5 ms·
The crux of this argument seems to be that UUIDs are too long? Which I disagree with. I can't memorize them, no, and it would be cumbersome to try to say one al
by iaaan 3y ago
The crux of this argument seems to be that UUIDs are too long? Which I disagree with. I can't memorize them, no, and it would be cumbersome to try to say one aloud, but these aren't situations I've ever found myself in.
Does it make the URL in the URL bar longer? Yeah, but does that matter?
- hot_gril 3y agoIt matters aesthetically. A huge site like Amazon might care about that, otherwise it's not a high priority.
- eternityforest 3y agoIt somewhat matters aesthetically, but mostly people are going to ignore long random strings. UUIDs are at least visually kind of white noise, companies have no problem+with+links?that=look&like=this, so why do they care about UUIDs?
- skybrian 3y agoSome of us will strip off the crud to get the base URL, to avoid being tracked.
- bandergirl 3y agoapple.com/iphone You can't beat that. Or would you rather receive texts that include the following? https://www.amazon.com/dp/B09V3HZ8B5/?pd_rd_w=DAycy&content-id=amzn1.sym.04e31e32-5e01-4048-8b59-a557891d595f:amzn1.sym.04e31e32-5e01-4048-8b59-a557891d595f&pf_rd_p=04e31e32-5e01-4048-8b59-a557891d595f&pf_rd_r=M1KXM468KNZJV189JBE7&pd_rd_wg=3O1uC&pd_rd_r=e51c1edc-213f-4c6d-b081-e23afa6bf4ab&ref_=vn_s_iwp&qid=1694453553 > companies have no problem+with+links?that=look&like=this Let's not match the lowest common denominator, shall we?
- 5e92cb50239222b 3y agoYou only really need this part: https://amazon.com/dp/B09V3HZ8B5 https://amazon.com/dp/B09V3HZ8B5
- bandergirl 3y agoYes but that's irrelevant, I used a real URL that you will receive in your texts. It's real life, it happens and it sucks. Let's not normalize it.
- sieabahlpark 3y ago[dead]
- traceroute66 3y agoNo. It's not irrelevant. As you have been told apple.com/iphone = www.amazon.com/dp/B09V3HZ8B5 The rest of what you posted on the Amazon link is tracking bullshit. Now, THAT is irrelevant !
- hot_gril 3y agoUsers aren't expected to manipulate URLs manually. If your URLs have extra stuff, that's what people are going to copy/paste into messages. Amazon product URLs are looong, but maybe people don't share them enough for Amazon to care. YouTube and Twitter put more effort into making them short.
- eternityforest 3y agoI wonder if this is something Unicode could address. You could have something like quote marks that mean "Anything between these is data that shouldn't be seen in digital media but should be printed" So you could have urls like: example.com?<a single icon>&productname=somethinghumanreadable
- hot_gril 3y ago
- deleted 3y ago[deleted]
- blowski 3y agoSure, if Amazon sold about 10 products, such a URL scheme would work great. Additionally, this constantly redirects to the latest version of the iPhone, whereas Amazon's URLs are pointing to a specific version. A more "apples to apples" comparison (pun intended) would be the MagSafe charger: https://www.apple.com/shop/product/MHXH3AM/A/magsafe-charger?fnode=c1cdaf0f0784e147f01cac4f3d6f8aac75e0d753bdb7bff1a51aa5fd67439677a470a88d109571ff0002841d9c3bf91bfedf900f8a2ceb988a63d243c0e9564d24a6f91c791ef7fcce01fd80b0230b187fe4f48a23d67e6827907331d9550f0f https://www.apple.com/shop/product/MHXH3AM/A/magsafe-charger...
- insanitybit 3y agoApple doesn't need to create pages for millions of arbitrary items for sale.
- bandergirl 3y agoThe point is that you can always always always do better than a 100-character URL.
- hot_gril 3y agoCause some links are more likely to be shared, meaning they'll appear in a comment or SMS rather than just in your URL bar. Like if I copy a link from YouTube into HN: https://www.youtube.com/watch?v=00Uw9kgZ4QM https://www.youtube.com/watch?v=00Uw9kgZ4QM I'm sure they put some thought into not making it ?v=f6dde15a-3485-4f36-b0b9-a3b56fbc12ae.
- richbell 3y ago> Does it make the URL in the URL bar longer? Yeah, but does that matter? Yes. That's one of the author's arguments. ) A simple ID like 3c6n63N is more than enough to represent any product while keeping it readable and making communication easier. A UUID alternative like a73ba12d-1d8b-2516-3aee-4b15e563a835 is just wasteful from an user’s perspective.
- appletrotter 3y agoMaybe it’s one if the author’s arguments, but that doesn’t mean the author is right.
- richbell 3y agoSure — it's just a weird question to pose when the author specifically provides their opinion on it. It'd be different to say "I don't think it matters".
- Petersipoi 3y agoYou're just nitpicking. "Does it matter" is a very reasonable response to someone expressing their opinion.
- richbell 3y agoIt's not nitpicking. If I say "x matters and here's why" and you respond "yeah but does x matter?", you're either not paying attention or being rude and dismissive.
- NBJack 3y agoThere is the rub. Readable for what purpose? Aesthetics? And why? It is meaningless in their example. And what do they mean with communication? Reading it aloud? If the URL is too long to stick in a tweet or message, there are plenty of URL shorteners out there.
- 3y ago
- NBJack 3y agoAgreed. Decorative URL slugs have been successfully used by everything from blogs to Amazon itself for over a decade. If anything, that should be the focus here. Short URLs aren't much of a help, especially when short is relative on something like a mobile device.
- Alupis 3y ago> Does it make the URL in the URL bar longer? Yeah, but does that matter? No, it doesn't. If you're using a central system to generate id's (UUID's or other), then you are indeed missing a lot of the benefits of UUID's and might as well use some other ID scheme. The benefits of UUID are many systems can generate them, and your database can eventually accept them, all with a very high guarantee of uniqueness/no-collisions. Not to mention the other nice bits like non-sequential and non-enumerability. Most modern databases have UUID/Binary types/functions to allow for more efficient storage/handling anyway.
- emodendroket 3y agoThat’s an excellent point; that can end up being a bottleneck across many systems.
- refulgentis 3y agoWhat can?
- marginalia_nu 3y agoUnique ID generation.
- emodendroket 3y agoA service responsible for handing out UIDs.
- crooked-v 3y agoFor a simple practical example, it's awfully useful for a lot of systems to be able to generate UUIDs in an app while offline (think document creation, etc) and reconcile things later by shooting the blob of content off to the server, while knowing that you only need to handle the dance of getting IDs and updating stuff locally again in your error handling case.
- croes 3y ago>Does it make the URL in the URL bar longer? Yeah, but does that matter? Nowadays many links are much longer because of referrer information and tracking parameters. So the UUID doesn't add much.
- dspillett 3y agoThey might if several sets of tracking information end up there, because people are blocking the cookies they might otherwise be in for instance, and each set of tracking info has an identifier or few. The length of UUIDs will multiply up quite quickly there. Not that people will care. Once a URL is longer than a few words plus a code most users won't even look, even if they bother that far. You'll be in danger of starting to hit some browser/server/proxy limits though. Not that I mind that sort of information being lost, I'm happy for the incessant tracking of everyone's everything these days needs to go to hell.
- hot_gril 3y agoI noticed a recent change on YouTube where the "share" button now includes extra tracking stuff, making it longer than the actual URL in the address bar. Which is even funnier considering that they bought the youtu.be domain just to make shared URLs shorter. Address bar: https://www.youtube.com/watch?v=SHWhKRKlG98 https://www.youtube.com/watch?v=SHWhKRKlG98 Share button: https://youtu.be/SHWhKRKlG98?si=gwQHHze3UnjTobJg https://youtu.be/SHWhKRKlG98?si=gwQHHze3UnjTobJg
- i_am_jl 3y ago>Yeah, but does that matter? I'm really reaching here, but an ID that omits special characters is easier to extract from a url, since it can be double-clicked in a URL bar to select it, whereas a GUID with hyphens forces the user to select the beginning and the end of the string. Realistically I think this matters to developers more than users (I hope your application doesn't force users to interact with GUIDs in the address bar) but that's the only "waste" I can identify. EDIT: Someone elsewhere noted that they can base64 encode their GUIDs to achieve this and I'm seething that I'd never thought to do that
- noisem4ker 3y agoTo select an UUID, double click the first segment and drag the selection till the last segment before releasing. No need to aim for the exact beginning and end characters. (Maybe that's what you meant, amd yes, it's still clunkier than simply double clicking, but not much)
- dheera 3y ago> easier to extract from a url, since it can be double-clicked Maybe the double-click logic needs to be less stupid then. Or have it progressive, e.g. double-click = alphanumeric, triple-click = stop at symbols, quadruple-click = stop at slashes only, quintiple-click = the whole URL. Use the device microphone to listen for swear words and adjust algorithm with machine learning accordingly
- tombert 3y agoAs you said in your edit, you can of course base64 the GUID, but also don't most GUID libraries have an option to just omit the hyphens? I know .NET allows you to do that, and even correctly parse GUIDs that don't have any hyphens. I usually did that in .NET simply because I thought it was prettier without the hyphens.
- tzot 3y ago> I'm really reaching here, but an ID that omits special characters is easier to extract from a url, since it can be double-clicked in a URL bar to select it, whereas a GUID with hyphens forces the user to select the beginning and the end of the string. The is-hyphen-part-of-a-word issue depends on the text control (browser, UI widget library, …) / terminal you use, which is not universal. In any case, the hyphens/dashes are not required part of the representation, and one can use the “dashless” representation (exactly 32 hex digits) in URLs and in-code without any issues whatsoever, as far as I know; for example, Postgres accepts either “dashful” or “dashless” UUIDs the same.
- thaurelia 3y ago> Yeah, but does that matter? It might, e.g. with embedded systems. I can neither confirm nor deny that we once BOFed our own devices because we assumed that 1200 bytes was a big enough buffer to hold a URL.
- AdamH12113 3y ago> Does it make the URL in the URL bar longer? Yeah, but does that matter? I appreciate shorter URLs any time I copy and paste them, which always involves looking at them and sometimes involves scrolling to the end to remove tracking- and search-related fluff. 128 bits is an absurd amount for a unique ID within a single system. Even 48 bits is very, very large -- enough to provide a unique ID (MAC address) to every Ethernet device made for something like 100 years. The purpose of a UUID is to provide a negligible probability of collisions between randomly-generated IDs in a global space forever. Almost no applications require that, so most of the time using a UUID is just needlessly taking up space.
- siva7 3y agoThat’s not the only major purpose for a UUID and even if it was, it still would be flat out wrong to claim that almost no application requires that.
- AdamH12113 3y agoMaybe I'm missing something, then? I'm having trouble thinking of applications where it seems like a good idea to generate a permanent ID number completely randomly at all, much less applications that need to let the whole world do so. I can see how Windows device drivers have that requirement, but the point of the article is that even a massive site like YouTube (which doesn't want videos to be randomly discoverable via URL manipulation) does not need anywhere close to 128 bits. What are these applications you speak of?
- paulddraper 3y agoThe purpose of a universally unique identifier was indeed to be universally unique.
- hot_gril 3y agoBasically, you want UUID's 122 bits (128 minus 6 wasted on variant + version) if you can't afford collisions. If you have some DB enforcing unique IDs at creation time, you can manage with a lot fewer bits if you want shorter URLs or something.
- paulddraper 3y ago> these aren't situations I've ever found myself in You've never needed to give an order number, member ID, account ID, invoice number, etc?