DEV Community

Asael Shinder
Asael Shinder

Posted on

Somebody Changed Your Code After You Left It

You come back from a week away, or you open a file you have not touched since spring, and the thing you wrote is not there any more. Same behaviour, different shape. Your structure gone, your names gone, someone else's approach sitting in its place. Nobody mentioned it.

The first feeling is a small cold one, and it has a sentence attached to it: so that was not good enough.

Before you accept that sentence, look at what usually causes this. Code is a shared surface that gets pushed around by whatever requirement arrives next, and the person who changed yours almost certainly had something you did not have. A constraint that appeared after you wrote it. A production incident at two in the morning that made a clever bit of it unaffordable. A standard the team adopted last month. A second caller that your version was never designed for.

There is also a plainer explanation that surprises people. A fair number of engineers rewrite things in order to understand them. It is how they read. It carries no verdict at all, and they would be genuinely startled to learn you had spent a day thinking about it.

The useful move is to go and get the information instead of sitting with the feeling. Ask about the change, specifically and without any temperature in it. I saw the import got restructured, what did you run into? That question costs you nothing, it is not a challenge, and it is close to the cheapest senior level lesson available, because you get handed a constraint you have not met yet.

Whatever comes back is worth something. A real problem you missed is the best possible outcome, since you now know it. A team standard nobody told you about is a gap in how people are onboarded, and you can fix that for the next person. Personal taste is information about your colleague, not about your ability.

The only version worth objecting to is silent replacement with no reason available when you ask. You are allowed to ask once, plainly.

And notice the other thing this means. Code nobody uses is never rewritten. Yours was in the way of real work.

– Asael Shinder

Top comments (0)