Wednesday, March 28, 2007

E Is For Editor Envy

I love it when I find out about a cool new tool. In this case, it is E, a Windows clone of the ubiquitous Mac text editor TextMate. Looks like this project has been around for awhile, but I just heard of it thanks to a blog entry about creating a Mac-like environment under Windows.

Installing E is not a small task, although it is not a difficult one. This is due to the fact that E relies heavily on Cygwin to support "bundles" which is how TextMate creates their oh-so-useful macro and template collections. I have installed it on two machines now, and I had trouble with cygwin on both of them. Sigh! After a few missteps, I managed to get Cygwin installed and E working mostly correctly.

Having a text editor that supports changing themes without a massive amount of pain is really nice for a guy like me who likes that retro black background thing. And having the same basic macro capabilities as TextMate under Windows is awesome! I have TortoiseSVN installed, and E's project view lets me see the change status and commit or diff changes. All of your basic needs in a Ruby on Rails editing tool are there.

But basic compatibility is all you get at this point. E does support TextMate "bundles", but there are plenty of differences in the bundles on each platform (Mac vs. Windows), enough so that plenty of things don't work. On each of the two machines I tried E on, I had different problems with the more advanced bundle abilities of bothe the Ruby and the Rails bundles.

The author of E is working closely with the author of TextMate, being as they are both Danes and very open minded, and is planning on a Unix version to join the Windows version. Even with the weirdness and slowness of the Cygwin install, E is rocking, so on Ubuntu, for example, E could become a cornerstone of a slick development platform. At this point, the real TextMate on the Mac is still the optimal route to programming glory. If you need to work under Windows, E is worth trying out, just be ready for some rough edges.

Monday, March 26, 2007

The Ruby.NET Interview From Down Under

An interview with Dr. Wayne Kelly has been put up on Channel 9, Microsoft's video interview site. Dr. Kelly is head of the Ruby.NET compiler project at the Queensland University of Technology in Australia. As always, I am eager to see progress on the .NET side of the Ruby language wars. I drank my coffee, and put on my phones for the 15 minute interview.

After watching the video, I must say I am a little underwhelmed. Not to disparage the fine work of the good doctor on this worthy project, far from it. But I was not impressed by his comments about his lack of familiarity with the Ruby language itself. "If I was going to do any real Ruby programming, I would have to have the pickaxe book at my side to help me with the syntax, " says Dr. Kelly midway thru the interview.

Compare that to a zealous Ruby language fan like Ola Bini with the JRuby team. And I say this as a long time detractor of Java! How DARE they flaunt their superiority.

There were a couple of interesting points, one of which was the trouble with implementing the Ruby.NET compiler by directly matching Ruby language methods to CLR methods. The collection of CLR methods for an assembly being set at compile time, vs. Ruby class and instance methods which are a very fluid and wonderful thing and can be created at any time.

It was also curious that he said they are not using any of the .NET techniques being pioneered by the IronPython team, like use of dynamic delegates and Lightweight Code Generation. I was really expecting that they would be. At least I would be, if I were them.

Dr. Kelly was apologetic over his team's missing their self-imposed monthly delivery of updated code. He was so understated, that by the end of the interview I got the feeling that "under promise and over deliver" wasn't just cliche, but it was this guy's personal mantra. I hope I got the correct impression.

Let's see some bits, boys! Keep those updates coming...the race isn't over yet.

Wednesday, March 21, 2007

I Have Seen The Future

The amazing artistic visions of computer science researcher Andrei State combine both grace and utility. I am reminded of how I felt first seeing the original Apple Knowledge Navigator video...a peek just around the corner into the future.

Check out Andrei's technical section of the really neat ARTA GRAFICA website. Thank you to my friend Dan Rasmus and his cool "Future of Information Work" blog for turning me on to this...

Wednesday, March 14, 2007

I Speak For The Code

Recently I was in a client meeting with a bunch of managers to discuss some very complex changes that were being proposed for an existing system. I was invited to the meeting so I could "speak for the code", which to them meant that I could validate the ideas of the group based on my knowledge of the code base.

After the meeting ended, I kept mulling over that phrase "speaking for the code". The more I did, the more I realized the parallels between "speaking for the code" as an architect or lead developer, and the Lorax "speaking for the trees" in the Dr. Seuss story of the same name.

