{"id":113,"date":"2014-09-23T21:40:04","date_gmt":"2014-09-23T21:40:04","guid":{"rendered":"http:\/\/blog.retryabortfail.com\/?p=113"},"modified":"2015-05-28T14:25:10","modified_gmt":"2015-05-28T14:25:10","slug":"the-road-to-functional-programming","status":"publish","type":"post","link":"https:\/\/blog.retryabortfail.com\/?p=113","title":{"rendered":"The Road to Functional Programming"},"content":{"rendered":"<p>Two years ago, I attended <a title=\"Dun DDD\" href=\"http:\/\/dun.dddscotland.co.uk\/\" target=\"_blank\">DunDDD (Dundee &#8211; Developer Developer Developer)<\/a>, the conference named after a <a title=\"Steve Ballmer - Developers\" href=\"https:\/\/www.youtube.com\/watch?v=8To-6VIJZRE\" target=\"_blank\">chant Steve Ballmer started<\/a> during one of his many eccentric moments. At the conference there were 4 tracks (Big Data, Web Development and I&#8217;m unsure\u00a0what the other two were looking at the agenda) &#8211; but you were free to hop between them as you pleased. At the time I had just started working in an international team, was realising the power of source control (or catastrophic risk of a lack of source control&#8230;) and was curious about big data (like most people in 2012).<\/p>\n<div id=\"attachment_116\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/agenda.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-116\" class=\"size-medium wp-image-116\" src=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/agenda-300x179.jpg\" alt=\"Agenda DunDDD 2012\" width=\"300\" height=\"179\" srcset=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/agenda-300x179.jpg 300w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/agenda-1024x611.jpg 1024w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/agenda-500x298.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-116\" class=\"wp-caption-text\">Agenda DunDDD 2012<\/p><\/div>\n<p>One thing to note about DunDDD is that it is a bit of a Microsoft centric conference &#8211; despite the generic developers title. Still there are plenty of non Microsoft based talks and even the ones that aren&#8217;t can be pretty good (if a little sales like at times). By late afternoon I was a little tired (part hangover, part early morning train to Dundee) and didn&#8217;t feel like I could sit through another sales like pitch, so I took a gamble and switched to <a title=\"Gary Short\" href=\"https:\/\/twitter.com\/garyshort\" target=\"_blank\">Gary Short<\/a>&#8216;s talk on &#8220;Not Everything is an Object&#8221;. I had overheard him talk about the bad UI decisions on hiding the power off options in Windows 8 and he sounded like he would be fun to listed to. Some other delegates at the conference had heard Gary talk before and had nothing to good things to say about his talks &#8211; so why not.<\/p>\n<div id=\"attachment_123\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/notoo.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-123\" class=\"size-medium wp-image-123\" src=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/notoo-300x222.png\" alt=\"Not Everything is an Object\" width=\"300\" height=\"222\" srcset=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/notoo-300x222.png 300w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/notoo-405x300.png 405w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/notoo.png 627w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-123\" class=\"wp-caption-text\">Not Everything is an Object<\/p><\/div>\n<p>The talk focused around how as an industry we had become obsessed with OO style programming and languages and crucially wanted to prove to us that this was a bad thing &#8211; that the world couldn&#8217;t always be described well by using objects. Instead functional programming could do things a lot better (in some\/most places). His preferential functional language was <a title=\"Clojure\" href=\"http:\/\/clojure.org\/\" target=\"_blank\">Clojure<\/a>. This wasn&#8217;t my first encounter with functional languages &#8211; for a very brief time at university we made use of <a title=\"Haskell\" href=\"http:\/\/www.haskell.org\/\" target=\"_blank\">Haskell<\/a>\u00a0(badly) &#8211; \u00a0but it was my first good\/interesting encounter. Clojure has a couple of advantages over some of it&#8217;s alternatives &#8211; mainly running on the JVM, meaning you didn&#8217;t have to give up the warm embrace of familiar old dog Java. This post isn&#8217;t about Clojure &#8211; but I will get around to that post very shortly. He had an example about a doctors surgery (or hospital) which he described in OO with the help of the audience &#8211; causing some debate at the time. When it came time for the Doctor object to become sick and mutate into a patient he demonstrated the pitfalls of OO &#8211; although I think it might be possible to build a better model as someone else suggested. While I can&#8217;t quite remember what he did with Clojure to solve the problem &#8211; by the end of the talk it did sound like a viable alternative if only a little better. Gary&#8217;s talk can be found on slideshare <a title=\"Not Everything Is an Object\" href=\"http:\/\/www.slideshare.net\/garyshort\/not-everything-is-an-object\" target=\"_blank\">here<\/a>.<\/p>\n<div id=\"attachment_118\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/clojure1_tm.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-118\" class=\"size-medium wp-image-118\" src=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/clojure1_tm-300x218.png\" alt=\"Adrian @ TM\" width=\"300\" height=\"218\" srcset=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/clojure1_tm-300x218.png 300w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/clojure1_tm-411x300.png 411w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/clojure1_tm.png 947w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-118\" class=\"wp-caption-text\">Adrian @ TM<\/p><\/div>\n<p>That would be the last time I encountered Clojure or functional programming for some time &#8211; or at least I thought it was at the time of my first draft post. It turns out the talk I was about to mention by <a title=\"TM Talks- Adrian Mowat @mowat27 Clojure in the Real World\" href=\"https:\/\/vimeo.com\/42627041\" target=\"_blank\">Adrian Mowat at Techmeetup Glasgow<\/a>, was a lot older than I thought. <a title=\"Adrian Mowat\" href=\"https:\/\/twitter.com\/mowat27\" target=\"_blank\">Adrian<\/a> gave what would become my first in depth (from a hands of and watch approach) look at Clojure. Again I was curious and a little more sold that it could be a good route to go down for coding.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_119\" style=\"width: 235px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/7in7.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-119\" class=\"size-medium wp-image-119\" src=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/7in7-225x300.jpg\" alt=\"Seven Languages in 7 Weeks\" width=\"225\" height=\"300\" srcset=\"https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/7in7-225x300.jpg 225w, https:\/\/blog.retryabortfail.com\/wp-content\/uploads\/2014\/09\/7in7.jpg 600w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><p id=\"caption-attachment-119\" class=\"wp-caption-text\">Seven Languages in Seven\u00a0Weeks<\/p><\/div>\n<p>Earlier this year would be the first time I would get my hands dirty learning a bit of the language. The monthly(ish) Code Craftmenship meetup in Glasgow &#8211; <a title=\"Code Craft\" href=\"http:\/\/www.codecraftuk.org\/\" target=\"_blank\">Code Craft<\/a> had decided to do a group reading and work through the text book &#8220;Seven Languages in Seven Weeks&#8221; which I mentioned in <a title=\"Seven Languages in Seven Weeks\" href=\"https:\/\/blog.retryabortfail.com\/?p=76\" target=\"_blank\">this blog post<\/a>. While I didn&#8217;t get as far into the book as I would liked to have (real life and work get in the way of keeping a good pace), I did finally at least write a few lines of Clojure. The focus of the book however was on the strengths and weaknesses of the languages rather than actually learning them however.<\/p>\n<p>Fast forward from then through summer and we end up here. The seed may have taken almost 2 years to grow, but I have finally made the decision to learn more Clojure. While I haven&#8217;t gotten too far yet, I hope to make regular posts on my journey to a more functional world.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two years ago, I attended DunDDD (Dundee &#8211; Developer Developer Developer), the conference named after a chant Steve Ballmer started during one of his many eccentric moments. At the conference there were 4 tracks (Big Data, Web Development and I&#8217;m &hellip; <a href=\"https:\/\/blog.retryabortfail.com\/?p=113\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[20,21,18,19,22,8,10],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-tech","tag-clojure","tag-code-craft","tag-dunddd","tag-functional-programming","tag-jvm","tag-microsoft","tag-techmeetup"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":7,"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":125,"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/125"}],"wp:attachment":[{"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.retryabortfail.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}