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

"Writing" code is a process. Probably about 80% of the process has nothing to do with typing. It's that 80% that determines "good" code vs. "bad" code, and getting that 80% right is just a matter of experience. If you're lucky, you are put on a project maintaining a ton of bad code early in your career. Otherwise, find some CPAN projects and help out. There's nothing like getting in the trenches to learn how stuff can go wrong in a heartbeat.

  • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
  • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
  • Comment on Re: Does bad code really teach you to write good code?

Replies are listed 'Best First'.
Re^2: Does bad code really teach you to write good code?
by Gekitsuu (Scribe) on Jun 18, 2005 at 06:30 UTC
    The situation I'm currently in doesn't give me the opportunity to work with existing code. I'm doing nearly everything from scratch (except for using modules). While I've been reading and examining code from anywhere I can get my hands on; one of the things I lack is a peer I can go to who can help me identify the parts of my code that while functional could be written better. That is what I hope to get from perlmonks.org.
      If you have a test suite, then it doesn't matter how your code was written - you can always refactor it.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?