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.

SavvyWolf
link
fedilink
English
31Y

The best part is that his “or” function changes the semantics of the code in a subtle and hard to find way. :D

Create a post

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.
  • 1 user online
  • 141 users / day
  • 300 users / week
  • 692 users / month
  • 2.83K users / 6 months
  • 1 subscriber
  • 1.56K Posts
  • 34.7K Comments
  • Modlog