<?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>lexanderA &#187; Autocomplete</title>
	<atom:link href="http://lexandera.com/tag/autocomplete/feed/" rel="self" type="application/rss+xml" />
	<link>http://lexandera.com</link>
	<description>A blog about the web, mobile web, semantic web and mobile semantic web.</description>
	<lastBuildDate>Sun, 06 Jun 2010 18:27:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>On named parameters</title>
		<link>http://lexandera.com/2009/05/on-named-parameters/</link>
		<comments>http://lexandera.com/2009/05/on-named-parameters/#comments</comments>
		<pubDate>Mon, 04 May 2009 04:07:30 +0000</pubDate>
		<dc:creator>Aleksander Kmetec</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Autocomplete]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[Named parameters]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://lexandera.com/?p=352</guid>
		<description><![CDATA[Here&#8217;s a proof that quitting your job and not working on anything for two months is not good for you: I just spent two days pondering why named function parameters are loved by coders and considered an important part of many programming languages while named parameters in URLs are considered to be ugly, harmful and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a proof that quitting your job and not working on anything for two months is not good for you: I just spent two days pondering why named function parameters are loved by coders and considered an important part of many programming languages while named parameters in URLs are considered to be ugly, harmful and one of the leading causes of scurvy. Developers will even find a way to emulate named function parameters in languages which don&#8217;t support them by default while at the same time they will try their best to make all the parameters in URLs of their websites strictly positional. It makes everyone look a bit confused and bipolar, if you ask me.</p>
<p>Here&#8217;s a quick overview of the situation.</p>
<p>Named parameters in URLs: BAD<br />
<em><span><span> http://domain.com/list?type=fruit&amp;page=1&amp;items=20</span></span></em></p>
<p>Positional parameters in URLs: GOOD<br />
<em><span><span> http://domain.com/list/fruit/1/20</span></span></em></p>
<p>Named parameters in function calls: GOOD<br />
<em>foo.list(:type =&gt; &#8220;fruit&#8221;, :page =&gt; 1, :items =&gt; 20)</em></p>
<p>Why is this so? It might have more than just a little bit to do with the fact that coders spend a lot of their time reading, writing and modifying function calls, while URLs are only rarely modified by anyone (or even read, for that matter). The need to modify URLs is so rare in fact that many security holes exist only because developers never even remotely considered that someone might insert an unfriendly value into one of the parameters. It makes sense then that if URLs are only meant to be looked at, to make them short and pretty and clean of any characters which make them appear as if they&#8217;ve been involved in an explosion at the ASCII factory.</p>
<p>Why then is the URL, this unfriendly sequence of characters, still presented as a fully editable value? Is it really not possible to turn it into anything more than a barely readable &#8220;you are here&#8221; sign?</p>
<p>Microsoft managed to do something interesting with the way directory paths (URL&#8217;s distant relatives) are displayed in Vista and Windows 7: each directory is a separate button and clicking any one of them takes you directly to that directory.</p>
<div id="attachment_354" class="wp-caption alignnone" style="width: 489px"><img class="size-full wp-image-354" title="Windows explorer in Vista" src="http://lexandera.com/wp-content/uploads/2009/05/urlbar-vista-path.png" alt="Windows explorer in Vista" width="479" height="55" /><p class="wp-caption-text">Two different ways of displaying the same directory path</p></div>
<p>Couldn&#8217;t something similar be done for URLs? Here&#8217;s my suggestion: make it easy to experiment with different parameter values. Hide all the &#8220;noise&#8221; characters. Turn each key/value pair into a button and offer alternative values when somebody clicks them.</p>
<p><img class="alignnone size-full wp-image-355" title="Location bar" src="http://lexandera.com/wp-content/uploads/2009/05/urlbar-builder.png" alt="Location bar" width="481" height="87" /></p>
<p>Now, this might not catch on with your average Joe Streetperson, but it does look like it could be useful to developers when they are testing a website or a web service which returns different XML/JSON based on parameter values.</p>
<p>Think of it as <a class="zem_slink" title="IntelliSense" rel="wikipedia" href="http://en.wikipedia.org/wiki/IntelliSense">Intellisense</a> for the location bar.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=2a9c2d7e-a319-43b2-9f0c-bffe5f520223" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://lexandera.com/2009/05/on-named-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
