this post was submitted on 10 Jul 2025
878 points (99.8% liked)

Programmer Humor

24932 readers
1179 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] meme_historian@lemmy.dbzer0.com 196 points 1 day ago (2 children)

I see your pitiful vibe coding and raise you... SPITE CODING πŸ‘Ώ

[–] ryathal@sh.itjust.works 85 points 1 day ago (1 children)

Spite coding is almost the original coding.

[–] sp3ctr4l@lemmy.dbzer0.com 19 points 1 day ago* (last edited 1 day ago) (2 children)

I have definitely gone into a rageful fugue state and woken up a week later after reworking an entire code base from being an inconsistent mess of slop...

...into actually having a common library of functions instead of just rewriting slightly different versions of them 8 times, having those functions only actually instantiated for necesarry classes...

...rewriting every variable name and function name to an actually consistent and intelligible naming scheme...

... and finally, moving a whole bunch of shit out of some kind of global 'think' type loop that doesn't actually need to be called or checked every goddamned micro second.

Done that more than once actually.

Never look inside 'baby's first video game mod' code, unless you have healthy blood pressure.

But uh yeah, spite, hatred, and anger are indeed powerful motivators for making good code, lol.

... so many idiots just jam everything into a global, called every tick loop, and then claim that it just can't be optimized, because "the game engine just can't handle it"...

[–] ChickenLadyLovesLife@lemmy.world 8 points 20 hours ago (4 children)

I spent a good fraction of my career taking over and trying to fix code bases that my company refused to scrap and replace outright because they didn't want to admit their worthlessness. Complete rewrites would have taken maybe a tenth of the time I spent.

My favorite thing to encounter (which was nearly universal) was the phenomenon of a young programmer fresh out of college encountering SQL for the first time, deciding he hated it, and writing a huge mess of code to handle auto-generating the necessary SQL. I remember taking over one C# application that had classes named "AND.cs" and "OR.cs" which just took a String as a parameter and returned that String with " AND " and " OR " appended to it, respectively. In about an hour, I replaced three months of this guy's work that had bottlenecked the project with like five SQL statements.

It's insane to think what the civil engineering world would be like if it had the career structure of the software world.

[–] lordbritishbusiness@lemmy.world 8 points 19 hours ago (2 children)

First thing I tell my interns: "The guys that made that database are smarter than you, they got PhD's for the algorithms the database uses. You are going to use SQL properly, and query properly, because the database will always do it better than your python code."

load more comments (2 replies)
[–] sp3ctr4l@lemmy.dbzer0.com 7 points 18 hours ago* (last edited 18 hours ago)

Jesus Fucking Christ.

I've done a lot of SQL/Database type work as well, and yep, I've been the person learning their insane spider web of db structures, and then either trying to enforce some kind of actual defined standards going forward, or in some instances, succeeding at restrucuring the dbs, transitioning them, and convincing corporate that this actually needed to be done.

It's insane to think what the civil engineering world would be like if it had the career structure of the software world.

Points at understaffed ATC tower, collapsing bridge that hasn't been even evaluated in a decade, general state of roadway disrepair and constant re-repair, also the new highway/overpass/lane expansion being built to 'solve traffic' despite doing that literally never working

load more comments (2 replies)
load more comments (1 replies)
[–] ZILtoid1991@lemmy.world 7 points 1 day ago

I prefer the term "spite-driven development".

I wrote an SDL replacement but worse after SDL refused to work with audio streams for me even after a week of googling, it took me the same amount to get it work with WASAPI directly as looking up audio streams, instead of the many easymp3playback.dll type solution. Another one week was making ALSA working. At least it's in D, so I have an easier time with development.

I also almost was involved with a YanSim clone development called "Love Letter: My True Feelings", but shit just started to hit the fan (character designer just left), so I decided to not get involved as a coder.

