News for hackers. Stuff that matters.
Re:A URL Lengthener by bulletsvshumans on Friday May 14, 2021 @02:38PM (#27158089)
"At least" means more than or equal to. In other words, the 'least' it can be is 100 characters, with no upper bound.
Re:A URL Lengthener by paulddraper on Friday May 14, 2021 @02:57PM (#27158330)
Both sentences require browsers to support 100 characters.

Both sentences permit browsers to support 101 characters.

Re:A URL Lengthener by TchoBeer on Friday May 14, 2021 @03:23PM (#27158632)
Exactly, they're functionally the same.
Re:A URL Lengthener by bulletsvshumans on Friday May 14, 2021 @03:34PM (#27158777)
On second pass, you're right. They're the same.
Re:A URL Lengthener by tgb on Friday May 14, 2021 @02:48PM (#27158224)
Yes but "you must support up to 100 characters" also has no upper bound - supporting 200 characters also fits that requirement.
Re:A URL Lengthener by mypalmike on Friday May 14, 2021 @03:32PM (#27158754)
So if you were a programmer on a project and you were given a spec that says "up to 100", you would just make it unbounded, and for all intents and purposes completely ignore the spec?
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.
Re:A URL Lengthener by bluefirebrand on Friday May 14, 2021 @03:41PM (#27158859)
I can see where you're coming from, it does read like "MUST support up to 100 characters (and MAY support more of you choose).

But honestly I think it's a bad practice to build the "may" part, because it's not explicit. The person who wrote the spec just as easily could have intended it to be "MUST support up to 100 (and may not go over 100)". So by not setting a bound you're gambling with your implementation being rejected, but setting a bound at 100 satisfies both possible "implied clauses" of the requirement and should not be rejected.

Re:A URL Lengthener by bigyikes on Friday May 14, 2021 @03:06PM (#27158436)
The supported URL length is at least 100 characters, not the URL length.