in reply to Does bad code really teach you to write good code?

People learn to discern quality by having multiple examples to compare and (most importantly) contrast. If all code that you deal with is good, then you'll never learn what makes it good - it just seems to naturally flow. If all code that you deal with is bad then you have no positive role models for your own code. Therefore you need exposure to both.

What is more helpful than exposure, though, is exposure with feedback from someone who can explain what to look at, why one is better than the other. (Feedback from trying to analzye the results of your project is also helpful.) Exposure to books that try to explain this is better than nothing, but far from perfect - we each make individual kinds of mistakes and books will only help you if your mistakes happen to match the ones that the books are trying to address.

  • Comment on Re: Does bad code really teach you to write good code?