Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

August 2003
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Jul  Sep

Concise Code and Packages

Tuesday, August 26, 2003

Concise Code

I've just finished reading Guido van Rossum's (Python's inventor) comments about developing with a language that allows you to do a lot with a small amount of code. Guido's comments are about Python, but if you do a replace of "Python" with "Lisp" in the quote below, his words are even more accurate.
"Finger typing. It wouldn't surprise me if the amount of typing Python requires is five times less than Java for a typical piece of code. That would be the ratio. When you have that much less code, it's so much easier to maintain, and also to change.

This is all very informal, but I heard someone say a good programmer can reasonably maintain about 20,000 lines of code. Whether that is 20,000 lines of assembler, C, or some high-level language doesn't matter. It's still 20,000 lines. If your language requires fewer lines to express the same ideas, you can spend more time on stuff that otherwise would go beyond those 20,000 lines.

A 20,000-line Python program would probably be a 100,000-line Java or C++ program. It might be a 200,000-line C program, because C offers you even less structure. Looking for a bug or making a systematic change is much more work in a 100,000-line program than in a 20,000-line program. For smaller scales, it works in the same way. A 500-line program feels much different than a 10,000-line program. "
The comments by Guido reminded me of a similar post by Kenny Tilton on c.l.l. where he compares programming with Lisp to the mountaineering approach of Reinhold Messner who climbed Mt. Everest without oxygen:
"Now what do we have to do? Be very good technically. Pick a great partner. Train incredibly hard. Top equipment. Zero tolerance of slips while climbing.

Lots of parallels there for Lisp and small teams, the one exception being that slips are handled /better/ by Lisp, so I just take as long as I need to sharpen my axe and crampons, reset myself on the ice slope and just carry on.

>
> Minimizing the risk of death, in this case, may not involve a terribly
> low minimum. The "best chances" may involve taking some pretty big
> risks...

Yeah, it's pretty scary, but they did the arithemtic and decided that in fact the risk of death their way was very small. Someone else calculated a tenth of a per cent.

Seige climbing (and the waterfall method of system development) provide a false sense of safety."


Packages in Large Systems

Joe Marshall recently posted a very good summary of how he deals with packages in large systems.

I'm Famous!

Just noticed that lemonodor and Gordon Weakliem have also mentioned by blog - fame and fortune must be just around the corner! ;-)

emacs Copyright © 2004 by Bill Clementson