The C++ code went something like this:
- Conver pointer to int
- Serialize the int over IPC to self using Linux Message Queues
- Delete/free the pointer
- Read the int from the queue
- Convert to pointer
- "Use" the pointer
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.
The C++ code went something like this:
The script I vibe coded to automate part of my job. It's sloppy and unrefined, but it works, and saves me a ton of effort.
I hate vibe coding. However, this is the best use of it. I've done it several times for scripts and basic HTML dashboards.
Agreed. I wouldn't write an entire app with an LLM, but for basic scripting and backend UIs, it's perfect for when you just need something quick and inelegant that works.
I have nothing against AI when it's used as a tool instead of a crutch.
Joined a new team and one of my first tasks was a refactor on a shared code file (Java) that was littered with data validations like if ("".equals(id) || id == null) { throw new IllegalArgumentException() }
The dev who wrote it clearly was trying to make sure the string values were populated but they apparently A) didn't think to just put the null check first so they didnt have to write their string comparison so terribly or else didnt understand short circuiting and B) didn't know any other null-safe way to check for an empty string, like, say StringUtils.isEmpty()
Doom original source code, codebase is very messy and looks like my grandpa scrimbles on paper.
Speaking as an old person, back then they didn't have the same concerns. Security? Ehh just don't let bad guys access your computer.
Yeah a lot of old programs are either great programming or terrible.
Whatever is happening in Monster Hunter Wilds.

Unless I'm missing something, this is a pretty bog standard SQL injection, yeah?
Weather forecasting software that maintains a linked list. When it eventually freed the memory used by the list, it would walk to the end of the list and free the last item. Then it would go back to the beginning of the list and do it again - rinse and repeat. Wonder why it was having performance issues 🙄