{"id":241,"date":"2012-04-21T10:50:56","date_gmt":"2012-04-21T14:50:56","guid":{"rendered":"http:\/\/codefork.com\/blog\/?p=241"},"modified":"2012-04-21T10:52:12","modified_gmt":"2012-04-21T14:52:12","slug":"exercise-mania","status":"publish","type":"post","link":"https:\/\/codefork.com\/blog\/index.php\/2012\/04\/21\/exercise-mania\/","title":{"rendered":"Exercise Mania"},"content":{"rendered":"<p>My ex-girlfriend&#8217;s mom started doing a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Jazzercise\">jazzercise<\/a> class in the 80s and hasn&#8217;t stopped since. It&#8217;s a weird thing.<\/p>\n<p>Programming exercises can be just as addictive as some forms of well-marketed physical exercise. I have to actively resist writing solutions in Lisp to every silly problem I stumble upon online. But this morning, I came across <a href=\"https:\/\/news.ycombinator.com\/item?id=3871449\">this simple one<\/a> (a blog post from 2007, but that happens on Hacker News) and, for some reason, couldn&#8217;t pass it up:<\/p>\n<blockquote><p>Write a program that prints the numbers from 1 to 100. But for multiples of three print &#8220;Fizz&#8221; instead of the number and for the multiples of five print &#8220;Buzz&#8221;. For numbers which are multiples of both three and five print &#8220;FizzBuzz&#8221;.<\/p><\/blockquote>\n<p><script src=\"https:\/\/gist.github.com\/2437313.js\"> <\/script><\/p>\n<p>It&#8217;s so silly that I guess some folks, like the blogger linked above, have turned it into a problem of &#8220;what&#8217;s the most creative\/strange way I can think of to do this?&#8221; Which is interesting and fun in its own right.<\/p>\n<p>What I don&#8217;t understand is the attitude expressed in the original fizzbuzz blog post, <a href=\"http:\/\/imranontech.com\/2007\/01\/24\/using-fizzbuzz-to-find-developers-who-grok-coding\/\">&#8220;Using FizzBuzz to Find Developers who Grok Coding&#8221;<\/a>. Does it really matter if it takes someone 5 or 20 minutes to write a solution? (FWIW, I took about 10 mins). A shorter time with such a goofy example means someone &#8220;groks&#8221; coding more than another? Ridiculous. <\/p>\n<p>These types of puzzles are amusing precisely because a lot of real-world development (which is what the vast majority of people who code for a living do) is unfortunately pretty rote, and doesn&#8217;t require a lot of algorithmic thinking. Code monkeys learn to use libraries and frameworks, and spend a lot of time trying to use them correctly and cleanly, in order to implement straightforward requirements. So these exercises are a shift in mindset. In a tiny way, they put you back on the path of engineering. It&#8217;s why people find them interesting to do. It&#8217;s why I&#8217;m reading the Structure and Interpretation of Computer Programs. <\/p>\n<p>Taking a few more minutes might mean you&#8217;re not accustomed to solving such problems every minute of your working life. But that&#8217;s not at all the same as gauging whether someone understands coding or not. That kind of measurement is naive at best.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My ex-girlfriend&#8217;s mom started doing a jazzercise class in the 80s and hasn&#8217;t stopped since. It&#8217;s a weird thing. Programming exercises can be just as addictive as some forms of well-marketed physical exercise. I have to actively resist writing solutions in Lisp to every silly problem I stumble upon online. But this morning, I came &hellip; <a href=\"https:\/\/codefork.com\/blog\/index.php\/2012\/04\/21\/exercise-mania\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Exercise Mania&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,19,12],"tags":[],"class_list":["post-241","post","type-post","status-publish","format-standard","hentry","category-culture","category-lisp","category-work"],"_links":{"self":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=241"}],"version-history":[{"count":11,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions"}],"predecessor-version":[{"id":252,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/241\/revisions\/252"}],"wp:attachment":[{"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codefork.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}