{"id":2511,"date":"2019-03-26T10:18:49","date_gmt":"2019-03-26T14:18:49","guid":{"rendered":"http:\/\/www.soul-repairs.com\/blog\/?p=2511"},"modified":"2019-02-28T17:26:47","modified_gmt":"2019-02-28T22:26:47","slug":"go-a-grumpy-old-developers-review","status":"publish","type":"post","link":"https:\/\/soul-repairs.com\/blog\/2019\/03\/26\/go-a-grumpy-old-developers-review\/","title":{"rendered":"Go: a Grumpy Old Developer\u2019s Review"},"content":{"rendered":"<figure id=\"attachment_2579\" aria-describedby=\"caption-attachment-2579\" style=\"width: 190px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2579 size-medium\" src=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/oldman-190x300.jpg\" alt=\"\" width=\"190\" height=\"300\" srcset=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/oldman-190x300.jpg 190w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/oldman-171x270.jpg 171w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/oldman.jpg 456w\" sizes=\"auto, (max-width: 190px) 100vw, 190px\" \/><figcaption id=\"caption-attachment-2579\" class=\"wp-caption-text\">An artist&#8217;s rendition of Josh.<\/figcaption><\/figure>\n<p id=\"E84\"><span id=\"E85\">I first started <a href=\"https:\/\/en.wikipedia.org\/wiki\/C_(programming_language)\" target=\"_blank\" rel=\"noopener noreferrer\">programming<\/a><\/span><span id=\"E86\"> in C, about twenty years ago. I pretty regularly call myself a grumpy old man &#8211; I always thought that describing myself as &#8220;grumpy&#8221; was legit, but that the &#8220;old&#8221; was a joke. <\/span><\/p>\n<p><span id=\"E86\">It turns out that twenty years is a long time.\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"emoji alignnone wp-image-2387 size-thumbnail\" src=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/01\/awkward-150x150.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/01\/awkward-150x150.png 150w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/01\/awkward.png 183w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/span><\/p>\n<p id=\"E89\"><span id=\"E90\">I\u2019ve got my copy of <a href=\"https:\/\/amzn.to\/2IknJdH\" target=\"_blank\" rel=\"noopener noreferrer\">K&amp;R<\/a><\/span><span id=\"E92\"> (if you don&#8217;t what K&amp;R is [like Laine didn&#8217;t, who is apparently neither grumpy NOR old&#8230;], <em>sigh\/get off my lawn<\/em>, look up the <a href=\"https:\/\/en.wikipedia.org\/wiki\/C_(programming_language)#K&amp;R_C\" target=\"_blank\" rel=\"noopener noreferrer\">authors<\/a>), and it\u2019s still my favorite programming book. I still love the simplicity of the C language. I\u2019ve written in languages that do garbage collection and languages that don\u2019t even bother to mention that they do garbage collection for you. I\u2019ve seen so many different kinds of inheritance it makes me mildly disturbed to think about it.<\/span><\/p>\n<p id=\"E93\"><span id=\"E94\">I\u2019ve learned <a href=\"https:\/\/en.wikipedia.org\/wiki\/Java_Platform,_Enterprise_Edition\" target=\"_blank\" rel=\"noopener noreferrer\">JEE<\/a>, <a href=\"https:\/\/spring.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Spring<\/a>, and <a href=\"http:\/\/spring.io\/projects\/spring-boot\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Boot<\/a>, and I&#8217;ve wandered around other people\u2019s <a href=\"https:\/\/www.python.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Python<\/a> code. <em>But I still have my love for C<\/em>. It\u2019s easy for me to read, easy for me to follow, and unless you\u2019re doing something dumb with pointers, it\u2019s pretty easy to figure out what you\u2019re doing, and what you\u2019re doing wrong.<\/span><\/p>\n<p><!--more--><\/p>\n<h2 id=\"E95\" class=\"qowt-stl-Heading2\"><span id=\"E96\">What is Go?<\/span><\/h2>\n<blockquote><p>Go (often referred to as Golang) is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. Go is syntactically similar to C, but with the added benefits of memory safety, garbage collection, structural typing, and CSP-style concurrency. (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Go_(programming_language)\" target=\"_blank\" rel=\"noopener noreferrer\">Thanks, Wikipedia!<\/a>)<\/p><\/blockquote>\n<figure id=\"attachment_2582\" aria-describedby=\"caption-attachment-2582\" style=\"width: 150px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.golang.org\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2582\" src=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/gogopher-220x300.png\" alt=\"\" width=\"150\" height=\"204\" srcset=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/gogopher-220x300.png 220w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/gogopher-198x270.png 198w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/gogopher.png 345w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><figcaption id=\"caption-attachment-2582\" class=\"wp-caption-text\">The Go Gopher<\/figcaption><\/figure>\n<p id=\"E97\"><span id=\"E98\"><a href=\"https:\/\/golang.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Go<\/a> is a relatively <strong>simple<\/strong> language<\/span><span id=\"E99\">. <\/span><span id=\"E101\">It <strong>runs fast<\/strong>, and it can be (and is!) used for most anything, from simple script work to heavyweight applications and services. It&#8217;s a general purpose language like Java but it doesn&#8217;t require a JVM or interpreter.<span style=\"color: #800080;\"><span style=\"color: #ff6600;\">\u00a0<\/span><\/span><\/span><span id=\"E103\">It\u2019s <\/span><strong><span id=\"E104\">safe <\/span><\/strong><span id=\"E105\">because variables can\u2019t be magically converted &#8211; so you always know an <code>int<\/code> is an <code>int<\/code>.\u00a0 <\/span><\/p>\n<p><span id=\"E105\">In C, you can take a memory pointer and do some math to get to other memory spaces &#8211; including memory spaces for <em>other<\/em> programs. Go, on the other hand, doesn&#8217;t allow for Pointer Math of Dubious Magic and so is much more <strong>memory-safe<\/strong>.<\/span><\/p>\n<h2 id=\"E108\" class=\"qowt-stl-Heading2\"><span id=\"E109\">Why Make Go?<\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2513 alignright\" src=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/why-are-you-the-way-that-you-are-300x168.jpg\" alt=\"\" width=\"300\" height=\"168\" srcset=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/why-are-you-the-way-that-you-are-300x168.jpg 300w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/why-are-you-the-way-that-you-are-768x429.jpg 768w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/why-are-you-the-way-that-you-are-483x270.jpg 483w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/why-are-you-the-way-that-you-are.jpg 843w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p id=\"E110\"><span id=\"E111\">Every language solves some of the problems of the ones that came before it. Really good languages solve almost all of the problems of their predecessors, while some languages just&#8230;make things more complicated than necessary.<\/span><\/p>\n<p id=\"E114\"><span id=\"E115\">Go is a reaction to languages that were easy to <\/span><span id=\"E116\"><em>start<\/em> but later made you want to die because they had unpredictable behavior or poor performance. For example, <\/span><span id=\"E117\">JavaScript can be dangerous from a type-safety and parallel processing standpoint and interpreted languages like Ruby and Python\u00a0aren\u2019t very performant.<\/span><\/p>\n<p id=\"E118\"><span id=\"E119\">Go was <em>also<\/em> a reaction to languages like C, which is simple and usually very fast but had some complications (e.g. header files) and was missing a lot of modern niceties (garbage collection, memory safety)<\/span><span id=\"E120\">.\u00a0<\/span><\/p>\n<h2 id=\"E121\" class=\"qowt-stl-Heading2\"><span id=\"E122\">What\u2019s my Take? (tl;dr)<\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-2614\" src=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/im-so-excited-i-get-to-talk-nerdy-300x201.jpg\" alt=\"\" width=\"250\" height=\"168\" srcset=\"https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/im-so-excited-i-get-to-talk-nerdy-300x201.jpg 300w, https:\/\/soul-repairs.com\/blog\/wp-content\/uploads\/2019\/02\/im-so-excited-i-get-to-talk-nerdy.jpg 359w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/>As an old C programmer, Go is pretty good. Its similarities to C are useful and familiar. Basically, it&#8217;s less garbage than everything else, and it delivers on what it set out to do. It\u2019s like getting into your <del>car<\/del> ten-year-old-Buick that you love, and you know how it works, and then you find that it has all kinds of new tricks it can deliver.<\/p>\n<h3>People who should give Go a shot<\/h3>\n<ul>\n<li><span id=\"E129\">\u00a0Java programmers who want to get away from the JVM and massive startup times and memory<br \/>\n<\/span><\/li>\n<li>Container developers who want fast startup time and simple, clean language syntax<\/li>\n<li>C programmers who want some modern language niceties<\/li>\n<li>Ruby and Python developers who want type-safety with the same speed of development<\/li>\n<\/ul>\n<h2><span id=\"E129\">Resources<\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/tour.golang.org\/list\" target=\"_blank\" rel=\"noopener noreferrer\">A super sweet tutorial complete with change-able and run-able code<\/a><\/li>\n<li><a href=\"https:\/\/www.golang-book.com\/books\/intro\" target=\"_blank\" rel=\"noopener noreferrer\">An Introduction to Programming in Go<\/a> (PDF book)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I first started programming in C, about twenty years ago. I pretty regularly call myself a grumpy old man &#8211; I always thought that describing myself as &#8220;grumpy&#8221; was legit, but that the &#8220;old&#8221; was a joke. It turns out that twenty years is a long time.\u00a0 I\u2019ve got my copy of K&amp;R (if you &hellip; <\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/soul-repairs.com\/blog\/2019\/03\/26\/go-a-grumpy-old-developers-review\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[105,104,107,89,108,103,93,83],"wf_post_folders":[],"coauthors":[11],"class_list":["post-2511","post","type-post","status-publish","format-standard","hentry","category-technology","tag-c","tag-go","tag-golang","tag-java","tag-old-josh","tag-python","tag-spring-boot","tag-technology-tldr"],"_links":{"self":[{"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/posts\/2511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/comments?post=2511"}],"version-history":[{"count":11,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/posts\/2511\/revisions"}],"predecessor-version":[{"id":2634,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/posts\/2511\/revisions\/2634"}],"wp:attachment":[{"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/media?parent=2511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/categories?post=2511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/tags?post=2511"},{"taxonomy":"wf_post_folders","embeddable":true,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/wf_post_folders?post=2511"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/soul-repairs.com\/blog\/wp-json\/wp\/v2\/coauthors?post=2511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}