Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.


Reading Beautiful Code, Chapter Two ...

I was reminded of this by reading an article on keeping all your important files aligned with Subversion. Chapter two is on Subversion's Delta Editor. Delta means change, and Delta (&916;) is math for change.

I cannot claim that the beauty of this interface was immediately obvious to me. My quick read of the interface sees tight but well-commented code. I'm hesitant to dive further in, as I'm already lots of review behind. The part that I think is most worthy of comment, right now, is that it's an interface. This differs from previous standards for code beauty (the author lists Duff's Device and rsync's checksum as examples) because it's not an algorithm, and because it's longer than what would fit on the back of an envelope. Five pages in the book, mostly comments. But the beauty of Perl that I see every day is that I can abstract, for example, the process of downloading a web page from a series of network pokes to something close to get($url) ;. If the foundations are solid, you can build on them. But nobody normally looks and says "My, what a great foundation."

Exclaiming "Mea Culpa! Mea Maxima Culpa!" ...

On Thursday, I said I would do one chapter a week.

On Friday, I said I'd do Chapter Two over the weekend.

On Monday, I failed to do anything.

I am in a state of sucking wildly. Suckety Suck Suck Suck.

At least I admit it.

And I'm putting the book on my desk right now.

But I'll mention two things.

First, there's a Perl program that replaces the "READY" text on your office's big HP printer. It is easily adaptable to, for example, take a string of weather information pulled from Weather Underground or whatever source you choose. The author chose Geo::METAR , but I found that too verbose for my purposes. And I am considering creating a module for HP Printer Job Language communication. It'd be my entry into CPAN!

Second, A post on O'ReillyNet brings up an interesting question relating to database inquiries and, as it turns out, a weakness in Perl's sleep. Well, limitation, at least.


Expressing how cool I am...

I stood 20 feet from Gene Cernan and Neil Armstrong. The first and most recent Boilermakers on the Moon.


Reading Beautiful Code, Chapter One ...

This is Brian Kernighan's chapter, on Regular Expressions. This amuses me, because Regular Expressions are widely considered to be an ugly thing. More than just ugly, too. "Some people, when confronted with a problem, think 'I know, I'll use regular expressions.'" wrote Jamie Zawinski. "Now they have two problems." I'm not there. I can read Perl-style regular expressions,

(I'll drop into an aside here and complain. Why is it that Perl has begun to complain when I write something like this:
my $foo = '' ;
print "XXX" if $foo =~ m{xxx}mx ;

Seriously, if a string has nothing, it clearly will not have the string xxx in it. '' should no more pop up an error than 'aaa' should.)

This chapter focuses on an implementation of a regular expression engine written by Rob Pike for the book The Practice of Programming. Chosen because it's a clear usage of recursion that isn't Quicksort or walking a tree. If I was Norm MacDonald, I'd note that programmers love recursion like Germans love David Hasselhoff. I suppose I might anyway.

But it's clear that Kernighan is fairly uncomfortable with the concept of beauty as applicable to computer science. He says "elegant" and "novel" and "compact". Those are three common metrics for beauty, but then, the standard of beauty would be Ingrid Bergman. She's beautiful, true, but hardly the only standard.


Working on a book review ...

So, I've been meaning to review Beautiful Code. I can give you the capsule, but not the deep. Capsule:
Beautiful Code is not the kind of book I normally go to O'Reilly for — it will not tell you how to code beautiful — but it helps you thing about your code in a deeper, better way, and you will be better off for having read it.
But I do need to do more than a capsule. I need to do a bigger thing.

Elsewhere, I've done memes and mindless link propagation. I will try not to do that here. But the last two really are. Well, yes and no. Revision3 hosts videos. Videoblog videos. One of the video blogs is systm, who talk on tech issues. For the most part, think of LUG meetings on video. I was sending myself a reminder to check out the video on Asterisk, which is a Linux-based Open-Source PBX. If you ever thought "I want to have my own voicemail setup", Asterisk is what you need. Anyway, that's that.

The other thing is an inexplicable looped video clock thing featuring dancing Japanese women in coulottes. It seems it's there to sell sweaters. I like the music, but can't control the volume, so I turn that off, and there's something unseemly about leaving a screen worth of dancing Japanese girls running all day, even if there isn't as much as a bared midriff (as far as I know), so I don't stay on long.

So, it is my endeavor to blog on reading a chapter a day (weekends excluded) until I have a proper review of Beautiful Code.

Telling the world ....

From the first time I tried using an external mail-reader, I became convinced of one thing.

POP3 sucks. IMAP rules.

Well, rules enough. In comparison. I still preferred pine and a shell.

Then GMail came. And I tried it, and it was good. But it was Web and POP3, and POP3 sucks.

I did the web interface for a while, building rules, building folders. The POP interface ignores those rules, ignores those folders, so, in Thunderbird, I had to recreate all the rules and folders I had built in GMail. Which sucks. Beyond, of course, the inherent suckiness of POP.

Now, GMail is offering an IMAP interface.

I don't know if it'll do everything I want it to. Strictly speaking, if I make a DrDobbs folder in GMail and a rule to put the Dr. Dobbs mail in that folder, I want whatever mail interface I have to respect that. So, we'll see.

Of course, nothing beats having Procmail or MH. (I prefer the rules language for MH, but SpamAssassin works with Procmail, so I use Procmail.) But if your mail host disallow executing abstract code triggered by email, then some sorting and IMAP's the next best thing.