<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: FizzBuzz and bored programmers</title>
	<atom:link href="http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/</link>
	<description>Samuel Tardieu's dual-sided blog</description>
	<lastBuildDate>Fri, 25 Jun 2010 18:04:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bob Cousins</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-109244</link>
		<dc:creator>Bob Cousins</dc:creator>
		<pubDate>Wed, 24 Feb 2010 17:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-109244</guid>
		<description>My answer was not very precise I should have said something like &quot;if I can&#039;t figure how it works (or not), write a new implementation derived from the requirements&quot;. We should know what the purpose of the code is, if not the details of how it does it. 

I often come across code cobbled together over many years, and it often really is easier to write a new clean implementation than keep patching the old stuff.</description>
		<content:encoded><![CDATA[<p>My answer was not very precise I should have said something like &#8220;if I can&#8217;t figure how it works (or not), write a new implementation derived from the requirements&#8221;. We should know what the purpose of the code is, if not the details of how it does it. </p>
<p>I often come across code cobbled together over many years, and it often really is easier to write a new clean implementation than keep patching the old stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nolo promittere</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-109242</link>
		<dc:creator>nolo promittere</dc:creator>
		<pubDate>Wed, 24 Feb 2010 15:38:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-109242</guid>
		<description>Bob,

I know this is an old post, but I&#039;m hoping you get notified of followups.  I was just curious about your answer.

How do you rewrite code from scratch if you don&#039;t know what it does?</description>
		<content:encoded><![CDATA[<p>Bob,</p>
<p>I know this is an old post, but I&#8217;m hoping you get notified of followups.  I was just curious about your answer.</p>
<p>How do you rewrite code from scratch if you don&#8217;t know what it does?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Cousins</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-75147</link>
		<dc:creator>Bob Cousins</dc:creator>
		<pubDate>Thu, 08 Nov 2007 23:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-75147</guid>
		<description>The question I ask is, if an interviewee is not supposed to give that sort of answer, should an employer set that type of question?

I invariably get asked in interviews to decipher some badly written/unnecessarily cryptic piece of code. In one interview I tried pushing back:

Me: I would never write that kind of code.

Interviewer: well, assume someone else wrote it and you needed to debug it.

Me: Don&#039;t you have coding standards? Code inspections? I doubt that code would pass.

Interviewer: Look, let&#039;s say we didn&#039;t have time to do an inspection. What does the code do?

Me: Well, in that case I probably haven&#039;t got time to decipher someone else&#039;s bad code, I would rewrite it from scratch.

I was not offered the job.</description>
		<content:encoded><![CDATA[<p>The question I ask is, if an interviewee is not supposed to give that sort of answer, should an employer set that type of question?</p>
<p>I invariably get asked in interviews to decipher some badly written/unnecessarily cryptic piece of code. In one interview I tried pushing back:</p>
<p>Me: I would never write that kind of code.</p>
<p>Interviewer: well, assume someone else wrote it and you needed to debug it.</p>
<p>Me: Don&#8217;t you have coding standards? Code inspections? I doubt that code would pass.</p>
<p>Interviewer: Look, let&#8217;s say we didn&#8217;t have time to do an inspection. What does the code do?</p>
<p>Me: Well, in that case I probably haven&#8217;t got time to decipher someone else&#8217;s bad code, I would rewrite it from scratch.</p>
<p>I was not offered the job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg Braithwaite</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-27083</link>
		<dc:creator>Reg Braithwaite</dc:creator>
		<pubDate>Fri, 26 Jan 2007 20:55:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-27083</guid>
		<description>Ok, we&#039;ve had a good laugh, now let&#039;s get serious about hiring:

Tickletux did NOT say make a hire or no hire decision based on this question. Tickletux did not say &quot;NO HIRE&quot; if you don&#039;t like the answer to the question.  Tickletux did not say the question or the answer had any particular significance. He said just one thing, and on the basis of that one thing I know exactly how to evaluate the solution in this post.

What Tickletux said was, &quot;The question serves to weed out people who cannot program AT ALL.&quot; His pass or fail for the question was whether you can make the code work in under fifteen minutes over the phone. The purpose was to NO INTERVIEW a candidate if they are unable to answer the question. But if they do answer teh question correctly, they win an interview, not a job, so you use the interview to discover whether they are bored, smart, prone to showing off, like to have fun, or enjoys writing the obscure.

It doesn&#039;t matter to me why the candidate would write the above code, or how it works. It just matters whether it works and whether the candidate was able to whip it up in fifteen minutes or less.

If you want to draw a lot of conclusions about what kind of production code the candidate would write, you need to modify the question, such as &quot;write the code EXACTLY AS YOU WOULD IN PRODUCTION.&quot; Then you can spend all day talking about the unit tests, comments, brace placement, and so forth.

Why have this incredibly complex hidden agenda behind a phone screen question?</description>
		<content:encoded><![CDATA[<p>Ok, we&#8217;ve had a good laugh, now let&#8217;s get serious about hiring:</p>
<p>Tickletux did NOT say make a hire or no hire decision based on this question. Tickletux did not say &#8220;NO HIRE&#8221; if you don&#8217;t like the answer to the question.  Tickletux did not say the question or the answer had any particular significance. He said just one thing, and on the basis of that one thing I know exactly how to evaluate the solution in this post.</p>
<p>What Tickletux said was, &#8220;The question serves to weed out people who cannot program AT ALL.&#8221; His pass or fail for the question was whether you can make the code work in under fifteen minutes over the phone. The purpose was to NO INTERVIEW a candidate if they are unable to answer the question. But if they do answer teh question correctly, they win an interview, not a job, so you use the interview to discover whether they are bored, smart, prone to showing off, like to have fun, or enjoys writing the obscure.</p>
<p>It doesn&#8217;t matter to me why the candidate would write the above code, or how it works. It just matters whether it works and whether the candidate was able to whip it up in fifteen minutes or less.</p>
<p>If you want to draw a lot of conclusions about what kind of production code the candidate would write, you need to modify the question, such as &#8220;write the code EXACTLY AS YOU WOULD IN PRODUCTION.&#8221; Then you can spend all day talking about the unit tests, comments, brace placement, and so forth.</p>
<p>Why have this incredibly complex hidden agenda behind a phone screen question?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Tardieu</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-27079</link>
		<dc:creator>Samuel Tardieu</dc:creator>
		<pubDate>Fri, 26 Jan 2007 20:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-27079</guid>
		<description>&lt;b&gt;Olive:&lt;/b&gt; I would only give the recruiter this kind of answer if I &lt;strong&gt;knew&lt;/strong&gt; that she would appreciate it (being an ügergeek for example). The &lt;em&gt;trick&lt;/em&gt; is to represent characteristics of every number (modulo 15) by an integer between 0 and 3 (plain, fizz, buzz, fizzbuzz). You need two bits for each number between 0 and 15, and can generate a decimal number with those 30 bits with: (thanks to &lt;a href=&quot;http://jsoftware.com/&quot; rel=&quot;nofollow&quot;&gt;J&lt;/a&gt;)

&lt;blockquote&gt;
&lt;pre&gt;
  4#.&#124;.(-.*3&#124;i.15)++:-.*5&#124;i.15
19142723
&lt;/pre&gt;
&lt;/blockquote&gt;

(no, I don&#039;t feel like explaining J today)

Then it&#039;s simply a matter of choosing between the four alternatives after right shifting this large number by twice i (modulo 15) and using the two rightmost bits only.</description>
		<content:encoded><![CDATA[<p><b>Olive:</b> I would only give the recruiter this kind of answer if I <strong>knew</strong> that she would appreciate it (being an ügergeek for example). The <em>trick</em> is to represent characteristics of every number (modulo 15) by an integer between 0 and 3 (plain, fizz, buzz, fizzbuzz). You need two bits for each number between 0 and 15, and can generate a decimal number with those 30 bits with: (thanks to <a href="http://jsoftware.com/" >J</a>)</p>
<blockquote>
<pre>
  4#.|.(-.*3|i.15)++:-.*5|i.15
19142723
</pre>
</blockquote>
<p>(no, I don&#8217;t feel like explaining J today)</p>
<p>Then it&#8217;s simply a matter of choosing between the four alternatives after right shifting this large number by twice i (modulo 15) and using the two rightmost bits only.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olive</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-27050</link>
		<dc:creator>Olive</dc:creator>
		<pubDate>Fri, 26 Jan 2007 17:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-27050</guid>
		<description>I think you are just missing one thing: have the candidate explain their code (or walk you through it). That way you can choose between the different explanations you make, which helps you make the hiring decision. This article also shows how you would answer the recruiter, so now you get to give us an explanation!</description>
		<content:encoded><![CDATA[<p>I think you are just missing one thing: have the candidate explain their code (or walk you through it). That way you can choose between the different explanations you make, which helps you make the hiring decision. This article also shows how you would answer the recruiter, so now you get to give us an explanation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: strange</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-27006</link>
		<dc:creator>strange</dc:creator>
		<pubDate>Fri, 26 Jan 2007 08:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-27006</guid>
		<description>my action: The candidate writes obscure code and is even proud of it. Don&#039;t hire in any circumstances - code clarity is what matters most in any real world situations.</description>
		<content:encoded><![CDATA[<p>my action: The candidate writes obscure code and is even proud of it. Don&#8217;t hire in any circumstances &#8211; code clarity is what matters most in any real world situations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/comment-page-1/#comment-26969</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 26 Jan 2007 02:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.rfc1149.net/blog/2007/01/26/fizzbuzz-and-bored-programmers/#comment-26969</guid>
		<description>Another option: the candidate considers his-/herself clever and isn&#039;t going to go out of his/her way to write clear code.  Not hired.  I never consider complex, non-parenthesized expressions (esp containing long constant values) to be the kind of thing I want.  Nice that they&#039;ve memorized their operator precedent table, better if they wrote it more clearly.

It&#039;s an interesting idea: you could have them refactor that code to make it more obvious.</description>
		<content:encoded><![CDATA[<p>Another option: the candidate considers his-/herself clever and isn&#8217;t going to go out of his/her way to write clear code.  Not hired.  I never consider complex, non-parenthesized expressions (esp containing long constant values) to be the kind of thing I want.  Nice that they&#8217;ve memorized their operator precedent table, better if they wrote it more clearly.</p>
<p>It&#8217;s an interesting idea: you could have them refactor that code to make it more obvious.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
