Last Sunday I finally had a decent programming session working on a tool that I use for my own purposes. Such sessions became pretty rare for me, because at work I’m mostly dealing with bug fixing, so I spend most of the day debugging and reading code.
So the tool I was working on is an old project of mine – a plugin container application that has no user interface apart from a context menu that you get after right clicking the system tray icon and an options form:
The thing is that sometimes I need to write some small application for my own use, but I don’t ever start it, mostly because I’m too lazy to create a user interface for it. For example, I needed a small app once to switch between different MAC addresses for my network card. I didn’t write it, because of the user interface part. Writing user interfaces is boring. That’s why I decided to go with plugin approach and a very minimalistic UI.
Anyways, that was like two years ago and I had the first version of the app ready in a day. It was great and working, but things got worse as I learned about different programming patterns, architectures, principles of OOP and similar things. Yes, it’s a great knowledge, so I ended up rewriting my application to make it decoupled. The levels of abstraction increased and increased and increased… and I dropped it. A simple application has became over-architectured and impossible to implement new features to.
What was once a simple working tool now became a pile of interfaces and half-finished implementations that did not work. So I decided to revive it again and what I did was remove some unnecessary abstractions and doing things in the easiest possible way. This saved me tons of thinking and what’s more important – my tool was working again. I even implemented new features into it easily within minutes.
So the lesson learned is: you can have the smartest architecture in the world, but it doesn’t matter at all if the application is not working.
Yes, I still try to follow all the principles and good practices, but it’s obvious that sometimes you need to be pragmatic and choose working software over ‘good’ design. Especially in pet-projects 🙂