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 452460
To read all comments associated with this story, please click here.
Mistake: Not grouping things by scope
by another_sam on Tue 7th Dec 2010 11:16 UTC
another_sam
Member since:
2009-08-19

An heterogeneous list of 12 items is exhausting. It should be structured in nested collections of 6-7 items at most.

My happiness is complete if the code is easy to understand and things have to be changed just once. So I'd just say simplicity and DRY.

About DRY: Caution with DRY and noobs. They may believe that is a syntax issue. It is not. It is a semantic one. Eg: Being A and B constants with different meaning, just because at the moment of coding they had the same value, they should not be defined such as A = B, nor B = A, nor one should replace the other, etc.

Reply Score: 1