Software Engineering Stack Exchange Community Digest

Top new questions this week:

Is the usage of random values in unit testing a good practice?

Having worked in complex solutions that had Unit Tests and Integration Test in the CI/CD pipeline, I recall having a tough time with tests that failed randomly (either due to random values being ...

unit-testing testing continuous-integration integration-tests xunit  
asked by Vinicius Scheidegger 51 votes
answered by Flater 62 votes

Interface implementation where one method body remains empty

I have producers that takes data A ,produce data B and send it public interface Producer<T>{ void produce(T data); void flush(); } public class DataBaseProducer ...

java design-patterns object-oriented  
asked by Johnyb 8 votes
answered by amon 23 votes

The Don't Repeat Yourself (DRY) principle in documentation

Dave Thomas, the author of the Don't Repeat Yourself principle said: DRY says that every piece of system knowledge should have one authoritative, unambiguous representation. Every piece of knowledge ...

documentation dry  
asked by iwis 6 votes
answered by Doc Brown 8 votes

Should a Car object be responsible for checking if it is able to run on certain Road objects?

I have 2 kinds of objects in my system, Car and Road. A Car can be of various types and have properties like tire, tire size, engine, etc. A Road can be of multiple types and have properties like ...

object-oriented single-responsibility typescript  
asked by NBA YoungCoder 5 votes
answered by JimmyJames 7 votes

Finding the right abstraction and minimising invalid states

I am writing a library to allow two people to play chess for a toy project. For what is worth, it is in C++. I have deemed useful to have a class named Move, which represents a move which needs to be ...

c++ object-oriented-design abstraction  
asked by user2891462 4 votes
answered by Doc Brown 1 vote

Requirements engineering done in Excel and Word?

Throughout this semester my classmates and I had to do the pre-coding(?) phase of a project (requirements and such) as part of our Software Engineering course. The way our professor had us do it seems ...

agile project-management requirements requirements-management excel  
asked by Segmentation fault 4 votes
answered by Doc Brown 5 votes

How can I write an enum for date periods where not all periods have a static number of months?

I have an enum that works very well to represents date periods and the number of months in those date periods: public enum StandardDatePeriod { ONE_MONTH(1), SIX_MONTH(6), ONE_YEAR(12), ...

java design design-patterns enum  
asked by James 3 votes
answered by Christophe 2 votes

Greatest hits from previous weeks:

How do you unit test private methods?

I am working on a java project. I am new to unit testing. What is the best way to unit test private methods in java classes?

java unit-testing  
asked by Vinoth Kumar C M 251 votes
answered by Adam Lear 307 votes

What is the difference between user requirements and system requirements?

From what I've read I believe user requirements are just the system requirements given in lay mans terms, is this correct? I'm specifically referring to the book "Software Engineering" by Ian ...

requirements users system  
asked by 5had3sofQu4rtz 7 votes
answered by Robert Harvey 12 votes

Why are interfaces useful?

I have been studying and coding in C# for some time now. But still, I can't figure the usefulness of Interfaces. They bring too little to the table. Other than providing the signatures of function, ...

interfaces  
asked by Pankaj Upadhyay 168 votes
answered by Eric Lippert 160 votes

Is it OK to have multiple asserts in a single unit test?

In the comment to this great post, Roy Osherove mentioned the OAPT project that is designed to run each assert in a single test. The following is written on the project's home page: Proper unit ...

unit-testing  
asked by Restuta 478 votes
answered by Jaco Pretorius 284 votes

Relationship between user story, feature, and epic?

As someone who's still new to agile, I'm not sure I completely understand the relationship or difference between user story, feature, and epic. According to this question, a feature is a collection ...

agile terminology  
asked by nivlam 129 votes
answered by Laurent Bourgault-Roy 110 votes

Choosing between Single or multiple projects in a git repository?

In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project: ...

java programming-practices version-control git maven  
asked by Johan Sjöberg 266 votes
answered by Christopher 231 votes

Difference between '\n' and '\r\n'

Yes yes, I am aware that '\n' writes a newline in UNIX while for Windows there is the two character sequence: '\r\n'. All this is very nice in theory, but my question is why? Why the carriage return ...

windows linux file-handling  
asked by sukhbir 120 votes
answered by Matt Ellen 25 votes

Can you answer this question?

Kubernetes cronjobs - triggering one after another completes - best practice?

I have a micro-service based system running in kubernetes bare-metal. The key aspects are: download data from a datasource nightly and add to a database get any new data from the database, run a ML ...

microservices cron kubernetes  
asked by wokiwiv 1 vote
answered by Rob 0 votes
You're receiving this message because you subscribed to the Software Engineering community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3