News for hackers. Stuff that matters.
Re:A URL Lengthener by tgb on Friday May 14, 2021 @02:35PM (#27158036)
Do you happen to have the exact wording? As far as I can tell these mean the same thing.

1. "You must support URL length up to 100 characters" -> your browser must support URLs that are 100 characters or less (and may or may not support longer ones)

2. "Your supported URL length must be at least 100 character" -> You must support URLs that are 100 characters or less (and may or may not support longer ones)

Re:A URL Lengthener by lacksconfidence on Friday May 14, 2021 @03:43PM (#27158877)
I don't know the exact wording, a gracious reading might be (as directed at people writing html)

1. Never use a URL longer than 100 characters

2. Go ahead and use a URL longer than 100 characters

As for the true intent? I've no clue.

Re:A URL Lengthener by tomwojcik on Friday May 14, 2021 @05:30PM (#27159911)
Didn't you confuse 'at least' with 'at most'?
Re:A URL Lengthener by lurkerasdfh8 on Friday May 14, 2021 @03:54PM (#27159002)
You are welcome to try to find it. I just failed :(
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.