Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

15 workplace barriers to better code

Peter Wayner | June 25, 2013
What's standing between you and the next generation of great software?

Programming productivity obstacle No. 9: Selfish or cowboy coders
Did you just get a null pointer from his code? That's your job to catch that. And you better think twice about passing in a zero because the self-absorbed coder doesn't check for divide-by-zero errors. That's your job.

The narcissist coder's work is supercool and superfast but only because it leaves much of the bulletproofing and testing to you. That's your job to handle the mundane chores so that it doesn't crash.

Many teams end up finding this out too late. The blocks of code work fine during the early tests, but after someone starts pushing real data through them, everyone realized that no one was checking for problems. Oops.

Programming productivity obstacle No. 10: Poor documentation
Writing documentation takes time. But we're paid to write code. We're often measured by the lines of code we generate. You want results. We're just doing what you want. Don't worry, we'll remember it all and write it down eventually.

Sometimes there's plenty of documentation, but it's for a version of the code that is months or years old. Did I say that this method stores the data in the Foo table? My bad. That was two generations ago, and we haven't had time to work through the code and fix those old notes. But we'll get to it — honest.

Programming productivity obstacle No. 11: Slavish devotion to documentation
While we've all experienced projects with no documentation, it's common for projects to fail with too much verbiage and too little coding. I've had several people show me a shelf filled with binders and say, "They were paid by the pound for their documentation." Reading it all would take a year.>

Programmers often handle the requirement to write a comment like they handle discussing "Battlestar Galactica" or "Dr. Who." They write endless pages filled with minute details without summarizing or getting to the point. This can be deadly in the documentation when they don't offer much abstraction or understanding, just a regurgitation of what the code does. They're not illuminating; they're just transliterating the code into English.

Programming productivity obstacle No. 12: Distraction-rich environment
One client insisted that I come into their office every day. Then they insisted that I use their PC, which could not be customized for a week. Then they didn't have any office space, so I was plopped into a converted conference room with six interns, who would spend half of their day talking about what happened the night before. The other half was devoted to figuring out what they would do that evening. While it was entertaining, I got little work done.


Previous Page  1  2  3  4  5  6  Next Page 

Sign up for CIO Asia eNewsletters.