r/badcode • • Jul 16 '20

java I've always wished java had a method to find the length of a string

Post image
2.9k Upvotes

r/badcode • • May 12 '21

c++ Comment before semicolon

Post image
2.7k Upvotes

r/badcode • • Jul 20 '21

c++ friend found this in a real 20+ year old codebase

Post image
2.7k Upvotes

r/badcode • • Jun 07 '21

js This abodmination is in production already.

Post image
2.5k Upvotes

r/badcode • • Jan 10 '21

python My friend thought that 1 is a string in Python

Post image
2.5k Upvotes

r/badcode • • Apr 17 '21

c++ When your teammate "refactor" your code

Post image
2.5k Upvotes

r/badcode • • Aug 07 '21

python I was wondering why it was running slowly

Post image
2.5k Upvotes

r/badcode • • May 26 '21

java I was playing Clash of code and in the heat of the moment I decided to use a for-loop to count str.length...

Post image
2.4k Upvotes

r/badcode • • Apr 27 '21

typescript Someone only watched if tutorial

Post image
2.4k Upvotes

r/badcode • • Oct 14 '20

c# I shouldn't be naming variables

Post image
2.4k Upvotes

r/badcode • • Jul 19 '21

js Variable naming can be difficult, but identifying them can be even more so.

Post image
2.4k Upvotes

r/badcode • • Jan 12 '21

js Yes, this is in a production build.

Post image
2.4k Upvotes

r/badcode • • Oct 30 '21

java So he had to write loop that prints numbers from 1 to 10

Post image
2.3k Upvotes

r/badcode • • Jul 01 '21

typescript I work with a junior who loves abusing ternary expressions. Usually it's just ones that end in ": false" but he's stepped up his game here

Post image
2.3k Upvotes

r/badcode • • Feb 11 '22

go Here is a great way to troll your fellow devs

Post image
2.3k Upvotes

r/badcode • • Aug 02 '20

js Who needs a database, when arrays exist?

Post image
2.3k Upvotes

r/badcode • • Jan 10 '22

java I present the objectively best way to setup braces: In a massive block at the bottom

Post image
2.2k Upvotes

r/badcode • • May 31 '21

js Clever?

Post image
2.2k Upvotes

r/badcode • • Jul 10 '21

js ah yes, Array check

Post image
2.1k Upvotes

r/badcode • • Feb 18 '21

c# I've done bad things

Post image
2.1k Upvotes

r/badcode • • Sep 26 '20

c++ I know Instagram code is garbage, but wtf

Post image
2.1k Upvotes

r/badcode • • Jun 17 '20

c# You've heard of spaghetti code, get ready for sausage link code

Post image
2.1k Upvotes

r/badcode • • May 11 '21

java The absolute best way to calculate change. I see nothing wrong with this approach, nothing at all.

Post image
2.1k Upvotes

r/badcode • • Aug 05 '21

typescript how to check for a file type

Post image
2.1k Upvotes