{"id":57,"date":"2015-02-16T17:35:08","date_gmt":"2015-02-16T17:35:08","guid":{"rendered":"http:\/\/codereporter.de\/?p=57"},"modified":"2015-02-16T19:18:44","modified_gmt":"2015-02-16T19:18:44","slug":"the-kindergarten-state-of-mind","status":"publish","type":"post","link":"https:\/\/codereporter.de\/?p=57","title":{"rendered":"The Kindergarten-state-of-mind"},"content":{"rendered":"<p>&#8222;Don&#8217;t worry about feeling stupid.&#8220; They keep telling you this at Makers Academy. &#8222;You will get used to not knowing how things work,&#8220; is another piece of advice I have heard several times.<\/p>\n<p>But I do worry that I&#8217;m too stupid to get my head around this. I thought I knew how to make my objects talk to each other. I thought I had understood that a proc wraps a method to have it executed within another. I meant to know which tests I need to write for each class. But\u00a0I run into the same problems again and again.<\/p>\n<div id='gallery-1' class='gallery galleryid-57 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=69'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-20-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-69\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-69'>\n\t\t\t\tMakers are not the kind of programmers that barely leave their basement. Makers do Yoga and come by bike.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=63'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-2-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-63\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-63'>\n\t\t\t\tMacBooks, bean bags, brick walls &#8211; the environment is preparing us for a job in a startup as well.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=64'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-3-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-64\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-64'>\n\t\t\t\tGirls get a discount on the course. And Kate (in this picture) seems to have as much fun as I do. Check out her blog at http:\/\/katebeavis.wordpress.com \n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=65'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-4-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-65\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-65'>\n\t\t\t\tThe official Makers cup.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=66'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-71-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-66\" style=\"width:100%;height:150.05%;max-width:933px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-66'>\n\t\t\t\tMy Colleague Tom during one of the lessons. You really have to concentrate to grasp what&#8217;s going on there.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=67'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-12-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-67\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-67'>\n\t\t\t\tMy Italian fellow Tommaso.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=68'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-14-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-68\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-68'>\n\t\t\t\tFancy view, huh?\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=70'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150211_LDN_W2-Makers-Pub-Brighton-22-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-70\" style=\"width:100%;height:150.05%;max-width:933px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-70'>\n\t\t\t\tI also like the stairs. I&#8217;m usually excited to go upstairs.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=71'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150212_LDN_W2-Makers-Pub-Brighton-32-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" aria-describedby=\"gallery-1-71\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div>\n\t\t\t\t<figcaption class='wp-caption-text gallery-caption' id='gallery-1-71'>\n\t\t\t\tLast week the December cohort had their &#8222;Makerthon&#8220;. We celebrated their inspiring projects with a short pub crawl.\n\t\t\t\t<\/figcaption><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=72'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150212_LDN_W2-Makers-Pub-Brighton-37-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=73'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150212_LDN_W2-Makers-Pub-Brighton-43-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=74'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150212_LDN_W2-Makers-Pub-Brighton-49-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=75'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-55-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=78'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-68-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=79'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-69-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=80'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-88-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=81'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-97-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=82'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-103-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=83'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-110-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:150.05%;max-width:933px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=84'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-118-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:150.05%;max-width:933px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=86'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-122-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=87'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-136-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:66.64%;max-width:1400px;\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/codereporter.de\/?attachment_id=88'><img width=\"150\" height=\"150\" src=\"https:\/\/codereporter.de\/wp-content\/uploads\/2015\/02\/150213_LDN_W2-Makers-Pub-Brighton-138-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" loading=\"lazy\" style=\"width:100%;height:150.05%;max-width:933px;\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\n<p><b>Battling<\/b><strong>\u00a0the ships<\/strong><\/p>\n<p>My pairing-partner Chris and I have produced\u00a0a small stack of models during the last week. We\u00a0found out that it is better to delete some lines of code than to pass hours fiddling around to get the old lines working (again). The code we wrote could have been written within two hours maybe. But we had to think about how a ship could get onto the board and how it would be hit by one of the player&#8217;s shots.<\/p>\n<p>One of the things I really like about Makers: we often start from scratch or at the same basis. This week we will extend our battleships-game with a web-interface (very excited about that!). (After programming a text-message-sending management system for a takeaway-restaurant during the\u00a0weekend). Our coach Stephen is writing the underlying code-basis for battleships web in front of us. I think that&#8217;s perfect. Since I have tackled the problem for so long, I can follow his writing and I see how he is solving the issues.<\/p>\n<p>When he programs one class, he doesn&#8217;t include the other classes at all. Let&#8217;s say he wants to program how the game ends:<\/p>\n<ol>\n<li><strong>Write the RSpec-tests:<\/strong><br \/>\n<code>it \u201cknows a game is not over as long as none of the players has lost\u201d do<br \/>\nexpect(game.over?).to eq false<br \/>\nend<\/code><code>it \u201cknows a game is over when one of the\u00a0players has lost\u201d do<br \/>\nallow(player_one).to receive(:lost?).and_return(true)<br \/>\nexpect(game).to be_over<br \/>\nend<\/code><\/li>\n<li><strong>Make the failing tests pass:<\/strong><br \/>\nThe easiest way to make the first test pass is to creat a method called &#8222;over&#8220; and make it return false.\u00a0The second test forces you to change the code: Line one is the human-readable test. Line two makes player_one answer with &#8222;true&#8220; to the method &#8222;lost?&#8220;. With this line we state that player_one has lost no matter what his board may look like. \u00a0Line three is the actual test. It expects the game to return &#8222;true&#8220; when confronted with the \u00a0method &#8222;over?&#8220; (RSpec looks vor a method &#8222;xyz?&#8220; ending on &#8222;?&#8220; when you write &#8222;&#8230;.to be_xyz&#8220;).<\/li>\n<li><strong>Code:<\/strong><br \/>\n<code> def over?<br \/>\nplayer_one.lost? or player_two.lost?<br \/>\nend<\/code><\/li>\n<\/ol>\n<p>The coaches keep saying that testing (TDD) and class modelling (OOD) are two of the most important things we have to understand if we want to become web developers by May.<\/p>\n<p>I try to stop worrying. I try to adopt the Kindergarten-state-of-mind, as Sam called it during my darkest hours at Makers last Friday.<\/p>\n<ul>\n<li>You can see <a title=\"Stephen Lloyd on GitHub\" href=\"https:\/\/github.com\/stephenlloyd\/feb_battleships_lecture\" target=\"_blank\">the code Stephen wrote in his GitHub<\/a>.<\/li>\n<li>My Colleague <a title=\"Kate Beavis Blog\" href=\"http:\/\/katebeavis.wordpress.com\" target=\"_blank\">Kate&#8217;s blog<\/a><\/li>\n<li>The <a title=\"Makers Academy on YouTube\" href=\"https:\/\/www.youtube.com\/channel\/UCdOjPqhheKtuIFtnYGOGW9A\" target=\"_blank\">most of our lessons are recorded and public on YouTube<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&#8222;Don&#8217;t worry about feeling stupid.&#8220; They keep telling you this at Makers Academy. &#8222;You will get used to not knowing how things work,&#8220; is another piece of advice I have heard several times. But I do worry that I&#8217;m too stupid to get my head around this. I thought I knew how to make my&hellip; <a class=\"more-link\" href=\"https:\/\/codereporter.de\/?p=57\"><span class=\"screen-reader-text\">The Kindergarten-state-of-mind<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":61,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[10,7,12,6,11],"_links":{"self":[{"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/posts\/57"}],"collection":[{"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codereporter.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57"}],"version-history":[{"count":6,"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions\/90"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codereporter.de\/index.php?rest_route=\/wp\/v2\/media\/61"}],"wp:attachment":[{"href":"https:\/\/codereporter.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codereporter.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codereporter.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}