So in addition to my regularly-scheduled job, I somehow agreed to do some training for the group of grads who joined the grad scheme the year after me. In Visual Basic for Applications. Which I loathe.
Now it's easy for me to say I hate Microsoft products. I'm a Linux user and a civil liberties geek, so it's fairly natural for me to hate those monopolistic bastards and their locked-down software. But this goes waaaay beyond that.
Visual Basic was the first programming language I ever learned. A friend introduced me to it when I was fourteen, and I was soon able to produce a cute little quiz program that got me really good marks in IT class. At the time I thought VBA was the bee's knees.
The process of disillusionment took a while. It probably started when I took an internship at a software company that did all their work in Python. The people were really nice, but it was immediately obvious how bad my programming style was. Stuff that should be completely intuitive for any programmer just wouldn't fit into my skull. I left with a much expanded repertoire of concepts, and a very strong sense of what makes code easier or harder to maintain.
My education continued over the years. A key resource was the comedy site
The Daily WTF which, in addition to being hilarious, is a brilliant primer on how
not to write code. There's a strong dose of the scientific community to professional programming: most coding conventions have arisen from years or even decades of gradual refinement by large numbers of skilled practitioners.
The icing on the cake was probably my university years. I did maths, and the programming modules were by no means focused on best practice, but I got very very good at elegantly expressing difficult algorithms in code. Software is the true language of mathematics; standard mathematical notation is just a shorthand.
And there's something beautiful about writing code for a well-designed programming language. When concepts and implementation tie together neatly, it brings a tear to your eye. Python is very good on this point: if you can think it, you can probably express it in Python code.
And then I took on a summer job with a telecoms consultancy. Who did all their programming in VBA for Excel. And I realised how very far I'd moved on. By week 4 I was gnawing at tables trying to get this kludgy toy language to do what I asked it to.
It doesn't have proper error handling. It doesn't have a proper object layer (try passing a function as an argument and call me a liar). It's not even remotely self-consistent in approach or content. Most of the Excel component is a wrapper round the Excel UI, which means that things like text search aren't at all programmer-friendly. Source control? Don't be silly.
Almost every language has something going for it. Java is slow and ugly, but at least it's portable. Lisp is impractical, but so very elegant. C++ is time-consuming, but good grief it's powerful. VBA is ugly, platform-specific, hard to use, lacking in basic and advanced functionality, but... there is no but.
As languages go, VBA stinks.
And yet, despite knowing this, I've managed to land myself in an industry with the highest concentration of VBA users on the planet. The vast majority* of actuarial "tools" are just spreadsheets with a VBA layer to do the messy stuff (batch-processing, goal seeks, etc).
I really can't take much more of this. It's as if I was a semi-pro mountain biker and the company forced me to ride around on one of those tiny clown bikes. It's as if I was a fencer and the only weapon they'd give me was a feather duster.
What makes it worse is that most people don't think this way. They've never even spoken to programmers, they show no awareness of software best practices or concepts like separation of concerns. Their idea of version control is taking a backup copy every few days (and that's only if they're particularly on-the-ball). Even commenting the damn code is seen as a bit avant-garde.
Most of them have had no formal training. Now I freely admit that neither have I - I'm a software dilettante. But I know my limitations, and I put a fair amount of effort into discovering what lies beyond them. By contrast, most people in the finance industry are alchemists: they take what they've learned from one or two tutors** and elevate it into divine knowledge.
I worry that, if I stay too long, I'll turn into one of them.
So I'm producing this VBA training material, and hating every minute of it. It's like swimming through treacle. The only good thing I can say is that, once the training is over, the company will have someone
else to lumber with VBA-related tasks.
Rant over.
* The only alternative appears to be COBOL. This kinda says it all.
** Who learned it from their tutors, who learned it from their tutors. The chain generally terminates with a bloke who read "VBA for Dummies".
Read the full post