I am God's greatest programmer
I am God's greatest programmer
I am God's greatest programmer
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.
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.
God, I would love that so much
Neither does the senior
Anymore
me when first starting out at a job commenting everything I can
VS
me a couple years in completely lost because I never updated the comments and now none of them make any sense whatsoever
Commenting well is a highly advanced skill. I generally prefer no comments on code since it's less likely to confuse people and I'll merrily purge auto-doc comments and anything like
// getId() returns an id
That comment has negative value.
I can't help it, I always get the mental image of hands clapping sarcastically when I see something like that.
In my experience refactoring lots and lots of crappy code left by devs long gone, a dev who can write useful comments is by and large a dev who can write code clean and simple enough not to need them. If the code doesn't have informative names and clear separation of concern, chances are a comment won't help because the dev didn't really know what they did that worked in the first place.
I write a lot of fairly simple scripts in Bash and PowerShell that should be easily understood by anybody else with moderate experience in the language, but I leave a lot of obvious comments because my coworkers don't write any code and are extremely skittish about my automations. I add them basically to quell their fears.
I'd rather teach people to comment well through my reviews. Much easier to understand two lines of well written function description in English than 20 lines of code.
Yeah well now we have git copilot where your comments include AI suggestions.
Now I have TONS more comments
The leash is good unit testing.
Oh, he'll just change the unit test if it fails.
Unit tests are there to get an @ignore annotation!
There’s also that long time senior dev who’s overly confident in their abilities and force pushes production breaking code directly to master.
Not for long there isn't.
Nah, they’re the one who’s contributing most to the project. Mostly because their code is so garbage no one else can work with it. But that’s not a thing the managers take into account.
This shit happened the other week for me. Senior dev pushed the shittiest JS code without testing the day of a production install and it caused us to have to roll back the install after it very predictably caused a bunch of crashes for pages on our public site. Worst part is, the entirety of what he wrote could've been implemented as a CSS media query
Look, it's me.
Just let me rewrite ONE report from scratch so it doesn't check a specific unindexed table that it doesn't actually need to check and causes the report to be killed by MSQL because it takes too long to run.
Please just one rewrite. Please.
Just one little crystal report.
Just one little crystal report.
Ugh 🤮
I mean I agree with the vibe of that image but holy niche.
Make him unit test it all and then they can do changes that don't break.
Often enough, the old code is so badly intertwined that it's impossible to actually test. Those are the moments where all you can do is nuke it from orbit.
Well I was going for that... They will surrender before they do any changes.
Why is the junior dev tied to the other one's penis?
Because everyone sucks at drawing hands
Bro that's not where the penis is located on the body
Hey, I don't body shame