Why while(1) when you could while(++n < n--)? Cheat sheet of obnoxious equalities.1yr ⋅ dchidelf ⋅ r/programminghorror
If only there was some way to know how many cents are in a dollar...2yr ⋅ vetruvet ⋅ r/programminghorror
My buddy just sent me this. His colleague used a white .png as background...2yr ⋅ GiuNBender ⋅ r/programminghorror
I love looking through my old code from the early 2000's when I was first learning to program1yr ⋅ GoBackToLeddit ⋅ r/programminghorror
Found in the Python Selenium code base. Imagine how much time was saved with this abstraction1yr ⋅ AbsoluteCabbage1 ⋅ r/programminghorror
Found in my college textbook. This is neither valid JavaScript nor valid Java !2yr ⋅ RubyBoyYT ⋅ r/programminghorror
Code from production from where I work :) (copied the code in to a new file and changed variable names for the screenshot but this is what I found)1yr ⋅ PerryThePlatypus10 ⋅ r/programminghorror
In my very short career in dev, this is one highlight of programmingHorror.2wk ⋅ the_guy_who_asked69 ⋅ r/programminghorror
Is there a legitimate reasons to not do this in java besides it looking weird?1yr ⋅ khryx_at ⋅ r/programminghorror
Was reviewing a code from a guy who saw a tutorial on parkour games and good God2wk ⋅ MarinoAndThePearls ⋅ r/programminghorror
Most cursed code. Example code provided by my professor for an assignment which mixes English and Swedish in method and variable names and comments. WHY!?1yr ⋅ dartyet1 ⋅ r/programminghorror
Not even Google is insane enough to follow their rules on their own HTML styleguide1yr ⋅ Magmagan ⋅ r/programminghorror
Worst diff I've ever seen (added support for multiple numeral system bases)1yr ⋅ Rudxain ⋅ r/programminghorror
I was told my solution to having my code work on only its second run belonged here1yr ⋅ s3ndm3m3 ⋅ r/programminghorror
The task was to convert a string to a list without using built-in functions. That's the code from a classmate2yr ⋅ LetsMelon ⋅ r/programminghorror
I thought it only existed in stories... but it has happend to me 😢😲😱1yr ⋅ kraneq ⋅ r/programminghorror
Found inside my compiler I've been writing for about 2 years11mo ⋅ KingJellyfishII ⋅ r/programminghorror
[Production code] The previous dev thought it was ok to use floating point variables for money1yr ⋅ CheeseyB0b ⋅ r/programminghorror
my code from two years ago checking if the user chose a valid option1yr ⋅ RafaelSwi ⋅ r/programminghorror
May I present to you: Superbasic++ - A programming language in german2yr ⋅ Nsber ⋅ r/programminghorror
Found in my college textbook. This is neither valid JavaScript nor valid Java.3yr ⋅ whizzythorne ⋅ r/programminghorror
One of my genius coworkers felt it was necessary to disallow any and all multi level imports, despite many a 3rd party library using it for exporting some utilities. Now our codebase is riddled with these `eslint-disable-next-line` comments2yr ⋅ notAnotherJSDev ⋅ r/programminghorror
Code like this is why PHP & WordPress get the hate they do. Found this on a website I just inherited. Fully executable in a public directory.1yr ⋅ jdev4 ⋅ r/programminghorror
This snippet we found was so delightfully perfect that we had to frame it in the office.5yr ⋅ DiamondIceNS ⋅ r/programminghorror
uno dos tres cuatro cinco seis siete ocho nueve diez once doce trece1yr ⋅ elreduro ⋅ r/programminghorror
In a project by two 'senior' devs. Descriptive names here would be the least of my concerns...7mo ⋅ wout189 ⋅ r/programminghorror
So uh. That unmaintainable code i wrote at 3 am that i was never going to come back to now needs to be modified.....1yr ⋅ loonathefloofyfox ⋅ r/programminghorror
Wrote this project a year ago. Have an error originating from this. Completely at lost at what I was looking at, o_o.11mo ⋅ positive-lookahead ⋅ r/programminghorror
This is a Gira Homeserver that automatically sends KNX-Commands to turn off all the lights in a building at certain times.....1yr ⋅ bombaglad ⋅ r/programminghorror
OpenCV with Python textbook. Took me an hour to run line-by-line and find the reason on crushing.3yr ⋅ _g550_ ⋅ r/programminghorror
When you can't be bothered using regex ( it doesn't even work btw)2yr ⋅ Artutin06 ⋅ r/programminghorror
The API I am dealing with has found THE BEST WAY to represent the country field. ONLY 192 VALUES necessary!4yr ⋅ octalgon ⋅ r/programminghorror
On this subreddit I always enjoyed reading bad code and programming related stories, but today it happened to me : I had to write this spaghet because I had literally no other solution2yr ⋅ gp57 ⋅ r/programminghorror
I discovered this today in the backend of our production React/Phoenix app7mo ⋅ WordsWithJosh ⋅ r/programminghorror
I got handed over this code from a guy leaving the company today3yr ⋅ supermaan6_6 ⋅ r/programminghorror
I didn't think about it until i started, then realized a ternary operator is the worst option for what i was doing because it would require this.2yr ⋅ UnwantedTelemarketer ⋅ r/programminghorror
Asked Github Copilot to duplicate all items in an array ten times. Result was interesting2yr ⋅ TurboToeter ⋅ r/programminghorror
The code retrieves over 100000 string from the database and renders 100000 option element on the UI. It takes 1 minute to be rendered.2yr ⋅ lucSurMontaine ⋅ r/programminghorror
try catch statements for when the recursion(maze) goes out of bounds...1yr ⋅ mylizard ⋅ r/programminghorror
There is a lot of older code in our codebase that is a goldmine1yr ⋅ HeWhoShantNotBeNamed ⋅ r/programminghorror
i gave up on c# but after a few months i tryed to make a program to calculate an avarge over a month where i manully put in the values i dont think it turnt out good it works though1yr ⋅ Gayafboyyy ⋅ r/programminghorror
Me after ctrl-c ctrl-v from stack overflow and slightly changing it.11mo ⋅ 1cubealot ⋅ r/programminghorror
Found this in an old script of mine. I don't know why or how I did this, but I made this.3yr ⋅ Kintler11 ⋅ r/programminghorror
Is there a better way to do this for my AI image generator lol4mo ⋅ Party_Volume7132 ⋅ r/programminghorror