I've been a professional software developer for around a decade now, and I've worked with roughly a dozen code bases, ranging from the tens of thousands to the millions lines of code. And, while line count is no perfect measurement of scale, it does at least get us close. Recently, a friend of mine asked me, why are you a software developer? I would typically say something like, because its fun! But, it really isn't fun. I was stumped.
I do recall at one point in time, I was genuinely excited to be learning about different technologies, best practices, and how to level up my software game. These days, I don't do much of that. I really do know quite a lot, and learning more just isn't pushing my career forward. I've had some rather unpleasant events recently, and my focus has really shifted. I'm working on reflective listening, building relationships, keeping myself healthy and spending time with my daughter, while of course, still programming a bit.
I also haven't been on too many projects that lasted longer than a year, and I haven't had a "greenfield application" in quite some time. It seems everywhere I look there are half finished code bases, for one reason or another. The projects that aren't thrown away, are riddled with typos, over abstracted nonsensical code and useless code galore. Perhaps, useless code isn't a fair criticism, it's really more so, "I'm pretty sure this subroutine does nothing... But uhh... let's not touch it, because I'm not sure what will happen if I get rid of it".
I think the real reason for these harsh quality issues are pretty straight forward and non-controversial, people are simply. in a hurry. There are deadlines, pressure to finish, and considering so many projects I see get scrapped, it's no wonder developers are making careless mistakes. I'm certainly no exception.
But that begs the question even more, why be a software developer? If every project is such a mess, why do it? Some might say, well, if you aren't happy, change your job. But, I can assure you, I've done that, I've worked with so many projects... and the really all are just as a big a mess as the next. The idea that there is a wonderful "magical fairy project that is gonna be the greatest thing ever" right around the corner doesn't do it for me anymore.
Here's what keeps me going. This is my rule, this guides my every action, every pull request and reflects my values.
Make every file you touch a little bit better. With every feature you implement, and every bug you fix, always do one of the following things.
I do this by:
- Removing code that has no purpose.
- De-abstracting the worst abstractions.
- Fixing a spelling error.
- Formatting the file to be visually consistent.
It isn't fun and exciting work, and it certainly isn't the kind of work you can brag about. But, for me knowing that I am make the project I work in, a little bit better each and every day. And seeing how that adds up over time, that's why I am a software developer.
I'm thinking about writing some more about the dangers of dead code, over-abstraction, typos and poor formatting. But, I'm not sure that is something that would interest you. If it is, please let me know in the comment section.
That's all, Stay safe out there folks.