All Questions

Filter by
Sorted by
Tagged with
52
votes
12answers
7k views

Is it common to have to iterate on a design due to overlooking problems with it?

When I'm designing a system for a program, I often make misjudgements that will prevent the design from either working, being maintainable, easy to use or all the above. This means I will usually have ...
-4
votes
1answer
56 views

Name of design pattern where type and instance classes are mirrored

I have used this design pattern in several entity-component designs. Now I want to introduce it to my team: It concerns a type-of relationship, where the instance structure and the type structure are ...
1
vote
3answers
187 views

Microservice integration with an external legacy system

We are decomposing a monolithic legacy system into microservices. As we do so, we can't completely remove reliance on some of the data in the legacy system that's required for each microservice. ...
-2
votes
0answers
31 views

Should you duplicate a dependency that is used on two use cases in the same class to simplify mocking it in unit test?

So my view model like this: final class ViewModel { let reloadData = reloadDataRelay.asSignal() private let reloadDataRelay = PublishRelay<DataEntity>() let closeSession = ...
3
votes
1answer
82 views

Design Error Codes Flow In Microservice

I'm designing an application in a micro-service architecture and I have some questions regarding error codes. Found some information about it (1,2) - but more focused on the responsibility of the ...
0
votes
0answers
48 views

Java Design Practice

I have gone through similar questions on this site and stackoverflow.com, but because I am still curious and want to cover all possible spectrums of this design, I am asking this question. I am ...
1
vote
4answers
327 views

What is the disadvantage of learning to code by doing?

It seems like the consensus is to learn by doing when it comes to programming, well that seems like the advice given to most beginners. How will beginners learn to write efficient code when they dive ...
1
vote
1answer
30 views

Pattern to combine orders from different systems

We have a legacy order system and a new order system that are both currently active. The legacy order system takes 'offline' orders still, the new order system handles 'online' orders but uses the ...
-4
votes
2answers
105 views

Malloc vs variable length array?

In general, should I use variable length arrays or malloc? In my specific case I am processing files of very short to very large sizes. Also if I compile on version MacOS 10.15, and then run on 10.13, ...
-2
votes
1answer
28 views

Advice on Feature Team Composition During Program Re-Org

I am coaching a client who is reorganizing their Program and could use some advice. Background: The client works for a large corporation with many different programs that all take their own approach ...
-3
votes
2answers
201 views

Why will it take approximately 2 years for Apple to transition Mac to ARM? [closed]

Why will it take that long to transition all Mac software to ARM according to Apple? I thought all they would need to do is to recompile the source code of their apps and rewrite SIMD code from intel ...
3
votes
5answers
192 views

Dealing with unwanted usages of a function

I am writing a function that I would not like to get called given a certain context and am wondering how best to convey that to possible users of the function. Assume, for exemplification, I am ...
0
votes
3answers
185 views

Is there an elegant way to structure consecutive short-circuited assignments?

The following code works and is clear, but it's also verbose. I suspect that there's a way to make it more terse, so that it could be skimmed quickly and it'd be more obvious what's happening. // The ...
1
vote
2answers
121 views

Collaborative graph exploration algorithm

Given a minimum spanning tree in an unweighted graph of (10 .. 500) vertices and (vertice_count .. 1000) edges. Each vertex can have up to 6 edges. Given K agents/bots/processes/etc.., all starting ...
2
votes
2answers
139 views

Designing distribued invoice number counting system

I m looking a way to design a system that can provide a linear and incremental counting for invoice number accros a scalable system. At this time, i have four pools of two servers (two pool for europe ...
0
votes
1answer
25 views

Using same flask server for HTTP and Websockets

I have a simple app which has the following architecture: front-end api/ back-end server.py api/ utils/ The app is already using http based server which is started/configured in the ...
18
votes
2answers
3k views

What is generator code?

Reading the Google C# style guide I came across this: Generators vs containers Use your best judgement, bearing in mind: Generator code is often less readable than filling in a container. Generator ...
-2
votes
0answers
28 views

should inversion of control throw duplicate template and terminate process

Inversion of control is reading .xmls files, these files are templates for the container. Input for IOC: Directory path, Then service iterate on all .xml in that directory and register them, each xml ...
1
vote
1answer
80 views

What is better way to track mistakes in error-prone part of a feature?

That is quite specific circumstances I've come across, and I somewhat struggle to find proper way how to approach this. I'm given a class written in swift-language, which has a control property, like ...
2
votes
3answers
90 views

In which order perform tasks from big backlog

I have a big backlog of tasks gathered during last years. And new tasks are added occasionally. All tasks have the same priority and tasks never expire over time. I was thinking of the reasonable way ...
0
votes
2answers
74 views

Design pattern to validate list of conditions

Background: I have a JSON object (named JSONConditionObject) which looks like the following, { "condition1":"value1", "condition2":"value2,value3 ..." ...
1
vote
3answers
126 views

What is use of “DPI” of a “image file” while viewing it on a display?

Display devices have their own PPI.Do these devices respect the DPI information of image file? If not, then what is use of"DPI" of image file? example: Image file- height: 1200 px width: 900 ...
1
vote
1answer
61 views

Array Declaration for Embedded System

I am developing a library for an embedded system with very little storage in C++. I would like to declare an array for a specific use in one function, however I am unsure if I should declare this in ...
0
votes
0answers
31 views

How to achieve both: clean (hexagonal) architecture with JPA goodies?

How do I achieve two things at the same time writing Java Spring Application: Clean Architecture JPA goodies (@Transactional, Optimistic Locking, dirty checking, etc.) I like the idea of database/...
-2
votes
0answers
33 views

What is the order of execution for useEffects in a component tree?

I'm trying to understand useEffect a bit more. I was tripped up a few months ago before realizing that useEffect hooks run after all other hooks. I would now like to know whether or not React will ...
0
votes
1answer
66 views

Asserting against Fakes

If I have a IRepository that Create,Update,Delete and Get an entity from the database and I do a fake for it with a public List inside it. If I am testing a command that is using it: is a bad ...
1
vote
1answer
80 views

Design Patterns: Factory Pattern Vs. getInstance Inside Abstract Class

I'm working on an app where we need to use different authentication flows depending on how the user is accessing the app. I want to make sure that there is only one instance of the authentication ...
0
votes
0answers
29 views

How do I map commits from a DVCS to the actual version numbers? [duplicate]

When using a centralized version control system such as SVN, where every commit acquires an auto-incremented number, it is relatively easy to track what version is released to production by simply ...
1
vote
2answers
74 views

Should an AggregateRoot not be a database Entity?

TLDR: Does using DB objects as my AggregateRoot lead to bloated God objects. In comparison to the issues I see in using separate DbObjects and DDD objects. I'm trying to bring together my ...
-2
votes
1answer
72 views

How to properly design solutions where encapsulated strategies may need to maintain state and communicate with one another?

I am designing an application whose main function is to trade cryptocurrency across different exchanges. I have defined Exchange as one of my core domain objects, with two public methods that revolve ...
-2
votes
1answer
69 views

should I design a simplified version of a use case and implement it, or should I stick to the exact use case while designing?

I know that user stories and use cases are written by a customer not the development team alone. And I know that on each iteration the development team picks a number of requested use cases and ...
-6
votes
3answers
90 views

How compiled code works?

I'm just curious, I'd like to understand how compiled code works from the moment I run an executable file. Some time ago I had found a very well written article which helped, using a hex editor, to ...
0
votes
1answer
66 views

Can I put domain services inside domain entities?

Say I have a domain entity User: class User { constructor (username, email, password) { this.username = username this.email = email this.password = password } } Now, all users need a ...
2
votes
4answers
264 views

How do I deal with the fact that I am forced to make helper functions public for testing purposes?

I've encountered several scenarios that require me to mock certain helper methods because they call outside resources. As a result, I'm forced to convert all my helper methods from private into public....
1
vote
4answers
113 views

Should you validate route parameters or let them fail with a 404?

So this is an example endpoint to fetch one user by its username [HttpGet("{username}")] public async Task<ActionResult<object>> GetUser([FromRoute] string username) { // ... ...
1
vote
1answer
79 views

What are the main aspects to consider in the design of a customised pattern?

(I’m trying to phrase this question to be as specific as it can get, but since I’m mostly interested in high-level design it might be a bit still too vague. Let me know if I need to edit it or specify ...
-5
votes
1answer
40 views

Should code be refactored to be more unit testable or should a framework like PowerMock be used?

Assume there's some code that's already in production that needs some unit testing. Generally speaking, would you want to refactor this code that's already in production by adding things like adding ...
-3
votes
1answer
36 views

Strategies in cloud migration [closed]

A few months ago I found a presentation with slides about the benefits of migrating to the cloud. I think that the presentation was maybe quite old but I think that it started with arguing that ...
0
votes
1answer
96 views

What is a not well-defined interface?

I keep reading about "well defined interfaces", as here, here or here, specially when talking about microservices. What's an example of the opposite, an interface that is not well-defined?
-2
votes
3answers
55 views

How should I store file history in a MySQl data?

I am creating a web app with JS and PHP where users can edit a file similar to a text editor such as notepad. I've decided to use a database to store these files. One of the primary functions of a ...
-6
votes
0answers
47 views

How to add Premium Features to Open Source Software? [closed]

I developed a Open Source Software in Electron and would like to add some paid functionalities to it, which target large companies. How could I add "Premium Features" to an Open Source ...
8
votes
3answers
348 views

Being great in one language when you need to know many?

My job requires me to know how to work with Ruby, Python, Bash, Puppet, Golang, MySQL and occasionally Scala and PHP. Yes I really do have projects including most of these and there are weeks where I ...
1
vote
0answers
18 views

Design REST API for Mobile Apps with Unregister Users

I'd like to know some best practices on how to build rest API for a backend which shall communicate with a mobile app by anonymous users. This is the scenario with details: I'm building a demo library ...
-5
votes
0answers
27 views

How do I connect python script with html?

I want to connect simple python code to HTML, so it's executing the function accordingly to the user's input. Then, it returns the output of that function back to HTML. More specifically, I want my ...
3
votes
5answers
223 views

Should I create different classes for the same technical object but different business usages

I know my question sounds a bit weird so I will try to explain my issue with examples. In my application, I have two types of business objects : Shops and Customers for example. Both of them can be ...
-3
votes
1answer
16 views

Implemented appstore/integrations in an SaaS application

What is the best way to implement a app store in a SaaS application? For example, say you have an ERP application and you want to allow external accounting systems to integrate into your application. ...
-2
votes
3answers
113 views

At what point a shopping cart can become deemed abandonded?

Let's take Shopify. They consider a shopping cart abandoned right after a customer has entered their email at the 1st step of checkout. I think it's wrong because a customer might need at least 5-10 ...
33
votes
10answers
9k views

How do app developers protect their app when a user decompiles it?

I've been trying my hand at building apps with Flutter and Dart. I noticed in my apps that if someone decompiled my app they could access a whole lot of things I didn't want them to access. For ...
0
votes
1answer
32 views

Photo Library Service: What should be right way of photo library using AWS S3 and Java

I want to make a service that is supposed to upload Photos in S3 and make them available using a link. I have few design plans for my service. PLAN 1: Upload photo to my REST API which will update ...
1
vote
2answers
185 views

Differences between NULL and zero-length in database

My project uses Microsoft SQL Server Express 2019 as data-engine and potentially will be migrated to other data-engine. The database used in the vb.net Desktop application. Tables usually contain an ...

15 30 50 per page
1
3 4
5
6 7
1139