Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Starting a project and landing between a rock and a hard place.

by chromatic (Archbishop)
on May 06, 2001 at 07:53 UTC ( #78323=note: print w/ replies, xml ) Need Help??


in reply to Starting a project and landing between a rock and a hard place.

tilly mentions XP in passing. I've learned quite a bit from that approach.

Two things come to mind.

First, write unit tests. jlp just wrote a very small and clever module for Jellybean that makes running tests very easy. If you have more complex needs, clemburg works on the Test-Unit bundle on the CPAN. Having a comprehensive test suite will prove baseline functionality, freeing you to clean things up inside without having to wonder if your changes broke something. (It's not 100% guaranteed, but if you move things around and a test suddenly fails, you know exactly why.)

The second thing is to keep your design as simple as it needs to be. That doesn't mean you design everything at the start and stick with that until the bitter end. It doesn't mean that you find yourself in a corner and rewrite everything. It means that you add features only when absolutely necessary. After you add a feature and its tests pass, go back over the code and see if you can simplify it further. The tests will tell you if you break something.

This all presupposes that you're a competent enough programmer to have good habits from the start -- you are. If you weren't, you wouldn't have recognized this and you wouldn't be asking for advice. Trust your instincts, but cultivate good habits to keep you from false Laziness.

Finally, when you're stuck, look at the project and ask yourself, "What needs to be done?" Organize that list according to importance. Then break the most important thing into individual units that can be added, tested, and debugged in a single sitting. Then do it.

If you can follow this half of the time, you'll be twice the programmer in short order. The tests are the key.


Comment on Re: Starting a project and landing between a rock and a hard place.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://78323]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-09-18 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (116 votes), past polls