<?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>Trail of Light &#187; Programming</title>
	<atom:link href="http://www.trailoflight.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trailoflight.net</link>
	<description>rantings of a geek</description>
	<lastBuildDate>Sun, 27 Nov 2011 12:09:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google API and their documentation &#8230;. ready for prime time?</title>
		<link>http://www.trailoflight.net/2010/06/google-api-and-their-documentation-ready-for-prime-time/</link>
		<comments>http://www.trailoflight.net/2010/06/google-api-and-their-documentation-ready-for-prime-time/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 13:49:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.trailoflight.net/?p=55</guid>
		<description><![CDATA[Anyone who is following the Google world can see that the Google APIs are taking quite a chunk of the talk (maybe right after Android). The idea behind the API themselves are very good and the fact that you can do a great many mushups using the Google Platform is just very cool. Unfortunately, in [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who is following the Google world can see that the Google APIs are taking quite a chunk of the talk (maybe right after Android). The idea behind the API themselves are very good and the fact that you can do a great many mushups using the Google Platform is just very cool. Unfortunately, in my experience, that is where the slippery slope from coolness starts.</p>
<p>About a month ago I started working on a little product idea called <a href="http://www.smstheteam.com" title="SMSTheTeam" target="_blank">SMSTheTeam</a> which would leverage Google&#8217;s Contact, Document and Spreadsheet API all while running on Google&#8217;s AppEngine. The start was quick and easy with AppEngine&#8217;s SDK and the Google API Documentation. I was able to come up with a proof of concept in a couple of days and then things went haywire. </p>
<p>Now as a disclaimer I am not sure if this is an issue in just Google&#8217;s setup or in the python Google API library, but I suspect the former plays a large role since it seems that Google endorses the python library by using it in their examples. Let me start with a case point which is the simple authentication sequence. Now almost all the examples show the using of authentication for a single Google service when using a session token, but what about if you want to use two services. In one place the documentation states that they should be separated by a blank in another it states they should be a list. Trying both did not work even though the forum discussion supported the second. </p>
<p>The solution amazingly is that you do need to use a list but what is not mentioned is that after you upgrade your token you get a new token from Google and that is the token that you need to manage and keep. Now to be fair it is easy to deduce that is the logic behind the process but with a detailed documentation I should not be making assumptions should I? More importantly the documentation does not mention that you need to use the variable <em>auto_set_current_token </em> and set it to <em>True</em> for you to be able to use the token later on. </p>
<p>And the worst part some things are just not documented in some versions. Like for example the insertRow function in the Spreadsheets does not appear in v1.0 even though the python library does support it and the fact that the list given to the function should be all small letters is barely mentioned (which causes some frustration let me tell you)</p>
<p>I do not know if others have found the same disappointments in Google&#8217;s API documentation but it is a shame to see that the guys behind the API are doing so much work (they are in version 3) when so many things are left undocumented or requiring too much work to turn into proper robust code. I wonder how many mushup opportunities were lost to that. So in conclusion Google&#8217;s API&#8230;great, but their documentation&#8230;merely good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trailoflight.net/2010/06/google-api-and-their-documentation-ready-for-prime-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Multiple hunchentoot instances</title>
		<link>http://www.trailoflight.net/2009/09/running-multiple-hunchentoot-instances/</link>
		<comments>http://www.trailoflight.net/2009/09/running-multiple-hunchentoot-instances/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 18:12:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://www.trailoflight.net/blog/?p=22</guid>
		<description><![CDATA[Setting hunchentoot to offer several different website on the same common lisp implementation is not very intuitive, so this post tries to shed some light on the matter.]]></description>
			<content:encoded><![CDATA[<p>So if you are someone like me and interested in developing  web applications in Common Lisp then you have probably come across <a href="http://weitz.de/hunchentoot/" target="_blank">hunchentoot</a> by <a href="http://weitz.de" target="_blank">Dr Edi Weitz</a>. Now hunchentoot is not the only common lisp web-server out there and there are those who argue against its design concepts but it is one that I have found to well suit my need. Now I will be writing a list of posts about how to go around setting up things to work for a web application, but for this post i want to talk about multiple hunchentoot instances.</p>
<p>As you might know lisp hosting is not abundant so must of the time you need your own server instance to run your lisp on. However instances are relatively expensive when compare to other hosting options so it might be useful if you could run multiple websites of the same server. And it turns out you can do exactly that with hunchentoot and you do not need multiple instances of your common lisp running (I use SBCL).</p>
<p>Your first option is to visit <a href="http://www.cyrusharmon.org/" target="_blank">Cyrus Harmon website</a> and get his hunchentoot vhost code and run it on top of your hunchentoot. The code is clean and understandable and last i checked Cyrus uploaded a new version on 12 June 2009.</p>
<p>Your second option is to use hunchentoot built in capabilities and separate your websites on different ports (you could use a webproxy in front but that is another post). Start by creating your hunchentoot instance in the following manner:</p>
<blockquote><p>(hunchentoot:start (make-instance &#8216;hunchentoot:acceptor<br />
:port port<br />
:request-dispatcher dispatcher))</p></blockquote>
<p>Now the important part is that we started by telling this particular instance that we need hunchentoot to listen to the designated port. The key thing you need to take care of however is the parameter request-dispatcher. It turns out creating a hunchentoot acceptor this way you can no longer use any of hunchentoot built in dispatcher functionality (Which is the price you have to pay). So how to deal with that is to make sure that the <strong>dispatcher</strong> is actually a function that return the appropriate html.</p>
<p>This function needs to take one argument which is the response object and then return the proper html based on the response. There are different ways to do this that could be fast. One suggestion which I implemented was to create a hash table with the url as the key and the handler function as the value and i simply do a funcall on the handler function. it is that simple <img src='http://www.trailoflight.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Hope you enjoyed the above and stay tuned for some more information on lisp programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trailoflight.net/2009/09/running-multiple-hunchentoot-instances/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

