<pedrocorreia.net ⁄>
 

<Signs that you're a bad programmer ⁄ >




clicks: 4826 4826 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: 6353 6353 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: 8022 8022 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: 6969 6969 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: 6492 6492 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: 6842 6842 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: 7454 7454 2010-04-12 2010-04-12 goto url (new window) allamerican.yra... goto myNews entretenimento


Unas volta ao Cabaret

(...)

clicks: 3863 3863 2007-05-03 2007-05-03 goto url (new window) correiomanha.pt... goto myNews entretenimento


Einstein, o papagaio

Em 2 palavras, im pressionante (...)

clicks: 3821 3821 2008-06-13 2008-06-13 goto url (new window) youtube.com/wat... goto myNews entretenimento