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

At work we have a program that uses the exit code to encode three enums. Each digit of the decimal representation of the exit code corresponds to one of these enums.

It’s some of the most cursed code I’ve ever worked with.

(God bless anyone who ever used this program and got a set fault or sigint or sighup and therefore a bizarre result.)



I was horrified by your post, because I've had to deal with load-bearing exit codes.

Then, I read the part about each digit of the decimal representation.

Now I may need to lie down for a spell.


That is a very bad design. Especially since you have only one byte to work with.

What is the decimal range of values used?


I think 11 to 200, but it’s not surjective




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: