« OpenURL 1.0 | Main | Microformats and OpenURL »

Comments

Eby

You might like the lesscode.org blog. I've found the posts to be interesting. Simplification seems to be making a comeback right now.

http://lesscode.org/

Ed Summers

"I claim that one page of dense code that does what ten pages of looser code would do is easier to read, understand, and maintain."

I would like to agree with you...but in general I find the things that get sacrificed in the name of brevity are, nice whitespace between lines, documentation, comments and abstractions (classes,etc)...all of which are near and dear to me. At least python will encourage pleasant indentation right? If you were using Perl would you do away with the newlines? I'm guessing not. Your claim taken to it's logical extreme in another language would lead to a good entry for an obfuscated code contest.

That said, your openurl code is *much* easier for me to read than the oai client. I guess this one isn't going on a t-shirt eh? :-) I totally agree with you that python is a lovely language that encourages simplicity of expression, without the baggage of Java's explicitness. But this comes at a cost in the form of unforseen runtime errors--instead of compile time bugfixes. Although Bruce Eckel has some interesting thoughts about this in his Strong Typing vs Strong Testing, which I find very compelling.

Martin Fowler has a good quote that I like to keep near the frontal lobe when programming: "Any fool can write code that a computer can understand. Good programmers write
code that humans can understand." It's a challenge that's for sure.

Thom

I do think it's important to write code that humans can read. That's one reason I was never a real Pearl fan.
In terms of runtime bugs, only very occasionally do I run into a bug in Python that static type checking would have prevented. I was surprised, but others report the same thing.
If you do worry about it, I think unit tests, and a decent code coverage tool to help you write them, catch the rest of the runtime errors that Java would at compile time. One thing to remember is that Python is strongly typed, it just does it at runtime.

--Th

The comments to this entry are closed.

My Photo

April 2018

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