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
310M

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
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog