Comment by clark_dent 2 hours ago Could you humor a coding noob--how do you deal with utterly insane inputs like that? 8 comments clark_dent Reply wwalexander 39 minutes ago Arbitrary precision arithmetic (GMP, BigInteger, etc). Numbers can take arbitrary amounts of memory, instead of just a single machine word. doubled112 2 hours ago Crash and report an error. chowells 1 hour ago You report an error and exit cleanly with a proper operating system error code. Crashing is a quick hack, acceptable for throwaway projects but not in software used long-term. SoftTalker 16 minutes ago Crashing (in the sense of "give up and exit with an error") on invalid inputs is valid (and often the best thing) in many cases.Fix your inputs. 1 reply → matthewkayin 2 hours ago You first ask if you really need to. AnimalMuppet 1 hour ago Unless you're exposing it to the internet, ever, in the entire future history of the program. Then you kind of have to, in one form or another. Someone 5 minutes ago [delayed]
wwalexander 39 minutes ago Arbitrary precision arithmetic (GMP, BigInteger, etc). Numbers can take arbitrary amounts of memory, instead of just a single machine word.
doubled112 2 hours ago Crash and report an error. chowells 1 hour ago You report an error and exit cleanly with a proper operating system error code. Crashing is a quick hack, acceptable for throwaway projects but not in software used long-term. SoftTalker 16 minutes ago Crashing (in the sense of "give up and exit with an error") on invalid inputs is valid (and often the best thing) in many cases.Fix your inputs. 1 reply →
chowells 1 hour ago You report an error and exit cleanly with a proper operating system error code. Crashing is a quick hack, acceptable for throwaway projects but not in software used long-term. SoftTalker 16 minutes ago Crashing (in the sense of "give up and exit with an error") on invalid inputs is valid (and often the best thing) in many cases.Fix your inputs. 1 reply →
SoftTalker 16 minutes ago Crashing (in the sense of "give up and exit with an error") on invalid inputs is valid (and often the best thing) in many cases.Fix your inputs. 1 reply →
matthewkayin 2 hours ago You first ask if you really need to. AnimalMuppet 1 hour ago Unless you're exposing it to the internet, ever, in the entire future history of the program. Then you kind of have to, in one form or another. Someone 5 minutes ago [delayed]
AnimalMuppet 1 hour ago Unless you're exposing it to the internet, ever, in the entire future history of the program. Then you kind of have to, in one form or another. Someone 5 minutes ago [delayed]
Arbitrary precision arithmetic (GMP, BigInteger, etc). Numbers can take arbitrary amounts of memory, instead of just a single machine word.
Crash and report an error.
You report an error and exit cleanly with a proper operating system error code. Crashing is a quick hack, acceptable for throwaway projects but not in software used long-term.
Crashing (in the sense of "give up and exit with an error") on invalid inputs is valid (and often the best thing) in many cases.
Fix your inputs.
1 reply →
You first ask if you really need to.
Unless you're exposing it to the internet, ever, in the entire future history of the program. Then you kind of have to, in one form or another.
[delayed]