All Questions

0
votes
0answers
8 views

How to split my product into multiple variants

I have a product which is a combination of mobile apps and webapi . I am working web API. The webapi part created earlier and it build with layered model. Even thought this does not have business ...
0
votes
1answer
21 views

Protobuf: compile specification once, use generated code everywhere?

Once written, a protobuf specification can be compiled using protoc to a variety of implementations in different languages (e.g. python, c++, go). That's great. But to compile that generated code, you ...
0
votes
0answers
7 views

Using the adapter design pattern for a news application microservice

I am currently developing the backend for a news application, which fetches news from various aggregators (e.g. Feedly). I thought this qualified as a good use case for the adapter design pattern, so ...
0
votes
1answer
20 views

Dependency injection - how can I design this situation with one composition root?

There is this article that says: A Composition Root is a (preferably) unique location in an application where modules are composed together. Only applications should have Composition Roots. ...
-2
votes
1answer
16 views

How to organize my test functions?

I'm writing a software application of a few thousand lines of code (in Python), and in order to keep the whole thing together, slowly but certainly the need for unit tests (and later, other types of ...
0
votes
0answers
22 views

Extends for feature (aka mix-in) in Scala is bad practice, isn't it?

In Scala, sometimes class extends a trait to provide some methods to inside extending class. ScalaTest import org.scalatest._ class ExampleSpec extends FlatSpec with Matchers { ... Matchers trait ...
0
votes
0answers
13 views

Dictionary Coding for OLAP

Let's say we have a generic table like below: id, name, price, quantity 20 product_x 5,00 100 20 product_y 5,00 100 20 ...
0
votes
2answers
75 views

How do you deal with comprehending abstraction in code?

When looking at a new codebase I like to start from a bottom-up approach. Where I comprehend one file and then move up to the next abstraction. But often times I find myself forgetting what the ...
0
votes
1answer
25 views

Where to apply multi-tenant logic (ASP.Net Core)?

I'm developing a multi-teant SaaS application in ASP.NET core mvc and I was wondering what the general approach is to applying tenant logic in a shared database scenario (TenantId for each entity). ...
1
vote
3answers
50 views

Class methods that are never called and everything handled by the internals of the class itself

I have a class in my code and I'm not sure if the design I've implemented is correct or if there is a better way to do it. The class I have created have important useful methods that is used by each ...
-3
votes
0answers
13 views

Sharing a ReactJS component privately with others in the same Team

I just created a ReactJS component which consists basically of 2 files: /path/to/components/FancyTextInput/FancyTextInput.js /path/to/components/FancyTextInput/FancyTextInput.scss FancyTextInput.js ...
0
votes
0answers
14 views

Separate bounded context or not? Employee will have an Account

In Vaugh Vernon's book "Implementing Domain Driven Design", the team separated the Identity and Access from Collaboration context because the team realized they are being stuck on the "role-based" ...
2
votes
1answer
47 views

Why doesn't Python3 optimise variables assignments

I just read this SE question about parameter optimisation. I wondered if Python3 bytecode compilation does the same optimisation and this appeared not to be the case: >>> def f(a): return 2*...
-5
votes
0answers
15 views

User management for a web portal with few applications

My company provides our clients a web portal where some applications are gathered. For now we just include applications developped by us, but we are in the process of including some other tools (third ...
-2
votes
1answer
13 views

Filtering the Data and summing on one field Should I do in JAVA or write query with aggregate query with filter clause?

I have one table in which there would be millions of records. The requirement is to the records based on the condition and then total on one of the fields. Selectivity would be around approx 50. ...
-3
votes
0answers
43 views

Compelling reasons to open-source internal service of a highly recognized brand by just dumping the sources? [migrated]

Assume you are considering open-sourcing a large service of your internal enterprise infrastructure. Let's say you have the resources required to ensure the minimal requirements are met: the licenses ...
0
votes
2answers
29 views

Logic to create/update values while maintaining their uniqueness (in a multi-threaded environment)

Assume I have a dumb repository which stores numbers (for sake of this example). It is dumb because it may only create new record, update specified record and list all the existing records - no other ...
2
votes
3answers
298 views

What is a good place, in OO, to store a string that is used many places?

I have a string that is used in a few places. string portalLoginPath = $"{Request.Scheme}{Uri.SchemeDelimiter}{Request.Host}/Account/Login"; I was thinking of creating a static class with a string ...
0
votes
1answer
21 views

Setting up data for integration tests: using SQL queries or APIs calls

We a have test repo outside of the app repo and we can generate data by either having direct SQL queries or through API calls (http requests). We've been entertaining the idea of switching over to ...
-1
votes
0answers
28 views

Failure handling and response code mapping in a (HTTP/REST) service architecture in Java

TLDR: I am looking for established standards to deal with translating error codes from a downstream remote call to an error code handed out upstream at a service interface, that allows to easily know ...
0
votes
2answers
57 views

How to scale horizontally a microservice that holds a database

Imagine a 'User' microservice that holds all user's related logic, and this microservice holds a database. How could you scale this microservice horizontally and keep consistency ? In fact, if you ...
0
votes
1answer
58 views

Difference between failed and canceled task

In case we hav functions (f_1,....,f_n) which runs in this order somewhere in the future. I would like to define a relationship between those functions such that if f_i failed due to expection then ...
4
votes
5answers
306 views

Should we be documenting our Scrum Retrospective feedback before the Retrospective meeting?

Our Scrum master wants us to document our feedback for the iteration before our Retrospective. Her argument is that she wants us to have time to document our feedback. Another guy on the thinks that ...
0
votes
2answers
67 views

Instantiate a class with two parents

Suppose I have TypeA and TypeB classes, which are totally different, but both hold an list of TypeC objects. Class TypeA { List<TypeC> cs; } Class TypeB { List<TypeC> cs; } Throuth all ...
0
votes
1answer
32 views

Design decision for a cross-platform text editor that optimized for speed

On designing a cross-platform text editor that optimized for speed - I heard atom.io uses node.js, would it be slow? I heard sublime text uses C++, would it lots of effort to be cross platform and ...
4
votes
2answers
505 views

Clean Code: Another question about boolean as function parameters [duplicate]

I had a discussion, if the code for calling information from a database can have a switch to show also deleted entries. Simplyfied the code (C#) look like this: void searchEntry(string searchValue, ...
0
votes
2answers
58 views

Are support arguments passed to functions that help skip certain checks a trap?

Often times, through my framework's importing side of things, I have access to certain data that functions I'm about to use will certainly need themselves. I have "resolvers" that these said ...
-1
votes
0answers
45 views

How to retrieve values before actually creating them but after defining them?

Doing the impossible you might say, right? Although there is this use case where I can use such functionality very effectively. Let me try to explain you the use case to you. The use case For an ...
-3
votes
0answers
69 views

Encoding information in object names

I work with a system that has some lists of objects that can have arbitrary, user defined names, and each object has some properties that can be configured. In the IDE for the system the objects are ...
0
votes
2answers
28 views

Reuse domain entity logic

Usually the domain logic should be contained in the domain entity, rather than being put in specialised external classes called from the entity. This is good to prevent that somebody comes later, ...
0
votes
1answer
40 views

Pseudo-Factory Abstract Class

So I have a requirement for something like this: The client shouldn't be aware of how the actual classes are implemented or constructed. The classes implement a common interface So I used Factory ...
0
votes
0answers
9 views

React Hooks and observables/Rx.js for writing a production ready ReactRX app

I've been learning about observables and how they come up with different flow of writing apps. My goal is to find the best fit for writing React app. I'm experienced React dev familiar with Redux ...
4
votes
7answers
137 views

Unit test which asserts that current thread is the main thread

The question is does it make sense to write a unit test which asserts that the current thread is the main thread? Pros/cons? Recently I've seen the unit test which asserts the current thread for the ...
1
vote
1answer
93 views

How to avoid code duplication in two similar projects?

We have a website with a lot of functionality, and we now start another one, which should have a lot of common code with the first one. What would be the best approach to avoid code duplication? ...
0
votes
1answer
12 views

How to ensure that every log event will be delivered to the GrayLog

In our applications we traditionally log events locally into the logging files. As our applications are distributed on multiple server instances, searching for particular events are complicated and ...
1
vote
0answers
15 views

Multiple apk's on Play Store for multiple feature testing

We have different teams working on multiple features. The feature release dates for each team are simultaneous. I want to create a mechanism so that each team is able to push an APK to the Play Store ...
-4
votes
1answer
38 views

CMS or Build from Scratch [on hold]

What is the main criteria to decide to build a web application using CMS framework like Drupal, WordPress or from scratch? Few days ago, I am having a discussion with my management level about to ...
4
votes
5answers
235 views

Is copy and paste the head of for-loop (e.g.:for(let i=0;i<something.length;i++)) violating DRY principle?

For example, in my project, I often found some head of for-loop appears many times, eg: for(let i=0;i<SharedData.students.length;i++){ SharedData.students[i].something=..... } if(isReset){ ...
-2
votes
0answers
18 views

Is it good idea to embed short-lived access token (bearor token) in HTTP header and pass it over url as qr-code string for login?

I have thought back of my mind to embed short-lived access token in HTTP header and pass it over url so that everytime when a mobile user scans the ID card (having url encoded string for example http:/...
-2
votes
0answers
9 views

Pattern for unsubscribing from RxJS subscriptions

I was reading Ben Lesh's article here: https://medium.com/@benlesh/rxjs-dont-unsubscribe-6753ed4fda87 I am wondering - is the following pattern sufficient? https://gist.github.com/ORESoftware/...
0
votes
1answer
40 views

When is it a good idea to test a build with both clang and gcc?

I am peeking through the code of torsocks where as you'll notice, the .travis.yml file instructs Travis CI to test against both clang and gcc. compiler: - clang - gcc I'm still learning and ...
0
votes
1answer
49 views

Removing an Object from its holder

Let's assume I have three classes, as follwing: class A { Array<B> bs; createB() { b = new B(); this.bs.insert(b); return b; } } class B { Array<C> cs; createC() { c = new C(); ...
2
votes
0answers
40 views

Bringing a large, complex legacy project under git control

I'm a newbie with respect to git, but not to version control in general — I've been using CVS and Subversion for years. I've read both the Progit and O'Reilly (Version Control with Git) books, ...
2
votes
4answers
89 views

Putting extra code review burden on team because of refactoring

I am reading Refactoring by Martin Fowler, and working in the patterns suggested into my coding. This has caused me to put up two code reviews for my service which are significantly lengthy, which are ...
0
votes
0answers
40 views

How to Handle Names That Might Change?

I work in an enterprise environment where most of our work involves adding custom integrations to a large, existing third-party system (purchased). Recently, we needed to attach a new attribute to an ...
-1
votes
1answer
20 views

How to use pull requests for code reviews with a shared remote repository?

I'm looking to improve the processes in our team. We currently are pretty informal: "I've finished feature X. Can you review my code?". This is not scaling up well now that we're busier - it's hard ...
-2
votes
0answers
54 views

How to predict a dying open source project? [on hold]

Some IT projects die. Even some open source projects die. What are the telling signs of this happening when choosing a library? The point is to avoid adding a dependency on something that soon will ...
0
votes
2answers
54 views

Should I always allocate QObject and derived classes to the heap?

I was in #Qt irc channel, and I showed a small snippet of my code in a style that I heavily rely upon. It looks like this: /* Get Reply from Server */ QPointer<QNetworkReply> reply; { ...
0
votes
1answer
82 views

Will FSM be a good solution?

At work, we are creating an android app. We have a business logic module for talking to an API for CRUD operations. The app I'm working on, the UI module, speaks to the business logic module to create,...
0
votes
1answer
68 views

What determines the internal order of a Python set?

When I read about sets in Python, it is always mentioned that they return items in an arbitrary/random order. What exactly causes this "randomness"?

15 30 50 per page