So here goes my attempt to illustrate some lessons about best practices in software development, inspired by the story of the Lorax...

At the far end of town where the Grickle-grass grows and the wind smells slow-and sour when it blows and no birds ever sing excepting old the Street of the Lifted Lorax.
And deep in the Grickle-grass, some people say, if you look deep enough you can still see, today, where the Lorax once stood just as long as it could before somebody lifted the Lorax away.

Our story begins looking at what remains of a once thriving software application, now gone to ruin. What went wrong?

What was the Lorax?
Any why was it there?
And why was it lifted and taken somewhere from the far end of town where the Grickle-grass grows?
The old Once-ler still lives here.
Ask him. He knows.

Perhaps the Lorax was the original system architect. But he is gone now, leaving behind Once-ler who is now in charge of the project.

You won´t see the Once-ler.
Don´t knock at his door.
He stays in his Lerkim on top of his store.
He stays in his Lerkim, cold under the roof,
where he makes his own clothes
out of miff-muffered moof.
And on special dank midnights in August,
he peeks out of the shutters
and sometimes he speaks
and tells how the Lorax was lifted away.
He´ll tell you, perhaps... if you´re willing to pay.
Then he hides what you paid him away in his Snuvv,
his secret strange hole in his gruvvulous glove.
Then he grunts, I will call you by Whisper-ma-Phone,
for the secrets I tell you are for your ears alone.

The Once-ler is the swamp guide project manager or developer who remains behind, holding on tightly to the secrets of the system.

Now I´ll tell you, he says, with his teeth sounding gray,
how the Lorax got lifted and taken away...
It all started way back... such a long, long time back...

Way back in the days when the grass was still green
and the pond was still wet
and the clouds were still clean,
and the song of the Swomee-Swans rang out in space...
one morning, I came to this glorious place.
And I first saw the trees! The Truffula Trees!
The bright-colored tufts of the Truffula Trees!
Mile after mile in the fresh morning breeze.

And under the trees, I saw Brown Bar-ba-loots
frisking about in their Bar-ba-loot suits
as they played in the shade and ate Truffula Fruits.

From the rippulous pond came the comfortable sound
of the Humming-Fish humming while splashing around.

The original system was a fine merger of art and science. It provided for all of the inhabitants of its software ecosystem (users, developers, testers, etc.) by using practices that conserved the ecology of the system. It was able to successfully grow from its origin to a useful level of functionality while preserving the environment of the code base.

In no time at all, I had built a small shop.
Then I chopped down a Truffula Tree with one chop.
And with great skillful skill and with great speedy speed,
I took the soft tuft. And I knitted a Thneed!

The instand I´d finished, I heard a ga-Zump!
I looked.
I saw something pop out of the stump
of the tree I´d chopped down. It was sort of a man.
Describe him?...That´s hard. I don´t know if I can.

He was shortish. And oldish.
And brownish. And mossy.
And he spoke with a voice
that was sharpish and bossy.

Mister! he said with a sawdusty sneeze,
I am the Lorax. I speak for the trees.
I speak for the trees, for the trees have no tongues.
And I´m asking you, sir, at the top of my lungs--
he was very upset as he shouted and puffed--
What´s that THING you´ve made out of my Truffula tuft?

The Once-ler took the original application in a direction that it was not architected to take, in a way that disturbed the equilibrium enough to attract the ire of the Lorax, who is the guardian for the system's logical integrity.

Look, Lorax, I said. There´s no cause for alarm.
I chopped just one tree. I am doing no harm.
I´m being quite useful. This thing is a Thneed.
A Thneed´s a Fine-Something-That-All-People-Need!
It´s a shirt. It´s a sock. It´s a glove. It´s a hat.
But it has other uses. Yes, far beyond that.
You can use it for carpets. For pillows! For sheets!
Or curtains! Or covers for bicycle seats!
The Lorax said,
Sir! You are crazy with greed.
There is no one on earth
who would buy that fool Thneed!

The Once-ler is utterly convinced of his own ideas regarding the directions for the system, and is not interested in listening to the warnings of the Lorax. He thinks he knows what the users need, and how to make the system fill that need. Or perhaps he is using the wrong design patterns, or too many different patterns, or some classic anti-patterns.

