<?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>Josh Cogan&#039;s Projects &#187; puzzles</title>
	<atom:link href="http://joshcogan.com/wp/tag/puzzles/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshcogan.com/wp</link>
	<description>Fun stuff Josh works on</description>
	<lastBuildDate>Tue, 19 Aug 2014 16:30:41 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>Infinite Volume Simulations</title>
		<link>http://joshcogan.com/wp/2013/03/infinite-volume-simulations/</link>
		<comments>http://joshcogan.com/wp/2013/03/infinite-volume-simulations/#comments</comments>
		<pubDate>Wed, 20 Mar 2013 06:08:31 +0000</pubDate>
		<dc:creator><![CDATA[Josh]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[puzzles]]></category>

		<guid isPermaLink="false">http://joshcogan.com/wp/?p=123</guid>
		<description><![CDATA[Hi Team, So here&#8217;s a puzzler for today:  How can you numerically simulate two planets interacting via gravity, in a universe with infinite volume?  Of course you only have standard computing architecture available.  Once you have a guess, make gravity repulsive<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://joshcogan.com/wp/2013/03/infinite-volume-simulations/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>Hi Team,</p>
<p>So here&#8217;s a puzzler for today:  How can you numerically simulate two planets interacting via gravity, in a universe with <strong>infinite volume</strong>?  Of course you only have standard computing architecture available.  Once you have a guess, make gravity repulsive and see if your solution still works.</p>
<p>&nbsp;</p>
<p>And since I&#8217;m totally an evil T.A., discuss when and how your numerical error grows &#8220;too large&#8221;.  Good hunting!</p>
]]></content:encoded>
			<wfw:commentRss>http://joshcogan.com/wp/2013/03/infinite-volume-simulations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ineffective Sorts</title>
		<link>http://joshcogan.com/wp/2013/03/ineffective-sorts/</link>
		<comments>http://joshcogan.com/wp/2013/03/ineffective-sorts/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 16:34:45 +0000</pubDate>
		<dc:creator><![CDATA[Josh]]></dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[puzzles]]></category>

		<guid isPermaLink="false">http://joshcogan.com/wp/?p=60</guid>
		<description><![CDATA[So xkcd had a delightful comic a few days ago about Ineffective Sorts (and below), and it really struck a chord with me. I&#8217;ve often hear of people being asked to (pseudo)code quicksort, or something similar, during an interview. This<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://joshcogan.com/wp/2013/03/ineffective-sorts/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>So xkcd had a delightful comic a few days ago about <a href="http://xkcd.com/1185/" title="Ineffective Sorts" target="_blank">Ineffective Sorts (and below)</a>, and it really struck a chord with me. I&#8217;ve often hear of people being asked to (pseudo)code quicksort, or something similar, during an interview.  This really irks me.  If <em>on the job</em> a boss says, &#8220;Quickly Josh, we need a quicksort!!&#8221;, the last thing I&#8217;m gonna do is sit down and stare at a page of pseudo-code riddled with off-by-one errors.  Nor am I very likely to go back to the textbooks and look it up (a much safer option anyway).  Am I really being hired to reimplement STL or Boost libraries?  Because those guys look like they got this stuff pretty darn well.  And its super tested.</p>
<p>But you, my avid reader, protest &#8220;it&#8217;s a test to see how you think and reason&#8221;.  Okay that&#8217;s fair, but I, for the sake of discussion, claim quicksort and other standard algorithms aren&#8217;t the right way to test an applicant&#8217;s reasoning ability.  All applicants know quicksort could be asked, so we all look it up.  Now, when we are sitting down during an interview, we&#8217;re trying to <em>recall</em> all the intricacies of a mature algorithm.  Instead of reasoning through divide-and-conquer, I&#8217;m thinking &#8220;oh crap, now how to I pick the pivot to avoid those QS-attacks?&#8221;. I&#8217;m trying to remember how to get all the details right, when I should be iteratively addressing problems as they arrive.</p>
<p>Of course, if you&#8217;re hiring someone to squeeze out the next 1% of execution time in some DB-query, then absolutely he or she should know every damn intricacy of the standard algorithms. But for the rest of us, I think non-standard brain teasers or puzzles seem much better than reproducing a well-known mature algorithm.</p>
<p>IMHO =)</p>
<div style="width: 723px" class="wp-caption aligncenter"><img src="http://imgs.xkcd.com/comics/ineffective_sorts.png" width="713" height="667" alt="Only Randall Munroe can write Alt Text" class /><p class="wp-caption-text">XKCD always getting to the heart of the matter</p></div>
]]></content:encoded>
			<wfw:commentRss>http://joshcogan.com/wp/2013/03/ineffective-sorts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
