<?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"
	>

<channel>
	<title>Constructing Software</title>
	<atom:link href="http://constructingsoftware.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://constructingsoftware.com</link>
	<description>thoughts on software construction</description>
	<pubDate>Mon, 23 Mar 2009 21:29:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>New Blog</title>
		<link>http://constructingsoftware.com/2009/03/23/new-blog/</link>
		<comments>http://constructingsoftware.com/2009/03/23/new-blog/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 21:29:22 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/?p=45</guid>
		<description><![CDATA[I&#8217;m launching a new blog called Zach&#8217;s Voice.  Go check it out: http://zachsvoice.com/
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m launching a new blog called Zach&#8217;s Voice.  Go check it out: <a href="http://zachsvoice.com/">http://zachsvoice.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2009/03/23/new-blog/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How Digg Scales</title>
		<link>http://constructingsoftware.com/2008/07/07/how-digg-scales/</link>
		<comments>http://constructingsoftware.com/2008/07/07/how-digg-scales/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 01:32:01 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Architecture]]></category>

		<category><![CDATA[scalability]]></category>

		<category><![CDATA[sharding]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/?p=41</guid>
		<description><![CDATA[I&#8217;ve become obsessed with scalability of late and appreciate how open people out there are when it comes to sharing their challenges and solutions.  I talk a lot about the advantages of sharding to scale so it was refreshing to see that they&#8217;re thinking the same thing at Digg:
“Ultimately what you want to do is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="border: 0pt none; margin: 15px 25px; float: left;" src="http://farm1.static.flickr.com/22/41186909_57d42684be_m.jpg" alt="" width="227" height="240" />I&#8217;ve become obsessed with scalability of late and appreciate how open people out there are when it comes to sharing their challenges and solutions.  I talk a lot about the advantages of <a href="http://highscalability.com/sharding-hibernate-way" target="_blank">sharding</a> to scale so it was refreshing to see that they&#8217;re thinking the same thing at <a title="Digg" href="http://digg.com/" target="_blank">Digg</a>:</p>
<blockquote><p><span style="color: #333333;"><span id="ctl00_content_PlaceHolder_articleBody_Label" class="arial_14_16 normalLink">“Ultimately what you want to do is go to a sharded architecture,” said Gorodetzky. “The first 1,000 users go on this set of servers, the next thousand on this set. You&#8217;ll find that&#8217;s an appropriate way to go, but right now we haven&#8217;t done that yet.</span></span></p></blockquote>
<p>It&#8217;s also nice to know that they&#8217;re at 26 million unique visitors per month without it.</p>
<p>Here is a summary of the tips provided by Digg&#8217;s Sys Admin Ron Gorodetzky:</p>
<ol>
<li>Employ <a href="http://members.cox.net/midian/howto/mysqlReplication.htm" target="_blank">master/slave database replication</a></li>
<li>Employ <a href="http://www.amazon.com/Caching-OReilly-Internet-Duane-Wessels/dp/156592536X" target="_blank">caching</a> to relieve pressure on the database.</li>
<li>Scale out your web servers.</li>
<li>For horizontal scalability use <span id="ctl00_content_PlaceHolder_articleBody_Label" class="arial_14_16 normalLink"><a href="http://www.danga.com/mogilefs/" target="_blank">MogileFS</a> rather than NFS.</span></li>
<li><span id="ctl00_content_PlaceHolder_articleBody_Label" class="arial_14_16 normalLink">Experiment with new technologies - They&#8217;re experimenting with <a href="http://www.podtech.net/home/4455/puppet-open-source-server-configuration-automation" target="_blank">Puppet</a> for server allocation.</span></li>
<li><span id="ctl00_content_PlaceHolder_articleBody_Label" class="arial_14_16 normalLink">Digg uses common tools such as <a href="http://www.nagios.org/" target="_blank">Nagios</a>, and </span><span id="ctl00_content_PlaceHolder_articleBody_Label" class="arial_14_16 normalLink">a souped-up version of the <a href="http://oss.oetiker.ch/mrtg/" target="_blank">Multi-Router Traffic Grapher</a>.</span></li>
</ol>
<p>Read the full post here: <a href="http://www.sysmannews.com/content/article.aspx?ArticleID=32490">Digging His Way to Web Success</a></p>
<p><span style="color: #333333;">Related Links:</span></p>
<ul>
<li><span style="color: #333333;">Flickr&#8217;s Architecture - <a href="http://highscalability.com/flickr-architecture" target="_blank">http://highscalability.com/flickr-architecture</a></span></li>
<li><span style="color: #333333;">LiveJournal&#8217;s Architecture - <a href="http://highscalability.com/livejournal-architecture" target="_blank">http://highscalability.com/livejournal-architecture</a></span></li>
<li><span style="color: #333333;">Twitter&#8217;s Architecture - <a href="http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster" target="_blank">http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster</a></span></li>
<li><span style="color: #333333;">Amazon&#8217;s Architecture - <a href="http://highscalability.com/amazon-architecture" target="_blank">http://highscalability.com/amazon-architecture</a></span></li>
<li><span style="color: #333333;">YouTube&#8217;s Architecture - <a href="http://highscalability.com/youtube-architecture" target="_blank">http://highscalability.com/youtube-architecture</a></span></li>
<li><span style="color: #333333;">Highscalability.com shard posts - <a href="http://highscalability.com/tags/shard" target="_blank">http://highscalability.com/tags/shard</a></span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/07/07/how-digg-scales/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cross-language development.</title>
		<link>http://constructingsoftware.com/2008/07/07/cross-language-development/</link>
		<comments>http://constructingsoftware.com/2008/07/07/cross-language-development/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 22:33:19 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[concurrency]]></category>

		<category><![CDATA[erlang]]></category>

		<category><![CDATA[facebook]]></category>

		<category><![CDATA[thrift]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/?p=40</guid>
		<description><![CDATA[I started looking at Erlang about a year ago and would have used it if it wasn&#8217;t so difficult to develop cross-language solutions.  I wanted to be able to use the guts of Erlang for concurrency, but re-use existing algorithms written in Java and C# within each Erlang process.  It looks like Facebook [...]]]></description>
			<content:encoded><![CDATA[<p>I started looking at <a href="http://www.erlang.org/faq/introduction.html#1" target="_blank">Erlang</a> about a year ago and would have used it if it wasn&#8217;t so difficult to develop cross-language solutions.  I wanted to be able to use the guts of Erlang for concurrency, but re-use existing algorithms written in Java and C# within each Erlang process.  It looks like Facebook engineers may have done just that with <a href="http://www.facebook.com/notes.php?id=9445547199" target="_blank">Thrift</a>, a cross-language serialization and RPC framework.</p>
<blockquote><p>One of the downsides of multi-language development is reusing code across languages. Facebook created <a href="http://www.facebook.com/notes.php?id=9445547199" target="_blank">Thrift</a> to tie together the Babeling Tower of all their different implementation languages. Thrift is a software framework for scalable cross-language services development. It combines a powerful software stack with a code generation engine to build services that work efficiently and seamlessly between C  , Java, Python, PHP, and Ruby. Another approach might be to cross language barriers using REST based services.</p></blockquote>
<p>This is very cool!  I love the idea of being able to marry the strengths of multiple languages.  I&#8217;ll be taking a closer look at this over the coming months.</p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/07/07/cross-language-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scaling Up Your Java EE Applications</title>
		<link>http://constructingsoftware.com/2008/07/07/scaling-up-your-java-ee-applications/</link>
		<comments>http://constructingsoftware.com/2008/07/07/scaling-up-your-java-ee-applications/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 07:44:37 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/?p=39</guid>
		<description><![CDATA[A decent article on scaling up your java applications: Scaling Your Java EE Applications
Here&#8217;s a list of tips:

 Make synchronized blocks as short as possible
 Reduce lock granularity
 Avoid lock on static methods
Use lock free data structure in Java SE 5.0
Be ware of race conditions: HashMap bug / consider using ConcurrentHashMap
Use Non-Blocking I/O for high [...]]]></description>
			<content:encoded><![CDATA[<p>A decent article on <strong>scaling up</strong> your java applications: <a href="http://www.theserverside.com/tt/articles/article.tss?l=ScalingYourJavaEEApplications">Scaling Your Java EE Applications</a></p>
<p><img class="alignright" style="border: 0pt none; float: right; margin-left: 20px; margin-right: 20px;" src="http://farm1.static.flickr.com/204/508229783_8073011ce7_m.jpg" alt="" width="160" height="240" />Here&#8217;s a list of tips:</p>
<ol>
<li><strong> Make synchronized blocks as short as possible</strong></li>
<li><strong> Reduce lock granularity</strong></li>
<li><strong> Avoid lock on static methods</strong></li>
<li><strong>Use lock free data structure in Java SE 5.0</strong></li>
<li><strong>Be ware of race conditions: HashMap bug / consider using ConcurrentHashMap</strong></li>
<li><strong>Use Non-Blocking I/O for high concurrency (Tomcat uses Blocking I/O, Glassfish uses Non-Blocking)</strong></li>
<li><strong>Parallelize single-thread tasks if possible by seeking independence in order of operations. <a title="JOMP" href="http://www.hipecc.wichita.edu/jomp.html" target="_blank">JOMP</a> or <a title="Parallel Java" href="http://www.cs.rit.edu/%7Eark/pj.shtml" target="_blank">Parallel Java</a> may be used to simplify this task.</strong></li>
<li><strong>To scale up in memory use multiple JVMs and limit the memory allocated to each to about 3GB or less.</strong></li>
<li><strong>Database - pay attention to isolation levels. keep stored procedures to a minimum.</strong></li>
<li><strong>Be ware of operating system and disk I/O limitations such as have a large number of files in one directory.</strong></li>
<li><strong>Synchronous logging</strong></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/07/07/scaling-up-your-java-ee-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Importance of Poka-yoke (Mistakeproofing)</title>
		<link>http://constructingsoftware.com/2008/07/05/the-importance-of-poka-yoke-mistakeproofing/</link>
		<comments>http://constructingsoftware.com/2008/07/05/the-importance-of-poka-yoke-mistakeproofing/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 17:13:39 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/2008/07/05/the-importance-of-poka-yoke-mistakeproofing/</guid>
		<description><![CDATA[ Software quality does come from testing alone.  Much of quality involves good design practices. One design practice that can&#8217;t be forgotten is mistakeproofing.  The japenese have a term for this - Poka-yoke.
One of the biggest mistakeproofing challenge is in creating good APIs whether for internal use or external use. We may not [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm2.static.flickr.com/1271/955926145_e26d0991a8_m.jpg" align="right" border="0" height="160" hspace="20" vspace="20" width="240" /> Software quality does come from testing alone.  Much of quality involves good design practices. One design practice that can&#8217;t be forgotten is mistakeproofing.  The japenese have a term for this - <a href="http://en.wikipedia.org/wiki/Poka-yoke">Poka-yoke.</a></p>
<p>One of the biggest mistakeproofing challenge is in creating good APIs whether for internal use or external use. We may not even be thinking we&#8217;re creating APIs, but any time you create a class or method that another developer has to use it&#8217;s an API.</p>
<p>Here are some examples that come to mind:</p>
<ol>
<li>getTaxRate(String country, String state) - it&#8217;s possible to pass these parameters in the wrong order.</li>
<li>Connection dbConnection = new Connection(String longComplicatedConnectionString) - I hate this one, I often have to look at the docs to figure out how to construct the connection string.</li>
<li>callRemoteMethod(String nameOfMethod, Oject[] params, long timeoutperiod) - many problems with this&#8230; but I&#8217;m thinking of &#8220;what if I use a timeout period that&#8217;s too short for a particular call?&#8221;</li>
<li>Any time I have to call a series of methods in the *right* order.</li>
</ol>
<p>There are endless examples of APIs that are easy to misuse.  Spend some time and you&#8217;ll easily be able to come up with a few.</p>
<p>The next time you&#8217;re writing software on a team remember that you&#8217;re probably creating an API of some kind that has the potential for accidental misuse.  Think about how the API could be misused and try to find a way to structure it so that misuse not possible or extremely difficult.</p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/07/05/the-importance-of-poka-yoke-mistakeproofing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Even Faster Web Sites</title>
		<link>http://constructingsoftware.com/2008/07/03/even-faster-web-sites/</link>
		<comments>http://constructingsoftware.com/2008/07/03/even-faster-web-sites/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 20:11:45 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[steve souders]]></category>

		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/2008/07/03/even-faster-web-sites/</guid>
		<description><![CDATA[To create a great user experience there is almost nothing more important than speed.  According to Steve Souders, an expert in this area, 80-90% of the end-user response time is spent on the front-end.
Here is the list of best practices he recommends:

Make fewer HTTP requests
Use a CDN
Add an Expires header
Gzip components
Put stylesheets at the [...]]]></description>
			<content:encoded><![CDATA[<p>To create a great user experience there is almost nothing more important than speed.  According to Steve Souders, an expert in this area, 80-90% of the end-user response time is spent on the front-end.</p>
<p>Here is the list of best practices he recommends:</p>
<ol>
<li>Make fewer HTTP requests</li>
<li>Use a CDN</li>
<li>Add an Expires header</li>
<li>Gzip components</li>
<li>Put stylesheets at the top</li>
<li>Put scripts at the bottom</li>
<li>Avoid CSS expressions</li>
<li>Make JS and CSS external</li>
<li>Reduce DNS lookups</li>
<li>Minify JS</li>
<li>Avoid redirects</li>
<li>Remove duplicate scripts</li>
<li>Configure ETags</li>
<li>Make AJAX cacheable</li>
</ol>
<p>Watch this Video of Steve&#8217;s talk at the recent Google I/O conference:</p>
<p><a href="http://sites.google.com/site/io/even-faster-web-sites">Even Faster Web Sites (Google I/O Session Videos and Slides)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/07/03/even-faster-web-sites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dear Commodore 64: Thanks for getting me started.</title>
		<link>http://constructingsoftware.com/2008/03/22/dear-commodore-64-thanks-for-getting-me-started/</link>
		<comments>http://constructingsoftware.com/2008/03/22/dear-commodore-64-thanks-for-getting-me-started/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 16:47:24 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[commodore 64]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/2008/03/22/dear-commodore-64-thanks-for-getting-me-started/</guid>
		<description><![CDATA[I can&#8217;t remember what bizzare series of clicks lead me there, but I just discovered an online copy of the original C-64 manual.  I flipped through it and relived all the emotions of entering and running every single one of the programs in it. I was 10 years old. One of my favorites was the [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t remember what bizzare series of clicks lead me there, but I just discovered an online copy of the original C-64 manual.  I flipped through it and relived all the emotions of entering and running every single one of the programs in it. I was 10 years old. One of my favorites was the bouncing ball program in Section 4 - Animation on pg. 30.</p>
<p><a href="http://www.scribd.com/doc/40437/Commodore-64-Users-Guide" title="Commodore 64 Users Guide" target="_blank">http://www.scribd.com/doc/40437/Commodore-64-Users-Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/03/22/dear-commodore-64-thanks-for-getting-me-started/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Python up front. Java in the back.</title>
		<link>http://constructingsoftware.com/2008/03/03/python-up-front-java-in-the-back/</link>
		<comments>http://constructingsoftware.com/2008/03/03/python-up-front-java-in-the-back/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 22:47:25 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/2008/03/03/python-up-front-java-in-the-back/</guid>
		<description><![CDATA[I&#8217;ve always thought that the ideal web development platform would be comprised of a dynamically typed language in the presentation tier supported by a statically typed language where the business and persistence logic lives. It just never made sense to me to use a statically typed language for building web user-interfaces considering that there&#8217;s very little [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always thought that the ideal web development platform would be comprised of a dynamically typed language in the presentation tier supported by a statically typed language where the business and persistence logic lives. It just never made sense to me to use a statically typed language for building web user-interfaces considering that there&#8217;s very little gain to be had from type-safety.</p>
<p>The news today that <a target="_blank" href="http://www.infoworld.com/article/08/03/03/hirings-python_1.html?source=rss&amp;url=http://www.infoworld.com/article/08/03/03/hirings-python_1.html">Sun hired two key Python programmers</a> makes me hopeful that they&#8217;re thinking what I&#8217;m thinking.</p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/03/03/python-up-front-java-in-the-back/feed/</wfw:commentRss>
		</item>
		<item>
		<title>xUnit Test Patterns</title>
		<link>http://constructingsoftware.com/2008/03/03/xunit-test-patterns/</link>
		<comments>http://constructingsoftware.com/2008/03/03/xunit-test-patterns/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 18:44:53 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[test patterns]]></category>

		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/2008/03/03/xunit-test-patterns/</guid>
		<description><![CDATA[Dustin Bartlett, one of the developers on the team here at Point2, was just in my office asking me about Mock testing. It turned into an interesting discussion about when to use Mock objects and when not to. 
Ultimately I suggested he take a look at some of the material at xunitpatterns.com, a site developed by Gerard [...]]]></description>
			<content:encoded><![CDATA[<p>Dustin Bartlett, one of the developers on the team here at Point2, was just in my office asking me about Mock testing. It turned into an interesting discussion about when to use Mock objects and when not to. </p>
<p>Ultimately I suggested he take a look at some of the material at <a href="http://xunitpatterns.com/">xunitpatterns.com</a>, a site developed by Gerard Meszaros while he was authoring the book <a target="_blank" href="http://www.amazon.ca/dp/0131495054?tag=xuntespat-20&amp;camp=8641&amp;creative=330649&amp;linkCode=as1&amp;creativeASIN=0131495054&amp;adid=1QQT3YH8K8YBA14D6JWH&amp;">xUnit Test Patterns</a>. I was fortunate enough to be mentored by Gerard on several projects I worked on in Calgary, and have a tremendous amount of respect for him and his knowledge when it comes to testing software.</p>
<p>After looking at <a href="http://xunitpatterns.com/">xunitpatterns.com</a> Dustin and I realized the real question was what type of <a target="_blank" href="http://xunitpatterns.com/Test%20Double%20Patterns.html">Test Double</a> should be used. For the problem at hand, we decided to go with a <a href="http://xunitpatterns.com/Configurable%20Test%20Double.html">Configurable Test Double</a>. If you are stuck on a testing problem, or just want to improve your testing skills, I strongly recommend looking at Gerard&#8217;s site and picking up his book.</p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/03/03/xunit-test-patterns/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Snake charming&#8230; or charming snake</title>
		<link>http://constructingsoftware.com/2008/02/29/snake-charming-or-charming-snake/</link>
		<comments>http://constructingsoftware.com/2008/02/29/snake-charming-or-charming-snake/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 18:46:58 +0000</pubDate>
		<dc:creator>Zach Scott</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://constructingsoftware.com/2008/02/29/snake-charming-or-charming-snake/</guid>
		<description><![CDATA[I just have to say, &#8220;I love Python!&#8221;

public void printPowers&#40;&#41; &#123;
    for &#40;int r = 0; r &#60; 100; r++&#41; &#123;
        int x = Math.pow&#40;r, r&#41;;
        System.out.print&#40;x&#41;;
        System.out.print&#40;&#34;,&#34;&#41;;
    [...]]]></description>
			<content:encoded><![CDATA[<p>I just have to say, &#8220;I love Python!&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="java"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> printPowers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> r <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> r <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span> r<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">int</span> x <span style="color: #339933;">=</span> <span style="color: #003399;">Math</span>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span>r, r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;,&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>In Java - *with class definition and formatting left out</strong></p>

<div class="wp_syntax"><div class="code"><pre class="python"><span style="color: black;">&#91;</span>r<span style="color: #66cc66;">**</span>r <span style="color: #ff7700;font-weight:bold;">for</span> r <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">100</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span></pre></div></div>

<p><strong>In Python</strong></p>
<p>Another thing I didn&#8217;t mention: The java implementation won&#8217;t work because int can&#8217;t store 99^99, but Python takes care of handling arbitrarily large numbers for you. It&#8217;s great.</p>
<p><hints id="hah_hints"></hints></p>
]]></content:encoded>
			<wfw:commentRss>http://constructingsoftware.com/2008/02/29/snake-charming-or-charming-snake/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

