Linked by snydeq on Mon 6th Dec 2010 23:52 UTC
General Development InfoWorld's Peter Wayner outlines the 12 most common programming mistakes, and how to avoid them. "Certain programming practices send the majority of developers reaching for their hair upon opening a file that has been exhibiting too much 'character'. Spend some time in a bar near any tech company, and you'll hear the howls: Why did the programmer use that antiquated structure? Where was the mechanism for defending against attacks from the Web? Wasn't any thought given to what a noob would do with the program?" Wayner writes. From playing it fast and loose, to delegating too much to frameworks, to relying too heavily on magic boxes, to overdetermining the user experience - each programming pitfall is accompanied by its opposing pair, lending further proof that "programming may in fact be transforming into an art, one that requires a skilled hand and a creative mind to achieve a happy medium between problematic extremes".
Permalink for comment 452465
To read all comments associated with this story, please click here.
import this
by renhoek on Tue 7th Dec 2010 11:44 UTC
renhoek
Member since:
2007-04-29

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

And from personal experience :

Tunnel vision, NIH syndrome, "look this generator generated 100K lines of code, what a timesaver!", Let's cut corners so we can finish on time, too much code already depends on the quirks, foreign keys make my live hard, i'll remove and cleanup after we ship.

It made me quit programming and starting to enjoy live again ;)

Reply Score: 6