485
This is a glass (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] Shalien@piefed.projetretro.io 5 points 3 days ago

//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
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.

this post was submitted on 28 Jul 2026
485 points (100.0% liked)

Programmer Humor

32547 readers
1676 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