We write code, we love to write code and sometimes we love the code we write.
At times, i feel so connected to my code that when product owner decides to change the feature or let go of it, i cannot say good bye to my code.
With experience, I’ve found that it’s ok to comment out or even completely remove the code i have written if it is no longer meaningful.
Sometimes a task that i developed in front end can be offloaded to backend for performance gains. Though it took me 3 days to write it in front end. I just share the snippet i wrote in JavaScript to backend, so that he can translate it in his language and then improve it.
Backend can utilise the multi threaded capabilities and is usually faster than browser.
Don’t stick to your code if it doesn’t serve the purpose or a new implementation comes which can improve the whole product.
Its not your girlfriend, let it go. Ghar ki kheti he.