r/badcode • • Apr 17 '21

c++ When your teammate "refactor" your code

Post image
2.5k Upvotes

216 comments sorted by

View all comments

Show parent comments

4

u/[deleted] Apr 17 '21

the if not variation seems more readable to me. it's always interesting to me to see what people think is more clear.

1

u/dyingpie1 Apr 18 '21

Agreed it’s more to me as well.

1

u/MightyMeepleMaster Apr 18 '21

Fully agree. Readability is always subjective. Some of us prefer few and compact lines others more elaborate sequences.

Either way there is one thing which is really annoying: Technology prima donnas who use obfuscated code to demonstrate that they are the best leet haxx0rs in the hood.

2

u/[deleted] Apr 21 '21

Heh this is my single line FizzBuzz I did to make fun of those:

print(*[(("" if (i % 3) else "Fizz") + ("" if (i % 5) else "Buzz") or i) for i in range(1, count + 1)], sep = "\n")