P@ Sunglasses

« The rich client/thin... | Main | Nick Lothian joins... »

20040617 e enjte qershor 17, 2004

A practical application of the Master Foo and the Ten Thousand Lines koan Zoe comments on my post about Rome 0.2 removing as many dependencies we could:
"we don't do our XML manually"... right... on the other hand, jdom-b10.tar.gz is a 3.4M (!?!?!) download and the jdom jar itself is 144KB... which is larger than the entire rome-0.2.jar (128KB)... what's wrong with this picture? I'm sure that you can do better than that and remove the *last* external dependency :)

# ls -la /usr/bin/ls
-r-xr-xr-x   1 root     bin        19084 Apr  6  2002 /usr/bin/ls
# ls -la /usr/bin/grep
-r-xr-xr-x   1 root     bin        10232 Apr  6  2002 /usr/bin/grep

ls and grep (on my system:-) "weight" 29314 bytes.

The following utility program (shell script) weights 16 bytes.

ls -la | grep $1

Should I reimplement a custom version of ls and grep to create my utility or is it better to just reuse these "bloated" 30K of code for my 16 bytes utility?

See Eric Raymond's excellent koan about this, Master Foo and the Ten Thousand Lines.

There's nothing wrong with this picture.
Master Bar would even argue that there is no picture at all, but that's another exercise:-)

I looked at Zoe: looks really cool. I will try it out.

( Qer 17 2004, 04:37:59 MD PDT ) Permalink Comments [2] Chat about it Technorati cosmos Tagsurf It

Comments:

I can see both sides of this. However, in this case I agree with Zoe. You already have SAX and DOM for processing XML in JDK 1.4 without any external dependencies, why not use them and avoid the additional library? Less dependencies is simpler. Smaller is better for all, but especially those that might want to use your library in an Applet or a WebStart application.

Posted by Scott on qershor 18, 2004 at 08:37 PD PDT #

Hmmm... this is not about size, Master Foo. It's about external dependencies. As Scott pointed out, the standard Java libraries provide already more than enough functionalities to handle the humble task at hand. No need to call the Cavalry to the rescue :o)

Posted by Zoe on qershor 18, 2004 at 12:35 MD PDT #

Post a Comment:

Comments are closed for this entry.

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.