Quotidian Quest

switching over to dashes

Category: tech
#blog #creative challenge

Today, I wanted to find out why urls used dash (-) instead of underscores (_). Personally, I perfer to use underscores because they are easier for me to read when looking at a long_title_that_signals_something and thought that the reason it didn't work out was because of someone thinking the opposite.

Turns out that it has more to do with how computers seperate words. Joel Atwood had a nice piece that points out that the w used in regular expressions matches up with the under score so what I view as multiple words would be counted as one.

The best example was in the comments when someone wrote:

This_is_a_single_word
but this-is-multiple-words
-- Jeff Atwood

I don't think I'll be changing my old files but going forward, I'll probably use this convention.