[–] Hackworth@sh.itjust.works 51 points 1 day ago (1 children)
load more comments (1 replies)
[–] mohab@piefed.social 48 points 1 day ago (3 children)

What's this dude talking about?! Everyone knows no one hates React like people who code in React πŸ˜‚ No one is gonna get pissed off watching this.

[–] Schmoo@startrek.website 11 points 1 day ago

I used to be a React dev. The only thing I hated more than React was my boss.

[–] gabbath@lemmy.world 7 points 1 day ago (3 children)

Do React devs really hate React?

Isn’t the adage that you either have haters or no users?

load more comments (2 replies)
[–] criss_cross@lemmy.world 7 points 1 day ago

I remember years ago when React was the savior of web apps Swooping in engineers from the clutches of JQuery and AngularJS (not to be confused with Angular 2+). Components we’re gonna make things simpler than the mess of JS files and global state.

And generally that’s true but we’ve traded that off for a mess of hooks and 700 line nested functions in nested functions and obtuse rules that only apply to react and not JS.

Complex web apps are hard.

[–] ChickenLadyLovesLife@lemmy.world 33 points 20 hours ago (1 children)

I moved from Visual Basic (3 no less!) to C because I needed to optimize the performance of a software synthesis (like, sound synthesis) application I was developing at the time (mid-1990s). It boggles my mind to this day how much fucking work you had to do just to create a simple window in C. It instantly made clear why UIs at the time were so bad and I went back to Visual Basic for the UI with a compiled C DLL to do the heavy lifting.

There's no excuse for why UIs are still so bad today.

[–] lordbritishbusiness@lemmy.world 23 points 19 hours ago (1 children)

The "excuse" is more or less the 20 or so replacements that have been made and died. I think Microsoft alone is responsible for 5 over the life of Windows.

We've more or less kinda settled on HTML only because it's already wide spread. But it's not perfect so more standards for the standards pile. Don't worry, react will end up buried by the next thing on the pile eventually.

We’ve more or less kinda settled on HTML

It's funny, one of the modern UI glitches that I hate the most is when a long bit of text is just truncated with ellipses instead of the whole thing being shown and you have to hold the mouse over to get it in a tooltip, or shudder actually click on the thing. HTML is great at word-wrapping and allowing the whole UI to "flow" with variable heights and widths as necessary - and yet that is never allowed to happen in apps.

[–] dejected_warp_core@piefed.world 32 points 1 day ago (3 children)

Speaking of coding out of spite, is nobody going to mention that his C code features a struct with over 20 fields in it?

[–] calcopiritus@lemmy.world 35 points 1 day ago

Sometimes you can't not have a god class (struct in this case). When doing UI specifically, I always end up with one.

You can try using encapsulation to reduce the amount of fields technically, but in the end it's the same amount of information in a single god class.

[–] wise_pancake@lemmy.ca 17 points 1 day ago* (last edited 1 day ago) (1 children)

That's not uncommon, is it?

[–] qqq@lemmy.world 9 points 1 day ago* (last edited 1 day ago) (3 children)

Not really, but I'd probably try to organize those into sub structures where it made sense. A data structure holding the UI state and FFT data all flat is kinda messy imo since it becomes unclear what is actually required where.

[–] grue@lemmy.world 23 points 1 day ago (1 children)

You can tell there ought to be substructures because he used comments to label the different groups. That's a code smell right there.

load more comments (1 replies)
load more comments (2 replies)
[–] four@lemmy.zip 8 points 1 day ago

That's the State struct. Globally accessible, I'd bet

I love this guy he's a fucking freak of nature

[–] deegeese@sopuli.xyz 25 points 1 day ago (4 children)

Data visualization β‰  UI and signal processing is traditionally done in C

[–] ulterno@programming.dev 45 points 1 day ago

That looks like buttons in the thumbnail, on the left of the visualisation.
I'd say that's enough to call it UI.

[–] zr0@lemmy.dbzer0.com 15 points 1 day ago (7 children)

