Unfortunately if you let Junior play in legacy code once, it'll learn some nasty habits and make more of it from scratch, usually when you're trying to sleep.
If you are creating an alternative implementation and leaving the old one in place, you are not fixing a problem, you are just creating a new one (and a third one because you have duplication of logic).
Either refactor the old function so that it transparently calls the new logic or delete the old function and replace all the existing usage with usage of the new one. It does not need to happen as a single commit. You can check in the new function, tell everyone to use it, and clean up usage of the old one. If anyone tries to use the old implementation, call them out in a code review.
If removing or replacing the old implementation is not possible, at least mark it as deprecated so that anyone using it gets a warning.
Let him play in the legacy code. You can just hose him off later before letting him back into the office so he doesn't track it everywhere.
Unfortunately if you let Junior play in legacy code once, it'll learn some nasty habits and make more of it from scratch, usually when you're trying to sleep.
deleted by creator
I don't want that shit all over me though. That's why I hired junior!
That's what the line represents. So they can pull you if you do something nasty.
deleted by creator
If you are creating an alternative implementation and leaving the old one in place, you are not fixing a problem, you are just creating a new one (and a third one because you have duplication of logic).
Either refactor the old function so that it transparently calls the new logic or delete the old function and replace all the existing usage with usage of the new one. It does not need to happen as a single commit. You can check in the new function, tell everyone to use it, and clean up usage of the old one. If anyone tries to use the old implementation, call them out in a code review.
If removing or replacing the old implementation is not possible, at least mark it as deprecated so that anyone using it gets a warning.
deleted by creator
I’m sure that ring buffer started out as a “temporary solution”.
God, I would love that so much