
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.

Welcome to Programming Horror!
This is a place to share strange or terrible code you come across.
For more general memes about programming there's also Programmer Humor.
Looking for mods. If youre interested in moderating the community feel free to dm @[email protected]
Party with your BFF like it's 99
A story from my day job. I submitted it to the Daily WTF. Fingers crossed that they'll accept it.
In order to facilitate development of frontend apps that rely on my employer's antediluvian monolith codebase, a team of developers at the company came up with a backend for frontend (BFF) service that would allow developers on other teams (such as mine) to quickly make frontends that use the monolith's logic and data. The service uses a schema-driven UI approach, where developers make forms by specifying the input elements (along with some related layout and validation logic, also schema-driven) using JSON schemas. This also includes specifying classes on the element for styling purposes. Who wants hot reloading when tweaking styles for a frontend app when you can instead make a JSON schema in a separate DotNET codebase that needs to be compiled (this is sarcasm)? As gross as that aspect is though, it is not today's WTF.
Right after lunchtime today, I saw a post
With modern tools, you have to try very hard to do something stupid, because the tools (rightly) recognize you’re doing something stupid. [Andreas Karlsson] can speak to that first hand as he…
With modern tools, you have to try very hard to do something stupid, because the tools (rightly) recognize you’re doing something stupid. [Andreas Karlsson] can speak to that first hand as he tried to get four billion if statements to compile.
You may ask what state space requires four billion comparisons to evaluate? The answer is easy: the range of an unsigned 32-bit integer. The whole endeavor started with a simple idea: what if instead of evaluating whether an integer is even or odd with a modulo or bit mask, you just did an if statement for every case? Small ranges like 0-10 are trivial to write out by hand, but you reach for more automated solutions as you pass 8 bits and move towards 16. [Andreas] wrote some Python that outputs a valid C program with all the comparisons. For 16 bits, the source only clocks in at 130k lines with the executable less than 2 MB.
Of course, scaling to 32 bits is a very different problem. The source file balloons to 330 GB, and most compilers ba
Everything has admin access, a storytime post
I have no idea how to title this post. Oh well.
A few years back I worked somewhere that had a large breach. Many practices changed in the wake of it. Developers actually had admin access prior to the change which was very nice. In an effort to restrict access but also let folks do their jobs they deployed some tool that would start all programs that "needed" admin access as an admin. This included cmd for the devs. So every time I opened cmd I had to be careful not to break something since there was no way to launch it without admin access after that change.
Average CSS
cross-posted from: https://lemm.ee/post/36467447
I am not allowed to credit the site that has this disaster. Its owner said "Nobody should see that"
Who needs a commit message, anyway?
An implementation of valve protocols (server, master servers and RCON) - Commits · Fabricio-191/valve-server-query
I was looking through various RCON tools and found this. Someone does not like commit messages.
Almost had to mark this one NSFW
For those unfamiliar with JS: subValue (the first argument in the forEach callback) is the value contained at arr[index].
PSD is not my favourite file format.
undefined
// At this point, I'd like to take a moment to speak to you about the Adobe PSD // PSD is not a good format. PSD is not even a bad format. Calling it such would be an // insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having // worked on this code for several weeks now, my hate for PSD has grown to a raging fire // that burns with the fierce passion of a million suns. // If there are two different ways of doing something, PSD will do both, in different // places. It will then make up three more ways no sane human would think of, and do those // too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide // that *these* particular chunks should be aligned to four bytes, and that this alignement // should *not* be included in the size? Other chunks in other places are either unaligned, // or aligned with the alignment included in the size. Here, though, it is not included. // Either one of these three behaviours would be fine.
Wikipedia's "official" newspaper's formatting
Jesus Christ, just add an if statement for even or odd!
my react frontend crashed with Segmentation faults
what do i do in this position ?