On Thu, 09 Jan 2003, Jim Martinez wrote:

> The start of a new year has me thinking of how I can improve things.  
> Like the way I develop, debug and test code.
> 
> Do you develop with an xterm tailing the logs, an emacs window (or other
> editor) to edit the script and/or the packages (and on some occassions
> httpd.conf), and a web browser (on an alternate virtual desktop)?  Do you
> pepper code with :
> 
> print "option:" . $option{$foo . "<br>" if $debug;
print "option:" . $option{$foo} . "<br>" if $debug;

> 
> Fairly low tech, huh.

yepi, I do that.

> At apachecon, a speaker (who neither bragged nor rambled) mentioned lwp
> use instead of (or to complement) the web browser portion.
> 
> Will the use of lwp instead of a browser improve my coding ability (either
> in terms of speed or just improving my perl coding)?  Seems like I'd have
> to spend too much time with the lwp script (tell it to first request the
> page then choose option A and B then hit the "submit" button ... )


I think the advantage of using LWP for testing is that you could write a
large series of tests which could be run frequently.  So, if you make some
little change way down in the guts of your code, you can then run all your
tests to make sure everything is still working without having to worry
about missing something along the way.  So, it may seem like a lot of
work up front, but in the long run you are better off.

There is other stuff out there that you can use for testing.  Test::Unit
come to mind, and there is a test framework I read about called puffin
(http://www.puffinhome.org/) which sounds like it could be useful.


andrew

> 
> Is there some way to improve this cycle : edit code -> refresh browser ->
> possibly look at the error log -> edit code -> ...
> 
> Or maybe you use another approach that's better?
> 
> Happy new near (9 days late),
> Big big Jim

Reply via email to