The code you write today will be killed off in the future. You are not the code you write.
Take ownership and write code that delivers value but be prepared for it to be trashed.
When you work for a software company, the code you write becomes company’s code.
Executives can change course and take the company in a different direction than you expect. The product that took a year to build is now sunset.
I worked on a product with several developers for over a year. The product didn’t generate projected revenue. It didn’t deliver value to the company. It was killed.
Did I fail? No. I delivered value by building a working product. I wasn’t involved in the decision to build it. It wasn’t the last time my code was terminated.
When I product managed Oil and Gas software, a software developer and I spent one year building a 3D visualization application.
For reasons still unknown to me, another team was secretly building one too. Their application won and ours was scrapped. It feels like you’ve built a sand castle and someone ran right through it.
I see software developers become attach to their code and it causes sleepless nights when it’s scrapped. They feel useless. It’s not a healthy mindset.
As a software developer, you are a craftsman. You are a problem solver. You’re there to connect pieces of code together to deliver value to whomever hired you.
When you build a complex system, you improved by honing your craft. Your craft is in your control and cannot be taken away. The code you write is a shadow left behind by your craftsmanship. The company owns the shadow but you own the craft within you.
As you stack skills and grow your craft, you don’t care so much about the particular code you write but rather the problem you solve.
I can’t control whether the code I write lives or dies. Even if it dies, it wasn’t mine to keep and it already contributed to my craft.
If you want to obsess about your creations then make sure they are within your control. I can control the future of the code in my personal projects. I can control the words I write in my articles. I cannot ensure the survival of the code I write at work.