It has taken me a few years to realize, but I get really attached to the code I write. I finally start to understand what people mean when they say “the code you write is not your code”.
Here are a few things I think about when I start to get frustrated/concerned when the code I have written start to change.
- all code is meant to be changed, it is not set in stone.
- people can iterate on it because it acts as a base for your teammates.
- deleting code is better than adding code.
- no code is perfect on the first iteration, and in a startup, you usually don’t have the luxury of having multiple iterations to refine it. That is fine.
- it is not because code you wrote is being rewritten/modified that people think your implementation was bad.
- it is just code, it is just a job.
A few things that can help:
- if you can, and want to, work on small side projects to keep programming fun, and nobody will rewrite it. :)
- talk with your teammates about the specific reasons something needed to be rewritten.
- it does not matter.