And, in no time at all,
in the factory I built,
the whole Once-ler Family
was working full tilt.
We were all knitting Thneeds
just as busy as bees,
to the sound of the chopping
of Truffula Trees.

Oh! Baby! Oh!
How my business did grow!
Now, chopping one tree
at a time
was too slow.

So I quickly invented my Super-Axe-Hacker
which whacked off four Truffula Trees at one smacker.
We were making Thneeds
four times as fast as before!
And that Lorax?... He didn´t show up any more.

Now the Once-ler is scaling up the project, using all of his old buddies. Now four times more staffing than before. Not only that, but with such confidence in his vision that he doesn't miss the fact that the crucial architectural knowledge of the Lorax is no longer guiding the project.

But the next week he knocked on my new office door.
He snapped, I´m the Lorax who speaks for the trees
which you seem to be chopping as fast as you please.
But I´m also in charge of the Brown Bar-ba-loots
who played in the shade in their Bar-ba-loot suits
and happily lived, eating Truffula Fruits.
NOW...thanks to your hacking my trees to the ground,
there´s not enough Truffula Fruit to go ´round.
And my poor Bar-ba-loots are all getting the crummies
because they have gas, and no food, in their tummies!

They loved living here. But I can´t let them stay.
They´ll have to find food. And I hope that they may.
Good luck, boys, he cried. And he sent them away.

I, the Once-ler, felt sad as I watched them all go.
BUT... business is business! And business must grow
regardless of crummies in tummies, you know.

The Once-ler is willing to do anything at all to the code base, including losing the architectural consistency of the system, in order to implement his new vision for the project. Or lose anyone at all on the project team, for that matter, to maintain control over the project. Too bad Once-ler doesn't realize that once the tipping point of architectural instability is reached, a system can become unreliable and unmaintainable very quickly.

And then I got mad. I got terribly mad.
I yelled at the Lorax, Now listen here, Dad!
All you do is yap-yap and say, Bad! Bad! Bad! Bad!
Well, I have my rights, sir, and I´m telling you
I intend to go on doing just what I do!
And, for your information, you Lorax, I´m figgering on biggering
turning MORE Truffula Trees into Thneeds
which everyone, EVERYONE, EVERYONE needs!

And at that very moment, we heard a loud whack!
From outside in the fields came a sickening smack
of an axe on a tree. Then we heard the tree fall.
The very last Truffula Tree of them all!

Did you see THAT coming? Of course you did! Once the technical debt of the system exceeded the available resources, the application went bankrupt.

No more trees. No more Thneeds. No more work to be done.
So, in no time, my uncles and aunts, every one,
all waved me good-bye. They jumped into my cars
and drove away under the smoke-smuggered stars.

Now all that was left ´neath the bad-smelling sky
was my big empty factory... the Lorax... and I.

Once the project's future prospects are bleak, project funding or company revenues dry up. As a result, key resources leave. When this vicious cycle begins, there may be no stopping it.

The Lorax said nothing. Just gave me a glance...
just gave me a very sad, sad backward glance...
as he lifted himself by the seat of his pants.
And I´ll never forget the grim look on his face
when he heisted himself and took leave of this place,
through a hole in the smog, without leaving a trace.

And all that the Lorax left here in this mess
was a small pile of rocks, with one word...

If you are an architect or dev lead, you are probably sympathizing with the Lorax as you sometimes feel like you are "defending" your system. If you are a hiring manager or recruiter reading this blog, perhaps at this point in the story you are getting a idea about why it is hard to recruit and retain the best system architects and developers to work on toxic projects.

But now, says the Once-ler,
Now that you´re here, the word of the Lorax seems perfectly clear.
UNLESS someone like you cares a whole awful lot,
nothing is going to get better. It´s not. SO...
Catch! calls the Once-ler. He lets something fall.
It´s a Truffula Seed. It´s the last one of all!
You´re in charge of the last of the Truffula Seeds.
And Truffula Trees are what everyone needs.
Plant a new Truffula. Treat it with care.
Give it clean water. And feed it fresh air.
Grow a forest. Protect it from axes that hack.
Then the Lorax and all of his friends may come back.

