Wednesday, November 11, 2009

The horror of programming

I've been roundly attacked, by programmers, for leading children astray. This comment is typical in its content, but more eloquent than most:

We should not fool children with this nonsense. Programming isn't about problem solving, fun, or beauty. It is about architecture, patterns, and tedious comma placement in templating languages. Give a child a copy of PoEAA. If the child enjoys it, steer that child into programming. Otherwise, encourage them to find a career that requires critical thinking, pride in one's work, and elegance; encourage them to be a carpenter.

I've edited that ever so slightly, the original is here:

My initial response included the lines:
I've been a programmer for nearly 30 years, a professional for most of the last 20, and I've done very little that wasn't problem solving or fun. Some of it was beautiful too.

I spent this evening in the Kingston Arms in Cambridge talking excitedly about Clojure with a bunch of really nice, interesting geeks. It was immensely enjoyable.

And this came back:
Not at all, I should have set off my post with sarcasm tags and added an 'A' to make PoEAA.

In fact, I love programming, but the short time I've spent in industry (now just over a year) is a bit disheartening. At home, I love hacking my toy Lisp interpreter or working with profs at the local university. But in the supposed "real world" there is very little to reward excellence that goes much beyond keeping the system or application running as a whole. Even though it may cause future headaches, the short-sighted-cutting-of-corners is often rewarded. And furthering the state of the art is almost never a priority. Perhaps I am at the wrong place, but these complaints seem widespread.

Sorry for the sour grapes. Nearly all of my daytime posts are fueled by php frustration.

Now I'm really troubled. This is a young man, who likes programming so much that he writes LISP interpreters at home. I do too, and it's the sign of a truly lost soul. But one lost in the joy of it all!

(A quick google reveals PoEAA to be "Patterns of Enterprise Application Architecture", by Martin Fowler)

Now, it would be very wrong of me to slag off a book I haven't read, so I'll confine myself to judging its title, which I have:

"Enterprise" is a word I have come to associate with tedious overcomplicated unusable rubbish. Examples are legion.

So I'll guess that this book is a tedious overcomplicated unusable rubbish version of:

Design Patterns: Elements of Reusable Object-Oriented Software, by Gamma Helm Johnson and Vlissides.

And this original Patterns book was joyful in its spirit, but it should really have been called: 'How to do all the things you can do in LISP if all you have is C++'.

A point I believe the authors considered so obvious that they didn't bother making it. [citation needed]

So now I feel like a man who has been offering round fine cigars and whose friends have, as a consequence, developed 40-a-day cigarette habits.


And I'm not sure how to respond. Not long ago I showed python to one of the brightest people I've ever met. He took to it like a duck to opium, and within a couple of weeks had written a truly impressive program to take advantage of arbitrage opportunities on betfair by screen scraping.

As a result, he walked into a programming job in London, where he tells me that his daily work involved programming in a deservedly obsolete language. His shop mandated copy and paste programming on the basis that it was a safer technique than using GOSUB.

He's now moved on to writing Java as part of a large team, as part of his firm's 'advanced research' effort.

Every time I talk to him he seems a bit less full of the joy of life, and I wish I'd never shown him how to start that damned interpreter.


But here goes:

A well paid job which you do not enjoy is a curse. Once you start to depend on the money, it stops making you happy and you are left with an infinity of drudgery which has to be endured if you are not to lose the things you have bought. The philosophers are unanimous and clear on this point.

If you are in an environment where everyone else is well paid, you don't even get the warm glow that comes from high status. Instead you just find yourself craving larger and larger amounts of money.

The process ends in a very few cases with a yacht in St Tropez that you are too busy to visit, but which you own to impress your friends. And that's what it means to be successful. Such people may or may not be happy. How would I know?

It doesn't matter, because they are a set of measure zero. As rare as world-class footballers are in a world of dreaming children.

But in the vast majority of cases you have a tedious daily grind. Your soul dies, and all you have to show for it is the desire for more money.

If you enjoy programming, then you have something that you love.

If you want to be a prostitute, be a courtesan rather than a crack whore.

First you need to go cold turkey.

You'll need about £2000 pounds. Quit your job and go skiing. Snow is always falling somewhere in the world.

Find a resort where there are youth hostels as well as hotels, and stay in the cheapest hostel you can find, sharing a room and cooking facilities.

You will meet large numbers of enthusiastic young people who are making sacrifices to do what they love. They work long unsocial hours at menial jobs in order to ski. To do what they love.

They are the happiest people in the world, and they are great fun. They will take you in and drink with you round the hostel table. They will teach you to ski for the sheer joy of passing it on, and show you where the best bits of the mountain are.

You will be a student again. You will remember why the old speak wistfully of student days.

Eventually you will get bored. When you return home, the idea of a big house to yourself in the suburbs will no longer seem so compelling.

Rent a room in the centre, near the university, because that's where the clever interesting people of all ages are. Make sure that you share a house, but you are now permitted to have a room to yourself. The luxury!!

And now find a job.

Not a permanent job. Never ever, not unless you're starving.

Find someone who has something that they need doing quickly.

Agree to do it for them at an hourly rate. They will pay a freelance three times as much as a permanent employee for the same work, and there are good reasons why that's a good deal from their point of view too, so don't be shy.

Word of mouth contacts from your last job are the best way, but there are agencies for such things if that doesn't work, and you are even allowed to consult for the company you walked out of, as long as the arrangement is paid by the hour.

From now on, you might only work for six months in any given year.

But that's OK. You will still make more than you used to, and you're back to living like a student so six months work will keep you going for three years.

Never allow your expenses to increase to the point where you even notice them.

And suddenly you are free.

You are free to choose to do things that seem interesting. It doesn't matter a bit whether they are for someone else, or just things you want to do, which are of no possible value to anyone else, like lisp interpreters.

There are always enough interesting jobs to pay the rent.


In case you think I'm some starry eyed idealist, preaching an impossible gospel,
I have lived like this since I was twenty five. It works a treat. Every time I've found my expenses creeping up to the point where I need to work rather than want to work, off to the ski slopes again for a detox.

And the thing is that there are plenty of companies round here that I'd be happy to work in as a permanent employee. Enlightened companies doing interesting things. I often work for them as a freelance, and their people are happy and fulfilled. But I value my freedom for itself.

And every time I do something, even a particularly mindless two week testing job that I once got tricked into, I learn something new. And as long as you're learning, you're enjoying. For me they are the same.

You said:

Otherwise, encourage them to find a career that requires critical thinking, pride in one's work, and elegance; encourage them to be a carpenter.

I have all those things. So do many of my friends. You might want to consider that a man who trains as a carpenter can set up his own business and make things that he loves for grateful clients for his whole life. Or he can spend his days on minimum wage in a gloomy factory operating one stage in an assembly line.

We programmers have the same choice. The only real difference is that programming is intrinsically more complex than carpentry.

1 comment:

  1. This is an evil posting... ;)

    I suppose that there may be alternatives. How about being fortunate enough to have jobs where you get to earn a healthy salary *and* get to do what you love doing. The trick is to find companies willing to allow this to happen, and sticking with them. I say trick because there appears to be considerable magic involved.