Live data from Hacker News

A URL Lengthener

aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com

121–130 of 313 posts

Re: A URL Lengthener

#121
post #117
post #66

A handy link to this discussion: https://aaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

I clicked on your link, half expecting to get rick-rolled, and was pleasantly surprised to find myself back on this same page.... but also kinda disappointed. :) +1 for avoiding the temptation.

I'd bet 30% of the URLs it lengthens are rick-rolls. I did it immediately and sent it to several people on Slack.

Re: A URL Lengthener

#122

Earlier quoted context omitted.

I don't know. There's a lot of problems but to me "at least" sounds like a more helpful phrasing. Browsers run in such heterogeneous compute environments (even back then) that "up to" basically cripples you to the lowest common denominator of all platforms you target. "At least" makes it mostly the HW vendors problem. Sure, MS was encountering this problem more because Windows ran on such a large range of HW but thin…

The URL can be up to 1024 characters. The browser must support at least 1024 character URLs. They're 2 sides of the same coin, but MS didn't actually rephrase the sentence properly. Their version would have every URL have at least 1024 characters in it. Any less than that, and the browser should reject the URL as invalid.

> Any less than that, and the browser should reject the URL as invalid.

lol. that would have been awesome. domain squatters would be running for the 1000 character names while crying about all the money they paid for three letters one :)

Re: A URL Lengthener

#124
post #36

fun fact. in the browser wars of 1993(?) i looked at the specs from netscape (mozilla dady for the young folks) and microsoft (what w3c? ha!) and netscape release a browser spec that said "X must support up to Y", as in "url must be up to 1024 chars", "cookies must be up to 1mb", etc... then microsoft release IE4 (or 6?) web spec. It was literally a copy of netscape's but with "up to" replaced with "at least". and fr…

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)

You are welcome to try to find it. I just failed :(

Re: A URL Lengthener

#125
post #115

Earlier quoted context omitted.

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?

"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.

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

#126
post #96

Earlier quoted context omitted.

Ah yes. Checkbox Driven Development. AKA Monkey Paw Development, where you give exactly what was asked for; it remains surprisingly popular in the government and enterprise spaces.

I've worked in such places. The reason it is that way is because you will receive a broken description/specification/story of what you are supposed to implement. You have a choice to make when that happens, you either implement it as specified or you reject it because it is broken. The problem is that if you do reject it then it will take about 6 months to get back a specification that is broken in another way and th…

Enterprise developer here. Exactly this. If you reject the spec, you won't get another one before the deadline that was committed before you got the spec you want to reject.

Re: A URL Lengthener

#127
post #78

Awesome to see a Replit app on top of HN! Our hosted apps proxy requests per second doubled (3k to 6k) by virtue of this being on HN. This app is fully made and hosted on Replit using Replit DB too: Frontend: https://replit.com/@piemadd/url-lengthener Backend: https://replit.com/@piemadd/ax56api Check out other Replit Apps here (launched yesterday): https://replit.com/apps

What's Replit?

Re: A URL Lengthener

#128
post #127
post #78

Awesome to see a Replit app on top of HN! Our hosted apps proxy requests per second doubled (3k to 6k) by virtue of this being on HN. This app is fully made and hosted on Replit using Replit DB too: Frontend: https://replit.com/@piemadd/url-lengthener Backend: https://replit.com/@piemadd/ax56api Check out other Replit Apps here (launched yesterday): https://replit.com/apps

What's Replit?

Online programming environment, community, and platform: https://replit.com
Post reply on HN