On Thu, 2004-03-11 at 18:58, Steve Holdoway wrote:
<snip>
> Five lines is extreme, yes. But you've obviously not tried this method
> of programming. If you do a top down design, and then a bottom up
> implementation, these functions become the building blocks of the
> higher level code. Not only that, you can rely absolutely on them once
> you've completed them, which makes the higher level code much easier
> to debug, and much more reliable when written.

I *have* tried programming like that and initially, I have to admit,
that it started to look like those promises would be fulfilled but alas
no.

> I know that your friend and mine BillWithTheGlasses has done his best
> to eradicate the design and analysis part of any project, but it does
> make for a far more robust and maintainable product.

The part that I dispute the most is the maintainability. When you have a
respectable sized project. What starts to form is a maze of hundreds of
tiny little functions all forming a call tree dozens of layers deep. 

In a debugger the call stack looks like a directory listing!
Trying to track down what function/method is doing the thing you're
trying to stop or change can be a nightmare.

I am certainly an advocate for simple and elegant code but extremism
with function size IMO is something that should be avoided.

Sometimes a great big central function is a simpler option to a cascade
of tiny little ones.


-- 
----------------------------------------------------
Regards,
Zane Gilmore   (Linux nerd since 1998)
____________________________________________________
Any sufficiently advanced technology is 
indistinguishable from magic.:- A.C.Clark
____________________________________________________

Reply via email to