this post was submitted on 26 May 2025
542 points (96.1% liked)

Programmer Humor

23842 readers
3021 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
you are viewing a single comment's thread
view the rest of the comments
[–] dfyx@lemmy.helios42.de 21 points 1 week ago* (last edited 1 week ago) (10 children)

Their argument was along the lines of "The requirements and design don't specify what should happen if you move and delete at the same time so it can't be a bug. Behavior that doesn't violate the design but also doesn't lead to the result the user wanted is a user error". My argument was that we can't always specify the interaction between arbitrary features other than "If the user does two things at once, at least one of them should be executed, ideally both" and "the program shouldn't crash just because the user did something unexpected". Otherwise our design document would be ten times as long.

[–] Jesus_666@lemmy.world 19 points 1 week ago (3 children)

Yeah, that's basically the kind of logic you use when designing a low-level programming language: If we didn't define what happens here then anything that happens is correct behavior and it's up to the user to avoid it.

Of course applying that logic to a GUI application intended for a comparatively nontechnical audience is utter madness.

[–] mobotsar@sh.itjust.works 6 points 1 week ago* (last edited 1 week ago) (1 children)

That's the kind of logic people historically used when designing low level programming languages. It's not the kind of logic you should use or that people nowadays usually do use. Undefined behavior is widely seen as a Bad Thing in the programming language design community.

[–] Jesus_666@lemmy.world 2 points 1 week ago* (last edited 1 week ago)

Oh, don't get me wrong, I fully agree. Undefined behavior is terrible UX and a huge security risk.

Undefined behavior was kind of okay when RAM and storage were measured in kilobytes and adding checks for this stuff was noticeably expensive. That time has passed, though, and modern developers have no business thinking like that, even ones working on low-level languages.

I should've phrased my comment differently.

load more comments (1 replies)
load more comments (7 replies)