<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nomulous Blog &#187; Google</title>
	<atom:link href="http://nomulous.com/blog/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://nomulous.com/blog</link>
	<description>Caveat Lector</description>
	<lastBuildDate>Wed, 07 Sep 2011 21:04:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dashes vs. Underscores in URLs</title>
		<link>http://nomulous.com/blog/dashes_vs_underscores_in_urls/</link>
		<comments>http://nomulous.com/blog/dashes_vs_underscores_in_urls/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 20:58:07 +0000</pubDate>
		<dc:creator>nomulous</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[dashes]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[readability]]></category>
		<category><![CDATA[semantics]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[underscores]]></category>
		<category><![CDATA[URLs]]></category>

		<guid isPermaLink="false">http://nomulous.com/blog/?p=643</guid>
		<description><![CDATA[The debate over whether to use dashes or underscores to represent spaces in URLs is rather heated in the web development community, but not quite as extremely as that of whether to use tabs or spaces when indenting code. If you know many human beings, you won&#8217;t be surprised to hear that the majority of [...]]]></description>
			<content:encoded><![CDATA[<p>The debate over whether to use dashes or underscores to represent spaces in URLs is rather heated in the web development community, but not quite as extremely as that of whether to use tabs or spaces when indenting code. If you know many human beings, you won&#8217;t be surprised to hear that the majority of people get both of these things completely wrong. This is partially because most people haven&#8217;t really thought it through yet, but mostly because they just don&#8217;t care what&#8217;s right and they just refer to the <em>status quo</em>, wrong or not. I plan to write about tabs vs. spaces in another post, but here I will present irrefutable arguments to answer the question once and for all: what is better to substitute for spaces in URLs, dashes or underscores?</p>
<div id="attachment_667" class="wp-caption aligncenter" style="width: 368px"><img class="size-full wp-image-667 " title="dash-underscore face" src="http://nomulous.com/blog/wp-content/uploads/2011/08/dash-underscore_face.png" alt="dash-underscore face" width="358" height="197" /><p class="wp-caption-text">Dash-underscore face is relevant to this discussion.</p></div>
<p>The simple answer is that, never mind what <a href="http://www.youtube.com/watch?v=AQcSFsQyct8" target="_blank">Google says</a>, <strong>underscores are the right way to go</strong>. Why, you ask?</p>
<h3>1) Hyphens Already Mean Something</h3>
<p>Hyphens and dashes are actually slightly different, but in practice everybody just uses the same character, ASCII number 45, the hyphen-minus. So let&#8217;s just pretend they&#8217;re the same. The strongest argument against dashes is that they already mean something in English! &#8220;Mother-in-law&#8221;, &#8220;X-ray&#8221;, and &#8220;twenty-one&#8221; are <em>all single words</em>! Inserting a hyphen in the middle of a sentence can completely change its meaning. You can&#8217;t just ignore those rules, anymore you would write without capital letters, or proper punctuation. If you use dashes in your URLs when you don&#8217;t mean them, you a) lose information about what the content of the URL actually is, b) confuse people, and c) will have the English police at your door by the morning. I mean that last one, this shit is serious.</p>
<p>For example, I have a file called <em>man-eating-shark.jpg</em>. Now, can you tell me if it&#8217;s a picture of a man eating shark meat, or a picture of an actual man-eating shark? No, you can&#8217;t. This example is from <a href="http://en.wikipedia.org/wiki/Hyphen#Varied_meanings" target="_blank">Wikipedia</a>, and there are some more great ones on that page. Sure, <em>you</em> can just open the file and see if the shark in question is dead and delicious or alive and ravenous. But when a search engine indexes the file, it has no idea. This is very, <em>very</em> bad.</p>
<p>One more that nicely illustrates the importance of preserving dashes: a document called <em>scientists-discover-three-hundred-year-old-trees.html</em>. Are they three-hundred-year-old trees, three hundred-year-old trees, or three hundred year-old trees? We know neither how many trees there are, nor how old each is. And Google doesn&#8217;t know either! If you&#8217;re looking for things that are one hundred years old and not three, you&#8217;re out of luck because Google can&#8217;t tell the difference. How dumb is that?</p>
<p>On the other hand, the following URLs are perfectly clear:</p>
<ul>
<li>man-eating_shark.jpg</li>
<li>scientists_discover_three_hundred-year-old_trees.html</li>
</ul>
<p>This isn&#8217;t just some rare exception scenario, I actually see this kind of confusion more frequently than you might think. Sadly, dashes are still more common than underscores, firstly because all people care about is their website&#8217;s PageRank, and secondly because Google programmers never learned about hyphenated words at MIT or wherever. Frankly, taking SEO this far is a bit childish. We should create high-quality and original content, make your site accessible and standards-compliant, but we shouldn&#8217;t have to worry about what Google thinks of our URLs, especially when they get it wrong.</p>
<p>In summary, <em>you can&#8217;t just ignore centuries of English writing</em>. Don&#8217;t use dashes in URLs when you don&#8217;t mean them. Doing so is the worst kind of wrong: grammatically incorrect.</p>
<h3>2) Aesthetics and Readability</h3>
<p>I&#8217;ve appealed to those who care about language, but if you happen not to, that&#8217;s okay. Underscores are still better, because they <em>look</em> better. Dashes are all up in your space (haha), next to the letters that you actually want to be looking at. I would rather honestly read something in Comic Sans than have all sorts of garbage between each word, firing all the wrong photons into your eyes and making them sore.</p>
<p>Underscores? Not as good as spaces themselves, but certainly a huge improvements over dashes. They&#8217;re a bit larger than spaces (if the typeface is not monospaced), but at least they rest comfortably at the bottom of the letters, and it should be no harder to read than something underlined (in fact, underscores <em>are</em> underlines — more on that later). In order of decreasing readability:</p>
<ol>
<li>The five boxing wizards and the quick brown fox jumped over the lazy dog.</li>
<li>The_five_boxing_wizards_and_the_quick_brown_fox_jumped_over_the_lazy_dog.</li>
<li>The-five-boxing-wizards-and-the-quick-brown-fox-jumped-over-the-lazy-dog.</li>
</ol>
<p>The last one looks <em>terrible</em>. Depending on the person, and the typeface, this may not always be the case, but in general the underscore is far superior from a readability standpoint.</p>
<h3>3) The Semantics of the Underscore</h3>
<p>So you&#8217;re a web developer. Hopefully you care about language or readability, but perhaps not. But you definitely <em>do</em> care about semantics. In fact, if you don&#8217;t care about semantics on the web, you might not be in the right profession.</p>
<p>It&#8217;s not common knowledge, but the underscore isn&#8217;t really a character like the rest are on our keyboard. It&#8217;s only there because of a little piece of tech history known as the typewriter. In order to underline text, you had to write it out normally, then move the typewriter carriage back and go over it again with underscores. That means that an underscore character all on it&#8217;s own is basically an underlined space — which is pretty much as close to an actual space as you can get on the web.</p>
<h3>The Better Answer</h3>
<p>It should be obvious, but in a sane computer ecosystem we wouldn&#8217;t have to use either! We should not have to compromise on any of these three points, where the underscore is only the next-best option. A space should be a space, no matter where it is. Our filesystems themselves work fine with spaces in filenames, so why replace it at all? Unfortunately, a while ago a whole bunch of geeks with no appreciation for language decided it was a good idea to make the space (of all characters) the delimiter for filenames in things like command-line arguments and URLs, etc. There&#8217;s a prettygoodreasonweusespacesinwriting, but apparently they didn&#8217;t need l4ng4g3 bk 7h3n so whatever, right? Likely, they also didn&#8217;t anticipate the masses ever using the software they were writing, so they thought everything would continue to be named the &#8216;ol cryptic bastardization of English words like &#8220;tmp&#8221;, &#8220;lib&#8221;, or &#8220;srv&#8221;.</p>
<p>Of course, quotes or some other non-space delimiter should have been required from the beginning. The &#8220;use spaces, or else fall back on quotes&#8221; system is just silly.  You have to use some delimiter, of course, but <em>not spaces</em>, because we use them more than any letter in the alphabet. Imagine if we just said that you had to use an &#8220;a&#8221; to delimit file names and URLs. That&#8217;s the same logic, works fine, it&#8217;s only less readable. The question then becomes, should we be using @ or 4 to substitute for &#8220;a&#8221; in URLs? Ridiculous. In any case, that&#8217;s the reason that when you have something called &#8220;my file.txt&#8221; you keep seeing &#8220;No such file or directory&#8221; on the command line, and also the reason we can&#8217;t use spaces in URLs.</p>
<h3>Conclusion</h3>
<p>As it is, the crazy idea that a space should represent a space and not some other character is pretty impractical. Because of the great mistake of our digital ancestors, space delimiters, you would have to rewrite every web browser on earth to make spaces work properly in URLs. If you do try to use them, a browser encodes them as &#8220;%20&#8243;, which%20makes%20your%20URLs%20look%20like%20this. Technically, they&#8217;re encoded spaces, but it&#8217;s hideous. You can barely read it. Oh well, maybe one day this will change.</p>
<p>So, underscores are not quite as good as spaces. They&#8217;re a compromise of language, readability, and semantics, but they&#8217;re the best we&#8217;ve got. Better than dashes, CamelCase, plus+signs, or anything else. So use them. Don&#8217;t do something you know is wrong because of the minute difference it might make to your Google PageRank. You should be caring more about your users anyways, and if you do it right, Google will change along with everyone else.</p>
<p>I realize that, ironically, all my other blog posts use dashes instead of underscores. It&#8217;s the WordPress default, and I haven&#8217;t had time to fix it yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomulous.com/blog/dashes_vs_underscores_in_urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Added Disqus, ShareThis, and Google Adsense</title>
		<link>http://nomulous.com/blog/added-disqus-sharethis-and-google-adsense/</link>
		<comments>http://nomulous.com/blog/added-disqus-sharethis-and-google-adsense/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 00:36:14 +0000</pubDate>
		<dc:creator>nomulous</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[advertisements]]></category>
		<category><![CDATA[Disqus]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Gravatar]]></category>
		<category><![CDATA[OpenID]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reddit]]></category>
		<category><![CDATA[ShareThis]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://nomulous.com/blog/?p=348</guid>
		<description><![CDATA[I have added three new features to the blog; the Disqus comments system , the ShareThis social media button, and Google AdSense advertisements. Disqus because it looks awesome and has a trillion more features than regular old WordPress comments, like signing in through Twitter/Facebook/OpenID, great comment approval and flagging, and Gravatar icons. At first the [...]]]></description>
			<content:encoded><![CDATA[<p>I have added three new features to the blog; the <a href="http://disqus.com/">Disqus</a> comments system , the <a href="http://sharethis.com/">ShareThis</a> social media button, and <a href="http://www.google.com/adsense/">Google AdSense</a> advertisements.</p>
<p>Disqus because it looks awesome and has a trillion more features than regular old WordPress comments, like signing in through Twitter/Facebook/OpenID, great comment approval and flagging, and <a href="http://en.gravatar.com/">Gravatar</a> icons. At first the admin page was giving me a blank grey screen, but I looked at my error logs and it turned out that for some reason <em>disqus.php</em> couldn&#8217;t find the <em>admin-header.php</em> file when it require()&#8217;d it. I just edited the plugin and replaced line 370 with the actual path to the file on my server.</p>
<p>ShareThis was added because Reddit is the pretty great and I want to be a part of it. I might eventually write my own version of this, because it&#8217;s a bit clunky and not customizable enough.</p>
<p>I added the AdSense block just as an experiment, I don&#8217;t actually plan on monetizing anything. I really just want to see how the system works and all that. It looks like I&#8217;ve already made about $0.47!</p>
]]></content:encoded>
			<wfw:commentRss>http://nomulous.com/blog/added-disqus-sharethis-and-google-adsense/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

