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!
In my first CS class, the professor announced an extra credit project due at the end of the class. It was to create a formatted terminal calendar given a year from user input. I finished it after learning about condition but before I learned about classes… or functions… or loops… or searching the internet… partially. I searched how leap years worked, but didn’t bother to search for code.
Anyway, long ass program with each month hard-coded with 7 possible calendars for each month depending on the first day of the week. Lots of copy and paste. Professor was speechless, but accepted it.
ImplyingImplications@lemmy.ca 1 year ago
“CS Major” is one of my favourite memes
Image
tool@r.rosettast0ned.com 1 year ago
It’s so rare for me to have to use the modulo operator I’m actually excited when I come across a situation where I can.
jimmux@programming.dev 1 year ago
It’s like how when you were a kid, you thought quicksand was something you would need to be aware of as an adult in the big wide world. In my undergrad, mod everywhere. Very important knowledge. Now not so much.
evatronic@lemm.ee 1 year ago
I did it the other day!
I was trying to pad a base64-encoded string with the proper number of
=
s to get it up to a multiple of 4 because our stupid build toolchain would explode if it wasn’t.chandz05@lemmy.world 1 year ago
Wow I literally laughed out loud
kungfusion@kbin.social 1 year ago
i logged in to upvote you, thank you