Slashdot Mirror


Programming Mistakes To Avoid

snydeq writes "InfoWorld's Peter Wayner outlines some of the 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.'" What common mistakes do you frequently have to deal with?

2 of 394 comments (clear)

  1. #1 - Not managing the pointers and memory yourself by Anonymous Coward · · Score: -1, Flamebait

    #1 - If you are a programmer, BE A PROGRAMMER and manage the pointers and memory allocations yourself. Garbage collection is for little boys. Men deal with it on their own with techniques that work and are efficient.

    #2 - Initialize all variables to known values. int i; doesn't cut it. int i=0; does.

    #3 - Use descriptive variable names

    #4 - you shouldn't be allowed to program anything new until you've been a maintenance programmer for a few years and seen the crap code that others puke into the world. Your crap code stinks too, BTW.

  2. Re:Printable version - All on one page by commodore64_love · · Score: -1, Flamebait

    Thus you've taken their labor w/o paying for it (i.e. not viewing the ads)
    Uh oh - here come the (-1) mods but I don't care: I speak truth to power.
    I think people are entitled to get paid for their hours.

    --
    "I disapprove of what you say, but I will defend to the death your right to say it." - historian Evelyn Beatrice Hall