Coding Horror

programming and human factors

Don't Devalue the Address Bar

I was reading an interesting entry in Rocky Lhotka's blog when something in the url caught my eye:

http://www.lhotka.net/WeBlog/PermaLink.aspx?guid=b28971dc-ac4b-4494-8a21-7a5105a39b07
I guess it's a DasBlog thing, but good lord: a globally unique ID in a blog hyperlink? Has it really come to this?

Dim g As Guid = Guid.NewGuid
Console.WriteLine(g.ToString)
2ac6857d-6fa4-43f6-9145-dfffaf00fd7a

This is my GUID. There are many like it but this one is mine. My GUID is my best friend. It is my life. I must master it as I must master my life. Without me, my GUID is useless. Without my GUID I am useless.

It's bad enough that so many websites devalue the address bar with nonsensical geek-speak URLs...

.. without adding GUIDs to the mix! How about something simpler that's actually understandable?

Building crappy URLs is just plain laziness. With the rich set of tools provided by IIS and ASP.NET, we should be leveraging 404 handlers and URL Rewriting to build URLs that are simple for people to understand, instead of taking the low road and building URLs that are easy for machines to understand.

My favorite technique is to map the 404 handler in IIS, per website, to /404.aspx. I can then intercept page not found errors with ASP.NET code and Server.Transfer them as I see fit. If you want a more robust solution at the ISAPI level, we've also used ISAPI Rewrite with great success.

* They should simplify this even further by making the default folder handler "index.x", then just.. http://www.techreport.com/etc/2004q3/3dmark05/?pg=1

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Overflow and Discourse. Disclaimer: I have no idea what I'm talking about. Find me here: https://infosec.exchange/@codinghorror