Obama's maintenance nightmare

Posted Wednesday, November 5th at 8:13p.m. under Work


On the 1st of this month, my promotion at work became official and I am now an official "Software Architect." It follows three full years of advocating the upgrading and modernising of the way we write code on our "corporate" development team. In my first post in this blog back in July, I wrote about how I was trying to save my career through a process called guerilla refactoring -- basically going rogue and fixing code and making it right without telling anyone. In the four months since that post, I became so confident that my work spoke for itself that I adopted a much simpler position - back me completely on the changes I want to make or I'm leaving.

Thankfully, my employers chose to get on board the change train.

For me I saw it as a personal victory. I don't like to quit something just because it's tough and my decision to stick it out and fight for change has been justified. Now I have to repay their faith by making the right changes and being patient through the long road ahead. I have enough experience in trying to implement small changes to know that trying to revamp the fundamentals of the way people work will be by far the most difficult thing I will ever embark on, but I wouldn't have demanded the promotion if I didn't believe I was man enough for the job.

We have several hundreds of thousands of lines of legacy code, mostly procedural Perl, that powers all of our critical products which bring in millions of pounds a month. These systems started small but grew in complexity to become bloated and monolithic, bug-ridden products with severe dependencies that limited what could be done to improve them. But I believe I can change that and bring us into the 21st century. This means Object Oriented Programming. Code reviews. Unit Testing. Refactoring. Model View Controller and all manners of proven techniques for writing maintainable code.

Over the next few months, I'll try to post regularly about the changes I attempt to make and the experiences of my most notable successes and failures. I'm sure there will be many of both.

With all this talk of change, I'd just like to spare a thought as well to this American guy that I know who also won a promotion recently, although I doubt he had to fight as hard to get it as I did mine. Still, on the 20th of January 2009 Barack Obama will become the 44th President of the United States of America, and he's taking up probably the worst maintenance job in history. The last guy in charge made a complete mess of the existing system and it's going to be this guy's job to go in there and clean it up. Personally I wouldn't touch the job for love nor money, but he seems pretty confident that he can turn things around.

And I wish him all the luck in the world.

Posted by David McLaughlin on Wednesday, November 5th

2 Responses


1

Ted Carnahan

Wednesday, December 3rd

I hope in your grand revamping of Perl code you consider the Catalyst framework. It has saved us countless hours of work, and represents the best of MVC in the Perl world. And, of course, Perl programmers have been doing testing since before testing was cool.

2

David McLaughlin

Wednesday, December 3rd

We've ended up rolling our own framework using Moose, mostly for reasons concerning integration between "new way" and "old way" systems. It's just not realistic that we will get the time to do complete rewrites of "working" systems, so in the short term we need to be able to start working in an OOP/MVC way and start unit testing new code whilst allowing it to play with the procedural mess all around it... fun times. The framework we're writing is aimed at maximising this, and so far it's proven to be doing a good job.

I looked at Catalyst and its features closely though, also the new Mojolicious framework that is in development. The thing I liked about both is that they really convinced me to stick with Perl as our development language - the code was extremely clean and elegant, something I hadn't really seen before in Perl. Once I knew that was possible, I haven't really looked back.

I've been using Test::Class as I go along for testing our new code too, I'm really pleased with it. Definitely the way forward.