Ravi Mohan's Blog

Monday, November 22, 2004

Back To The Seventies

Sergei Dmitriev wrote an article on his blog about what he calls Language Oriented Programming. Sergei claims "It is time to begin the next technology revolution in software development, and the shape of this revolution is becoming more and more clear. The next programming paradigm is nearly upon us." Unfortunately the rest of the essay is not very successful in establishing this claim.

What he seems to establish is that languages like Java and C# are inadequate for serious programming and makes the developer jump through hoops to get things done and results in lots of verbiage.

Fair Enough. The rest of the article explains a series of necessary languages and the tools required for manipulating them . Brian Selinsky rebuts this line of thinking in his blog .

Brian has two objections.

First , he says that custom languages are difficult to understand because they introduce new concepts which have to be understood by the reader. I think he is partly right.Writing new languages for every minor concept change would end up with weird code. If some set of concepts is better expressed as a library , in frozen languages like Java that is a better option.

But on the other hand one does need languages that reflect the underlying concepts. Using an object based library to do what SQL does well, for example is stupid. (I have participated in a project in which the chief designer went object crazy and reinvented database concepts as an object library . Believe me it is really no fun) .

On the other hand when you do need to "build a language to reflect the domain" the best way to do this is with Lisp Macros .(Doubters should read Paul Graham's On Lisp ).The good thing about macros is the the full power of your lisp environment is available at all points of time.one does not need to rebuild tools for each language defined.

Brian goes on to say "It's quite possible that languages like Lisp failed to become popular (beyond a small community) partially because they encourage programmers to write domain-specific languages. This has a tendency to fragment the community into groups that have trouble communicating (a tower of babel effect). " This is simply not true . The failure of Lisp to "take over the world" has many reasons but this is the first time i've heard that the macro facility was the reason . These minor quibbles aside ,I agree totally with Brian. Asking the typical "enterprise and J2ee expert " programmer to hack macros (or for that matter to use "Language Oriented Programming" to define new languages) is a sure invitation to disaster but this is because you macros are a power tool. You wouldn't ask someone whose driving experience is limited to tricycles to drive a ferrari would you ?

Inventing a whole tool chain to re invent what was essentially complete in the seventies seems suboptimal to me.In other words , learn lisp first . If you have a lot of time on your hands write a lisp library that can call into java and use objects defined in java libraries. That will give you "Language Oriented Programming" (oh nonot another buzz word) without a "technology revolution" .

Friday, April 02, 2004

Spells and Software

How hard is the software you write ? Most "business" software is more a matter of repeating endlessly minor variations on a fairly simple theme. Most "product" software consists of fixing an endless stream of bugs.

But if one goes beyond the "normal " part of software (and sometimes one does need to write those endless jsp pages or whatever to put bread on the table - been there, done that ) one sees an endless panorama of exciting, mind blowing software that waits to be written. Most of us software developers are so buried in the soporific details of our "day jobs" that we soon forget the wonder that brought us into software.

My epiphany occured whan i was about 10. I had never seen a computer but one of my cousins had a small "Space Invaders" portable game. I couldn't believe that somone had actually WRITTEN it for me to play.

Software is the nearest thing to magic in the 21st century.

Your thoughts, converted into arcane spell like languages move money, machinery and people to do all sorts of wonderful things. And as with magic, there are Master Wizards and Spell Crafters who extend the frontiers of the art. There are tomes of knowledge which are freely available but remain cryptic "until the student is ready". And of course there are frauds and charlatans(no i did NOT mean "managers"! I actually know a few GOOD managers!All two of them :-P ) . See all the nonsense happening in the name of "test first" or "Extreme Programming" for example.

A few people can spout the jargon. Almost nobody can CODE test first.

Here is an example of some software that I think has a touch of magic about it.The folks at the Cortex brought us Clover and now they are going to bring us fisheye! I hope they make a ton of money off their lovely products.

The best advice I have ever recieved on the subject came from Martin Fowler . I was feeling fairly gloomy about "everyone is fairly happy with the status quo " , when Martin said "Why do you care what everyone else does ? If no one does cool things, there's all the more left for you to do".

A light bulb licked on in that instant inside my mind and has never gone off. These days I don't care anymore that I am an Aging Overweight Indian "software professional" . I can write code .And I can dream.

And in the midst of all the CMM ISO madness no one can take that away from me .

So i am learning LISP , running my own consultancy, planning my Ph D ,learning to play the blues.. All the "weariness of the heart" has dropped away and life is crammed full of interesting things to do and code to craft.

All because a Master Wizard , perhaps unknowingly, passed on a spell to me (and I freely pass it to you ).Four words.

What do YOU care?

Tuesday, March 16, 2004

The Fowler Effect and The Thief's justification

One of my friends said " You thoughtworkers , (conveniently ignoring the fact that I am no longer a Thoughtworker) always point at Martin Fowler and say 'See how cool he is. Aren't I cool too?' ".

Though this was intended as a joke, there is a kernel of truth to this.

And it is not about Thoughtworks( which is one of the finest companies in the world. I advise any non thoughtworker reading this blog to consider working at Thoughtworks for a year or two.You'll meet some very high calibre peple and learn an incredible amount about how to write good code)

I have seen people from Lucent and even IBM Global Services (!!) and Wipro (!!!) and God Forbid, TCS , walk around with their noses in the air .

There are a few Indians , thoughtworkers and others , who stand on their own feet, technically and otherwise . But there is also a tendency to "derive" one's own coolness from a company, a co worker etc , which I think is shameful .

On a related thread, yesterday I was speaking to a friend who was in a moral dilemma which was all about being attracted to ,what we in our college days used to call an an AMG (Another Man's Girl). To a degree the attraction was reciprocated and my friend was in a dilemma as to proceed further or not.

In my usual brutally direct fashion,I pointed out that the solution to poverty is not theft . You can't steal another man's girl just because you don't have one (or more :-P ) of your own.

Back to the Fowler Effect .If you are poor in "coolness" the solution is not to steal a bit of Martin's , but to generate some of your own !

In general I think what one ought to do is to strive to reach the levels of excellence exemplified by the person(s) you admire. That is not only personally fulfilling, it is also a fitting tribute to your idol.

Besides it puts the "coolness" where it belongs - inside you .

So, yes, I want to be known for my technical skills . Yes I want to speak at OOPSLA someday. I want to write books . And Martin Fowler has been and remains a BIG inspiration, as a person who has "walked the walk". And Thoughtworks has been very educational . But I don't want ANY respect for having worked in Thoughtworks or having worked with Martin . Just react what I do and who I am and I am more than happy. Having said that, I WILL dedicate the first book I publish to Martin and Thoughtworks!

Tuesday, February 03, 2004

A Tale Of Three Movies

The last few days saw me in the grip of a flu/fever/cough infection that drew my temperature up and enthusiasm down.

So the moment i showed some signs of living to fight another day, I thought i would go and see a movie to revive my spirits. So then I and a friend went off to see Master and Commander - The Far Side Of The World - apretty decent movie about British warship and its battles with a French enemy. More than the naval action though , the story is about the men who sail the ship and fight and die for her. So i was feeling fairly satisfied when I was persuaded to see one more movie and unluckily for me i chose Pooja Bhatt's latest movie called "Paap" (that's "Sin" for you non hindi speakers).

I would strongly urge foriegners who are looking to "understand India " to see this incredibly stupid film. For, in understanding Bollywood's inanities , you would get a glimpse into the hopelessly muddled psyche of the metro dwelling Indian.

First of all if the plot sound somewhat familair, it should be. The script is a rip off Of "Witness"(by Peter Weir, starring HArrison Ford). The hero John Abraham, looks suitably bewildered at various points in the film, but the heroine(Udita Goswami ) who is apparently trying to portray a "Virginal Yet Sensual Indian Woman Tempted By Forbidden Desire" falls flat.She apparently has some lama's trick whereby she can withstand the cold , because she is often shown jumping into freezing lakes with very little on. Jeez just make a soft porn film on something and just be done with it . If Pooja Bhatt wants some direction on how to do this in a "socially relevant" fashion , she should talk to Mira Nair. Spare us the horrendous pseudo philosphy.Mix in a lot of comical lamas and impropable dangling plot threads and you have some idea of what this hopeless movie is like . The best part of the whole experience was the audience , who were rolling in the aisles, laughing at the various "profound " moments in the film.

You know you'd better quit directing when you cook up a scene with "young girl quoting poetry to handsome hunk and hunk falling in love" and the audience is in splits and hooting at the nonsense on screen. As Stephen King once said " Horror and Comedy are the hardest genres to get right. Unless you do it right your horror becomes comedy and your comedy beomes horror". Well, in Pooja's hands Romance becomes rib ticking comedy and the "forbidden desire" motif looks like a couple suffering from simultaneous epilepsy.

Just to remove the bad taste, I put on a DVD of Sholay - a movie made in the 70's and arguably the best movie ever made in Hindi. After the horror of Paap, Sholay was pure bliss. A simple story well told .

A Pity Indian film makers never learn from their few successes.

Monday, January 05, 2004

Software@India

I am beginning to despair of serious design level software development work ever coming to India. The (profit = number of bodies * x $$) paradigm ensures that most work coming to India is of the "here is a framework and here is how you do X. Now do 100 of these. Thank you " type .Of course the framework design happens in the USA .

The same for management . Except a few people who run their own companies or are the CTO/CFO level, most "project management" in India seems to consist of taking orders from higher ups in the USA and "motivating" the technical folks.

So amidst all the rising euphoria about India being the next software destination I am pretty cynical about the whole "our jobs are going to India" clamor i hear from my American friends.

Believe me you folks are better off without these jobs. Go do something interesting with your lives ...

It is not that we don't have talented people in India. But most people i know work at a fraction of their potential. I would guess the reasons are a combination of the Great Indian Laidback Attitude and a lack of opportunity and initiative.

i'm depressed . :-(