Well over a decade ago I remember a coworker would just go through the codebase and add his own coding style.
Instead of if (predicate) {
He would do if ( predicate )
I would always ask why he did it and he said, “well we don’t have any coding standards so I’m going to do it” … I replied, “there’s things like unwritten rules and sticking to whatever’s in the codebase makes it easy”. I told the seniors and they chose not to do anything (everyone just merged into trunk) and they just left him for a while.
Then he turned rewrote built-in logical functions in code like this: if (predicate || predicate) {
Into code like this: if ( or( predicate, predicate ) ) {
This was C# and there was no Prettier back then.
Also, he would private every constructor and then create a static factory method.
Eventually the seniors told him to knock it off. All I said was that I initially tried telling them weeks ahead of time and now we got a mess on our hands.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
Well over a decade ago I remember a coworker would just go through the codebase and add his own coding style.
Instead of
if (predicate) {
He would do
if ( predicate )
I would always ask why he did it and he said, “well we don’t have any coding standards so I’m going to do it” … I replied, “there’s things like unwritten rules and sticking to whatever’s in the codebase makes it easy”. I told the seniors and they chose not to do anything (everyone just merged into trunk) and they just left him for a while.
Then he turned rewrote built-in logical functions in code like this:
if (predicate || predicate) {
Into code like this:
if ( or( predicate, predicate ) ) {
This was C# and there was no Prettier back then.
Also, he would private every constructor and then create a static factory method.
Eventually the seniors told him to knock it off. All I said was that I initially tried telling them weeks ahead of time and now we got a mess on our hands.
The best part is that his “or” function changes the semantics of the code in a subtle and hard to find way. :D