281

saw a 2nd year CS guy run a maze solver (for final exam) with 300 nested if-statements. worked about 50% of the time. so he added another 5000 nested ifs and got it up to 90%. good enough!

you are viewing a single comment's thread
view the rest of the comments
[-] coloredgrayscale@programming.dev 19 points 1 year ago* (last edited 1 year ago)

300 nested if statements, (...) added another 5000 nested if statements.

At this point I want to doubt that they actually wrote it themselves, vs writing a metaprogram to generate the code.

[-] sukhmel@programming.dev 4 points 1 year ago

Not sure if that would've made it better or worse 🤔

[-] nintendiator@feddit.cl 1 points 1 year ago

Oh, a metaprogram?

ifs printing ifs...

this post was submitted on 19 Jul 2023
281 points (95.8% liked)

Programmer Humor

19606 readers
839 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 1 year ago
MODERATORS