this post was submitted on 27 Jun 2025
852 points (98.6% liked)

Programmer Humor

24736 readers
1805 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
[–] wewbull@feddit.uk 76 points 6 days ago (12 children)

At university I had an introductory C course where one assignment was to write a program that searched a 4x4 array of booleans for groups of cells set to true. Groups had to be rectangles, powers of 2 in width and height, and could wrap (i.e. they could go off the right edge and back on the left edge). We had to submit our programs by e-mail and printed form one week later. The prof. marked the paper versions and the TA ran and tested the digital. One slight problem, if you used the university owned printers, they charged for print outs. A few pence per page to cover costs and stop people abusing the rather nice high quality printers the computer faculty had.

I'd always enjoyed programming and whilst C was new to me, using another language wasn't a big problem. As I worked on it I realised the problem wasn't as straightforward as I first thought, but I spent a few hours on it that evening and had a solution I was happy with.

Penny was a student on the course whose approach to academia was memorization. She didn't consume, process, and apply concepts. She just remembered them. Her favourite subject was maths. While the rest of us were struggling to derive some formula, she'd have just committed the process to memory.

Penny was complaining a lot on this programming assignment. She didn't understand why the assignment was so hard for an introductory class. I didn't judge. I know some people find programming hard, but I didn't feel I could help her much without jeopardising my own mark. There's only so much uniqueness in a small program and if she just copied my solution we'd both get penalised for plagiarism. I did mention to her the cases I'd found tricky to get right was when two groups overlapped. If one group completely covered a smaller one you'd only report the bigger one, but if not you'd report both groups.

I heard, through her boyfriend, that that week had involved many long evenings working on this assignment, but she turned up at the next class solution in hand. Obviously stressed, she carried a pile of paper of several hundred pages. She had written a program that consisted of an if-statement for every possible group size and location. About a hundred different possible groups. Each condition written with constant value indices into the array. To cope with the overlapping groups problem, checks for smaller groups also checked that no larger group also covered this area. No loops. No search algorithm. Just a linear program of if-statements.

Apparently debugging this has been a nightmare. Cut and paste errors everywhere, but when I'd told her about overlapping groups aspect it had blown her mind. There always seemed to be a combination she hadn't accounted for. Multiple times she thought she was done, only to find a corner case she'd missed. And just to kick her when she was down, she'd paid for multiple printouts, each one costing about £10 only to find a problem afterwards.

This consistent A grade student who sailed through everything by relying on her memory had been broken by being asked to create an algorithm rather than remember one. She got credit for submitting a solution that compiled and solved some cases, but I doubt the professor got past the first page of that huge printout.

Penny had worked really hard for that D.

[–] psud@aussie.zone 1 points 1 day ago

I wonder if people who think AI is "just a bunch of if statements" think programs work like Penny thought they did

[–] Hawk@lemmy.dbzer0.com 63 points 6 days ago (1 children)

Lol why does this entire text sound like a setup for that last sentence

[–] Iambus@lemmy.world 2 points 6 days ago

😂😂😂

[–] DahGangalang@infosec.pub 3 points 6 days ago

I need this in green text format

load more comments (9 replies)
[–] bvoigtlaender@feddit.org 34 points 6 days ago (5 children)

This is actually what made me start my programming journey. Made small games using PowerPoint until I was starting to make an level editor on a 12x12 grid. My father thankfully stopped me pretty early on and showed me Game Maker 7. Not sure for how long i would have continued.

[–] gerryflap 13 points 6 days ago (1 children)

Are you me lol? I did exactly the same, and at some point I started computing how many slides I had to make to make anything larger and I pivoted. My dad didn't know this stuff but I also ended up at gamemaker

[–] x0x7@lemmy.world 2 points 6 days ago* (last edited 6 days ago) (1 children)

I did the same but it was the TI-83 plus calculator. This was in middle school. Eventually I made games for it a more reasonable way. But I spent a month thinking this is how games were made, by knowing every possible image of the game and knowing how to map from one image state to another based on the controls.

There's something kind of plato's cave to say about it. When all you see are images on the screen you think that's the state.

Makes you wonder if there is something deeper we refuse to see because we got down to a level of state we could actually work with. Could it be RAM is not really the program state, and only what you think the program state is?

load more comments (1 replies)
[–] Anomalocaris@lemm.ee 6 points 6 days ago (1 children)

hey, there is an inherent fun in maing games/programs using things that were never meant to.

once i did a CPU/RAM emulator using excel, so you could see every bit.

it was fun to make loops, and programs

[–] NikkiDimes@lemmy.world 4 points 6 days ago (3 children)

This is how I got into game development myself. I used to use Javascript to make dumb little interactive games in the early 2000s before it was ever meant to do such things, emulating what is now modern day HTML5 canvas and such

load more comments (3 replies)
[–] JackbyDev@programming.dev 5 points 6 days ago

PowerPoint is actually turning complete so... https://youtu.be/uNjxe8ShM-8

[–] tinkermeister@lemm.ee 4 points 6 days ago

I suddenly feel in good company. I got my start doing crazy things with PowerPoint and Excel because it was what I knew.

I coded basic games in PowerPoint using animations plus VBA. Not good.

[–] BuboScandiacus@mander.xyz 23 points 6 days ago* (last edited 6 days ago)

This is supposed to be a joke but sadly a lot of beginner tutorials on coding Tic-Tac-Toe teach this

now implement castling in that

[–] ulterno@programming.dev 7 points 5 days ago

Found the guy who passed the test with

printf ("    *\n   **\n  ***\n ****\n*****\n);
[–] nexguy@lemmy.world 7 points 6 days ago

Well this is how programing works so if you don't like it...

[–] the16bitgamer@programming.dev 2 points 6 days ago* (last edited 6 days ago)

They are doing it dumb. You can text output chess but you just need to keep track of where the pieces are in code, then when you are ready to output, place the characters. Saves so much time. /s

[–] melsaskca@lemmy.ca 2 points 6 days ago

I'm familiar with issues like this. Lots of copy/pasting with little edits here and there all the way down.

load more comments
view more: next ›