384
submitted 2 weeks ago* (last edited 2 weeks ago) by FunnyCoder@programming.dev to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] netizen@programming.dev 18 points 2 weeks ago

I remember having to program a trap for double-clicking buttons in an application.

Then I had to implement a penalty for triple-clicking.

Later, I converted it to a progressive incremental penalty.

[-] FunnyCoder@programming.dev 6 points 2 weeks ago

I’m actually surprised no one’s roasted my math in ShatterCanvas.xaml.cs yet—I’m basically faking the 'gravity' by just incrementing VelocityY every frame. It’s surprisingly lightweight for how many polygons are flying around.

[-] leburb@sopuli.xyz 7 points 2 weeks ago

What is acceleration other than increase in velocity over time? Nothing to roast!

[-] FunnyCoder@programming.dev 1 points 1 week ago

Haha, fair point! I guess I spent too much time looking at the code and thinking "this feels too simple to work". But hey, if it hits the bottom of the screen and satisfies the VelocityY math, it’s a feature, not a bug. Glad to see another dev who appreciates the simple approach.

[-] locuester@lemmy.zip 2 points 1 week ago

I remember the first program I wrote where I implemented gravity. I too was amazed at the simplicity. But that simplicity is only in hindsight. You stumbled into physics when you thought you were just programming.

[-] FunnyCoder@programming.dev 1 points 1 week ago

That’s a beautiful way to put it. I definitely went from "how do I move a polygon" to "wait, why does this feel like it has weight?" in about 10 lines of code. It’s wild how much of the physical world is just hidden in a simple $v += g$ loop. Definitely an "ah hah!" moment I won't forget. 〒▽〒

[-] Hack3900@lemy.lol 5 points 1 week ago

That is exactly how gravity works lol

[-] FunnyCoder@programming.dev 2 points 1 week ago

Phew! Glad I haven't offended the ghost of Isaac Newton. I half-expected someone to tell me I needed a full-blown physics engine just to drop some glass polygons on the taskbar.

load more comments (5 replies)
this post was submitted on 09 Apr 2026
384 points (94.9% liked)

Programmer Humor

31092 readers
736 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 2 years ago
MODERATORS