All Questions

Filter by
Sorted by
Tagged with
24
votes
7answers
19k views

When are enums NOT a code smell?

Dilemma I've been reading a lot of best practice books about object oriented practices, and almost every book I've read had a part where they say that enums are a code smell. I think they've missed ...
0
votes
0answers
6 views

Python generating payload and parsing payload

(Using python) I am looking to generate a bytes (or can be string that I convert to bytes) that is a message to send over TCP. The format is [Header][Length][Payload]. Within [Header] is a [...
19
votes
7answers
7k views

Can functional programming be used to develop a full enterprise application?

I am just beginning to learn Functional programming (FP). I come from a OOP world, where everything are objects, and most of them are mutable. I have a hard time wrapping around the concept that ...
1
vote
1answer
94 views

Rebuilding a legacy application : What about the data model?

I am currently rebuiling from scratch a product catalogue (to feed a shopping website). The existing legacy system is heterogenous, Long story short : The some products are stored in a FileMaker ...
0
votes
1answer
63 views

Database consistency for a distributed system

I'm working on a phone call monitoring project. The aim is to have one row in the calls table for each ongoing call. Each call instance may be updated by many different servers/threads as more ...
10
votes
3answers
1k views

Should we use a monorepo?

My team is planning a migration from subversion to git. We support 3 applications... 1 is primarily for internal users, 1 is for corporate "partners" and 1 is for end users. These applications share ...
3
votes
0answers
77 views

Refactoring nested if-else statement [duplicate]

I have an app where every object is checked based on various types of business rules. For this, i used multiple nested if-else statement which was done in one class. I am not happy with this situation ...
1
vote
0answers
21 views

Where should “query” business logic be placed in Domain-driven design?

System description This is a simple eCommerce application containing a Products inventory managed by an Admin. The Products in inventory/repository will show in the User App. Admin has the ability to ...
1
vote
2answers
65 views

Does API Rate Limiting Violate REST Methodology?

Information given here adequately explains the "Stateless" nature of REST. Even going as far as to say: For becoming stateless, do not store even authentication/authorization details of ...
1
vote
1answer
51 views

why java List interface implements 10 methods of(..) instead of just one varargs version? [duplicate]

I find it strange that in the List interface are defined 10 methods of(...) static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) instead of just @...
-3
votes
1answer
52 views

Good idea to use source control with my Lambda functions?

So, I have this legacy project I am starting to hump into with my team. This is a AWS Lambda Python application (a bunch of Micro-services that inform various front-ends). So, when I asked how they ...
0
votes
2answers
282 views

Lazy assignment of python variables

