Most Popular
1500 questions
65
votes
16 answers
Are first person comments distracting and unprofessional?
I just found myself writing the following comment in some (archaic Visual Basic 6.0) code I was writing:
If WindowState <> 1 Then
'The form's not minimized, so we can resize it safely
'...
End if
I'm not sure why I subconsciously use "we"…
dlras2
- 2,310
65
votes
21 answers
"Don't do programming after a few years of starting career". Is this a fair advice?
I am a little experienced developer having approximately 5 years experience in PHP and somewhat less in Java, C# and trying to learn some Python nowadays. Since the start of my career as a programmer I have been told every now and then by fellow…
Yasir
- 1,239
- 3
- 13
- 14
65
votes
7 answers
When does pair programming work? When to avoid it?
Rather than slavishly pair program all the time, we use pair programming selectively on our team. I think it works best in the following circumstances:
Ramping up brand new team members on a project (instead of letting them wade through…
Paddyslacker
- 11,080
65
votes
12 answers
Why isn't functional programming more popular in the industry? Does it catch on now?
During my four years at university we have been using much functional programming in several functional programming languages. But I have also used much object oriented programming to, and in fact I use object oriented languages more when doing my…
Jonas
- 14,867
65
votes
23 answers
Why can't there be an "universal" programming language that serves all purposes?
why not combine the best features of the all existent programming languages and fit it in a universal programming language?
killown
- 1,466
- 3
- 15
- 18
65
votes
5 answers
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 injected or because of the async nature of the process…
65
votes
9 answers
Why do "checked exceptions", i.e., "value-or-error return values", work well in Rust and Go but not in Java?
Java has "checked exceptions", which force the caller of the method to either handle an exception or to rethrow it, e.g.
// requires ParseException to be handled or rethrown
int i = NumberFormat.getIntegerInstance().parse("42").intValue();
Other,…
Heinzi
- 9,748
65
votes
31 answers
Why isn't software as reliable as a car?
I had a user ask me this question. We know that cars break down, but that's because of something physical (unless software is involved!).
I tried to answer that software is a much younger industry, but the user countered with "didn't the automobile…
Alex Angas
- 681
65
votes
12 answers
Having a flag to indicate if we should throw errors
I recently started working at a place with some much older developers (around 50+ years old). They have worked on critical applications dealing with aviation where the system could not go down. As a result the older programmer tends to code this…
Nicolas
- 707
65
votes
12 answers
How to develop excellent software with agile methods?
The Kano model of customer satisfaction defines different classes of product features. Among them are
Must-be qualities: If these are not implemented the customer will not accept the product.
Attractive qualities (delighters): Features that the…
Frank Puffer
- 6,429
65
votes
9 answers
Should one check for every little error in C?
As a good programmer one should write robust codes that will handle every single outcome of his program. However, almost all functions from the C library will return 0 or -1 or NULL when there's an error.
It's sometimes obvious that error checking…
Derek 朕會功夫
- 509
65
votes
11 answers
Does path coverage guarantee finding all bugs?
If every path through a program is tested, does that guarantee finding all bugs?
If not, why not? How could you go through every possible combination of program flow and not find the problem if one exists?
I hesitate to suggest that "all bugs" can…
user155884
65
votes
7 answers
Is a 1 < 10 comparison less expensive than 1 < 1000000?
I just used ~1 billion as the count for a z-index in CSS, and was thinking about the comparisons that must go on. Is there a difference in performance on the ALU level in comparisons between very large numbers vs very small ones?
For example, would…
J.Todd
- 3,823
65
votes
2 answers
Are Git branches, in fact, "homeomorphic endofunctors mapping submanifolds of a Hilbert space"?
As we all know:
Git gets easier once you understand branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space
Which seems like jargon, but on the other hand,
All told, a monad in X is just a monoid in the category of…
Larry OBrien
- 4,967
65
votes
12 answers
Reconciling the Boy Scout Rule and Opportunistic Refactoring with code reviews
I am a great believer in the Boy Scout Rule:
Always check a module in cleaner than when you checked it out." No
matter who the original author was, what if we always made some
effort, no matter how small, to improve the module. What would be…
t0x1n
- 955