Lately I’ve been spending a lot of time thinking about my career and where it’s going. I don’t want to give the impression that I have never thought about my career before, but now the thoughts are becoming constant.
... and so on ...
I know, an odd introduction. But have you ever been through this? You've been working on a project for 2 years. And although you attempt to make your life easier by abstracting things out or adding tests, it still seems to take longer and longer to develop new features (even small ones). Even to the point where you'd rather not work on that product anymore. Or maybe, you're a rockstar developer and you simply pass off this masterpiece to someone else to maintain, just to find that they're a terrible developer and take twice as long as you do? Yea, you're probably not a rockstar...
Let's write the perfect piece of software: Everything is abstracted and everything is programmed to an interface. We use IEnumerable everywhere and there isn't a single grouping of code repeated. Everything has a "single responsibility" and functions are 5 lines of code or less. "Amazing," they all say to you. "You're super smart," they snicker, with a twinkle in their eye. You have risen above the rest, ready to work for NASA or the NSA. No one can bear to be in your awesome presence any longer for fear of being destroyed... yep... they exist.
There is no place for idealism in software development. Any dogmatic attempt to assert that something MUST be a certain way, turns into the above example where each feature gets longer and longer to develop. But hey, as long as the code is "perfect," who cares, right? I care. There are a many a expert that will tell you the "right" way to do things. But it requires wisdom to know whether they tell you "truth." Just because you hear them on a podcast or YouTube, doesn't mean they have ANY idea about what they're talking about. Heck, me included. Why should you even listen to me?
The point is, question everything someone tells you, especially if they tell you how doing "X" will save you time years down the road. It's easy to claim something that has no immediate results. Be cautious with these "experts" of software.
With that said, let me tell you what will help you years down the road.
There is one, and only one, primary focus that any software developer should acknowledge: the ability for software to be maintainable. Of course, correctness, functionality, and performance are all important. However, these will always be easier to address with maintainable software. But let's define maintainability first.
Basically, when you lower the cost and risk to altering software, the higher the maintainability of that software becomes. We must actively reduce code entropy in the process, simply because increased complexity, by definition, lowers maintainability. So having "hard and fast" rules for using "X" everywhere, will make it hard to have the flexibility to create better software.
The next question everyone has at this point is simple: How do we increase a software's maintainability?
There isn't a direct answer, especially for established software. For new software, you can guard against complexity throughout the process. But with established software, patterns and architecture are stuck. These pieces of software require slow refactoring and sometimes the risk is so high, refactoring can be too dangerous to attempt.
But luckily for us, it's called "soft"ware because it can be changed. I am going to provide a couple suggestions and things you should think about when trying to make software more maintainable:
This list is not exhaustive, but it can give you some things to think about. Ultimately, your focus should be to phase out your job on that software product. When you're not needed anymore, the software can be deemed a success. This means your software is working and you get to move on to bigger and better things.
Note: This, obviously, assumes that you're not kicked OFF the team for such terrible programming practices.
I know it can be hard to see how to create maintainable software from these steps. I will create other articles on how to do this and what it looks like later. But for now, good luck, and God speed!
Check out our thoughts here.
There is one, and only one, primary focus that any software developer acknowledge: the ability for software to be maintainable. Of course, correctness, functionality, and performance are all important, these will always be easier to address with maintainable software.