News for hackers. Stuff that matters.
Re:A URL Lengthener by devmor on Friday May 14, 2021 @03:42PM (#27158872)
"Must" and "Must Not" are keywords in formal spec. If it says "Must support up to 100" and doesn't say "Must Not support over 100" then I would consider the upper limit to be whatever limit is sane for the data type.
Re:A URL Lengthener by mypalmike on Friday May 14, 2021 @03:57PM (#27159025)
So you would pick an arbitrary upper limit based on your own notion of what is sane. Picking such a limit, you would still need to write the same error handling code for limits, but it would happen at maybe 200. And the next programmer who inherits your code looks at the spec and your code and has to guess "why 200"? And it becomes lore. Which is specifically worse than writing to the spec.
Re:A URL Lengthener by devmor on Tuesday May 18, 2021 @09:56AM (#27194594)
The spec doesn't exist. It's undefined. "Must support up to 100" is not a limit, it's a lower bound.