News for hackers. Stuff that matters.
Re:Source code of the file with the Zune bug (starts on line... by noahlt on Thursday January 01, 2009 @09:58PM (#416960)
A lesson in code smell and good style: I took one look at the code and (before noticing the bug) thought, “why is there an inner if instead of just using a single conditional with a logical AND?”

That is to say, I could have fixed the bug without knowing what it was. (I'm a hs student and don't do much bug-shooting in code that wasn't written by me or my close friends, so I don't know if this is common.)

Re:Source code of the file with the Zune bug (starts on line... by palish on Thursday January 01, 2009 @10:48PM (#417005)
Unfortunately, it's much easier to introduce new bugs when refactoring other people's code.
Re:Source code of the file with the Zune bug (starts on line... by etal on Friday January 02, 2009 @06:38PM (#417896)
C lets a lot of exciting things happen inside an if statement. I once spent a couple hours cleaning up a big, ugly and unfamiliar codebase with transformations like that before I realized I was ignoring some side-effects and was therefore introducing bugs willy-nilly. (Isn't version control great?)