Questions tagged [mistakes]

16 questions
101
votes
61 answers

What's the most absurd myth about programming issues?

To put it another way... What is the most commonly held and frustrating misunderstanding about programming, you have encountered? Which widespread and longstanding myths/misconceptions do you find hard for programmers to dispel/correct. Please,…
Maniero
  • 10,826
  • 14
  • 80
  • 133
57
votes
42 answers

Most regrettable design or programming decision you made?

I would like to hear what kind of design decisions you took and how did they backfire. Because of a bad design decision, I ended up having to support that bad decision forever (I also had a part in it). This made me realize that one single design…
VNarasimhaM
37
votes
13 answers

Worst practices in C++, common mistakes

After reading this famous rant by Linus Torvalds, I wondered what actually are all the pitfalls for programmers in C++. I'm explicitly not referring to typos or bad program flow as treated in this question and its answers, but to more high-level…
Felix Dombek
  • 2,109
  • 1
  • 16
  • 24
29
votes
49 answers

What is the greatest design flaw you have faced in any programming language?

All programming languages are having their design flaws simply because not a single language can be perfect, just as with most (all?) other things. That aside, which design fault in a programming language has annoyed you the most through your…
Anto
  • 11,157
  • 13
  • 67
  • 103
22
votes
5 answers

How to correct a mistake in the test, after writing implementation

What is the best course of action in TDD if, after implementing the logic correctly, the test still fails (because there is a mistake in the test)? For example, suppose you would like to develop the following function: int add(int a, int b) { …
Attilio
  • 477
  • 3
  • 8
20
votes
30 answers

Which language features are considered harmful?

Please, explain why and list which languages have the (mis)feature implemented As far you know. Post what you consider a harmful feature, not what you dislike.
Maniero
  • 10,826
  • 14
  • 80
  • 133
15
votes
6 answers

How does a large company make rookie mistakes which leave security holes?

Sony was recently hacked with a SQL injection and the passwords of their user's was stored in plain text. These are rookie mistakes. In such a large company, how does this pass QA? How do they not have better teams than to know better than this? The…
richard
  • 3,325
  • 2
  • 25
  • 39
6
votes
7 answers

Should I charge a client for mistakes that I made?

After developing a website for a client, I've realized that the load time is too extreme, and some changes need to be made. The extreme load times are attributed to the bloated css/js frameworks that I've been using. Much of the code that was…
MikeTheCoder
  • 171
  • 1
  • 4
5
votes
2 answers

Common mistakes with javascript arithmetic

I've ran into several oddities using javascripts floating point arithmetic, but I can never recall them off the top of my head! What are some common mistakes when using JavaScript to do math?
Derek Adair
  • 521
  • 5
  • 13
5
votes
5 answers

How can I avoid mistakes using the same variable name again?

This isn't a rare case and occurs with me often and I spent countless time trying to debug the code. Latest example, this PHP code where I used $email for the parameter and for object as well. private function _mail( $email ) { if( filter_var(…
Shubham
  • 713
  • 7
  • 17
4
votes
5 answers

Minimising little coding mistakes

I make a fair amount of small mistakes when I code (things such as getting an angle bracket to the wrong direction). It adds a fair amount of time to my coding because I have to debug several times and iron out the dinks. Have you got any advice on…
Tom Squires
  • 17,695
  • 11
  • 67
  • 88
4
votes
2 answers

Programming IDEs feature to add a forgotten open parentheses?

I very often find myself in situations where I should have opened a parentheses, but forgot and end up furiously tapping the left arrow key to get to the spot I should have put it, and doing the same to get back to where I was - that, or removing…
mowwwalker
  • 1,117
  • 2
  • 12
  • 20
1
vote
4 answers

Must a variable contain an instance of a class if it invokes a method?

In the following link, the author states that We have already reasoned that ‘out’ is a static variable belonging to the class System. But now we can see that ‘out’ must be an instance of a class, because it is invoking the method ‘println()’. But…
1
vote
3 answers

How do you avoid looping mistakes? Mistakes that are not detected by systems

I had this crazy initialisation -- documentList = new ArrayList>(); which I intended to store a new map everytime in a loop but unfortunately put itself inside the loop. And you know the havoc. How do you detect such mistakes? I…
0
votes
2 answers

4 Months of Code Rewritten in 2 Days Team Dilemma

I recently had a project that I took me 4 months to do , I hit some very significant bugs that where impossible to track down. I said this code is absolute garbage and started from scratch, drank a monster and got cracking, people tried to distract…
1
2