Thursday, July 28, 2005

Conspicuously Caucasian

In both trips this year to Singapore, I had the eerie sense of sticking out like a sore thumb -- I was conspicuously Not From Around Here. In most of the other places I've traveled, I could, with a little effort, blend in with the natives. In Europe or Australia, if I dress like the natives, I look like a native. Of course, as soon as I open my mouth, I'm a goner, but I can quietly blend. Not in Singapore! I am obviously not from the neighborhood.

I don't mind being different (I certainly was in high school, and I was from the neighborhood). However, in Singapore, I'm a target for all sorts of commerce attempts. I can't walk past a store front, even in the tony parts of town, without someone trying to sell me something. I'm not only conspicuously Caucasian, I'm American, and therefore both gullible and rich! I can't get the locals price around here for anything. Just another example of how travel broadens you, and why I like travel so much because it provides perspective.

Friday, July 22, 2005

Battle of the Desktop Search Giants

Back in the dim and distant past, I blogged about desktop search in general and Google Desktop Search specifically. In that post, I lamented the search tools of yore that went away for one reason or another. A commenter kindly pointed out that my all time favorite (Magellan) now lives on as X1..

Lo and behold, Yahoo has entered the fray with their own desktop search tool, based on X1. In fact, it is a free version of X1 that doesn't include the enterprise features. It has a slick Windows-based UI and does a lot of cool tricks. So, I displaced Google and installed Yahoo Desktop Search (PCMagazine also gave it their editor's choice).

Well, after using it for a while, I'm un-installing it and going back to Google. Both are in beta, but Google is much more stable IMO. Yahoo was constantly doing odd things, and seemed to be belly up when I needed it the most. While Google has a sparser UI and doesn't handle as many file types, it is (at least for now, for me) more stable. And, for infrastructure software like desktop search, stable wins the day for me. I'm writing this while un-installing Yahoo and re-installing Google. Maybe once Yahoo turns 1.0, I'll re-evaluate. But for now, I'm switching back to Google.

Thursday, July 21, 2005

Passion Part 2

As if on cue from my last post, an aphorism from Robert Fripp:
Life is too short to spend time on activities where our passion is not engaged.
I know a lot of people who fundamentally don't enjoy their work. While earning a living is a laudable goal, I think those of us who do really enjoy their work are lucky. Most of my friends who don't enjoy their work envy the passion with which I attack my work. Some of them accuse me of not really working, just enjoying my hobby: that's not true -- it's still work. For my hobby, I would create an entirely different set of software. It still tires me out at the end of the day. But, for the most part, I take joy in the job that I do. I'm lucky.

Tuesday, July 19, 2005

Enjoying the Passion

Last week was one of those great ThoughtWorks weeks in Chicago. There were lots of people in the office, it was a new hire week (with several people in orientation), and there were lots of gatherings to which I was either invited or managed to latch onto. It's always a mixed crowd at ThoughtWorks, with business analysts, project managers, and, of course, developer geeks. During one of the meals, I started talking about Language Oriented Programming (I know, a big shock to those of you who read my blog and/or been around me lately). The business analysts sitting nearby didn't have a clue as to what we were talking about. At one point, I turned to someone sitting next to me and apologized for the obviously obtuse (for non geeks) discussion. That reminded me of a similar situation that happened in Columbus, OH, when I met fellow ThoughtWorkers (a developer-type and a project manager). Of course, we started immediately talking about very esoteric software engineering topics. At one point, just as this week, I turned to the PM and apologized. She said: "That's OK, I'm just enjoying the passion".

Both events, last week and in Columbus, is a vivid reminder why I do this for a living and why I work where I do. How many people you know are really passionate about what they do for work, and so actively proselytize it to everyone they meet that can understand it? And in fact actively seek out people who can understand it so that they can talk about it some more? Even the non-techies at ThoughtWorks enjoy it, albeit vicariously.

Thursday, July 14, 2005

Running Tests to Watch Them Fail

I was reminded again today by a fellow ThoughtWorker why in Java it's a good idea to write the test, run it to watch the test fail, then make it pass: what if you mis-spell the testing method, i.e., "tsetMyMethodToSeeWhatItDoes()"? Because JUnit uses reflection to find the methods to run as tests, it won't pick up "tset".

Which is why I think that NUnit v2 got it righter (is that a word?) by using annotations to mark the test methods instead of naming patterns. If you misspell the annotation, the compiler complains, which, in this case, is A Good Thing. Improvements are already afoot in the Java world -- TestNG already supports annotations (and JavaDoc tags if you are using 1.4) and several other features, and rumor has it that JUnit 4 will support annotations and some of the other TestNG features as well.

Tuesday, July 12, 2005

Beyond OOP

One of the questions that frequently comes up during the expert panels at No Fluff, Just Stuff is "What Comes Next?" What, in the opinion of the speakers, is the Next Big Thing? Consequently, I think about this probably more than most developers just so that I'll have a lucid answer at these panels.

One of my favorite characteristics of college was the accidental synergy that occurs between classes that you happen to be taking in the same quarter. For example, I took the automata class the same quarter as the compilers class, and there are obvious common elements. Even something as seemingly unrelated as artificial intelligence and philosophy creates a fertile ground for interactions.

