Most Popular
1500 questions
54
votes
24 answers
Why do some programmers hate the UI part of the development?
Lots of programmers that I've met always says that "He is not a UI guy." The fact is that development nowadays, whether web, Windows, Linux, OSX, or any other type of development now comprises software with a good-looking UI. Why do so many…

zero95teen
- 323
54
votes
5 answers
How to deal with fear of taking dependencies
The team I'm in creates components that can be used by the company's partners to integrate with our platform.
As such, I agree we should take extreme care when introducing (third-party) dependencies. Currently we have no third-party dependencies and…

robinwit
- 650
54
votes
11 answers
Agile Practices: Code Review - Fail the review or raise an issue?
At the end of a 2 week sprint and a task has a code review, in the review we discover a function that works, is readable, but it's quite long and has a few code smells. Easy refactor job.
Otherwise the task fits the definition of done.
We have two…

Erdrik Ironrose
- 4,846
54
votes
3 answers
What's the difference between a subclass and a subtype?
The highest rated answer to this question about the Liskov Substitution Principle takes pains to distinguish between the terms subtype and subclass. It also makes the point that some languages conflate the two, whereas others do not.
For the…

tel
- 569
54
votes
8 answers
Term (or "pattern"?) for "Do something if it's not already done"
Sounds pretty basic, I know, but I recently had a colleague tell me that a method called startHttpServer is too complicated to understand because it only starts the server if it's not already running. I find I get into trouble when I respond with,…

John Calcote
- 599
- 4
- 4
54
votes
11 answers
"Easy to reason about" - what does that mean?
I have heard a lot of times when other developers use that phrase to "advertise" some patterns or developing best practices. Most of the time this phrase is used when you are talking about benefits of functional programming.
The phrase "Easy to…

Fabio
- 3,126
54
votes
7 answers
Is it bad practice to not delete redundant files right away from VCS but instead mark them as "To be deleted" with comments first?
I wanted to know if the way I deal with source files that need to be deleted from version control could be regarded as bad practice.
I want to explain it to you based on that example:
I recently got very angry because I had to tediously sort out…

Bruder Lustig
- 655
54
votes
6 answers
Function inadvertently invalidates reference parameter - what went wrong?
Today we found out the cause of a nasty bug that only happened intermittently on certain platforms. Boiled down, our code looked like this:
class Foo {
map m;
void A(const string& key) {
m.erase(key);
cout << "Erased: "…

Nikolai
- 561
54
votes
7 answers
What happened to database constraints?
When I review database models for RDBMS, I'm usually surprised to find little to no constraints (aside PK/FK). For instance, percentage is often stored in a column of type int (while tinyint would be more appropriate) and there is no CHECK…

Arseni Mourzenko
- 135,365
54
votes
6 answers
Business logic: Database vs code
I'm a student of systems engineering, and all my teachers and friends (that actually work in the area) say that it is better to have as much logic as possible implemented in the database (queries, views, triggers, T-SQL, etc.). I think that it's…

Larizza Tueros
- 714
54
votes
8 answers
Is the use of NoSQL Databases impractical for large datasets where you need to search by content?
I've been learning about NoSQL Databases for a week now.
I really understand the advantages of NoSQL Databases and the many use cases they are great for.
But often people write their articles as if NoSQL could replace Relational Databases. And there…

Leo Lindhorst
- 862
54
votes
5 answers
What is the exact ingenuity of Unix pipe
I have heard the story of how Douglas Mcllroy came up with the concept and how Ken Thompson implemented it in one night.
As far as I understand, pipe is a system call which shares a piece of memory between two processes where one process writes and…

aoak
- 671
54
votes
7 answers
Referencing database values in business logic
I guess this is another question about hard coding and best practices. Say I have a list of values, lets say fruit, stored in the database (it needs to be in the database as the table is used for other purposes such as SSRS reports), with an ID:
1…

Kate
- 643
54
votes
5 answers
What's the use of .Any() in a C# List<>?
I've been discussing this with colleagues, and we couldn't figure out what the use is of .Any for any given List<>, in C#.
You can check the validity of an element in the array like the following statement:
if (MyList.Any()){ ...} //Returns true or…

Gil Sand
- 2,173
54
votes
2 answers
REST API - Should API Return Nested JSON Objects?
When it comes to JSON APIs is it good practice to flatten out responses and avoid nested JSON objects?
As an example lets say we have an API similar to IMDb but for video games. There are a couple entities, Game, Platform, ESRBRating, and…

greyfox
- 869