System architects, let a thousand flowers bloom. Fight for your systems.

RIP, Dr. Seuss. We miss your wisdom.

Tuesday, March 13, 2007

CruiseControl.rb: Continuous Integration Is About To Get Beautiful

At last, Ruby has a real Continuous Integration system, not just some crazy hacked-together solution. Nothing against crazy, hacked-together solutions, but your CI system is not the place for such madness. From those wonderful folks at Thoughtworks, we now have CruiseControl.rb, to join the CruiseControl and CruiseControl.NET offerings for Java and .NET projects respectively.

I have been a constant user of CruiseControl.NET for all of the MS-platform projects for the last couple of years, and having a powerful, flexible system has been great. However, having to pay heavily of the angle-bracket tax to create the XML for the NAnt build scripts, CC.NET config files, and pretty much everything else has been a real pain. The pleasure has been the real-time integration with the CCTray notification program (shows up red in your system tray, and pops up a balloon notification when a build has been broken).

Now, a pure Ruby solution has been created. Although a very young offering, the incredible simplicity of Ruby allows a far easier extensibility than the other CruiseControl options. Here are a few of the interesting features:

  • All CruiseControl.rb config files are Ruby, for nice DSL-ish syntax

  • Uses Rake by default for builds, but can support NAnt, Ant, MSBuild or anything other build tool. In other words you CAN use CruiseControl.rb as your CI systems for any target language or environment, not just for Ruby or Ruby on Rails projects.

  • Build messages can be sent via IM using Jabber

  • The same CCTray system tray application can monitor CruiseControl.rb servers as well as CruiseControl.NET servers.

CruiseControl.rb looks to have the core features required for a decent, even an amazing CI system. However, being such a new tool it still lacks some really cool and useful add-on things like integration with Fitnesse, Simian code analysis, and the other neat add-ons that can easily integrate with CruiseControl.NET. Given that the CruiseControl.rb is pure Ruby, and the prolific nature of the Ruby open source community, I would not be surprised if those gaps are filled very quickly.

Rock on, Thoughtworks!

Monday, March 12, 2007

Aptana + RadRails = Much Web Development Goodness?

AptanaIt was a couple of weeks ago when the RadRails team acknowledged that the ship had started to wander off course. Without any revenues, and with too few project contributors, the project was looking adrift. Could this be the end?

Do not fear, gentle reader. Last week, the announcement came at EclipseCon that the RadRails project is now part of the Aptana project. Up until this announcement, I had never heard of Aptana. What is this, I said. AJAX IDE, JavaScript debugging, support for every major JS library from the now ubiquitous Prototype to my current personal favorite jQuery. Of course I had to immediately download and install it, and try out the RadRails integration.

Despite some initial hitches with the install that required a retry or two, and a weird error message when opening RHTML files, I think that I will spend some more time with it to really put it thru its paces. I like what a good IDE can give you, and so am willing to put up with a bit to see if Aptana can deliver what it promises. I will be posting here with my results...

Monday, March 05, 2007

JRuby Has Won The Rails Race vs. .NET

So now it is official. The latest build from the JRuby team is now running Ruby on Rails in the JRuby runtime. Great work from that team! The Sunsters up top must be gloating right now.

And Microsoft is still MIA. Despite some hopeful signs of life, the silence is deafening from Ray Ozzie and the .NET camp (is that a band?). MS had better have some damn strong announcement at MIX vis-à-vis Ruby.NET or some top secret John Lam project if they want to stay in the game.

In the meantime, I still think that YARV will be the runtime for me, based on sheer performance alone. Not to mention that is now part of the Ruby SVN tree.

Thursday, March 01, 2007

Now Computerworld Jumps In On The Rails Lovefest

According to Computerworld today, Ruby on Rails is the number one of the "five most important technologies that you need to know about in 2007." Oh yeah! As I wrote a couple of days ago, now even the oldest of the old school enterprise publications are showing the love for Ruby and for Rails.

That in itself is quite exciting. Another interesting point to note, is learned by looking over the list of the other four hot technologies. Three are hardware related, and and the fourth is grid computing. So Rails is the ONLY important new application development technology right now, according to Computerworld? So it would seem...

I cannot say I disagree, but I am still amazed!