Peepaal

Continuous Community Learning

Recently I was hunting for do's and dont's of coding, and I came across this article on c2.com, which provided an extensive list of how a coder should NOT code. The article states, and I quote, "Cowboy Coders are programmers who write code according to their own rules. They may be very good at writing code, but it doesn't generally follow the standards, processes, policies, or anything else derived from the group."

Here are some traits of cowboy coders:

  • The speed with which I can hack something together determines my worth
  • People who need comments in order to understand my code are too dumb to be working with me
  • People who ask me questions about my code are too dumb to understand it, and (therefore) are too dumb  

    to be working with me

  • Other people's code is just crappy, but mine is self-descriptive and beautiful
  • Exploiting a compiler-dependent language feature to save a line of code is "elegant"
  • Other people on my team cause all of the bugs; I'm the one that fixes them
  • My code is never at fault, always perfect, and I don't make mistakes
  • Since my code is never at fault, I don't need to test it thoroughly, if at all
  • Since my code is always perfect, it never needs to be refactored no matter how long it's been in the

    codebase or how much has changed around it

  • Since I never make mistakes, I can yell at anyone else who does
  • Since my code is perfect, if the program crashes due to unexpected data, it's the user's fault for entering

    bad data.

  • Since my code is perfect, if the program fails after a minor machine configuration change, it's the

    sysadmins fault for changing it.

  • Since my code is perfect, if the program runs too slowly, it's the managements fault for not providing a

    faster machine.

 

These provide a good guideline of how NOT TO CODE.

Views: 57

Tags: best, code, codeing, how, not, practice, to

Comment

You need to be a member of Peepaal to add comments!

Join Peepaal

Comment by preeti kulkarni on January 11, 2012 at 1:03pm

Nice one :)

Comment by Nikhil Bhawkar on August 26, 2011 at 10:25am
Archis, the term is used in a negative sense!!! It's ok if a fresher like me says that I consider myself a cowboy coder, but why do you say so about youself?
Comment by Archis Gore on August 26, 2011 at 1:48am
Good one. :-) I personally like the word cowboy coder, and consider myself one.

© 2012   Created by Kaushik.

Badges  |  Report an Issue  |  Terms of Service