Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> What’s the clue? It’s got a little tire for a knob! Pull the lever up, and the gear gets sucked up. Push it down, the gear goes down. Is that self-evident or what?

Well, I didn't figure it out. Definitely easy to identify if you've heard this before, but that's not something that's self-evident.

> enum { Yes, No } is just an automatic no hire decision

This comes from process management where 0 is success and anything else is an error code. Shell conditionals are this way around because of that. Depending on the context it could be an indicator of someone who really understands the system but isn't yet familiar with more general coding idioms.

> The More Control Paths, the Less Understandable

Woah no, I feel like I agree with the title but that is a terrible example. It looks like Z happens even in Not Z situations, which requires digging into everything to find out what's actually going on. The code is lying to you, which is a really bad setup.

This could be mitigated by just renaming doZ() into something that hints it won't always occur, maybe tryDoZ() or checkDoZ() or something.




Consider another example. There was a case where the pilots had set the automatic air pressure regulator to "manual". As they climbed past 10,000 feet, a warning horn sounded because the cabin air pressure was too low. The horn sounded similar to another horn, and the pilots worked the other horn problem.

Then, they lost consciousness from lack of oxygen and crashed, killing all aboard.

This is not a self-evident user interface. A better one would be to change the beep of the warning horn to a voice: "alert: air pressure too low". Now the pilots save precious seconds figuring out what's wrong and how to fix it. The horning could be even better: "alert: air pressure too low. Don oxygen mask".

With the landing gear lever, maybe a pilot in training needs to be told what it does once. But he'd never have to be told again.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: