<pedrocorreia.net ⁄>
 

<Signs that you're a bad programmer ⁄ >




clicks: 4396 4396 2009-08-08 2009-08-08 goto entretenimento myNews entretenimento  Bookmark This Bookmark This


1. Inability to reason about code

Reasoning about code means being able to follow the execution path ("running the program in your head") while knowing what the goal of the code is.
Symptoms

1. The presence of "voodoo code", or code that has no effect on the goal of the program but is diligently maintained anyway (such as initializing variables that are never used, calling functions that are irrelevant to the goal, producing output that is not used, etc.)
2. Executing idempotent functions multiple times (eg: calling the save() function multiple times "just to be sure")
3. Fixing bugs by writing code that overwrites the result of the faulty code
4. "Yo-Yo code" that converts a value into a different representation, then converts it back to where it started (eg: converting a decimal into a string and then back into a decimal, or padding a string and then trimming it)
5. "Bulldozer code" that gives the appearance of refactoring by breaking out chunks into subroutines, but that are impossible to reuse in another context (very high cohesion)



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://sites.google.com/site/yacoset/Home/signs-that-you-re-a-bad-prog...




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="entretenimento" ⁄>

7 Longest Roads in the World

Road trips are an iconic part of the American experience. Despite the ease and speed of air travel, (...)

clicks: 5734 5734 2011-03-01 2011-03-01 goto url (new window) interbent.com/7... goto myNews entretenimento


30 Most Amazing Shots Captured Photography in 2010

There're thousands of photographs you have seen in 2010. By Splitting into distinct categories, this (...)

clicks: 7434 7434 2010-11-23 2010-11-23 goto url (new window) smashinghub.com... goto myNews entretenimento


17 Amazing/Beautiful Examples Of Origami Art

The other day, we did a post on 16 Origami tutorials, which were easy and fun. This time, this list (...)

clicks: 6410 6410 2010-06-05 2010-06-05 goto url (new window) listfied.com/17... goto myNews entretenimento


As Lost Ends, Creators Explain How They Did It, What's Going On [Spoilers]

The series endured thanks to the power of faith (coincidentally, a theme of the show) and a more mod (...)

clicks: 5899 5899 2010-05-21 2010-05-21 goto url (new window) wired.com/magaz... goto myNews entretenimento


9 Strong Reasons To Eat Slowly

I like chocolate candies a lot. Most of the time I have to eat 3 candies to be totally pleased. But (...)

clicks: 6258 6258 2010-04-17 2010-04-17 goto url (new window) healthassist.ne... goto myNews entretenimento


World's Most Stunning Data Centers

Who says technology can't be art? These pictures show you some of the most impressive data centers o (...)

clicks: 6890 6890 2010-04-12 2010-04-12 goto url (new window) allamerican.yra... goto myNews entretenimento


Alta, magra, loira e nua. Uma mulher entrou numa bomba de gasolina na pequena cidade Doemitz, na Ale (...)

clicks: 3759 3759 2007-07-24 2007-07-24 goto url (new window) portugaldiario.... goto myNews entretenimento


100 Things Your Kids May Never Know About

There are some things in this world that will never be forgotten, this week's 40th anniversary of th (...)

clicks: 4721 4721 2009-08-15 2009-08-15 goto url (new window) wired.com/geekd... goto myNews entretenimento