Most Popular
1500 questions
226
votes
11 answers
Why do we need so many classes in design patterns?
I am junior developer among seniors and am struggling a lot with understanding their thinking, reasoning.
I am reading Domain-Driven Design (DDD) and can't understand why we need to create so many classes. If we follow that method of designing…
user1318496
- 1,817
224
votes
14 answers
Why aren't more desktop apps written with Qt?
As far as I know and have understood in my experience with Qt, it's a very good and easy to learn library. It has a very well designed API and is cross-platform, and these are just two of the many features that make it attractive. I'm interested to…
Dehumanizer
- 1,381
- 2
- 12
- 20
224
votes
10 answers
What is MVC, really?
As a serious programmer, how do you answer the question What is MVC?
In my mind, MVC is sort of a nebulous topic — and because of that, if your audience is a learner, then you're free to describe it in general terms that are unlikely to be…
Nicole
- 28,243
223
votes
6 answers
What exactly makes the Haskell type system so revered (vs say, Java)?
I'm starting to learn Haskell. I'm very new to it, and I am just reading through a couple of the online books to get my head around its basic constructs.
One of the 'memes' that people familiar with it have often talked about, is the whole "if it…
phatmanace
- 2,485
- 3
- 16
- 12
220
votes
11 answers
What is the advantage of little endian format?
Intel processors (and maybe some others) use the little endian format for storage.
I always wonder why someone would want to store the bytes in reverse order. Does this format have any advantages over the big endian format?
Cracker
- 3,263
220
votes
25 answers
New Team Lead - How to deal with a resentful former peer
I've been told that I am to be a team lead of an upcoming project. I've not ever been team lead before but the responsibilities are what you would typically expect, with revolving door of 3 to 4 other developers through the 8 or 9 months it takes to…
aceinthehole
- 2,388
219
votes
16 answers
My boss asks me to stop writing small functions and do everything in the same loop
I have read a book called Clean Code by Robert C. Martin. In this book I've seen many methods to clean up code like writing small functions, choosing names carefully, etc. It seems by far the most interesting book about clean code I've read.…
GitCommit Victor B.
- 2,041
218
votes
29 answers
What's the canonical retort to "it's open source, submit a patch"?
The danger of ever suggesting some feature on a product, especially open source, is that you'll get the response, "why don't you do it?".
That's valid, and it's cool that you can make the change yourself. But we know practically that products do…
Vincent Scheib
- 381
218
votes
5 answers
What are good habits for designing command line arguments?
While developing the application I started to wonder - How should I design command line arguments?
A lot of programs are using formula like this -argument value or /argument value. Solution which came to my mind was argument:value. I thought it is…
Filip Hazubski
- 2,053
218
votes
14 answers
"Never do in code what you can get the SQL server to do well for you" - Is this a recipe for a bad design?
It's an idea I've heard repeated in a handful of places. Some more or less acknowledging that once trying to solve a problem purely in SQL exceeds a certain level of complexity you should indeed be handling it in code.
The logic behind the idea is…
PhonicUK
- 1,037
218
votes
18 answers
How can one manage thousands of IF...THEN...ELSE rules?
I am considering building an application, which, at its core, would consist of thousands of if...then...else statements. The purpose of the application is to be able to predict how cows move around in any landscape. They are affected by things like…
David
- 4,449
217
votes
11 answers
Are exceptions as control flow considered a serious antipattern? If so, Why?
Back in the late 90's I worked quite a bit with a code base that used exceptions as flow control. It implemented a finite state machine to drive telephony applications. Lately I am reminded of those days because I've been doing MVC web apps.
They…
Aaron Anodide
- 5,703
216
votes
16 answers
When using the Single Responsibility Principle, what constitutes a "responsibility?"
It seems pretty clear that "Single Responsibility Principle" does not mean "only does one thing." That's what methods are for.
public Interface CustomerCRUD
{
public void Create(Customer customer);
public Customer Read(int CustomerID);
…
Robert Harvey
- 200,592
216
votes
16 answers
Do we really need OO languages to manage software complexity?
This is going to be a very non-technical, soft question and I am not sure if this is the right platform. But I am a beginning CS student so I hope you guys tolerate it.
In the first semester we were introduced to OOP concepts like encapsulation,…
steakexchange
- 1,579
216
votes
8 answers
Is it bad practice to use = tag in PHP?
I've come across this PHP tag = ?> recently and I am reluctant to use it, but it itches so hard that I wanted to have your take on it. I know it is bad practice to use short tags ?> and that we should use full tags instead, but what…
marco-fiset
- 8,791