Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
2  
Possible duplicate of stackoverflow.com/questions/350861/… – Flimzy Jun 22 '11 at 6:20
19  
The worst programmer habit is spending too much time on internet Q&A sites asking inappropriate questions. – paxdiablo Jun 22 '11 at 6:23
5  
@Andreas, @Rei: while it's true that the question does not have a single, objectively correct answer, the various answers are all useful. And goddamit, deletionism is the cancer that is killing Wikipedia, and now it's spreading to SX... – Michael Borgwardt Jun 22 '11 at 7:57
show 5 more comments

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.

17 Answers

Having contempt for the end-user is the worst of the worst in programmer habits.

share|improve this answer
3  
Programmers shouldn't be responsible for the end-user, that's the role of the interaction designer. – konrad Jun 22 '11 at 7:37
5  
That, mko, is precisely the bad attitude I'm talking about. – JUST MY correct OPINION Jun 22 '11 at 7:41
1  
No, the fact is that pretty much all programmers are bad at end-user stuff. Naturally they shouldn't have contempt for them but that doesn't mean they should be trusted with them either :) – konrad Jun 22 '11 at 7:43
6  
First, your "end-user" is another programmer when you're writing APIs, libraries, programming languages, development tools, etc. Second, whether or not you are writing the GUI for a secretary's desktop, and whether or not you have design skills for doing that part of the equation, you still should not have contempt for the end-user. It is the contempt I'm saying is bad, not the lack of domain knowledge. – JUST MY correct OPINION Jun 22 '11 at 8:03
1  
The end user is your source of money. The end user is why you're getting paid. Expressing contempt for that person is probably a sign you should be working elsewhere. – JUST MY correct OPINION Jun 22 '11 at 12:18
show 3 more comments

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"

share|improve this answer
2  
Note that commented out code tells the future maintainer that there are some options here. If it is completely removed the maintainer has no clue that it may exist at all. – user1249 Jun 23 '11 at 9:49
1  
I don't agree with the last one. Unless its a massive section of code (probably anything bigger than a screenful is way to much), keeping it commented is better than having to spend a whole hour one day trying to find that sliver of code you deleted 4 weeks and 200 revisions ago. – TheLQ Jun 23 '11 at 15:07
1  
@Philip, then you don't delete it. – user1249 Jun 23 '11 at 16:32
show 4 more comments

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.

share|improve this answer

Just a few:

  • Ignoring wisdom accummulated over the last few decades, and thinking that only the latest cool technology is what matters.
  • Blindly jumping into every bandwagon that is thrown at him/her by industry fashionistas, be it agile methods, SOA or anything else.
  • Failing to gain contextual insight about what they do, by learning about fields other than programming, such as management science, management theory, psychology, etc. (see here).
share|improve this answer
1  
Ignoring wisdom is bad, ignoring "wisdom" is not. – Kimvais Jun 22 '11 at 8:25
show 1 more comment

Lack of humility.

In my experience those considering themselves much better than their peers usually aren't. Knowing that makes you humble.

share|improve this answer
4  
"Don't be ridiculous -- I have no peers." – drxzcl Jun 22 '11 at 8:29

Just a simple fix. No need to test.

share|improve this answer

Assuming things.

"Assumption is the mother of all f*** ups!"

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.

share|improve this answer
show 1 more comment

My worst habit is underestimating effort required. "Oh I think I can have that implemented by the morning..."

share|improve this answer

-"I am not a tester"

And then those guys tend to write buggy code that is not testable.

share|improve this answer

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.

share|improve this answer

Assuming that one is smarter than ones peers.

share|improve this answer
show 1 more comment

Code First, Think Later....

then code and think again

share|improve this answer

Not caring enough to notice or fix by oneself when things go wrong.

share|improve this answer
  • Assuming other people have knowledge that they couldn't possible have by giving answers to questions using advanced terminology - rather than attempting to explain things in the simplest possible terms. If they understood the terminology, they would probably know the answer.
  • Explaining solutions in these abstract terms, without giving an example of how to implement.
  • Having no patience with those who are trying to learn.
  • Looking for the answer that utilises their coding ability, rather than the simplest answer - or a solution which is already available.
  • Looking down on programming languages which aren't their own language of choice.
  • Not annotiating code for future users.
share|improve this answer

Over-engineering, because "we'll need that in the future".

share|improve this answer

"Damn I'm not catching that case, better write another if-test..." Instead of well thought algorithms.

share|improve this answer
  • Over-genericising and -abstracting things that don't benefit from it. Often done in the name of "avoiding hard-coding". E.g. having a DB table complete with access layer to hold the structure of the application's navigation menu. If the menu changes, it's pretty much guaranteed to be because of new features for which you'll have to touch the code anyway. And if new pages can be added without touching the code, you're developing a CMS - why aren't you using/extending an existing one?

  • Related: Building the system architecture around what's technically interesting rather than what the requirements call for. Extreme example: programming a "rules engine" that ostensibly "executes" the business requirements as supplied by the users (except it turns out to be inflexible and unusable by non-programmers).

share|improve this answer
show 3 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.