<?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: From interviewee to interviewer in seven months</title>
	<atom:link href="http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 16:39:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: A better solution to the FizzBuzz interview problem &#124; Cyde Weys Musings</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30681</link>
		<dc:creator>A better solution to the FizzBuzz interview problem &#124; Cyde Weys Musings</dc:creator>
		<pubDate>Wed, 02 Jul 2008 22:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30681</guid>
		<description>[...] months ago, I wrote about a simple programming problem that I was administering to interviewees at work to assess their programming skills. The basic problem is this: loop through a range of integers, [...]</description>
		<content:encoded><![CDATA[<p>[...] months ago, I wrote about a simple programming problem that I was administering to interviewees at work to assess their programming skills. The basic problem is this: loop through a range of integers, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyde Weys</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30249</link>
		<dc:creator>Cyde Weys</dc:creator>
		<pubDate>Thu, 26 Jun 2008 15:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30249</guid>
		<description>Well I would typically start the question by making sure they knew what the Fibonacci sequence was.  It&#039;s really easy though.  F(1)=F(2)=1, for all n&gt;2: F(n)=F(n-1)+F(n-2)</description>
		<content:encoded><![CDATA[<p>Well I would typically start the question by making sure they knew what the Fibonacci sequence was.  It&#8217;s really easy though.  F(1)=F(2)=1, for all n>2: F(n)=F(n-1)+F(n-2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William (green)</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30227</link>
		<dc:creator>William (green)</dc:creator>
		<pubDate>Thu, 26 Jun 2008 07:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30227</guid>
		<description>I&#039;d have to do research to know how to calculate any numbers in a Fibonacci sequence, &#039;cause I don&#039;t remember what they are exactly.  Whereas Fizzbuzz is just simple programming, and fairly easily done.</description>
		<content:encoded><![CDATA[<p>I&#8217;d have to do research to know how to calculate any numbers in a Fibonacci sequence, &#8217;cause I don&#8217;t remember what they are exactly.  Whereas Fizzbuzz is just simple programming, and fairly easily done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyde Weys</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30206</link>
		<dc:creator>Cyde Weys</dc:creator>
		<pubDate>Wed, 25 Jun 2008 23:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30206</guid>
		<description>I didn&#039;t go that route because it made the code messier, requiring keeping track of more state.  I didn&#039;t say that my code was optimal, only that it was more efficient than his (three divides versus four divides).  So no, I don&#039;t suck.  Here&#039;s an off-the-top-of-my-head approach at two divides (omitting the for-loop as it&#039;s not relevant):

&lt;code&gt;bool flag = false;
if (i % 3 == 0) {
flag = true;
print &quot;Fizz&quot;;
}
if (i % 5 == 0) {
flag = true;
print &quot;Buzz&quot;;
}
if (!flag) {
print i;
}
print &quot;\n&quot;;
&lt;/code&gt;

I do think if I ever ask prospective interviewees this question again, I&#039;ll ask them to optimize it down to two divides just to make sure they know how to do it.  And if I&#039;m really feeling evil, I&#039;ll also ask them how to do it without defining an additional state variable (hint: think gotos).</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t go that route because it made the code messier, requiring keeping track of more state.  I didn&#8217;t say that my code was optimal, only that it was more efficient than his (three divides versus four divides).  So no, I don&#8217;t suck.  Here&#8217;s an off-the-top-of-my-head approach at two divides (omitting the for-loop as it&#8217;s not relevant):</p>
<p><code>bool flag = false;<br />
if (i % 3 == 0) {<br />
flag = true;<br />
print "Fizz";<br />
}<br />
if (i % 5 == 0) {<br />
flag = true;<br />
print "Buzz";<br />
}<br />
if (!flag) {<br />
print i;<br />
}<br />
print "\n";<br />
</code></p>
<p>I do think if I ever ask prospective interviewees this question again, I&#8217;ll ask them to optimize it down to two divides just to make sure they know how to do it.  And if I&#8217;m really feeling evil, I&#8217;ll also ask them how to do it without defining an additional state variable (hint: think gotos).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelly Martin</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30201</link>
		<dc:creator>Kelly Martin</dc:creator>
		<pubDate>Wed, 25 Jun 2008 21:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30201</guid>
		<description>Checking for mod 15 more efficient?  How in the hell do you figure that?  You&#039;re doing three integer divides, which are pretty expensive instructions.  If you check for 3 and 5 separately, you only use two integer divides.  

I don&#039;t want either one of you writing code for imbedded systems, video codecs, or anything else where cycles really matter.  You both suck.</description>
		<content:encoded><![CDATA[<p>Checking for mod 15 more efficient?  How in the hell do you figure that?  You&#8217;re doing three integer divides, which are pretty expensive instructions.  If you check for 3 and 5 separately, you only use two integer divides.  </p>
<p>I don&#8217;t want either one of you writing code for imbedded systems, video codecs, or anything else where cycles really matter.  You both suck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyde Weys</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30187</link>
		<dc:creator>Cyde Weys</dc:creator>
		<pubDate>Wed, 25 Jun 2008 16:07:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30187</guid>
		<description>Dear God, that&#039;s so much whitespace.  Allow me to Perl one-line it, if you will:

&lt;code&gt;for (int i = 0; i &lt;= 100; i++) { if (i % 15 == 0) { print &quot;FizzBuzz&quot;; } elsif (i % 3 == 0) { print &quot;Fizz&quot;; } elsif (i % 5 == 0) { print &quot;Buzz&quot;; } else { print &quot;$i&quot;; } print &quot;\n&quot;; }&lt;/code&gt;

Everyone seems to check mod 3 and mod 5 individually, not realizing that checking for mod 15 is equivalent and more efficient.  I haven&#039;t yet seen one person implement it using mod 15.  More recently I&#039;ve just taken to asking people to write a recursive function that calculates the nth Fibonacci number.  That&#039;s a good weed-out question.

(I should point out that your solution is slightly incorrect because you don&#039;t print out anything for 100, which is in the inclusive range.)</description>
		<content:encoded><![CDATA[<p>Dear God, that&#8217;s so much whitespace.  Allow me to Perl one-line it, if you will:</p>
<p><code>for (int i = 0; i < = 100; i++) { if (i % 15 == 0) { print "FizzBuzz"; } elsif (i % 3 == 0) { print "Fizz"; } elsif (i % 5 == 0) { print "Buzz"; } else { print "$i"; } print "\n"; }</code></p>
<p>Everyone seems to check mod 3 and mod 5 individually, not realizing that checking for mod 15 is equivalent and more efficient.  I haven't yet seen one person implement it using mod 15.  More recently I've just taken to asking people to write a recursive function that calculates the nth Fibonacci number.  That's a good weed-out question.</p>
<p>(I should point out that your solution is slightly incorrect because you don't print out anything for 100, which is in the inclusive range.)</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tawker</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30159</link>
		<dc:creator>Tawker</dc:creator>
		<pubDate>Wed, 25 Jun 2008 06:29:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30159</guid>
		<description>Err I made a typo

add             if(i%5 ==0 &amp;&amp; i%3 == 0)
            {
                System.out.println(&quot;FizzBuzz&quot;);
            } as the first if and else if on the rest</description>
		<content:encoded><![CDATA[<p>Err I made a typo</p>
<p>add             if(i%5 ==0 &amp;&amp; i%3 == 0)<br />
            {<br />
                System.out.println(&#8220;FizzBuzz&#8221;);<br />
            } as the first if and else if on the rest</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tawker</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-30155</link>
		<dc:creator>Tawker</dc:creator>
		<pubDate>Wed, 25 Jun 2008 06:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-30155</guid>
		<description>public class FizBuzz{

    public static void main(String[] args) {

//        Write a program that prints the numbers from 1 to 100.
//                But for multiples of three print &quot;Fizz&quot; instead of the number and
//                for the multiples of five print &quot;Buzz&quot;.
//                For numbers which are multiples of both three and five print &quot;FizzBuzz&quot;
        
        for (int i = 1; i&lt; 100; i++)
        {
            if(i%3 == 0)
            {
                System.out.println(&quot;Fizz&quot;);
            }
            else if(i%5 ==0)
            {
                System.out.println(&quot;Buzz&quot;);
            }
            else
            {
                System.out.println(i);
            }
        }
    }

}

Actual time needed, 1 minute.</description>
		<content:encoded><![CDATA[<p>public class FizBuzz{</p>
<p>    public static void main(String[] args) {</p>
<p>//        Write a program that prints the numbers from 1 to 100.<br />
//                But for multiples of three print &#8220;Fizz&#8221; instead of the number and<br />
//                for the multiples of five print &#8220;Buzz&#8221;.<br />
//                For numbers which are multiples of both three and five print &#8220;FizzBuzz&#8221;</p>
<p>        for (int i = 1; i&lt; 100; i++)<br />
        {<br />
            if(i%3 == 0)<br />
            {<br />
                System.out.println(&#8220;Fizz&#8221;);<br />
            }<br />
            else if(i%5 ==0)<br />
            {<br />
                System.out.println(&#8220;Buzz&#8221;);<br />
            }<br />
            else<br />
            {<br />
                System.out.println(i);<br />
            }<br />
        }<br />
    }</p>
<p>}</p>
<p>Actual time needed, 1 minute.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The hallmarks of a good programmer &#124; Cyde Weys Musings</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-18458</link>
		<dc:creator>The hallmarks of a good programmer &#124; Cyde Weys Musings</dc:creator>
		<pubDate>Fri, 07 Mar 2008 23:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-18458</guid>
		<description>[...] qualifications, gives me a good idea for what types of questions I should be asking when I do more potential employee interviews. I&#8217;ve already subconsciously realized that one of the aspects that makes me a good programmer [...]</description>
		<content:encoded><![CDATA[<p>[...] qualifications, gives me a good idea for what types of questions I should be asking when I do more potential employee interviews. I&#8217;ve already subconsciously realized that one of the aspects that makes me a good programmer [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-10373</link>
		<dc:creator>William</dc:creator>
		<pubDate>Sun, 11 Nov 2007 09:22:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-10373</guid>
		<description>Huh, I thought it was just my imagination.  I&#039;ve noticed that many of the students in my CS classes are totally stumped by even basic programming problems and fail to apply any sort of basic programming theory.  Saw a guy make a true/false array instead of an int.  And instead of making an actual array object, he made 18 different boolean values, one for each possible.  I can understand that sort of thing from one guy, once in a while, &#039;cause he wasn&#039;t thinking.  But this sort of thing seems to be done by half the class for some of the assignments.
I&#039;m trying to avoid this trap, myself, but I&#039;m not having much luck.  I realize the whole idea is basically to grab a book and go through it, grab a new one, rinse, repeat, but...
Well, good luck on having a pleasant interview.  I&#039;m curious to see your, for want of a better phrase, after action report.</description>
		<content:encoded><![CDATA[<p>Huh, I thought it was just my imagination.  I&#8217;ve noticed that many of the students in my CS classes are totally stumped by even basic programming problems and fail to apply any sort of basic programming theory.  Saw a guy make a true/false array instead of an int.  And instead of making an actual array object, he made 18 different boolean values, one for each possible.  I can understand that sort of thing from one guy, once in a while, &#8217;cause he wasn&#8217;t thinking.  But this sort of thing seems to be done by half the class for some of the assignments.<br />
I&#8217;m trying to avoid this trap, myself, but I&#8217;m not having much luck.  I realize the whole idea is basically to grab a book and go through it, grab a new one, rinse, repeat, but&#8230;<br />
Well, good luck on having a pleasant interview.  I&#8217;m curious to see your, for want of a better phrase, after action report.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelly Martin</title>
		<link>http://www.cydeweys.com/blog/2007/11/08/from-interviewee-to-interviewer-in-seven-months/comment-page-1/#comment-10306</link>
		<dc:creator>Kelly Martin</dc:creator>
		<pubDate>Fri, 09 Nov 2007 13:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cydeweys.com/blog/index.php/2007/11/08/from-interviewee-to-interviewer-in-seven-months/#comment-10306</guid>
		<description>I once interviewed candidates for a systems administration position that would include Microsoft Exchange administration.  My &quot;stumper&quot; question was &quot;Can you tell me one of the differences between Exchange Standard Edition and Exchange Enterprise Edition?&quot;  I, myself, had only encountered this a few days previously (we were running Standard, and had recently exceeded the total store size limit, which at that time was 16GB).  

I didn&#039;t expect candidates to know the answer.  (It&#039;s easy enough to find out in practice by going to the Microsoft Exchange product website.)  I was more interested in seeing how candidates reacted to being asked this question.  I had one (who we did not select) whose response was basically &quot;I&#039;m an MCSE, I should know this!&quot; repeated over and over again.  He spent the rest of the interview obsessing over this, apologizing almost continuously for his lack of knowledge.</description>
		<content:encoded><![CDATA[<p>I once interviewed candidates for a systems administration position that would include Microsoft Exchange administration.  My &#8220;stumper&#8221; question was &#8220;Can you tell me one of the differences between Exchange Standard Edition and Exchange Enterprise Edition?&#8221;  I, myself, had only encountered this a few days previously (we were running Standard, and had recently exceeded the total store size limit, which at that time was 16GB).  </p>
<p>I didn&#8217;t expect candidates to know the answer.  (It&#8217;s easy enough to find out in practice by going to the Microsoft Exchange product website.)  I was more interested in seeing how candidates reacted to being asked this question.  I had one (who we did not select) whose response was basically &#8220;I&#8217;m an MCSE, I should know this!&#8221; repeated over and over again.  He spent the rest of the interview obsessing over this, apologizing almost continuously for his lack of knowledge.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.326 seconds -->

