Sometimes, I think, people are worried that if they make their code too simple, then either:
- Somehow they’re not demonstrating how intelligent they are, or how valuable they are, to their managers, or
- The project will become so simple to work on that anybody can just steal their job!
It’s almost as though if they actually did their job right, then they’d lose it. Now, stated that way, that’s obviously a nonsensical viewpoint. But, if you’ve ever worried about it, here’s something to think about:
What if your code is so complex that you’ll never be able to leave your job?
What if you made something so complicated that nobody else could understand it? Well, then you personally would be tied to that project forever and ever. If you wanted to work on some other project at your organization, your managers would protest, “But who else will maintain this code?” Whoever was assigned after you to work on your code would constantly be walking into your new office, saying, “Hey, how does this part work?”
Maybe you have no conscience, and you’ll just leave the code to some hopeless replacement and ditch the company. However, I’m guessing that most people would feel tied to a project if they were sure that nobody else could ever take it over successfully. And really, even if you just take off and leave, somebody’s going to be calling you up and saying, “Um, hey, you know that one piece of code where…” You’ll get emails from “the new guy”: “Hey, I hear you wrote this code, and I have this problem…” If you can’t make somebody else understand your code and have them truly take it over, then you’re going to be stuck with a piece of that job forever.
In the Bugzilla Project, I am doing the best I can to work myself out of a job. I love working on Bugzilla, but I don’t want to be tied to it every moment of my life. I want to go on vacation sometimes. I want to write music! I want to be able to leave my computer for a month, and not have the whole world collapse. So I work to make Bugzilla simple enough and well-designed enough that somebody else can take over the parts I work on, some day. Maybe then I can go on and work on other things in Bugzilla, or some other programming project that I have, or maybe I could go make an album! Who knows! I just don’t want to be imprisoned by my own code.
If job security is so important to you that you’d tie yourself to a single job forever just to get it, then maybe you should re-evaluate your priorities in life! Otherwise, when you’re making decisions about your project, one thing to remember is this: complexity is a prison; simplicity is freedom.