I have been programming for over twenty years but I still have no idea which one of these \ / is called a backslash and which is a forwardslash. I have been reminded hundreds of times, but it is a piece of information that just refuses to stick in my head.
I generally refer to them as “the slash on the question mark key” and the “other one“. It works best when I am on the phone with a client (or a relative) and trying to walk them through a long url. They always ask “which one?“. I have to open up my web browser and look at the url to remember which direction it goes and then match it up to the question mark key slash or the other slash.
I type them incorrectly all of the time. When entering urls where the http:\\ (or is that http://) is required.
I recently embarrassed myself on a list of asp.net gurus because I wasn't getting expected behavior from HttpResponse.RemoveOutputCacheItem(”/mypage.aspx”). It turned out that I had that slash wrong, yet again. (By the way, RemoveOutputCacheItem is a great method if you want to programmatically invalidate a web page from the OutputCache.Check out this article by caching guru Steven Smith.)
When I was growing up, my mother (who is a brilliant woman) never could remember left from right. Her excuse was “geniuses have no habits” and we had to make the leap that memorizing things like the association between the words “left” & “right” and the directions that they represent were “habits” and just not relevant to critical thinking. I'd love to piggy-back onto that excuse since the stupid backslash forwardslash thing feels just the same (I do know left from right, by the way!), though I don't really think I'm a genius. I spent years having to think “California is West, New York is East“ before I no longer needed that crutch to remember East from West.
Seems to me that slashes are pretty contextual. Wouldn't it be great if intellisense could somehow detect my common misuse of them in strings and just fix 'em for me. Or, perhaps I should stick with the URIBuilder class from now on. I could build a little System Tray program that lets me instantiate a new URIBuilder object with the constructor that lets me pass in the key parts of my url.
dim newURI as New System.UriBuilder("http", "www.thedatafarm.com")
and then I can return newURI.URI.AbsoluteURI which will then return “http://www.thedatafarm.com/”. Pretty darned tricky, eh?
(Note: In response to this post, Charles Petzold provides a history of slashes and their repercussions...)