Many people get into programming because programming is fun. At least in the beginning. After some time doing it professionally, programming is no longer fun, often just hard work. Sometimes we develop bad habits along the way to make it fun again. Some bad habits of programmers are well known, for example the "I fix that in a second" habit, the "reinvent the wheel" practice or the "all code except mine is crap" attitude (which often leads to "I will re-write the entire program from scratch" syndrome). There are things which a programmer should never do. What is the worst programmer habit?
|
migrated from stackoverflow.com Jun 22 '11 at 6:54
closed as not constructive by ChrisF♦ Jun 22 '11 at 8:48
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
|
Having contempt for the end-user is the worst of the worst in programmer habits. |
|||||||||||||||||||||
|
|
For me the most common one is: "I will fix that small bug later....", where later=never Another one: Commenting out a piece of code 'just in case', instead of making use of SVN/GIT" |
|||||||||||||
|
|
Failure to simplify and refactor This is IMO by far the most detrimental of all programmer habits. Many programmers are quite smart so when they write an application they can keep all the "complexity" in their head while they're writing it. The problem is when that code needs to be revisited by them or someone else. Wrapping your head around a complex solution that was incrementally built but never simplified can be incredibly hard. Good code is a simple as it can be, but not simpler. Good programmers refactor their code continously to keep the conceptual integrity of the solution intact. |
||||
|
|
|
Just a few:
|
|||||
|
|
Lack of humility. In my experience those considering themselves much better than their peers usually aren't. Knowing that makes you humble. |
|||||
|
|
Assuming things.
Do not assume. Test/assert/prove your assumptions. i.e. Ignorance and false sense of "knowing it". Lack of humility and not understanding that it is what you do not know, think or plan for that bites you. |
||||
|
|
|
My worst habit is underestimating effort required. "Oh I think I can have that implemented by the morning..." |
||||
|
|
|
-"I am not a tester" And then those guys tend to write buggy code that is not testable. |
||||
|
|
|
Copy-pasta. Badly designed code can be understood and refactored. Copy-pasted badly designed code has to be diffed and the differences understood before it can be refactored. |
||||
|
|
|
Assuming that one is smarter than ones peers. |
||||
|
|
|
||||
|
|
|
"Damn I'm not catching that case, better write another if-test..." Instead of well thought algorithms. |
||||
|
|
|
||||
|
|