this post was submitted on 28 Jul 2026
478 points (96.0% liked)

Programmer Humor

32547 readers
1661 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 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Shalien@piefed.projetretro.io 5 points 3 days ago (2 children)

//This a glass // To get the quantity and type of content use
// glass->qty : float
// glass->content : glass_content

[–] LeFrog@discuss.tchncs.de 5 points 3 days ago (1 children)
if glass.empty?
  make_sad_noise
else
  homi.hydrate(glass.qty)
end
[–] rbn@sopuli.xyz 2 points 3 days ago

You should check against homi.healthyCapacity first unless you want to drown them.

[–] red_tomato@lemmy.world 4 points 3 days ago

How can you be so sure other readers will understand floating point numbers? Better include the entire IEEE 754 standard just in case.