Most Popular
1500 questions
153
votes
14 answers
Did the Gang of Four thoroughly explore "Pattern Space"?
Ever since I first learned about the Gang of Four (GoF) design patterns, at least 10 years ago, I am having the impression that these 23 patterns should be only a small sample of something much larger which I like to call the Pattern Space. This…
Frank Puffer
- 6,429
153
votes
9 answers
Is there any "real" reason multiple inheritance is hated?
I've always liked the idea of having multiple inheritance supported in a language. Most often though it's intentionally forgone, and the supposed "replacement" is interfaces. Interfaces simply do not cover all the same ground multiple inheritance…
Panzercrisis
- 3,173
153
votes
1 answer
What are the advantages and disadvantages of cryptographically signing commits and tags in Git?
So someone peer reviewed my work, and he told me that I should always sign my commits and tags cryptographically. When asked why, he didn't know to explain it to me, and said "It's just a good thing to do".
Trying to avoid an obvious chimpanzee…
Madara's Ghost
- 8,887
152
votes
6 answers
Why hasn't a faster, "better" language than C come out?
With all the new "modern" languages out today, how is it that C is still heralded as the fastest and "closest to the machine"? I don't really believe in there ever being only one correct way to do things, and C has been around for a really long time…
Jason
- 2,037
152
votes
10 answers
Should we define types for everything?
Recently I got into a problem with the readability of my code.
I had a function that did an operation and returned a string representing the ID of this operation for future reference (a bit like OpenFile in Windows returning a handle). The user…
Ziv
- 3,016
152
votes
12 answers
Is this a violation of the Liskov Substitution Principle?
Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure the option to close a started ProjectTask is never…
Paul T Davies
- 3,154
152
votes
13 answers
Is it just me or is this a baffling tech interview question?
Background
I was just asked in a tech interview to write an algorithm to traverse an "object" (notice the quotes) where A is equal to B and B is equal to C and A is equal to C.
That's it. That is all the information I was given.
I asked the…
Matt Cashatt
- 3,315
151
votes
7 answers
Working on a branch with a dependence on another branch that is being reviewed
How does git help deal with the scenario below:
I have a task broken down into 2 parts: backend task and frontend task. I make a pull request to merge the backend changes and wait for it to be merged (and address feedback). While waiting, I can't…
sul4bh
- 1,701
- 2
- 11
- 11
151
votes
16 answers
What do you do when code review is just too hard?
OK so a lot of code review is fairly routine. But occasionally there are changes that broadly impact existing complex, fragile code. In this situation, the amount of time it would take to verify the safety of the changes, absence of regression, etc.…
Bradley Thomas
- 5,100
151
votes
11 answers
How can I find a good open source project to join?
I just started working a year ago, and I want to join an open source project for the same reasons as anyone else: help create something useful and develop my skills further.
My problem is, I don't know how to find a project where I'll fit in.
How…
Pops
- 4,113
151
votes
14 answers
What is the ideal length of a method for you?
In object-oriented programming, there is of course no exact rule on the maximum length of a method , but I still found these two quotes somewhat contradicting each other, so I would like to hear what you think.
In Clean Code: A Handbook of Agile…
Spring
- 1,743
151
votes
5 answers
What are the key points of Working Effectively with Legacy Code?
I've seen the book Working Effectively with Legacy Code recommended a few times. What are the key points of this book?
Is there much more to dealing with legacy code than adding unit/integration tests and then refactoring?
Armand
- 6,508
150
votes
8 answers
Are bad programming practices typical within the software industry?
I just started my first job as a software developer over a month ago. Everything I have learned about OOP, SOLID, DRY, YAGNI, design patterns, SRP, etc. can be thrown out the window.
They use C# .NET Webforms and do almost everything within the Code…
Grim
- 903
- 2
- 7
- 10
150
votes
17 answers
Coding standard for clarity: comment every line of code?
I've worked in shops that produce life critical software and I've dealt with commenting rules that were meant to keep the code readable and potentially save lives. In my experience though the requirement becomes a brain dead chore to be ticked off…
candied_orange
- 108,538
150
votes
14 answers
Does auto make C++ code harder to understand?
I saw a conference by Herb Sutter where he encourages every C++ programmer to use auto.
I had to read C# code some time ago where var was extensively used and the code was very hard to understand—every time var was used I had to check the return…
Mircea Ispas
- 1,633