edit-article
Home
Up
Delete
Article Name:
Article Description:
] by Imran Ghory, - An older article(2007) about using a fairly simple coding test to separate those who can code from those who can't,
Chapter ID/Name:
Status:
Write
Writing
Written
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">title</h1> <h2>[WHAT]</h2> <ol> <li>] <a href="http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/" target="_blank">http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/</a> using tiny problems</li> </ol> <h2>[WHY]</h2> <ol> <li>] so i had to try it and of course i stumbled</li> <ol> <li>] didnt know the operator for modulus,( googled it )</li> </ol> <li>] I came up with a fairly non elegant untested</li> <ol> <li>] <span style="text-decoration: underline;">solution-v-001</span></li> </ol> <li>] this took me approx</li> <ol> <li>] 10ish minutes</li> </ol> <li>] author assert that "most programmers" should be able to write this program</li> <ol> <li>] in under a couple of minutes ...</li> <li>*] couple is = 2 ?? </li> </ol> <li>] also claims that most computer science graduates</li> <ol> <li>] cant write it</li> <li>] self proclaimed "senior programmers" take 10-15 minutes to write it </li> </ol> <li>] the author is not saying that</li> <ol> <li>] that these people "cant write good code" just that "it will take them longer" and in a business environment thats exactly what you dont want</li> <li>] it will identify good programmers, just that it will weed out the bad ones</li> </ol> <li>] comments</li> <ol> <li>] offered up some implementations</li> </ol></ol> <h2>[WHERE]</h2> <ol> <li>]</li> </ol> <h2>[WHEN]</h2> <ol> <li>]</li> </ol> <h2>[EXAMPLE]</h2> <ol> <li>]</li> <li>] if (i % 3 == 0){<br /> echo ‘Fizz’;<br /> }<br />if (i % 5 == 0){<br /> echo ‘Buzz’;<br /> }</li> </ol> <h2>[HOW-TO]</h2> <ol> <li>]</li> </ol> <h2>[REFERENCE]</h2> <ol> <li>]</li> </ol> <p> </p> <p> </p> <p>Write a program that prints the numbers from 1 to 100.</p> <p>But for multiples of three print “Fizz” instead of the number and <br />for the multiples of five print “Buzz”.</p> <p>For numbers which are multiples of both three and five print “FizzBuzz”.</p> <h2>] <span style="text-decoration: underline;">solution-v-001</span></h2> <p><strong>script</strong></p> <p>var fizz, buzz, fizz-buzz ;</p> <p>for (x=0, x<100, x++){</p> <p> if ( x % 3 == 0){<br /> fizz = true; <br /> <br /> }</p> <p> if ( x % 5 == 0 ){</p> <p> buzz = true;<br /> <br /> }</p> <p> if ( fizz === true && buzz === true){<br /> <br /> console.log("fizzbuz");</p> <p> }<br /> if ( fizz === true && buzz != true){<br /> console.log("fizz"); <br /> }</p> <p> if ( fizz != true && buzz == true){<br /> console.log("buzz"); <br /> }</p> <p> if ( fizz !=== true && buzz !=== true){<br /> <br /> console.log(x);</p> <p> }</p> <p>}</p> <p> </p> <p><strong>/script</strong></p> <p> </p> <h1 style="text-align: center;"> </h1>