So, how are these two things related? Lately, during my constant ruminations about What Comes Next, I've seen an interesting synergy between two separate but related concepts. Language oriented programming, my new favorite geek obsession, is one. It addresses the disconnect between the hierarchical nature of OOP and the rich semantics of language. The other day, I was talking to Obie Fernanadez, a fellow ThoughtWorker, and he is really into RDF and the Semantic Web. He's dealing in hierarchies, but in a different way. I am probably greatly injuring this assertion by my newness to this subject, but the Semantic Web folks maintain that, among other things, the problem with OOP is that it is basically context free. Hierarchies exist, but they don't relate in the rest of the world with other hierarchies -- each inheritance tree is an island. And properties that exist on classes don't have any context outside the class. In the real world, "address" can have separate meanings based on the context -- are we talking a physical place or a inaugural speech? The way our minds work isn't like OOP, where everything exists in a strict hierarchy. We have these "free floating" concepts like "address" that can be attached to the correct context. What's needed is context...and that's what the semantics of language provides that OOP doesn't already have. Now, this week at least, I'm thinking that What Comes Next is related to both language oriented programming, which provides needed context to the structure of programming, and semantic ontologies, which provides global context. These are fundamentally different things, but seems like there is some synergy to be found. More later...

Friday, July 08, 2005

Metaphor Shear

I was reminded today of a term I read about several years ago in the excellent essay "In the Beginning was the Command Line" by science fiction author Neal Stephenson. In it, he talks a lot about the layers of metaphors that make working with a computer what it is today. Without metaphors, you are stuck looking at a bunch of 1's and 0's (side note: every expensive piece of software you own -- Oracle, Application Servers, etc. -- are just 1's and 0''s the order they're in that's important). Anyone who has seen one of the original Osborne computers knows just how scintillating starting at blinking lights representing 1's and 0's is. The problems come in when the metaphors suddenly turn into vapor. I'll let the other Neal take it from here:

Anyone who uses a word processor for very long inevitably has the experience of putting hours of work into a long document and then losing it because the computer crashes or the power goes out. Until the moment that it disappears from the screen, the document seems every bit as solid and real as if it had been typed out in ink on paper. But in the next moment, without warning, it is completely and irretrievably gone, as if it had never existed. The user is left with a feeling of disorientation (to say nothing of annoyance) stemming from a kind of metaphor shear--you realize that you've been living and thinking inside of a metaphor that is essentially bogus.

The whole essay is a great read, with lots of insights into fundamental ideas about operating systems (if you think this metaphor is good, wait until you read his description of Windows vs. Mac OS vs. Linux as car dealerships). I think about metaphor shear anytime I'm forced down to the guts of computers or operating systems.

Sunday, July 03, 2005

Language Workbench Sample Ported to Java

As I've blogged about recently, I'm updating my Building Domain Languages atop Java conference talk to incorporate information from Martin Fowler's article Language Workbenches: The Killer-App for Domain Specific Languages?. I wanted to show his example domain language sample in my talk but my talk is Java and his sample is in C#. So, as a public service to Java developers everywhere, I ported his sample to Java 5. This is mostly a straight port with a few differences:
  • I used generics in a few places to clean up type casting
  • The reflection stuff is different because that's where .NET and Java differ the most
  • I cheated and created simple classes with public fields rather than properties for the target classes to make the reflection code easier
It is a complete version of the sample (including all the supporting files to make it run + IntelliJ project file). Martin graciously gave me permission to post it on my website and in my blog. Language oriented programming looks to me like the next big revolution in programming paradigms, and I'm spending a lot of time playing with this right now.

Friday, July 01, 2005

Berg's Chamber Symphony

Recently, I had the privilege to see a unique performance of Alban Berg's Chamber Concerto by members of the Chicago Symphony Orchestra, lead by Pierre Boulez, with Daniel Barenboim on piano and Pinchas Zukerman on violin. This concert was special because it re-created a landmark recording of this work by the same ensemble. The other unique thing about this concert: the musical work is only about 30 minutes long, but it was the only piece of the evening. Mr. Boulez and the entire ensemble came out and discussed the work (with examples) for 1 hour, 40 minutes, then took a short intermission, then played the work.

What makes this music so interesting that you can talk about it for 3 times as long as the piece itself? Well, it would take me over an hour to explain! Here are some examples, though. This piece was written in homage to Berg's teacher, Arnold Schonberg, who developed the 12-tone method of composition. The first theme of Berg's work represents Schonberg, Berg, and Anton Webern (another student) with the motif Arnold Schonberg Anton Webern Alban Berg (using the German alphabet). So, the main theme of the work uses the names of the teacher and students. Another example: the second movement is a palindrome: it plays up to the middle (signified by the piano's only involvement in the 2nd movement) the plays in reverse to the end, using different combinations of instruments so that it's not immediately obvious. There are lots of mathematical features in this music: the first two movements have 240 bars each, and the third has 480 bars.

Needless to say, this is a fascinating piece of music, made all the richer if you understand the context of the time in which it was written and all the ideas that went into it. Many people who don't like modern serious music don't have the correct expectations or context. Just as the movie Memento is different than Casablanca, they are both great achievements. The same is true for serious music.