{"id":111,"date":"2010-10-20T00:32:14","date_gmt":"2010-10-20T07:32:14","guid":{"rendered":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/?p=111"},"modified":"2014-06-09T01:29:03","modified_gmt":"2014-06-09T00:29:03","slug":"why-write-code","status":"publish","type":"post","link":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/why-write-code\/","title":{"rendered":"Why write code?"},"content":{"rendered":"<p>Sitting here in China, wondering what to do, I decided to write some code to help with analysis of moves in a wargame.\u00a0 Rather than write it though, I started to wonder why people like to write code.<\/p>\n<p>I find writing computer programs fun. When they work, it&#8217;s fantastic. When they won&#8217;t, it&#8217;s frustrating.\u00a0 I love learning new skills in computing, new languages, environments, toolkits. That&#8217;s not to say I like all the ones I come across; there are some which put me off, or which I fail to understand quickly enough to keep my interest. (Ruby on Rails is one such.)\u00a0 I claim that learning to use these new tools keeps my brain sharp.\u00a0 Recently I&#8217;ve been writing web-hosted database applications, for fun!\u00a0 I used to think databases were the pits; the boring, commercial end of computing, but now I&#8217;ve found a need to use them and find lots of interest, particularly in constructing complicated queries. I never cease to be amazed at how much one can persuade the server to do, rather than have to code into the client application.<\/p>\n<p>This morning though, it wasn&#8217;t the challenge which excited me, or even the benefit the new code would bring once it was completed &#8211; it was the aesthetics of the code itself.\u00a0 There are two aspects to that, one serious and one more trivial.\u00a0\u00a0 Since I learnt my original computing skills (in assembly language and BASIC), the power of languages has changed greatly.\u00a0 There&#8217;s a good deal of satisfcation in being able to write small chunks of code which do a lot.\u00a0 I find Ruby particularly rewarding in this respect.\u00a0 Secondly, editors with syntax highlighting make code so attractive!\u00a0 Pretty code draws the eye; colours help understanding.\u00a0 I want to code because the result is pretty!<\/p>\n<p><a href=\"https:\/\/blog.lemongrass.org.uk\/lemongrass\/files\/2010\/10\/code.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-117 size-full\" src=\"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-content\/uploads\/sites\/2\/2010\/10\/code.jpg\" alt=\"\" width=\"452\" height=\"403\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sitting here in China, wondering what to do, I decided to write some code to help with analysis of moves in a wargame.\u00a0 Rather than write it though, I started to wonder why people like to write code. I find writing computer programs fun. When they work, it&#8217;s fantastic. When they won&#8217;t, it&#8217;s frustrating.\u00a0 I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":6,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts\/111\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}