this post was submitted on 24 Mar 2024
788 points (98.6% liked)

Programmer Humor

19585 readers
476 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
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 35 points 7 months ago (3 children)

The amount of people nitpicking about the brand of pseudocode or arguing the question is tricky reminds me of some coworkers, and not the good kind.

If you belong to the above category, try to learn some new programming language / read about some algorithm descriptions (not implementation) and go out take some sun. The question is super intuitive if you're not stuck to a single paradigm or language.

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago)

So I teach coding to idiots. Confusing or poorly defined abstractions in pseudocode are bad. If you want people to infer useful information from pseudocode, and learn good practices from it, you need to treat it as if there a real underlying class structure written with good practices, or even better, make it comply to some actual language which does that. If you want to imply that this is a member of string, something like string.len_chars is way better imo because it captures the idea of a string being an array. Then the next question can be about string.len_bytes (watch the wheels turn!). That naturally transitions nicely into object oriented paradigms of object containers/storage being at once a templated abstraction with a stride and depth, and also a physical thing in memory.

[–] [email protected] -2 points 7 months ago (1 children)

i'm of the belief that pseudocode should be real code that actually runs. I.E. something like bash. A scripting language.

[–] [email protected] 9 points 7 months ago (2 children)

Starting off a noob programmer in Bash... Pure evil

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago)

The first language I tried to learn as a kid was Batch scripting...

(edit: and then some VBScript along the way! Eventually worked my way to C++ though)

[–] [email protected] 1 points 7 months ago

thats why i hate pseudocode.

I would much rather just learn an actual language, or two even. At that point.

[–] [email protected] 14 points 7 months ago

Exactly. It's pseudo code. It's meant to be universally understandable, not language specific.

[–] [email protected] 11 points 7 months ago
[–] [email protected] 99 points 7 months ago (1 children)

print("x") is you want to screw your students.

[–] [email protected] 20 points 7 months ago* (last edited 7 months ago) (1 children)

screw your students

ಠ_ಠ

[–] [email protected] 10 points 7 months ago

"Dr. Prof. Mann, I really didn't understand anything about UNIX on that last midterm. Can we go over how to touch and finger after class?"

load more comments
view more: next ›