I have the following if statement and I feel it could be made simpler to read by breaking the terms up into their own named variables. if os.path.isfile(os.path.join(dirname, 'file.json')) \ or (os....
-2
votes
0answers
21 views

Timeline Estimation Tool using Machine Learning [closed]

I am looking to create a tool which takes in a dataset of previous project timelines, along with some other variables for each project in the data set (size, no. systems affected). The user should ...
0
votes
1answer
35 views

Additional method that compares two objects

I'd like to ask you if it's a good approach to have additional method in entity class that compares two objects? In my entity I have equals and hashcode @EqualsAndHashCode(callSuper = false, of = &...
0
votes
0answers
20 views

What is the best way to easily tamper with request data for purposes of vulnerability testing on a web site?

When developing web pages, it's often critical to test and verify that the application is protected against various forms of bad input, even if the front end offers some discouragement against the bad ...
-4
votes
4answers
163 views

Is enforcing code formatting standard that important in 2021 compared to 2005 with microservice architecture? [closed]

How would you evaluate the necessity of enforcing code formatting standat now contra code formatting in the yearly 2000s? Presumptions: Formating your code according to good practices is important. ...
2
votes
1answer
93 views

Publisher-Subscriber architecture with central registry

Problem description Publisher-Subscriber architecture with a central registry where agents can either promote their capabilities or search for a given capability. The project must be developed with ...
0
votes
2answers
75 views

Should the client handle unsolicited protocol events from the backend?

This is a very generic question not much related to any language/protocol. I have a desktop application and a backend that communicate via TCP. Most protocol events are paired -- request/response. For ...
-1
votes
0answers
39 views

Architectural design of similar classes

I wan to ask you what is better approach from architecture and development perspective. I have typical structure of the Order, where I can have multiple lines connected to the order. I can have ...
1
vote
3answers
117 views

How do binary numbers interact with the CPU and cause some action to take place?

EDIT: Perhaps what I am misunderstanding is that when it is said that the code we type gets turned into machine code of 0s and 1s. If these 0s and 1s are the abstracted representation of their ...
21
votes
10answers
15k views

When does SOAP make more sense than REST? [duplicate]

From my understanding of REST, the implicit assumption is that all operations are CRUD operations. Sometimes, you are not doing CRUD operations and are doing some more complex logic. In this case, is ...
1
vote
2answers
384 views

Unit Testing against Detailed Design, How to perform requirements based tests ISO 29119? Traceability to Unit Requirements?

According to the standards like ISO 29119 & ASPICE, the left side of the V-Model contains Requirements, Architecture Design and Detailed Design. On the test side, there are Unit/Component Test, ...
15
votes
7answers
2k views

What is “premature abstraction”?

I've heard the phrase being thrown arround and to me the arguments sound completely insane (sorry if I'm strawmaning here, Its not my intention), generally it goes something along the lines of: You ...
53
votes
9answers
6k views

Why do “checked exceptions”, i.e., “value-or-error return values”, work well in Rust and Go but not in Java?

Java has "checked exceptions", which force the caller of the method to either handle an exception or to rethrow it, e.g. // requires ParseException to be handled or rethrown int i = ...
5
votes
2answers
2k views

Technical documentation vs Software design documentation

I am trying to start a documentation about a class library that is already finished/developed. The purpose of the documentation is to be used by other developers in order to understand what kind of ...
8
votes
4answers
10k views

In C++, why shouldn't all function parameters be references?

I am currently learning C++ from the C++ Primer 5th edition. The book's chapter on functions states that only large objects (large being relative as standard library strings count, but "primitive ...
40
votes
9answers
6k views

Is memory management in programming becoming an irrelevant concern?

Background I revisited an old (but great) site I had not been to for ages - the Alioth Language Shootout (http://benchmarksgame.alioth.debian.org/). I started out programming in C/C++ several years ...
18
votes
3answers
16k views

Fastest Functional Language

I've recently been delving into functional programming especially Haskell and F#, the prior more so. After some googling around I could not find a benchmark comparison of the more prominent functional ...
18
votes
7answers
5k views

Is it necessary to read every single byte to check if a copied file is identical to the original?

I recently learned of a program called Total Commander. It's a Windows Explorer replacement and has its own stuff to copy files. To check whether the files are identical, instead of calculation a CRC, ...
1
vote
1answer
72 views

In which layer should I load views on a Clean(ish) architecture?

I am trying to organize my architecture following the clean architecture while using some common practices/frameworks. I'm writing in PHP, but have no problem with other languages. The flow of my app ...
0
votes
1answer
278 views

Enterprise Mashups. A good approach for .net

I'm in the middle of trying to talk our management into letting us do a portal that sits across the many, many systems that we use. I believe in using the best tool for the job so we have a good ERP, ...
5
votes
3answers
2k views

I want to overload a function with the same type parameter; what should I do?

I'm creating an API, and I want to overload a function for strip: QString MyClass::strip(); QString MyClass::strip(QRegularExpression open); QString MyClass::strip(QRegularExpression close); QString ...
12
votes
1answer
8k views

static globals and anonymous namespaces in C++

Why did C++ make any distinction between static globals (internal linkage) and symbols in an unnamed namespace (external linkage, but no way to refer to it from outside anyway), when introducing the ...
21
votes
6answers
3k views

Should a method be forgiving with the arguments that are passed in? [closed]

Suppose we have a method foo(String bar) that only operates on strings that meet certain criteria; for example, it must be lowercase, must not be empty or have only whitespace, and must match the ...
37
votes
5answers
3k views

How is defining that a method can be overridden a stronger commitment than defining that a method can be called?

From : http://www.artima.com/lejava/articles/designprinciples4.html Erich Gamma: I still think it's true even after ten years. Inheritance is a cool way to change behavior. But we know that it's ...
82
votes
4answers
8k views

What's the difference between “to” and “as” method name prefixes? [closed]

What's the difference between "to" and "as" method name prefixes like toList(), asList(), etc... When to use which when designing a method?
0
votes
0answers
39 views

Public API for Node JS applications

I am having some design headache writing a simple public API for my NodeJs application for consumption by things like an HTTP REST client while maintaining the freedom to easily add other types of ...
1
vote
2answers
61 views

add function to input of builtin python logger

For simplicity, assume my application logs only dictionaries. I want to add a step to Python logging for my application to prevent logging any dictionary with the key password, i.e., def clean_log(...
0
votes
2answers
139 views

Routing with micro services

I’ve decided to create my project following a micro service architecture. I have a products service and a reviews service. The products service essentially stores all information regarding a product ...
1
vote
1answer
61 views

How should verification of items in a database be recorded?

I am planning software which includes a relational database of people. For each person, data includes such things as current employer, job title and phone number. Since these are things which may ...
1
vote
3answers
128 views

Is creating an entity in a database considered to be business logic?

According to my (perhaps incorrect) understanding business logic includes saving/updating entities in the database, as well as connecting with any 3rd party API's or using services and should ...
0
votes
0answers
44 views

3-tier architecture diagram for e-commerce mobile application

I am working on a 3-tier architecture diagram for an e-commerce mobile application, mainly an Android application. Since I come from a strong technical background with little to no experience in ...
6
votes
1answer
3k views

How do you protect your WCF service?

sometimes a programmer comes up with a brilliant idea to protect his/her webservice created with Windows Communication Foundation. I would like to hear from you guys, which techniques do you use to ...
1
vote
1answer
36 views

Seeding Microservice data cache or materialised view

In dealing with distributed data across Microservices, common solutions I've read for sharing this data are: a) using a local cache where the cache is updated from domain events coming from the ...
1
vote
2answers
131 views

Collect Data of different Modules inside a Monolith

During my first attempt of implementing a project with the "Clean Architecture" I try to implementation a job portal where I came across a problem concerning the communication between (...
2
votes
2answers
77 views

Domain driven design model version

sorry for the long question, but I love DDD but there is a problem I can't seem to resolve. We have a problem when adding business rules to the aggregate root. Our architecture is mostly like this ...
0
votes
0answers
34 views

Ajax with interval vs WebSocket

I am currently developing a script for real estate which tries to find a match between your products and your clients needs. So I need to give the user a notification whenever a match is found, I am ...
0
votes
0answers
32 views

Should I use Odata with non-relational database?

I'm working on a project where I need to expose Odata endpoints to the clients, and we are using CosmosDB for our database. Most of the documents I found on implementing Odata with Cosmos DB actually ...
5
votes
1answer
251 views

Why Golang projects seldom use mocking library in testing?

New to golang and is now researching on how to do test in golang. I see that there are popular mocking library like gomock. However, at the same time, I see that large golang open source projects don'...
-1
votes
1answer
67 views

RuntimeException or DomainException or LogicException in loader function?

Assume I have module of classes: EntityLoader loads some entity by id. EntityValidator checks preconditions, input data before saving changes. EntityUpdater saves changes. EntityLoader has method ...

15 30 50 per page
1
2 3 4 5
1169