Brown trousers time :~
Ovid
publiustemp-londonpm at yahoo.com
Mon Oct 8 10:24:18 BST 2007
--- "Lyle - CosmicPerl.com" <perl at cosmicperl.com> wrote:
> Hi All,
> Soon I'll be embarking on the largest project I've ever undertaken.
> It's going to be 10's of thousands of lines of code. It needs to be
> perfect (or damn close :))
Skipping most of the rest, what's of paramount importance is that your
code is both correct (does things right) and complete (does everything
it *must*). That's the best place to start from when worrying about
optimization and there are plenty of well-established tools to help you
analyze your code's performance (from painful personal experience, most
programmers who try to guess up front what they need to optimize get it
wrong).
So how do you ensure your code is both correct and complete? It's
tough, but testing is one of the best ways to get close. I'd recommend
the O'Reilly book "Perl Testing: A Developer's Notebook"
(http://www.oreilly.com/catalog/perltestingadn/). (disclaimer: I was
one of the reviewers, so I may be biased). Once you learn to start
automated testing, so many other "hard" problems in programming become
so much easier.
Once you have a correct and complete system built, with tests, then you
can profile and optimize to your heart's content and feel much more
confident that you haven't broken anything.
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Perl and CGI - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/
More information about the london.pm
mailing list