<?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>CoderJoe.net &#187; Coding</title>
	<atom:link href="http://www.coderjoe.net/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderjoe.net</link>
	<description>Me, myself, and my code.</description>
	<lastBuildDate>Tue, 08 Jun 2010 19:45:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>A little turkey day coding!</title>
		<link>http://www.coderjoe.net/archive/2008/12/01/a-little-turkey-day-coding/</link>
		<comments>http://www.coderjoe.net/archive/2008/12/01/a-little-turkey-day-coding/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 23:23:20 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[budget]]></category>
		<category><![CDATA[holiday]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/?p=149</guid>
		<description><![CDATA[So what does any self respecting programmer do when he finds himself awake at 2am after Thanksgiving? Do some coding of course! In this case I decided to finish up that holiday shopping budget I had been putting off. Using this simple little javascript application you can tell exactly how much you can afford to [...]]]></description>
			<content:encoded><![CDATA[<p>So what does any self respecting programmer do when he finds himself awake at 2am after Thanksgiving?</p>
<p>Do some coding of course!</p>
<p>In this case I decided to finish up that holiday shopping budget I had been putting off. Using this simple little javascript application you can tell exactly how much you can afford to spend on each person.</p>
<p><a title="http://lab.coderjoe.net/holiday-budget/budget.html" href="http://lab.coderjoe.net/holiday-budget/budget.html" target="_blank">http://lab.coderjoe.net/holiday-budget/budget.html</a></p>
<p>Just choose your overall max budget, enter the names of all those people you will be giving gifts to, and rate them on a scale from 1 to 10!</p>
<p>Easy as pie.</p>
<p>Happy Holidays!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2008/12/01/a-little-turkey-day-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Core Dump Grapher</title>
		<link>http://www.coderjoe.net/archive/2008/03/20/oracle-core-dump-grapher/</link>
		<comments>http://www.coderjoe.net/archive/2008/03/20/oracle-core-dump-grapher/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 03:45:51 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[core dump]]></category>
		<category><![CDATA[graphviz]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[trace file]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2008/03/20/oracle-core-dump-grapher/</guid>
		<description><![CDATA[Anyone who has ever spent any significant amount of time working with an Oracle database has probably seen a ORA-600 or ORA-07445 &#8220;exception encountered: core dump&#8221; trace file. Unfortunately, when you come across an Oracle core dump you can&#8217;t do much more than send the dump to Oracle and hope the issue is already resolved [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who has ever spent any significant amount of time working with an Oracle database has probably seen a ORA-600 or ORA-07445 &#8220;exception encountered: core dump&#8221; trace file.</p>
<p>Unfortunately, when you come across an Oracle core dump you can&#8217;t do much more than send the dump to Oracle and hope the issue is already resolved in a newer version, or that a patch is available for your current version.</p>
<p>This process usually consists of three steps:</p>
<ol>
<li>Collect the trace files related to the issue.</li>
<li>Open a Service Request on Oracle&#8217;s Metalink site.</li>
<li>Wait for a response</li>
</ol>
<p><span style="font-style: italic">If you&#8217;re lucky</span>, the first step is an easy one.<br />
<span style="font-style: italic">If you&#8217;re lucky</span> you caught the first occurrence of the core dump and only need to shoot off a single trace file to the guys at Oracle.</p>
<p>On the other hand, if you&#8217;re not lucky, you might be handed 50-60 trace files spanning multiple weeks and be asked to sort them by distinct issue for reporting to Oracle.</p>
<p>I&#8217;m <span style="font-weight: bold">not</span> lucky.</p>
<p>Sorting the trace files is a long process which involves searching the trace file for the dump, researching the issue on Metalink, finding similar issues on Metalink, and then sorting the trace files by those issues.</p>
<p>Two trace files into the process I knew there had to be a better way.<br />
Well, what better way to organize trace files than by the stack trace that generated the dump?</p>
<p>From that idea TraceFileGrapher was born.</p>
<p>The TraceFileGrapher takes as input a directory of trace files, and creates a graph representing the call stacks of all of the trace files resulting in core dumps. The graph is then saved as any <a href="http://www.graphviz.org" title="Graphviz: The opensource graph vizualisation package." target="_blank">Graphviz</a> compatible format of your choosing.</p>
<p>The graphs themselves are simple. The starting nodes of the graph are colored green. The ending nodes are colored red. For a stack trace graph, the end nodes are the names of the trace files in which the core dump appeared. For a PL/SQL Call stack graph, the end nodes are the final PL/SQL function or procedure call name.</p>
<p>Example Graphs</p>
<ul>
<li><a href="http://www.coderjoe.net/wp-content/uploads/2008/03/example-stack-graph.png" title="Oracle Core Dump Stack Graph">Oracle Core Dump Stack Graph</a></li>
<li><a href="http://www.coderjoe.net/wp-content/uploads/2008/03/example-noloop-stack-graph.png" title="Oracle Core Dump Stack Graph without loops">Oracle Core Dump Stack Graph without loops</a></li>
<li><a href="http://www.coderjoe.net/wp-content/uploads/2008/03/example-plsql-graph.png" title="PL/SQL Call Stack Graph">PL/SQL Call Stack Graph</a></li>
<li><a href="http://www.coderjoe.net/wp-content/uploads/2008/03/example-noloop-plsql-graph.png" title="PL/SQL Call Stack Graph without loops">PL/SQL Call Stack Graph without loops</a></li>
</ul>
<p>In addition to graphing core dump stack traces, TraceFileGrapher can graph PL/SQL Call Stacks as well.</p>
<p>The TraceFileGrapher requires <a href="http://www.perl.org" title="The offical Perl webpage." target="_blank">Perl</a>, the <a href="http://search.cpan.org/~tels/Graph-Easy/" title="The Graph::Easy CPAN module for creating graphs in Perl." target="_blank">Graph::Easy</a> Perl module, and the <a href="http://www.graphviz.org" title="Graphviz: The open source graph visualization project." target="_blank">Graphviz</a> open source graph visualization software.</p>
<p>Get the TraceFileGrapher <a href="http://www.coderjoe.net/wp-content/uploads/2008/03/tracefilegrapher-0.1.tar.gz" title="TraceFileGrapher-0.1.tar.gz">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2008/03/20/oracle-core-dump-grapher/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>GoGeocode PHP Library Release</title>
		<link>http://www.coderjoe.net/archive/2008/02/26/gogeocode-php-library-release/</link>
		<comments>http://www.coderjoe.net/archive/2008/02/26/gogeocode-php-library-release/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 04:48:06 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2008/02/26/gogeocode-php-library-release/</guid>
		<description><![CDATA[Over the past two months or so I&#8217;ve been playing with an old pet project of mine that I tend to peck away at when I can&#8217;t think of a better to work on. As part of this project I found myself needing to do a massive amount of geocoding in PHP. After searching through [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past two months or so I&#8217;ve been playing with an old pet project of mine that I tend to peck away at when I can&#8217;t think of a better to work on.</p>
<p>As part of this project I found myself needing to do a massive amount of geocoding in PHP.</p>
<p>After searching through the various PHP based geocoding libraries online I came to notice that none of them seemed to make use of the APIs ability to return multiple points as well as informational data about each point.</p>
<p>Thus GoGeocode was born.</p>
<p>GoGeocode is an extremely small set of classes for use in querying both the Google and Yahoo geocoding APIs.</p>
<p>I&#8217;ve released the code under the <a href="http://www.opensource.org/licenses/mit-license.php" title="MIT License" target="_blank">MIT License</a> and posted the code at <a href="http://code.google.com/p/gogeocode/" title="http://code.google.com/p/gogeocode/" target="_blank">http://code.google.com/p/gogeocode/</a></p>
<p>Take and enjoy!</p>
<p><strong>Update:</strong> The GoGeocode page has been updated with a description, example use case, and a tar.gz archive of the gogeocode-0.1 release tag from SVN.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2008/02/26/gogeocode-php-library-release/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FreeRice.com and Automaton</title>
		<link>http://www.coderjoe.net/archive/2007/11/19/freericecom-and-automaton/</link>
		<comments>http://www.coderjoe.net/archive/2007/11/19/freericecom-and-automaton/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 02:04:02 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[freerice.com]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/11/19/freericecom-and-automaton/</guid>
		<description><![CDATA[I had recently become aware of a website named FreeRice.com. This site provides a vocabulary game where one identifies synonyms for words with an ever increasing difficulty. Since I could always use a better vocabulary the site intrigued me. I played the game for a few hours but was in no way satisfied with my [...]]]></description>
			<content:encoded><![CDATA[<p>I had recently become aware of a website named <a href="http://freerice.com" title="FreeRice.com: Learn vocabulary while feeding the hungry.">FreeRice.com</a>. This site provides a vocabulary game where one identifies synonyms for words with an ever increasing difficulty. Since I could always use a better vocabulary the site intrigued me. I played the game for a few hours but was in no way satisfied with my progress. At roughly one correct answer every two seconds I&#8217;d rank up 18,000 grains of rice an hour. Unfortunately, once I reached the higher levels I was averaging only 3 out of every 4 questions right.</p>
<p>While 13,500 (75% of my estimated optimal efficiency) grains of rice is a lot, it was nowhere near satisfactory. After joking about my &#8220;horrible rice metrics&#8221; at work, I mused that I should write a <a href="http://www.greasespot.net/" title="The Greasemonkey Firefox Extension." target="_blank">Greasemonkey</a> script which would play the game better than I could possibly hope to. As the rest of my work day rolled on I became more and more intrigued by the idea. There was absolutely no reason why I couldn&#8217;t write a very simple AI to play the FreeRice.com game.</p>
<p>Were there reasons why I shouldn&#8217;t?</p>
<p>I knew the most obvious reason:<br />
This wasn&#8217;t a controlled experiment. If the script spun out of control and was allowed to play over and over I could risk exhausting FreeRice.com&#8217;s funds.</p>
<p>Because I didn&#8217;t want to be responsible for the downfall of a potentially lucrative source of food for impoverished children  I initially abandoned my bot. Despite my fears, curiosity eventually got the best of me and I began implementing my bot. I started by implementing a simple timing method limiting page requests to once every 10 seconds for debugging purposes, just in case.</p>
<p><span id="more-107"></span></p>
<p>Flash forward a day or so and I had a working FreeRice.com bot named &#8220;Automarice&#8221;. The bot had a number of interesting features which I found fun. First and foremost the bot kept statistics on its &#8220;correctness&#8221; per level it visited. These statistics were provided both over every answer given for a single level, as well as for the last hundred answers. These answers were provided as a simple HTML table benieth the FreeRice.com advertisements.</p>
<p><a href="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-stats.jpg" title="Automarice - Statistics"></a></p>
<p style="text-align: center"><a href="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-stats.jpg" title="Automarice - Statistics"><img src="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-stats.jpg" alt="Automarice - Statistics" height="173" width="460" /></a></p>
<p>The AI behind Automarice was simplistic at best. I have no formal training in Artificial Intelligence and as such I just tried to make the bot behave as I would. To implement the AI the bot was given a few things. First, the bot was given a dictionary which it could use to store words and definitions. Second, the bot was set to record the associations it remembered learning from playing the game. In this way the bot was given a &#8220;memory&#8221; of previous correct answers. The bot started out with random play. If the bot was unsure of the answer it would select one answer at random, and would record the result. In this way the bot would slowly build a large vocabulary and increase its level.</p>
<p>The algorithm was improved on slightly by allowing the bot to reduce it&#8217;s probable correct answer set by excluding potential answers which it already knew that did not match the given question word. This did introduce incorrect answers when new synonyms were learned, but since it improved the general case it was considered a good thing. The thought process of the bot was identified in the UI by striking through answers it believed were incorrect, and underlining the answer it would chose. If the answer was a guess it would append a question mark to that answer.</p>
<p><a href="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-list.jpg" title="Automarice - List Changes"></a></p>
<p style="text-align: center"><a href="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-list.jpg" title="Automarice - List Changes"><img src="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-list.jpg" alt="Automarice - List Changes" height="279" width="404" /></a></p>
<p>Finally, I implemented a dictionary and statistics exporter and importer. An export would generate an HTML page containing JSON representations of the internal dictionary and statistics. When this export file was opened it would trigger Automarice to import the data.</p>
<p>My bot contained a number of functional bugs. For example, if both the bot and the user played at the same time, the bot would produce script errors. However, since my bot was able to play the game successfully these errors didn&#8217;t really bother me.</p>
<p>After reducing the wait time from 10 seconds to a random number between 2 to 10 seconds per question I let my bot go for a few hours. After my bot gained an accuracy of 78% on level one, it looked like it would gain 1 or 2 levels every hour or so.</p>
<p>Satisfied with my progress I retired my bot. While I am interested in releasing the source code I do not want to provide a plug and play method for taking down FreeRice.com. As such the source code will remain locked up.</p>
<p><a href="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-full.jpg" title="Automarice - Full View"></a></p>
<p style="text-align: center"><a href="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-full.jpg" title="Automarice - Full View"><img src="http://www.coderjoe.net/wp-content/uploads/2007/11/freerice-full.thumbnail.jpg" alt="Automarice - Full View" height="178" width="202" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/11/19/freericecom-and-automaton/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>More Fun with Greasemonkey</title>
		<link>http://www.coderjoe.net/archive/2007/10/30/more-fun-with-greasemonkey/</link>
		<comments>http://www.coderjoe.net/archive/2007/10/30/more-fun-with-greasemonkey/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 04:34:16 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[experts-exchange]]></category>
		<category><![CDATA[greasemonkey]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/10/30/more-fun-with-greasemonkey/</guid>
		<description><![CDATA[The past month has been a difficult one. Between readying the apartment for winter, various chores, and social obligations, I&#8217;ve had little time for my own personal projects. Recently however I came across a few things that I just couldn&#8217;t pass up. &#160; More fun with Experts Exchange &#160; I was recently informed that my [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0in">The past month has been a difficult one. Between readying the apartment for winter, various chores, and social obligations, I&#8217;ve had little time for my own personal projects. Recently however I came across a few things that I just couldn&#8217;t pass up.</p>
<p style="margin-bottom: 0in"><span id="more-106"></span></p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in"><strong>More fun with Experts Exchange</strong></p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">I was recently informed that my <a href="http://www.coderjoe.net/archive/2007/08/10/experts-exchange-encryption/" title="Unhide Experts Exchange script">Unhide Experts Exchange Greasemonkey script</a> had become obsolete. Reader <a href="http://community.zdnet.co.uk/blog/0,1000000567,2000342184b,00.htm" title="nico5038's blog covering issues with Experts Exchange" target="_blank">nico5038</a> points out in a comment that Experts Exchange now hides all comments from users unless they&#8217;re logged in.</p>
<p style="margin-bottom: 0in"> I would have been content to leave it at that until my friend <a href="http://www.seancolombo.com" title="Sean Colombo's blog." target="_blank">Sean</a> pointed out that Experts Exchange seems to be “<a href="http://en.wikipedia.org/wiki/Cloaking" title="Wikipedia article on Cloaking" target="_blank">cloaking</a>” its answer pages. What this means is that when a search spider visits the site Experts-Exchange they will present a page that has all comments visible. However, if you or I go visit the site, the comments are hidden. This isn&#8217;t exactly the nicest thing to do on the web these days, so I&#8217;ve decided to write a new Experts-Exchange Greasemonkey script to fetch the hidden text from one of many different potential sources and replace the hidden text with the text that we should all be able to see.</p>
<p style="margin-bottom: 0in">Edit: They aren&#8217;t cloaking they&#8217;re just appending the comments to the end of their page. In any case grabbing a cached version of the page will help stave off any other awkward practices they use in the future.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">I&#8217;ll update again tomorrow with the script once its been tested.</p>
<p style="margin-bottom: 0in">In the mean time enjoy a Happy Halloween!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/10/30/more-fun-with-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experts Exchange Part 2</title>
		<link>http://www.coderjoe.net/archive/2007/10/28/experts-exchange-part-2/</link>
		<comments>http://www.coderjoe.net/archive/2007/10/28/experts-exchange-part-2/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 21:41:51 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[experts-exchange]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/10/28/experts-exchange-part-2/</guid>
		<description><![CDATA[It would seem that Experts Exchange has changed their free access strategy. Where they would once display the normal solutions to a question hidden under a weak rot13 encryption, they have finally chosen to hide the articles all out unless one signs up for an account. I for one welcome the change. Since it was [...]]]></description>
			<content:encoded><![CDATA[<p>It would seem that Experts Exchange has changed their free access strategy. Where they would once display the normal solutions to a question hidden under a weak <a href="http://www.coderjoe.net/archive/2007/08/10/experts-exchange-encryption/" title="Expets Exchange Encryption" target="_blank">rot13</a> encryption, they have finally chosen to hide the articles all out unless one signs up for an account.</p>
<p style="margin-bottom: 0in">I for one welcome the change. Since it was their intention to only provide answers to registered users in the first place, moving away from obfuscated text helps clarify the site&#8217;s goals.</p>
<p style="margin-bottom: 0in">As a result of this site change I&#8217;ve been asked by a number of anonymous visitors to my site to rewrite my script to fetch the answers to an article so they don&#8217;t have to log in. I would like to make it clear that given the sites new design, that a script to display the answers is no longer possible. As such no effort will be put forth to do so.</p>
<p style="margin-bottom: 0in">Sorry to anybody who had their hopes up, but you can&#8217;t un-hide what isn&#8217;t there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/10/28/experts-exchange-part-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Continuations: What is the deal?</title>
		<link>http://www.coderjoe.net/archive/2007/09/07/continuations-what-is-the-deal/</link>
		<comments>http://www.coderjoe.net/archive/2007/09/07/continuations-what-is-the-deal/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 00:49:57 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[computer-science]]></category>
		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/09/07/continuations-what-is-the-deal/</guid>
		<description><![CDATA[Over the past few weeks I&#8217;ve noticed what I consider to be an interesting trend. It has become almost impossible for me to browse for technical reading on the internet, or partake in a technical discussion, without someone mentioning continuations.In general, I welcome any discussion, and discussion of continuations is no different. The implementation of [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks I&#8217;ve noticed what I consider to be an interesting trend. It has become almost impossible for me to browse for technical reading on the internet, or partake in a technical discussion, without someone mentioning continuations.In general, I welcome any discussion, and discussion of continuations is no different. The implementation of continuations intrigues me, and I&#8217;m curious about how useful they will turn out to be. I&#8217;ve even been known to suggest that continuations could be used to make code smaller and easier to write.</p>
<p>With such a positive opinion about the potential use of continuations, it surprises my colleagues to learn that I am very wary of their actual use. I find myself asking, or being asked, the same question again and again.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in"><span id="more-104"></span></p>
<p style="margin-bottom: 0in"><strong>What&#8217;s wrong with continuations?</strong></p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">Quite frankly, continuations remind me too much of the &#8220;GOTO&#8221; statement. Continuations, as with GOTOs, have their potential uses. However, I feel that the problems inherent in using continuations outweigh the benefits.</p>
<p style="margin-bottom: 0in">From what I&#8217;ve gathered from my individual conversations, continuations are useful in a numer of ways.</p>
<ul>
<li>First, in generators.</li>
<li>Second, in the form of their close cousin, the closure.</li>
<li>Finally, for their use in arbitrary state management.</li>
</ul>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">Their use as a part of generators is obvious, even if only made evident through the number of times the Python Fibonacci generator has been published as an example of the use of a continuation. Despite this, I don&#8217;t find myself creating and using generators in my every day code. Generators may be helpful, but using one seems like more of an occasional convenience than the rule.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">Closures on the other hand are something I use every day. My job involves a fair amount of web application development which results in a good deal of Javascript development. I will openly admit that I would be lost without  closures. Closures are invaluable when dealing with things such as binding execution to event handling. Without closures, some of the things I do might very well be impossible given Javascript&#8217;s event system design. Then again, Javascript was designed with closures in mind, so one could very well consider their use a moot point.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">The use of continuations for state management may not be as apparent as the previous examples. For an example, one need only look as far as the <a href="http://www.seaside.st/" title="Seaside: A Continuation Based Web Framework" target="_blank">Seaside</a> web framework. Seaside is a continuation based web framework which takes the stance that one should <a href="http://www.seaside.st/documentation/videos?16&amp;_k=jWLNbTUu&amp;_n&amp;_s=URoqQLYxrnXYKHZb" title="As stated by Lukas Renggli in his talk " target="_blank">&#8220;share as much state as possible&#8221;</a>. In essence, the web framework itself keeps track of the sessions. These sessions are tied to a hash of continuations, each representing a state in the current application&#8217;s logical flow. The web application URL is not meaningful and contains little more than a reference ID to the current continuation. When you render a new page, a new continuation is generated and a reference to it is pushed into a hash somewhere for fetching later. That way if you hit the back button, going back to a previous page, the page will reference the previous continuation. When that continuation is used, your application flow would start from where you left off on that previous page.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">All of a sudden the back button is useful!</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">Seaside has found an incredibly ingenious way to manage session state. At the same time, I believe it&#8217;s important to remember that while you gain automatic session state management, you lose some rather nice perks. The first thing I would miss while using Seaside would be meaningful URLs. In addition, your web framework is maintaining an ever increasing amount of state for each session. For some reason I get the feeling that this solution isn&#8217;t as great as it initially seemed.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in"><strong>With so many good examples, why be so wary of continuations?</strong></p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">It is true that there are many examples of continuations used for some very interesting, and often ingenious tasks. However, I still remember seeing GOTOs used in some of the most interesting and ingenious examples of code I have ever seen. For a proper example of the type of &#8220;ingenious&#8221; and &#8220;interesting&#8221; code I speak of, I refer you to <a href="http://catb.org/jargon/html/story-of-mel.html" title="The Story of Mel from The Jargon File." target="_blank">&#8220;The Story of Mel&#8221;</a>.</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">So Internet, I ask you, what is the deal? Are continuations just the current topic fad that they seem to be to me? Or are continuations something people are actually very excited about? Should I look forward to finding more examples of good continuation practice? Or will I soon be suggesting that programmers avoid both GOTOs and continuations because they encourage lazy or hard to manage code? Could their possibly be a happy medium?</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p>Forgive me for remaining skeptical, but I just can&#8217;t shake the feeling that continuations aren&#8217;t the magical entity that people seem to keep telling me they are.  I&#8217;ll leave it up to history (or the Internet) to decide&#8230;</p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in">Addendum: It would seem that <a href="http://www.wikipedia.org/wiki/Continuation#Disadvantages" title="Wikipedia Continuations Article - Disadvantages" target="_blank">Wikipedia already agrees</a> with me that continuations are really just “the functional expression of the GOTO statement&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/09/07/continuations-what-is-the-deal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Foxnight.net is dead&#8230; anybody want it?</title>
		<link>http://www.coderjoe.net/archive/2007/08/17/foxnightnet-is-dead-anybody-want-it/</link>
		<comments>http://www.coderjoe.net/archive/2007/08/17/foxnightnet-is-dead-anybody-want-it/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 02:50:47 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[foxnight.net]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/08/17/foxnightnet-is-dead-anybody-want-it/</guid>
		<description><![CDATA[Oh no! You killed it! When I purchased my first domain I had a nifty idea for a particularly useful and exciting web application. It was to be the be-all and end-all of all my internet needs. Then I realized that my idea sucked harder than a vacuum. Since then the domain has been sitting [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Oh no! You killed it!</strong></p>
<p>When I purchased my first domain I had a nifty idea for a particularly useful and exciting web application. It was to be the be-all and end-all of all my internet needs.</p>
<p>Then I realized that my idea sucked harder than a vacuum.</p>
<p>Since then the domain has been sitting around gathering dust, and generally wasting space. People have suggested that I sell the domain, but I&#8217;ve decided to just give it to the first person to  give me a good reason why it should be theirs.</p>
<p><strong>How can I get it from you?</strong></p>
<ul>
<li>First, you need whatever the transfer costs for your registrar.</li>
<li>Second, you need a good reason why you should be the lucky one to own <a href="http://www.foxnight.net" title="Foxnight.net" target="_blank">Foxnight.net</a>.</li>
</ul>
<p>Ok, so the reason doesn&#8217;t have to be amazing. Your reason just needs to beat the many &#8220;because I want it&#8221; reasons I&#8217;ve been receiving.</p>
<p>Want to do something good with the domain? Going to start a business? Want to own your first domain and think it sounds neat?</p>
<p>Let me know!</p>
<p>Contact me via my e-mail address at coderjoe[squiggily-a]coderjoe.net with your reason, and if I like it we&#8217;ll get the transfer process started.</p>
<p>I&#8217;ll leave this post up for as long as it takes to catch someones interest.  Once the domain has a new owner I&#8217;ll note it at the top of this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/08/17/foxnightnet-is-dead-anybody-want-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experts Exchange Encryption</title>
		<link>http://www.coderjoe.net/archive/2007/08/10/experts-exchange-encryption/</link>
		<comments>http://www.coderjoe.net/archive/2007/08/10/experts-exchange-encryption/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 00:56:24 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[experts-exchange]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[rot13]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/08/10/experts-exchange-encryption/</guid>
		<description><![CDATA[NOTE: The methods listed below are no longer necessary! Experts Exchange has moved to providing the answers in plain text at the bottom of the page. Just look past the first set of &#8220;answers&#8221;, past the advertisements and link farm, and you&#8217;ll see them. What is Experts Exchange? If you&#8217;ve ever tried to look up [...]]]></description>
			<content:encoded><![CDATA[<h3><strong>NOTE: The methods listed below are no longer necessary! Experts Exchange has moved to providing the answers in plain text at the bottom of the page. Just look past the first set of &#8220;answers&#8221;, past the advertisements and link farm, and you&#8217;ll see them.</strong></h3>
<p><strong>What is Experts Exchange?</strong></p>
<p>If you&#8217;ve ever tried to look up some sort of technical information on the internet, you&#8217;ve likely come across the <a title="The Experts Exchange website." href="http://www.experts-exchange.com" target="_blank">Experts Exchange</a>. Experts Exchange is a site on which people can ask questions about a variably infinite number of technical topics and receive a range of answers from experts purported experts.</p>
<p>The site then allows the user to select a &#8220;best answer&#8221; earning the answer&#8217;s author extra points. Points can be redeemed for a better type of account and access to other things on the site.</p>
<p>In this way the site is user supported, without the experts there would be no exchange of answers.</p>
<p><strong>What&#8217;s your problem with Experts Exchange?</strong></p>
<p>As an incentive to sign up, the questions asked on experts exchange are visible to all, however, the answers are obscured in two rather tricky ways.</p>
<ol>
<li>The answers are obscured by a transparent gif with alternating pixels of solid and transparent, making the words a fuzzy haze.</li>
<li> The answer text itself is encrypted using a basic and fairly famous encryption scheme called <a title="Wikipedia article about Rot13." href="http://en.wikipedia.org/wiki/Rot13" target="_blank">Rot13</a></li>
</ol>
<p>As a person just looking for the answer to my question I&#8217;m often frustrated by the number of times I stumble across an experts exchange thread which might answer my question, but is obscured.</p>
<p><strong>What are you going to do about it?</strong></p>
<p>Well I hate to be bothered with unnecessary prompts to log in as much as the next guy.  With that in mind, I present to you:</p>
<p><a title="The Unhide Experts Exchange Greasemonkey Script" href="http://www.coderjoe.net/wp-content/uploads/2007/08/unhide_experts_exchange.user.js">The Unhide Experts Exchange Greasemonkey Script</a></p>
<p>This script does what it says, it removes the image which blurs the answer text, and then Rot13 decrypts the answers for your viewing pleasure.</p>
<p>As the title implies, you will need to be using <a title="Download firefox your your web browsing pleasure!" href="http://www.getfirefox.com" target="_blank">Firefox</a>, and you will need the <a title="The official Greasemonkey blog." href="http://www.greasespot.net/" target="_blank">Greasemonkey</a> plug-in to use this script.</p>
<p><strong>Will this destroy Experts Exchange?</strong></p>
<p>For those of you worried that this might just ruin the Experts Exchange, fear not. In their infinite wisdom they decided to completely omit the &#8220;selected answers&#8221; for the questions unless you&#8217;re logged in.</p>
<p>In this way there is still incentive to get an account and contribute!</p>
<p>In addition, I do not believe that my little <a title="The Greasemonkey blog." href="http://www.greasespot.net/" target="_blank">Greasemonkey</a> script will ever gain enough momentum to offset a significant portion of potential Experts Exchange visitors. If it ever did, all they would have to do is change their cypher or insert dummy text.</p>
<p>Any change to the cypher algorithm will be taken as a hint. (Also I&#8217;m way too lazy to implement anything other than rot13 instead of just logging in.)</p>
<p>However, if you&#8217;re as lazy as I (or rather as lazy as one needs to be to write a Greasemonkey script to avoid logging in&#8230;), and would prefer not to manage yet another user name and password combination, you may use the script above.</p>
<p>Note: The Greasemonkey script was updated on Sunday August 12th at 1:00am. It now properly takes care of the &lt;br&gt; characters that they do not rot13.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/08/10/experts-exchange-encryption/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>A list of Nintendo DS Homebrew Resources</title>
		<link>http://www.coderjoe.net/archive/2007/08/08/a-list-of-nintendo-ds-homebrew-resources/</link>
		<comments>http://www.coderjoe.net/archive/2007/08/08/a-list-of-nintendo-ds-homebrew-resources/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 04:14:08 +0000</pubDate>
		<dc:creator>coderjoe</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[devkitarm]]></category>
		<category><![CDATA[devkitpro]]></category>
		<category><![CDATA[libnds]]></category>
		<category><![CDATA[nintendo-ds-homebrew]]></category>

		<guid isPermaLink="false">http://www.coderjoe.net/archive/2007/08/08/a-list-of-nintendo-ds-homebrew-resources/</guid>
		<description><![CDATA[I was asked recently what resources I use as references while developing Nintendo DS homebrew. As such I&#8217;ve decided to collect my favorite links in a single post for your enjoyment.  ( Please keep in mind that I am also new to the Ninendo DS development scene, and as such this post is by no [...]]]></description>
			<content:encoded><![CDATA[<p>I was asked recently what resources I use as references while developing Nintendo DS homebrew.</p>
<p>As such I&#8217;ve decided to collect my favorite links in a single post for your enjoyment.  ( Please keep in mind that I am also new to the Ninendo DS development scene, and as such this post is by no means a complete list of all of the resources available to you. )</p>
<p>If you know of any killer resources that I&#8217;m missing please feel free to let me know and I&#8217;ll add them to the list.</p>
<p><strong> Hardware References:</strong></p>
<ul>
<li> <a href="http://www.bottledlight.com/ds/" title="More information than you'd ever need to know about the Nintendo DS's hardware." target="_blank">NDSTech Wiki</a> &#8211; The de-facto Nintendo DS Hardware Doc.</li>
<li><a href="http://www.work.de/nocash/gbatek.htm" title="The GBATek GBA hardware documentation, with a little bit of information about the NDS as well." target="_blank">GBATek Specifications</a> &#8211; The de-facto GBA Hardware doc (with some NDS thrown in for good measure)</li>
</ul>
<p><strong>Tutorials: </strong></p>
<ul>
<li><a href="http://www.dev-scene.com/NDS/Tutorials" title="Dev-Scene.com's programming tutorials. While incomplete, the sections that are finished are very useful." target="_blank">dev-scene.com tutorials</a> &#8211; The official dev-scene.com tutorials. Incomplete but thorough.</li>
<li><a href="http://www.patatersoft.info/manual.php" title="Provides a step by step look into Nintendo DS 2D game programming with example code." target="_blank">PataterSoft Introduction to NDS Programming</a> &#8211; A step-by-step introduction to Nintendo DS 2D game development with examples.</li>
</ul>
<p><strong>Library References:</strong></p>
<ul>
<li><a href="http://devkitpro.sourceforge.net/devkitProWiki/libnds/index.html" title="The libnds doxygen documentation." target="_blank">libnds documentation</a> &#8211; Libnds documentation as generated by doxygen. Excellent autodocs.</li>
</ul>
<p><strong>Communities:</strong></p>
<ul>
<li><a href="http://www.dev-scene.com" title="The dev-scene.com website." target="_blank">dev-scene.com</a></li>
<li><a href="http://www.drunkencoders.com" title="The Drunken Coders website." target="_blank">Drunken Coders</a> &#8211; The guys who brought you many (if not all) of the nds-examples code!</li>
</ul>
<p>That&#8217;s all I&#8217;ve got for now. If you feel I&#8217;m missing something important please let me know!</p>
<p>Code away.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coderjoe.net/archive/2007/08/08/a-list-of-nintendo-ds-homebrew-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
