Skip to main content

Questions tagged [programming-practices]

Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.

35 votes
2 answers
13k views

Voyager 1 reached interstellar space in August 2012 and is the most distant human-made object in existence. Launched just shortly after its twin spacecraft, Voyager 2, in 1977, Voyager 1 explored the ...
94 votes
7 answers
18k views

In most languages it is possible to give priority to operators in an if statement based on order. I use this as a way to prevent null reference exceptions, e.g.: if (smartphone != null && ...
1 vote
1 answer
238 views

I'm developing firmware for control system. That system will collect data from different sensors (using ADC, GPIO, I2C temperature sensors, etc.), process this data and generate some control signals. ...
-1 votes
6 answers
1k views

There are techniques of proving program correctness under all possible cases, but that is a more advanced topic, for a later subject in your curriculum. I always had this doubt: Is it possible to ...
13 votes
7 answers
3k views

I’m a programming student, and I have a problem that’s holding me back. In my first year, we coded in Pascal, and back then, AI tools like ChatGPT weren’t as popular. But starting from my second year, ...
57 votes
4 answers
75k views

This question is subjective but I was just curious how most programmers approach this. The sample below is in pseudo-C# but this should apply to Java, C++, and other OOP languages as well. Anyway, ...
3 votes
11 answers
2k views

I am reviewing a proposed OO software architecture that looks like this: Base Foo Something Bar SomethingElse Where Base is a static class. My immediate thought was that every object in any class ...
25 votes
2 answers
18k views

I'm learning DDD and I'm thinking about throwing exceptions in certain situations. I understand that an object can not enter to a bad state so here the exceptions are fine, but in many examples ...
13 votes
4 answers
11k views

I sometimes find experienced programmers who will actively avoid using spaces in their filenames, opting to use underscores or camelCase instead. (i.e. /org map/attach jobs.cpp vs /org_map/...
0 votes
4 answers
282 views

So I just learned about Expression<TDelegate>. As a library author this really intrigued me; my libraries make extensive use of source generators to generate both high-performance code and code ...
69 votes
17 answers
24k views

Most of time while writing loops I usually write wrong boundary conditions(eg: wrong outcome) or my assumptions about loop terminations are wrong(eg: infinitely running loop). Although I got my ...
4 votes
3 answers
1k views

This is a bit experimentation from my part because I had written a lot of procedural code back in my school days hence I have trouble in thinking in OOP way i.e. to find proper classes and ...
1 vote
3 answers
3k views

Before I started using auto-implemented properties, I was taught that when assigning properties in the constructor (because of the potential of making a property read only), I should assign directly ...
-2 votes
1 answer
216 views

I'm working on an ASP.NET Core application that requires handling multiple types of a single entity. Each type has its own properties and validation rules, which has led to confusion and complexity in ...
-1 votes
1 answer
187 views

Recently, I spoke to an Engineering Manager about some work I've done: I had to implement a micro-service to a third party API contract (that they will call). Part of the requirement is to ...

15 30 50 per page
1
2 3 4 5
107