this post was submitted on 30 Sep 2023
943 points (96.4% liked)

Programmer Humor

32410 readers
265 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 1 year ago (4 children)

I literally use this meme in a slide when teaching while and do while.

[–] [email protected] 24 points 1 year ago (1 children)

Well, it's wrong. The only difference between the two kinds of loops is that do-while starts by unconditionally running the body once

[–] [email protected] 2 points 1 year ago

Yes, that's true. It's also good enough to make an abstract concept more approachable while getting a kick out of it too. Honestly this is more of a "well akcshually" thing that someone who already knows how this works would point out (nobody has so far) than something that misleads students who don't get it. It works.

[–] [email protected] 11 points 1 year ago (1 children)

Please switch over to something that actually has a condition that needs to logically be evaluated on each step and not as an end condition - yes this meme is technically correct for the case where they both start adjacent to the cliff and programmers should always consider (cliff) edge cases... but the visual strongly implies they've been running for a while.

[–] [email protected] 2 points 1 year ago

I mean yeah, it does have that problem, but even if it's not entirely accurate it's good enough to illustrate an otherwise abstract concept that's not exactly easy to understand for someone who's just getting started with programming and may not really be interested in it, rather looking to be an artist or game designer. Also humor really helps when it comes to learning. It does way more good than bad in my experience so far.

[–] [email protected] 6 points 1 year ago

They do say, "Those who can do..."