{"id":2547,"date":"2012-08-20T17:53:46","date_gmt":"2012-08-20T05:53:46","guid":{"rendered":"http:\/\/coffeehouse.co.nz\/wordpress\/?p=2547"},"modified":"2012-08-20T17:57:05","modified_gmt":"2012-08-20T05:57:05","slug":"introduction-to-computer-programming-concepts-by-way-of-practical-examples-1-planting-hedges","status":"publish","type":"post","link":"https:\/\/coffeehouse.co.nz\/wordpress\/?p=2547","title":{"rendered":"Introduction to computer programming concepts by way of practical examples 1: Planting hedges."},"content":{"rendered":"<p>(This might make slightly more sense if you look at the individual story, and not the condensed view on the front page&#8230; <a href=\"https:\/\/coffeehouse.co.nz\/wordpress\/?p=2547\">Click here if you like<\/a>.)<\/p>\n<p><code>Sub PlantHedges<\/p>\n<p>&nbsp;&nbsp;&nbsp;Dim HedgesToPlant as hedges = 2<br \/>\n&nbsp;&nbsp;&nbsp;Dim HedgePlants as HoneysuckleBox = 88<\/p>\n<p>&nbsp;&nbsp;&nbsp; for HedgesStillToPlant = 0 to HedgesToPlant<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark out desired hedge line with builders line and rocks<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dig turf out of desired hedge line<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fill hole that we've just dug with compost<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do While HedgePlants > 0 and not at end of hedge trough<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dig hole for plant<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if big stones in soil pile just dug up<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pull out any big stones<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;put stones in empty plant pot<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raise eyebrows in surprise<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;push in HedgePlant<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HedgePlants = HedgePlants minus one<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;put all soil just dug out of hole back around plant<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;move 25cm along row<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loop<br \/>\n&nbsp;&nbsp;&nbsp;next HedgesStillToPlant<\/p>\n<p>&nbsp;&nbsp;&nbsp;clean up site so next mow of lawn doesn't fire stones everywhere<br \/>\n&nbsp;&nbsp;&nbsp;sprinkle blood and bone in the hope it keeps the hares away<br \/>\n&nbsp;&nbsp;&nbsp;celebrate completion appropriately<br \/>\n&nbsp;&nbsp;&nbsp;feel pretty weary and go watch rugby highlights to recover<\/p>\n<p>End Sub<\/code><\/p>\n<p>And that pretty much sums up our fun-day Sunday! Hope you can work out just how much fun we had in the cold, grey day. But at least that&#8217;s another 88 shrubs\/trees planted. Just the last 100 of yet another size and shape to go. They&#8217;re going to follow a similar pattern though, I suspect. Good job we&#8217;ve got the perfect  algorithm sorted now! <\/p>\n<p align=center><a href=\"https:\/\/coffeehouse.co.nz\/wordpress\/wp-content\/uploads\/2012\/08\/halfway.jpg\"><img loading=\"lazy\" src=\"https:\/\/coffeehouse.co.nz\/wordpress\/wp-content\/uploads\/2012\/08\/halfway_small.jpg\" alt=\"\" title=\"Only halfway?!\" width=\"450\" height=\"300\" class=\"aligncenter size-full wp-image-2561\" srcset=\"https:\/\/coffeehouse.co.nz\/wordpress\/wp-content\/uploads\/2012\/08\/halfway_small.jpg 450w, https:\/\/coffeehouse.co.nz\/wordpress\/wp-content\/uploads\/2012\/08\/halfway_small-300x200.jpg 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Let&#8217;s just hope we have the same level of assistance (i.e. sleeping) from munchkin when we&#8217;re planting the next instalment.<\/p>\n<p align=center><a href=\"https:\/\/coffeehouse.co.nz\/wordpress\/wp-content\/uploads\/2012\/08\/done.jpg\"><img loading=\"lazy\" src=\"https:\/\/coffeehouse.co.nz\/wordpress\/wp-content\/uploads\/2012\/08\/done_small.jpg\" alt=\"\" title=\"Done\" width=\"450\" height=\"300\" class=\"aligncenter size-full wp-image-2561\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>(This might make slightly more sense if you look at the individual story, and not the condensed view on the front page&#8230; Click here if you like.) Sub PlantHedges &nbsp;&nbsp;&nbsp;Dim HedgesToPlant as hedges = 2 &nbsp;&nbsp;&nbsp;Dim HedgePlants as HoneysuckleBox = 88 &nbsp;&nbsp;&nbsp; for HedgesStillToPlant = 0 to HedgesToPlant &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark out desired hedge line with builders [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2547"}],"collection":[{"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2547"}],"version-history":[{"count":18,"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2547\/revisions"}],"predecessor-version":[{"id":2568,"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2547\/revisions\/2568"}],"wp:attachment":[{"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coffeehouse.co.nz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}