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

Programmer Humor

24555 readers
1700 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
[–] BuboScandiacus@mander.xyz 5 points 7 hours ago* (last edited 7 hours ago)

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

[–] bvoigtlaender@feddit.org 24 points 14 hours 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@feddit.nl 10 points 13 hours ago

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

[–] tinkermeister@lemm.ee 3 points 10 hours ago

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

[–] JackbyDev@programming.dev 5 points 13 hours ago

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

[–] Anomalocaris@lemm.ee 3 points 11 hours 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 3 points 10 hours ago (1 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

[–] Anomalocaris@lemm.ee 1 points 10 hours ago (1 children)

bes way to learn is by doing what you're not supposed to

[–] NikkiDimes@lemmy.world 2 points 8 hours ago* (last edited 8 hours ago)

True enough! Mistakes are the best teacher. That said, I'm still making games in Javascript to this day, so I guess you can say I haven't learned enough lol.

[–] ChaoticNeutralCzech@feddit.org 3 points 13 hours ago

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

[–] wewbull@feddit.uk 63 points 18 hours ago (7 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.

[–] Hawk@lemmy.dbzer0.com 51 points 18 hours ago

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

[–] DahGangalang@infosec.pub 2 points 14 hours ago

I need this in green text format

load more comments (5 replies)
[–] nexguy@lemmy.world 5 points 13 hours ago

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

[–] the16bitgamer@programming.dev 2 points 10 hours ago* (last edited 10 hours 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

[–] pugnaciousfarter@literature.cafe 47 points 22 hours ago (1 children)

This is very inefficient, they should be using a switch case.

[–] Hotzilla@sopuli.xyz 2 points 7 hours ago* (last edited 7 hours ago)

For efficiency you should you GOTO, so you can join trees that end up in same position.

Like those create your own adventures books.

[–] LovableSidekick@lemmy.world 28 points 22 hours ago (1 children)

This reminds me of one of my very first programs, a tic-tac-toe game I wrote in high school. It displayed hardcoded grids of Xs and Os and blanks very similar to what's shown here. This approach worked because of the much more limited move possibilities. The program could always win if it made the first move, and always win or tie if the human moved first, depending on if the human made mistakes. I wish I still had the code.

[–] Tja@programming.dev 16 points 19 hours ago (3 children)

Did the program cheat? Tic tac toe is a tie if opponents play correctly.

[–] LovableSidekick@lemmy.world 2 points 7 hours ago

I'm probably remembering it wrong, it was a long time ago. It definitely always either won or tied but could never lose, because it knew the right responses to every move. No, it didn't cheat lol.

[–] Couldbealeotard@lemmy.world 2 points 13 hours ago (1 children)

How do you define cheating in such a simple game?

[–] rat@lemmy.dbzer0.com 4 points 13 hours ago

Placing moves in invalid locations, passing a turn, or making multiple moves on one turn?

[–] VoidJuiceConcentrate@midwest.social 78 points 1 day ago (17 children)

Programming chess as a single lookup table is wild

load more comments (17 replies)
[–] SGG@lemmy.world 140 points 1 day ago (18 children)

Honestly back when I was a kid this is how I thought games were made, every possible image of a game was already saved and according to your input it just loaded the next image.

I stopped thinking that with 3d games

[–] Makeshift@sh.itjust.works 2 points 13 hours ago

This is what I believed. And I tried to trick the game by doing movements and inputs no one could have planed. Never outdid that planning somehow. They were on to me!

[–] mister_flibble@sh.itjust.works 4 points 16 hours ago

Those shitty old tiger hand holds kind of worked like that.

[–] 0ops@lemm.ee 51 points 1 day ago (3 children)

I thought that they were managing that stuff on a per-pixel basis, no engine, assets, or other abstractions, just raw-dogging pixel colors.

And before I even played video games at all I was watching somebody play some assassin's creed game I think and I thought the player had to control every single limb qwop-style.

load more comments (3 replies)
load more comments (15 replies)
[–] _AutumnMoon_@lemmy.blahaj.zone 11 points 22 hours ago (1 children)

Are they trying to code every possible chess position??

[–] porous_grey_matter@lemmy.ml 14 points 20 hours ago

The implication is that the person in the meme is

load more comments
view more: next ›