UI. User Interface. The bridge between a system and a user. So anything, literally any information transfer from the user to the system OR from the system to the user, is a User Interface.

load more comments (7 replies)
load more comments (2 replies)
[–] harbard@fedia.io 19 points 22 hours ago (4 children)

this is like when I built that web server in x86 assembly lol.

[–] Im_old@lemmy.world 8 points 22 hours ago (5 children)

I bet that thing was fast!

[–] Ad4mWayn3@sh.itjust.works 9 points 17 hours ago

I mean, just because you implemented something in a low level lang, it doesn't mean you're gonna have the fastest implementation. Even in high level langs, there's usually heavy optimization involved in things that are done all the time (e.g. web servers)

[–] frezik@lemmy.blahaj.zone 8 points 16 hours ago

Meh. Even hosting static files in a RAM disk over localhost, you're 99% as good as you can be by using the sendfile() system call. The kernel can copy data from one file descriptor to another faster than any userspace program can. Implementing the Length header is a stat() call.

If you're not on a RAM disk and not on localhost, then disk access or network throughput will predominate.

Assembly is not magic go faster sauce.

load more comments (3 replies)
load more comments (2 replies)
[–] CookieOfFortune@lemmy.world 12 points 1 day ago (3 children)

Umm this is just being retro. Like using a film camera.

load more comments (3 replies)
[–] Blackmist@feddit.uk 10 points 1 day ago* (last edited 1 day ago) (5 children)

There used to be a UI library on the Amiga called MUI.

It used a bunch of C macros to let you define the window and all the controls. Was honestly pretty good considering it was like 30 years ago.

[–] gens@programming.dev 9 points 1 day ago

Unrelated but there is microui, a 1100 loc library in ansi C for a basic UI.

https://github.com/rxi/microui

load more comments (4 replies)
[–] Phoenix3875@lemmy.world 10 points 1 day ago

React Native

[–] someguy3@lemmy.world 9 points 1 day ago (2 children)
[–] ByteOnBikes@slrpnk.net 23 points 1 day ago (1 children)

React is what powers your Windows Start Menu.

[–] camr_on@lemmy.world 9 points 1 day ago (1 children)
[–] Schmoo@startrek.website 13 points 1 day ago (1 children)

Yes, as well as parts of the settings menu. What's not to love about constantly loading and unloading javascript just by clicking around in native apps? CPU spikes are good for your health.

load more comments (1 replies)
[–] ArmchairAce1944@discuss.online 8 points 1 day ago (4 children)

React is a Javascript based web development programming language developed by Facebook to make pages run faster and better. I learned it as part of a MERN stack full web development course.

[–] grue@lemmy.world 22 points 1 day ago (2 children)

to make pages run faster and better.

Huh, well that's a funny way of saying "break the model of web page as document and fuck up the entire web!"

[–] CookieOfFortune@lemmy.world 13 points 1 day ago (3 children)

Yeah because documents are limiting and we want to do stuff that executables can do but with a better distribution model.

load more comments (3 replies)
[–] RageAgainstTheRich@lemmy.world 7 points 1 day ago (1 children)

Oh stop it. Are you saying you don't enjoy pressing the "Back" button in your browser, but staying on the same page. Therefore breaking the page so you refresh and lose whatever the fuck you were doing? /s

load more comments (1 replies)
[–] Lemminary@lemmy.world 8 points 1 day ago* (last edited 1 day ago)

Javascript based web development ~~programming language~~ UI library

[–] leftytighty@slrpnk.net 7 points 1 day ago

On the other hand React Native is a JavaScript based development language developed by Facebook to make applications run slower and worse.

load more comments (1 replies)
[–] snekmuffin@lemmy.dbzer0.com 7 points 19 hours ago (1 children)

can your React do that?? didn't fackin think so dabs mockingly

load more comments (1 replies)
load more comments
view more: next β€Ί