<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Poems &amp;&amp; Programs</title>
    <description>Poems and programs by Eric Weinstein.</description>
    <link>https://ericweinste.in/</link>
    <atom:link href="https://ericweinste.in/feed.xml" rel="self" type="application/rss+xml" />
    
      <item>
        <title>Thoughts on Go</title>
        <description>&lt;h3 id=&quot;what-i-like&quot;&gt;What I Like&lt;/h3&gt;
&lt;p&gt;I actually like Go just fine, despite the bulk of this post being about my gripes with the language. Go was designed by Google to build scalable web services that would be worked on by large teams with wide ranges of experience and skill, so it’s no surprise that the things I like about Go are the things its designers set out to do well: concurrency and optimizing for reading code over writing it.&lt;/p&gt;

&lt;p&gt;I’m a big fan of &lt;a href=&quot;https://www.cs.cmu.edu/~crary/819-f09/Hoare78.pdf&quot;&gt;CSP&lt;/a&gt;, so Go’s channels and goroutines feel very natural to me. The general approach is summed up in the Go community as “don’t communicate by sharing memory; instead, share memory by communicating,” which I think is capital-C Correct and is well explained in &lt;a href=&quot;https://blog.golang.org/codelab-share&quot;&gt;this Go Blog post&lt;/a&gt; and &lt;a href=&quot;https://golang.org/doc/codewalk/sharemem/&quot;&gt;this related Codewalk&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While I don’t particularly like Go’s style conventions, I &lt;em&gt;really&lt;/em&gt; like that those conventions are enforced by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go fmt&lt;/code&gt;. There are some minor annoyances (such as unused imports and variables being errors during development), but generally, I’ve found Go’s opinions to be reasonable and informed by hard-won experience. I don’t hate the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;err != nil&lt;/code&gt; idiom as much as I expected: I prefer errors as values, and I’m willing to trade the boilerplate typing for the requirement that I think through and explicitly handle each error.&lt;/p&gt;

&lt;p&gt;The rest of this post is about the things I dislike about Go (which are, unsurprisingly, features that exist in other languages but were intentionally omitted by the Go designers&lt;sup&gt;1&lt;/sup&gt;). These are, in rough order of decreasing dislike: the lack of parametric polymorphism (generics), the lack of algebraic data types, and the lack of functional constructs like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;map&lt;/code&gt;/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filter&lt;/code&gt;/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reduce&lt;/code&gt;. Part of this is my superhuman ability to attract off-by-one and nil pointer errors; the rest is probably that I’m used to having these constructs (I really like writing Clojure, Elixir, Haskell, Ruby, and TypeScript). If any of this resonates with you, read on!&lt;/p&gt;

&lt;h3 id=&quot;parametric-polymorphism&quot;&gt;Parametric Polymorphism&lt;/h3&gt;
&lt;p&gt;Parametric polymorphism really just means “generics” (I’ll use the two interchangeably); if you’re familiar with Java or C&lt;sup&gt;#&lt;/sup&gt;, you’ve likely come across this idea. If you haven’t encountered generics before, the idea is to parameterize your type system so that instead of specifying that a certain function works on, say, “list of integer” or “list of string,” you can write that function to work on “list of A,” where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt; is whatever type you want; you get a common interface for multiple types (polymorphism) that takes the concrete type as a parameter (parametric).&lt;/p&gt;

&lt;p&gt;Go doesn’t have parametric polymorphism, so if you want to write a function that operates on slices of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; arbitrary types, you have to write your function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; times. &lt;a href=&quot;https://repl.it/repls/RichCheeryWireframe&quot;&gt;For example&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IntList&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IntList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StringList&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;StringList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;// &amp;amp;c, &amp;amp;c&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In a language that &lt;em&gt;does&lt;/em&gt; have parametric polymorphism, such as Haskell, you can write &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt; &lt;a href=&quot;https://repl.it/repls/SameSatisfiedListeners&quot;&gt;like so&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-haskell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Eq&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;False&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;True&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;otherwise&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The type parameter is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; in this example, and this version of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt; will work on any type where instances can be equal or unequal to each other: integers, characters, booleans, and so on. This syntax might look odd if you’re unfamiliar with Haskell, so let’s walk through it. The first line is the type signature, which says:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;This function is called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt;;&lt;/li&gt;
  &lt;li&gt;It has a certain type (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;::&lt;/code&gt; is read “has type”);&lt;/li&gt;
  &lt;li&gt;That type includes a variable, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;, which implements the typeclass &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Eq&lt;/code&gt; (this means “whatever &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; is, instances of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; are equal or unequal to one another”);&lt;/li&gt;
  &lt;li&gt;Given &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[a]&lt;/code&gt; (a list of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;) and some candidate &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;, the function returns a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bool&lt;/code&gt;ean.&lt;sup&gt;2&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The next few lines pattern match on the parameters. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains [] _ = False&lt;/code&gt; means “If you get the empty list, return false”; the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_&lt;/code&gt; character means “I don’t care what &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; you provide, since by definition, the empty list can’t contain anything.”&lt;/p&gt;

&lt;p&gt;The final lines destructure the list into a head (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;) and a tail (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ys&lt;/code&gt;); if the head of the list equals what we’re looking for (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;), we return &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;True&lt;/code&gt;, otherwise, we recurse on the rest of the list. (The base case is the empty list: if we get to an empty list, the list must not contain &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;, so we return &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;False&lt;/code&gt;.)&lt;/p&gt;

&lt;p&gt;If you’re familiar with Java, a generic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt; method looks &lt;a href=&quot;https://repl.it/repls/ShabbyWickedTheory&quot;&gt;like this&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;equals&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This strikes me as verbose compared to the Haskell version (the Haskell types are inferred, and while I included the type signature for clarity, it’s optional). In many ways, the Go designers were &lt;a href=&quot;https://golang.org/doc/faq#What_is_the_purpose_of_the_project&quot;&gt;trying to build a better Java&lt;/a&gt;, so in this sense, Go is unquestionably an improvement; however, from the point of view of &lt;a href=&quot;https://softwareengineering.stackexchange.com/questions/279316/what-exactly-makes-the-haskell-type-system-so-revered-vs-say-java&quot;&gt;languages with more powerful type systems&lt;/a&gt; (like Haskell), it’s a bit lacking.&lt;/p&gt;

&lt;p&gt;I’ll touch on TypeScript a few times in this post, so here’s what &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt; looks like &lt;a href=&quot;https://repl.it/repls/CluelessStrikingTransversals&quot;&gt;in TypeScript&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you try to call &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains(contains([1, 2, 3], &quot;quux&quot;)&lt;/code&gt;, the TypeScript compiler will yell at you: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Argument of type &apos;&quot;quux&quot;&apos; is not assignable to parameter of type &apos;number&apos;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To round out our examples: if you’re coming from a language with duck typing, like Ruby, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt; looks something &lt;a href=&quot;https://repl.it/repls/DefiantMoccasinAdministrators&quot;&gt;like this&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;contains?&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;collection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;collection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We don’t explicitly parameterize the type here because we don’t need to: the idea of duck typing is that if it walks like a duck and quacks like a duck, it must be a duck; similarly, if &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;element&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;desired&lt;/code&gt; both respond to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;==&lt;/code&gt; message&lt;sup&gt;3&lt;/sup&gt;, then that’s good enough.&lt;/p&gt;

&lt;p&gt;Okay! Back to Go. Some developers argue that the workaround for the language’s lack of generics is to use the empty interface: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interface{}&lt;/code&gt;. The implementation for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt; could then be written &lt;a href=&quot;https://repl.it/repls/AssuredThriftyTrees&quot;&gt;like this&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
	&lt;span class=&quot;s&quot;&gt;&quot;fmt&quot;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Collection&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Element&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Collection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
			&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;false&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Collection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;quux&quot;&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;fmt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%v&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;By doing this, however, we’re effectively &lt;em&gt;opting out of type checking&lt;/em&gt;. The equivalent TypeScript makes this more explicit:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;// Note the replacement of the type paramater `T` with&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// `any`. You can make a list of any random combination&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// of types and look for an element of literally any type!&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// There are no rules! Human sacrifice, dogs and cats&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// living together... mass hysteria!&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;any&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The TypeScript compiler no longer complains here (simply returning &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;false&lt;/code&gt;), and the same is true of the Go compiler: it can no longer help us if we choose to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interface{}&lt;/code&gt;. Indeed, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;list := Collection{1, 2, 3}; list.Contains(&quot;quux&quot;)&lt;/code&gt; compiles, and at first blush seems to work:&lt;/p&gt;

&lt;div class=&quot;language-sh highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;go run List.go
&lt;span class=&quot;nb&quot;&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;…but what if we want to &lt;a href=&quot;https://repl.it/repls/FondHollowWorkplace&quot;&gt;add a function&lt;/a&gt; that appends a new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Element&lt;/code&gt; to our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Collection&lt;/code&gt;?&lt;/p&gt;

&lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;// ...&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Collection&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Collection&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;c&quot;&gt;// ...&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;fmt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%v&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;desired&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Our program cheerfully prints &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[1 2 3 quux]&lt;/code&gt;. While we’ve gained the ability to write single, generic functions for slices, we’re no longer able to to guarantee that slices only hold a single type (as opposed to our Haskell &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contains&lt;/code&gt;, which would fail at compile time if we were to try to append a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;quux&quot;&lt;/code&gt; to a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[Integer]&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;There’s been &lt;a href=&quot;https://blog.golang.org/why-generics&quot;&gt;some discussion around adding generics to Go&lt;/a&gt;, but as far as I know, there’s no plan to include them in upcoming releases of the language. For the time being, we’re stuck either writing code generators to handle the “&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; implementation” problem or opting out of compile-time checks entirely via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interface{}&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;algebraic-data-types&quot;&gt;Algebraic Data Types&lt;/h3&gt;
&lt;p&gt;Languages like Haskell and TypeScript have &lt;a href=&quot;https://en.wikipedia.org/wiki/Algebraic_data_type&quot;&gt;algebraic data types&lt;/a&gt;. If you’re not familiar with the idea, ADTs are a kind of composite data type that come with certain rules for their manipulation (hence “algebraic”). They’re most commonly found in two kinds: product types and sum types.&lt;/p&gt;

&lt;p&gt;Most languages have product types, and depending on your background, you might know these as records, named tuples, or structs. (They’re called product types because the set of possible values for a given product type is the Cartesian product of the sets of all possible values of its composite field types.) In Go, they take the form of structs, and they look like this:&lt;/p&gt;

&lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;User&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;Id&lt;/span&gt;        &lt;span class=&quot;kt&quot;&gt;uint64&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;FirstName&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;LastName&lt;/span&gt;  &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;Email&lt;/span&gt;     &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The other algebraic data type, the sum type (also known as a discriminated union, tagged union, variant, or coproduct), doesn’t exist in Go. The closest analogue would be enums using &lt;a href=&quot;https://blog.learngoprogramming.com/golang-const-type-enums-iota-bc4befd096d3&quot;&gt;iota&lt;/a&gt;, which is &lt;em&gt;unbelievably&lt;/em&gt; clumsy compared to true sum types. Either way, the goal is the same: to specify a type that can only take on a fixed set of values. (They’re called sum types because the set of all possible values is the sum of all possible values.)&lt;/p&gt;

&lt;p&gt;For example, not too long ago I was working through the “Sublist” problem on &lt;a href=&quot;https://exercism.io/&quot;&gt;Exercism&lt;/a&gt;, which involves determining whether one list is a sublist of another. The Go version expects the programmer to define a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Relation&lt;/code&gt;, but just as an alias for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;string&lt;/code&gt;, with the implicit expectation that said string is one of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;equal&quot;&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;sublist&quot;&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;superlist&quot;&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;unequal&quot;&lt;/code&gt;. The type system can’t help you here if you somehow pass in another string: any valid &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;string&lt;/code&gt; is a valid &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Relation&lt;/code&gt;. In Haskell, we might define &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Relation&lt;/code&gt; as a sum type like this:&lt;/p&gt;

&lt;div class=&quot;language-haskell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kr&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Relation&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Equal&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Sublist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Superlist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Unequal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here, the Haskell compiler enforces the possible values of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Relation&lt;/code&gt;: it can only be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Equal&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Sublist&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Superlist&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Unequal&lt;/code&gt;. They’re not strings whose values we try to constrain with comments, test cases, or other hints to the programmer: any other value than the four delineated will cause a failure at compile time.&lt;/p&gt;

&lt;h3 id=&quot;the-functional-approach&quot;&gt;The Functional Approach&lt;/h3&gt;
&lt;p&gt;As I mentioned earlier in this post, I’m a magnet for off-by-one errors and null pointer exceptions. While the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;range&lt;/code&gt; operator does obviate indexing errors, Go still has classic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;for&lt;/code&gt; loops, in which cases you have to be careful not to accidentally introduce a negative index or an index greater than &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;len(list) - 1&lt;/code&gt;. Functions like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filter&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;map&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reduce&lt;/code&gt; allow you to pipeline list operations (or operations on arbitrary collections—at least in languages with generics) without the risk of going out of bounds. This is especially nice when munging text; for example, here’s &lt;a href=&quot;https://repl.it/repls/TepidShorttermMaintenance&quot;&gt;a function that canonicalizes an article title into a URL path in Go&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;// Converts an article title (e.g. &quot;A Fine Mahok to&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;// You All: The Robert U. Terwilliger, Jr. Story&quot; to&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;// a URL path (e.g. &quot;a-fine-mahok-to-you-all-the-&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;// robert-u-terwilliger-jr-story&quot;).&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ToURLPath&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ToLower&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
	&lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;strings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Builder&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;character&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;range&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
		&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;unicode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IsLetter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt;
			&lt;span class=&quot;n&quot;&gt;unicode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IsDigit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
			&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WriteRune&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

		&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;unicode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IsSpace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
			&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WriteRune&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sc&quot;&gt;&apos;-&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
		&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

	&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;…and the same function &lt;a href=&quot;https://repl.it/repls/ImperfectDarkgreyComputationalscience&quot;&gt;in Clojure&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-clj highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url-printable?&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;or&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Character/isLetterOrDigit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Character/isSpace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to-url-path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;-&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;lower-case&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url-printable?&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sc&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;sc&quot;&gt;\-&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here I don’t think there’s much cost savings in either lines of text/cognitive load or time to compose (each implementation took me a couple of minutes), so it comes down to ease/familiarity and style. If you’re not familiar with Clojure, the syntax (especially the threading macro, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-&amp;gt;&amp;gt;&lt;/code&gt;) can be disorienting; if you don’t know Go or Java, the string builder pattern might be foreign to you.&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Overall, Go is fine. While I wouldn’t necessarily pick it for small personal projects, I can see its merits as a production language for large teams building web services, and I think it’s a language worth knowing.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;When I’m feeling charitable, I think of this as removing footguns (obvious and non-); when I’m feeling less generous, I’ve got to admit it kinda feels like catering to the lowest common denominator.&lt;/li&gt;
  &lt;li&gt;You might wonder why the function takes two arguments and returns a result, but is written as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[a] -&amp;gt; a -&amp;gt; bool&lt;/code&gt; (rather than, say, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;([a] -&amp;gt; a) -&amp;gt; bool&lt;/code&gt;). The reason is that all functions in Haskell are automatically &lt;a href=&quot;https://wiki.haskell.org/Currying&quot;&gt;curried&lt;/a&gt;, so a function that appears to take two arguments is actually a function that takes a single argument, &lt;em&gt;which returns a function that takes a single argument and returns the end value&lt;/em&gt;. The major theoretical advantage is that it makes formal proofs easier; the major practical advantage is it aids composition via partial application.&lt;/li&gt;
  &lt;li&gt;Ruby is heavily influenced by &lt;a href=&quot;https://en.wikipedia.org/wiki/Smalltalk#Messages&quot;&gt;Smalltalk&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
</description>
        <pubDate>Wed, 25 Mar 2020 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/go/golang/2020/03/25/thoughts-on-go/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/go/golang/2020/03/25/thoughts-on-go/</guid>
      </item>
    
      <item>
        <title>On Leverage</title>
        <description>&lt;h3 id=&quot;leverage-learning--caveat-lector&quot;&gt;Leverage, Learning, &amp;amp; Caveat Lector&lt;/h3&gt;
&lt;p&gt;I’ve been spending a lot of time at work thinking about leverage: areas where a small investment can result in a large return over a reasonable amount of time. A classic example is writing a library—for the cost of extracting, testing, designing, and implementing library code, you reduce bugs, duplicated effort, and time to delivery for all teams that use that library for as long as they use it.&lt;/p&gt;

&lt;p&gt;Applying this concept to my own workflow, I’ve identified learning (absorbing, remembering, and applying information) as an ideal area to exert leverage. In so doing, I’ve settled on a set of tools that I’ve found drastically improve my ability to learn and share what I’ve learned, which is what this post is all about!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Nota_bene&quot;&gt;NB&lt;/a&gt;: These are some of my preferred tools (or, in a more general sense, wetware optimizations). None of these is an endorsement for anything other than my personal use (and I guess your personal use, if my reasoning and use cases resonate with you). I haven’t received any money, free products, or other compensation for writing about any of the below.&lt;/p&gt;

&lt;h3 id=&quot;reading&quot;&gt;Reading&lt;/h3&gt;
&lt;p&gt;I spend most of my day reading—code, slide decks, e-mails, Slack messages, academic papers, and so on—and while I read fairly quickly (roughly 550 words a minute&lt;sup&gt;1&lt;/sup&gt;), I receive more material to read per day than I can comfortably read in a standard eight-hour workday.&lt;/p&gt;

&lt;p&gt;I’d previously not put much stock in the idea of &lt;a href=&quot;https://en.wikipedia.org/wiki/Speed_reading&quot;&gt;speed reading&lt;/a&gt;, but I came across Tina Konstant’s &lt;a href=&quot;https://www.amazon.com/Speed-Reading-Week-Teach-Yourself/dp/1473609348&quot;&gt;Speed Reading in a Week&lt;/a&gt; at my local library and figured the potential leverage (a more-or-less permanent 4x to 8x multiplier on my reading speed in exchange for a week of learning and a few months of practice) was worth exploring.&lt;/p&gt;

&lt;p&gt;There are several aspects to successful speed reading, but for me, the two most important keys to reading more quickly were:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Turning off subvocalization;&lt;/li&gt;
  &lt;li&gt;Using more of my peripheral vision when reading.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Subvocalization&quot;&gt;Subvocalization&lt;/a&gt; is the “voice in your head” you “hear” while reading, and it’s how we naturally learn to read as we progress from reading out loud to reading silently. The problem with subvocalizing while you read, though, is that you’re constrained to reading roughly as quickly as you could read the words aloud&lt;sup&gt;2&lt;/sup&gt; (modulo the latency involved in your brain getting your tongue and jaw to move). It was honestly a huge surprise to me that it was possible to read &lt;em&gt;without&lt;/em&gt; subvocalizing, but I’ve been able to do it with the help of a pacer: a visual guide for tracking words on the page.&lt;/p&gt;

&lt;p&gt;I tend to use my finger or the eraser end of a pencil for pacing, but you can use any tool you like so long as you use it to physically mark where you are on the page as you read. Moving the pacer at a steady clip (as well as the sound of it moving across the paper) is enough to turn off my tendency to subvocalize; this alone allows me to reliably read non-fiction&lt;sup&gt;3&lt;/sup&gt; roughly twice as fast as I could before.&lt;/p&gt;

&lt;p&gt;As I’ve stopped subvocalizing, I now realize that I &lt;em&gt;see&lt;/em&gt; words rather than hearing them when I read, which makes it easier for me to parse them in blocks. By using more of my peripheral vision, I don’t have to scan all the way to the start of the line and all the way to the end in order to read. If you’ve ever observed experienced speed readers, you might have noticed they move their pacers almost vertically down the page; this is due to their using much more of their peripheral vision to scan each line.&lt;/p&gt;

&lt;p&gt;I’m hoping to get to the point where I can read 2,000 to 3,000 words per minute! I’ll share updates as I improve.&lt;/p&gt;

&lt;h3 id=&quot;writing&quot;&gt;Writing&lt;/h3&gt;
&lt;p&gt;This section’s more a mix of tools and practice.&lt;/p&gt;

&lt;p&gt;Before I wrote software, I wrote poems, and I’ve always loved to draw, so I have Some Opinions™ about writing implements. I also take a lot of notes for work, so here are some of the tools that work well for me.&lt;/p&gt;

&lt;p&gt;If you’re writing with a pencil, you want a Ticonderoga #2 pencil. It’s got everything: a balanced lead (not too hard, not too soft), erases cleanly (rather then somehow turning your mistake into a Schrödingeresque superposition of greasy smear and burnt hole in the paper), wide availablility, and low cost (roughly $0.20 each). (If you’re an artist, you may have harder or softer leads that you prefer; go with what you like!)&lt;/p&gt;

&lt;p&gt;For writing in ink, I used to really like Sharpie 0.8mm marker pens, but somewhere in 2016 I &lt;a href=&quot;https://www.washingtonpost.com/graphics/politics/2020/03/19/trump-greatest-sharpie-hits/&quot;&gt;lost my enthusiasm&lt;/a&gt;, so since then I’ve been relying on my trusty &lt;a href=&quot;https://www.lamy.com/en/lamy-safari/&quot;&gt;Lamy Safari&lt;/a&gt; fountain pen.&lt;/p&gt;

&lt;p&gt;Sometimes I like to write code or architecture diagrams out on a larger scale. As ubiquitous as whiteboards are in tech offices, I actually really prefer blackboards; I eventually want to get a good slate one for my home office, but for now, I’m making do with a blackboard decal on the wall. Luckily, I’ve managed to get my hands on some &lt;a href=&quot;https://www.amazon.com/HAGOROMO-Fulltouch-Color-Chalk-White/dp/B01HDNUXBW&quot;&gt;Hagoromo Fulltouch chalk&lt;/a&gt;. Note that this is &lt;em&gt;not&lt;/em&gt; the Japanese original; this version is made in South Korea, but using the exact same equipment—shipped from Japan—and manufacturing process (the Japanese proprietor taught the South Korean company how to produce it). The box arrived in perfect condition (not a single broken stick!), and each stick has a thin coating that starts about two-thirds of the way down that prevents you from getting chalk on your hands. It creates clear, bright lines, erases easily, and doesn’t create a lot of dust. Mathematicians have even ascribed &lt;a href=&quot;https://medium.com/@jeremyjkun/a-teary-goodbye-to-hagoromo-d29df12f3bce&quot;&gt;supernatural properties&lt;/a&gt; to it! 😂&lt;/p&gt;

&lt;p&gt;Moving on to writing systems (rather than pure tools), I’ve recently started learning Gregg simplified shorthand using &lt;a href=&quot;https://www.amazon.com/GREGG-Shorthand-Manual-Simplified/dp/0070245487&quot;&gt;this book&lt;/a&gt;. One of my responsibilities at work is to take notes during technical discussions, and even though I type very quickly (between 100 and 130 WPM), it’s not quite fast enough to keep up with real-time discussion. Learning Gregg shorthand (which I expect to take me about six months) is another high-leverage opportunity, eventually allowing me to write up to 300 WPM (much faster than my handwritten 30 WPM, and faster than most people speak).&lt;/p&gt;

&lt;p&gt;Finally, when writing by hand, I’ve found I really like &lt;a href=&quot;https://www.leuchtturm1917.us/notebooks/&quot;&gt;Leuchtturm 1917&lt;/a&gt; notebooks; the dotted pages make it much easier for me to ensure the proportions of my shorthand are correct (and therefore legible). The &lt;a href=&quot;https://www.leuchtturm1917.us/special-edition-red-dots-5-3-4-x-8-1-4-in.html&quot;&gt;special edition with red dots&lt;/a&gt; is my favorite.&lt;/p&gt;

&lt;h3 id=&quot;typing&quot;&gt;Typing&lt;/h3&gt;
&lt;p&gt;I spend a &lt;em&gt;lot&lt;/em&gt; of time typing at work, and in order to avoid repetitive stress injuries, I’ve recently switched over to an ergonomic split keyboard (the &lt;a href=&quot;https://ergodox-ez.com/&quot;&gt;Ergodox-EZ&lt;/a&gt;) with my own haphazardly implemented Vim layer (mostly for navigating using J-K-H-L). I opted for &lt;a href=&quot;https://www.cherrymx.de/en/mx-special/mx-clear.html&quot;&gt;Cherry clear switches&lt;/a&gt; because I type like the Incredible Hulk and don’t want to drive my coworkers insane, along with the tilt/tent kit and wrist rests for comfort (though &lt;a href=&quot;https://ergodox-ez.com/pages/customize&quot;&gt;without glow or shine&lt;/a&gt;). I’ve been using it for about six months and love it so far; I’m considering getting the &lt;a href=&quot;https://ergodox-ez.com/pages/planck&quot;&gt;Planck&lt;/a&gt; for travel/conferences. (They don’t offer the clears for the Planck, so I’ll probably go with Cherry Browns, or maybe Blues if I’m going to be by myself.) As mentioned, I use Vim extensively (not just for programming), and I’ve found it makes editing everything from code to book manuscripts to blog posts like this one much faster and more comfortable.&lt;/p&gt;

&lt;h3 id=&quot;in-conclusion&quot;&gt;In Conclusion&lt;/h3&gt;
&lt;p&gt;I hope some of these thoughts/recommendations have been helpful to you. I learned long ago to invest in the tools and processes I use frequently, and by making small, deliberate investments early, I hope to continue to reap long-term rewards for years to come.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The majority of sources I consulted suggest the average adult reads roughly 200 to &lt;a href=&quot;https://www.forbes.com/sites/brettnelson/2012/06/04/do-you-read-fast-enough-to-be-successful/#31fd47cf462e&quot;&gt;300 words per minute&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;This is no surprise to anyone who’s heard me talk (spoiler: super quickly!). If you’re like me, you might also benefit from watching YouTube videos on double speed, particularly for recordings of conference talks or lectures.&lt;/li&gt;
  &lt;li&gt;There’s nothing special about non-fiction, it’s just that I tend to read non-fiction for information, rather than enjoyment.&lt;/li&gt;
&lt;/ol&gt;
</description>
        <pubDate>Sat, 29 Feb 2020 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/tools/reading/writing/memory/2020/02/29/on-leverage/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/tools/reading/writing/memory/2020/02/29/on-leverage/</guid>
      </item>
    
      <item>
        <title>Reading List 2020</title>
        <description>&lt;p&gt;Time for the ol’ annual blog post! (Well… more on that below.)&lt;/p&gt;

&lt;h2 id=&quot;goals&quot;&gt;Goals&lt;/h2&gt;
&lt;p&gt;I added this section to my annual reading list blog post &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2019/01/03/reading-list-2019/&quot;&gt;last year&lt;/a&gt;, and I feel like it’s provided some much-needed structure to my self-directed learning. Let’s see how I did!&lt;/p&gt;

&lt;h3 id=&quot;math&quot;&gt;Math&lt;/h3&gt;
&lt;p&gt;I set out to cover two broad, somewhat meandering topics in mathematics in 2019:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The foundations of mathematics (logic, proofs, set theory)&lt;/li&gt;
  &lt;li&gt;Select topics in abstract algebra (primarily group and category theory)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I think this was the goal I made the most progress toward: I deepened my understanding of logic and now have a firm grasp of set theory and reading/writing proofs (at least for someone who isn’t a practicing mathematician). The books I found most helpful for exploring these topics were &lt;a href=&quot;https://www.amazon.com/Theory-Metric-Spaces-Chelsea-Publishing/dp/0821826948&quot;&gt;Set Theory and Metric Spaces&lt;/a&gt;, &lt;a href=&quot;https://www.amazon.com/Programmers-Introduction-Mathematics-Dr-Jeremy/dp/1727125452&quot;&gt;A Programmer’s Introduction to Mathematics&lt;/a&gt;, &lt;a href=&quot;https://www.amazon.com/How-Prove-Structured-Approach-2nd/dp/0521675995&quot;&gt;How to Prove It&lt;/a&gt;, and, weirdly, &lt;a href=&quot;https://www.amazon.com/Elements-Real-Analysis-Second/dp/047105464X&quot;&gt;The Elements of Real Analysis&lt;/a&gt;. I hadn’t really planned to do real analysis this year, but this book offered an overview of set theory (covering the algebra of sets, functions, and finite and infinite sets), the real numbers (including the Cantor set), and topology of Cartesian spaces. I skimmed the sections on convergence, continuous functions, and infinite series, and left the bulk of the book (infinite series, differentiation, and integration) for whenever I review calculus.&lt;/p&gt;

&lt;p&gt;Most of my group theory self-study was pretty ad-hoc and cobbled together from online sources (such as Wikipedia and Math Stack Exchange); I’d like to find a more structured resource in 2020. For category theory, I started digging into &lt;a href=&quot;https://github.com/hmemcpy/milewski-ctfp-pdf&quot;&gt;this book&lt;/a&gt; and &lt;a href=&quot;https://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_&quot;&gt;these lectures&lt;/a&gt; by Bartosz Milewski, and I’m loving it so far (I got about halfway through in 2019 and am nearly done now). I wasn’t quite ready for the &lt;a href=&quot;https://www.amazon.com/Categories-Working-Mathematician-Graduate-Mathematics/dp/0387984038&quot;&gt;Mac Lane book&lt;/a&gt;, but I’m excited to dig into it this year. The mathematical topics I’d like to cover in 2020 include &lt;a href=&quot;https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence#Curry%E2%80%93Howard%E2%80%93Lambek_correspondence&quot;&gt;the Curry-Howard-Lambek correspondence&lt;/a&gt; (the “Lambek” bit is new to me), mathematical logic, boolean algebra, and discrete math.&lt;/p&gt;

&lt;p&gt;I’m disappointed I didn’t get around to creating any &lt;a href=&quot;https://twitter.com/ericqweinstein/status/1079524045224259584&quot;&gt;math ‘zines&lt;/a&gt; in 2019, but it turned out I didn’t need to create them to get the level of understanding I was looking for. (I tend to do this by explaining topics to myself on my walk to and from work, filling in holes in my understanding when I get back to a book/computer; I later found out this is a variation on the &lt;a href=&quot;https://mattyford.com/blog/2014/1/23/the-feynman-technique-model&quot;&gt;Feynman technique&lt;/a&gt;.) I may still create ‘zines in 2020 if there’s interest, but it would be more for teaching/sharing than cementing my own understanding (though arguably I’d still derive value from structuring and ordering the topics for someone else).&lt;/p&gt;

&lt;h3 id=&quot;foreign-languages&quot;&gt;Foreign Languages&lt;/h3&gt;
&lt;p&gt;My audacious (and fuzzy) goal in 2019 was to somehow make progress on &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2019/01/03/reading-list-2019/&quot;&gt;all the languages I want to speak&lt;/a&gt; (some are languages I’ve learned and want to brush up on; others are pretty much new to me). As expected, an overly ambitious, blurry goal resulted in not much measurable progress, though I did get a ton of value out of &lt;a href=&quot;https://twitter.com/searls&quot;&gt;Justin Searls&lt;/a&gt;’ &lt;a href=&quot;https://www.kamesame.com/&quot;&gt;KameSame&lt;/a&gt; and will be using it in earnest this year.&lt;/p&gt;

&lt;p&gt;Learning from last time ‘round, this year I have two specific foreign language goals: to get to a Spanish &lt;a href=&quot;https://en.wikipedia.org/wiki/Common_European_Framework_of_Reference_for_Languages&quot;&gt;B1/B2&lt;/a&gt; and a Japanese &lt;a href=&quot;https://en.wikipedia.org/wiki/Japanese-Language_Proficiency_Test&quot;&gt;JLPT N4/N5&lt;/a&gt; by the end of the year. Also ambitious, but much less so than “master five languages lol” and much easier to measure. In the meantime, I’ll continue to read French and German and ideally participate in conversation (&lt;em&gt;e.g.&lt;/em&gt; our informal French group at work) in order to keep my existing abilities up.&lt;/p&gt;

&lt;p&gt;Okay! On to the new goals.&lt;/p&gt;

&lt;h3 id=&quot;programming&quot;&gt;Programming&lt;/h3&gt;
&lt;p&gt;I’ve tried to make note of the times in my career I’ve gotten dramatically better as a programmer (&lt;em&gt;e.g.&lt;/em&gt; attending the &lt;a href=&quot;https://www.recurse.com/&quot;&gt;Recurse Center&lt;/a&gt;, moving from a customer-facing application development team to an SRE team, designing my first major cross-team service), and I’d like to try to deliberately recreate that on my own in 2020. I’m still sort of putting together a self-study curriculum, but here are the broad topics (divided into 12-week deep-dive “batches,” similar in length/scope to a Recurse Center batch):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;01/01 - 03/25: Programming theory&lt;/strong&gt;: Haskell, category theory, and the lambda calculus (the &lt;a href=&quot;https://www.destroyallsoftware.com/screencasts/catalog&quot;&gt;Destroy All Software series on the lambda calculus&lt;/a&gt; is excellent).
&lt;strong&gt;04/08 - 07/01: Programming environment&lt;/strong&gt;: Go, Docker/containers, Kubernetes/container orchestration, and the Linux kernel.
&lt;strong&gt;07/08 - 08/30: Databases&lt;/strong&gt;: PostgreSQL, the relational calculus, and query optimization.
&lt;strong&gt;09/07 - 12/30: Optimization problems&lt;/strong&gt;: the Bellman equations (reinforcement learning, MDPs, dynamic programming), game theory, and statistics.&lt;/p&gt;

&lt;p&gt;I may change the content/order of these deep dives as I go along, but I tried to find topics where I have basic to advanced intermediate knowledge and really want to dig deep to learn more.&lt;/p&gt;

&lt;p&gt;Finally, as I hinted earlier, I think I could be more disciplined in my approach to tracking my learning progress and synthesizing new ideas, so in 2020, my goal is to blog on technical topics at least monthly.&lt;/p&gt;

&lt;p&gt;Whew! Okay. On to the reading list.&lt;/p&gt;

&lt;h2 id=&quot;books&quot;&gt;Books&lt;/h2&gt;
&lt;p&gt;I mostly read &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2019/01/03/reading-list-2019/&quot;&gt;what I set out to read in 2019&lt;/a&gt; (see below for the ones I’m rolling into next year). Here are a few extras I read:&lt;/p&gt;

&lt;h4 id=&quot;the-first-90-days&quot;&gt;&lt;a href=&quot;https://www.amazon.com/First-90-Days-Strategies-Expanded/dp/1422188612&quot;&gt;The First 90 Days&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Watkins&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was a &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/learning/2017/12/23/reading-list-2018/&quot;&gt;re-read&lt;/a&gt;, but I always learn something new each time I come back to it. I joined ZipRecruiter as director of engineering earlier this year, and this time around I found the sections on matching strategy to situation and achieving alignment especially valuable.&lt;/p&gt;

&lt;h4 id=&quot;unsolved&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Unsolved-History-Mystery-Greatest-Societies/dp/0691192294&quot;&gt;Unsolved!&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Craig Bauer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been interested in classical cryptography and historical oddities like the &lt;a href=&quot;https://en.wikipedia.org/wiki/Voynich_manuscript&quot;&gt;Voynich manuscript&lt;/a&gt; for awhile now, so I really enjoyed this as a kind of survey course of unsolved crypto-mysteries (ranging from undeciphered ancient writing systems to the cryptograms of the Zodiac Killer!).&lt;/p&gt;

&lt;h4 id=&quot;patterns-of-enterprise-application-architecture&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420&quot;&gt;Patterns of Enterprise Application Architecture&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Martin Fowler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While I read this more or less cover-to-cover, I think its real utility will be as a reference guide (especially the chapters on concurrency and distribution strategies).&lt;/p&gt;

&lt;h4 id=&quot;never-split-the-difference&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Never-Split-Difference-Negotiating-Depended-ebook/dp/B014DUR7L2&quot;&gt;Never Split the Difference&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Chris Voss&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I honestly didn’t expect to like this book (I was worried it would have too strong a “bro” vibe), but I actually really enjoyed it (less so for the war stories and more for the negotiation tactics and strategies). There was still a bit of swagger, but overall, I found it down-to-earth and self-aware.&lt;/p&gt;

&lt;h4 id=&quot;getting-to-yes&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Getting-Yes-Negotiating-Agreement-Without/dp/0143118757&quot;&gt;Getting to Yes&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Roger Fisher, William L. Ury, and Bruce Patton&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I picked this one up specifically because Chris Voss references it in &lt;em&gt;Never Split the Difference&lt;/em&gt; (generally in contrast to his own approach, which is derived from his years of training and experience as a hostage negotiator). I did find &lt;em&gt;Getting to Yes&lt;/em&gt; to be very academic and process-oriented, though I did glean some interesting insights (particularly around separating people from problems).&lt;/p&gt;

&lt;h4 id=&quot;the-leadership-pipeline&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Leadership-Pipeline-Build-Powered-Company/dp/0470894563&quot;&gt;The Leadership Pipeline&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ram Charan, Stephen Drotter, and James Noel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I read this on the recommendation of a friend and colleague of mine, and I particularly liked the idea that the pipeline zig-zags, illustrating that often during advancement, “what got you here” (the skills that made you stand out in your prior role) “won’t get you there” (are not necessarily the ones you need to excel in your new role). Speaking of…&lt;/p&gt;

&lt;h4 id=&quot;what-got-you-here-wont-get-you-there&quot;&gt;&lt;a href=&quot;https://www.amazon.com/What-Got-Here-Wont-There/dp/1401301304&quot;&gt;What Got You Here Won’t Get You There&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Marshall Goldsmith&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;…I picked this one up to dig further into the new skills I might need to acquire in order to succeed at increasingly higher levels (both personal growth level and company growth level, as covered in &lt;em&gt;The First 90 Days&lt;/em&gt; and &lt;em&gt;The Leadership Pipeline&lt;/em&gt;), but instead, this was more about identifying the weaknesses and bad habits one might have succeeded in spite of thus far and addressing them. Still useful, but not quite what I was looking for (luckily I borrowed it from the library).&lt;/p&gt;

&lt;h4 id=&quot;the-elements-of-real-analysis&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Elements-Real-Analysis-Second/dp/047105464X&quot;&gt;The Elements of Real Analysis&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Robert G. Bartle&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was just a general overview of real analysis; I found the early, foundational chapters on the algebra of sets, finite and infinite sets, and the topology of Cartesian spaces the most applicable.&lt;/p&gt;

&lt;h4 id=&quot;solving-mathematical-problems&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Solving-Mathematical-Problems-Personal-Perspective/dp/0199205604&quot;&gt;Solving Mathematical Problems&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Terence Tao&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was a quick read (absolutely doable in a single sitting), and I particularly enjoyed the general strategies for problem solving and the examples from number theory. Hard to believe he wrote this when he was just fifteen years old!&lt;/p&gt;

&lt;h4 id=&quot;software-design-decoded&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Software-Design-Decoded-Experts-Think-ebook/dp/B071CM2M1F&quot;&gt;Software Design Decoded&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Marian Petre, André van der Hoek, and Yen Quach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was hoping to glean some real insights from the experiences of seasoned developers, but was disappointed to find a Page-A-Day calendar of statements ranging from obvious (“Experts prefer solutions that they know work,” “Experts go as deep as needed,” “Experts know how things work”) to vaguely patronizing (“Experts focus on the essence,” “Experts use design methods (selectively)”).&lt;/p&gt;

&lt;h4 id=&quot;accelerate&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Accelerate-Software-Performing-Technology-Organizations-ebook/dp/B07B9F83WM&quot;&gt;Accelerate&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Nicole Forsgren, PhD, Jez Humble, and Gene Kim&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This book was the result of several years of studies conducted on the effect of lean, agile, and DevOps strategies/mindsets as applied to software engineering teams, with the aim of identifying what distinguishes high-performing teams from low-performing teams. These studies mostly affirmed my experiences and instincts around testing (such as who should write tests, their correlation with success, &amp;amp;c), architecture, management, and the role of DevOps/SRE in an organization, but it was good to see these beliefs backed up by concrete data. I particularly liked the section on servant leadership vs. transformational leadership.&lt;/p&gt;

&lt;h4 id=&quot;strategize-to-win&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Strategize-Win-Start-Step-Career-ebook/dp/B00L9B7LU6&quot;&gt;Strategize to Win&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Carla A. Harris&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was a selection for our tech management book club at work. The “Starting Out” section was less relevant for me (choosing a career, acquiring necessary skills, and so on), but I found the “Stepping Up” section very useful—particularly the ideas of performance currency and relationship currency, which put into words an idea I’d formed years ago: high performance gets you your initial recognition, but relationship-building is what opens the door to advancement (whether networking for your next job, raising money for your next venture, or rising through the ranks of executive leadership).&lt;/p&gt;

&lt;h4 id=&quot;a-philosophy-of-software-design&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Philosophy-Software-Design-John-Ousterhout-ebook/dp/B07N1XLQ7D&quot;&gt;A Philosophy of Software Design&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;John Ousterhout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I technically finished this one in the first week of 2020, but started and read most of in 2019. I thought this was a thoughtful, well-structured approach to software design, and I agreed with most of it (particularly around the role and handling of errors and the preference for “deep” modules whose simple abstractions/API provide high-leverage access to powerful internal logic), but I wasn’t sold on the author’s opinion of TDD (that it’s “tactical-only” and tends to incur debt). I view tests not only as indications of correctness, but as living documentation and powerful design tools, and I’d like to see that viewpoint expressed more widely. (Maybe this is an instance where I need to be the change I want to see in the world.)&lt;/p&gt;

&lt;h4 id=&quot;deaf-republic&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Deaf-Republic-Poems-Ilya-Kaminsky-ebook/dp/B07GDD1BFV&quot;&gt;Deaf Republic&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ilya Kaminsky&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://pbs.twimg.com/media/D-aEWxOXoAAxdbW.jpg&quot; alt=&quot;We Lived Happily During the War (Poem)&quot; /&gt;&lt;/p&gt;

&lt;p&gt;These poems are astounding. You should read them.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Here are the books I want to read in 2020, starting with the four books I’ve rolled over from 2019:&lt;/p&gt;

&lt;h4 id=&quot;categories-for-the-working-mathematician&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Categories-Working-Mathematician-Graduate-Mathematics/dp/1441931236&quot;&gt;Categories for the Working Mathematician&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Saunders Mac Lane&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As I mentioned last year, I want to more deeply understand the relationships between category theory and programming, and I think this book will help me better grasp the theoretical foundations I’ve started building with Bartosz’s lectures.&lt;/p&gt;

&lt;h4 id=&quot;abstract-algebra&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Abstract-Algebra-I-N-Herstein/dp/0471368792&quot;&gt;Abstract Algebra&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;I. H. Herstein&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Groups, rings, and fields have come up in my category theory reading, so I’d like to take something of a side-quest into various topics in abstract algebra to better understand how these objects interact.&lt;/p&gt;

&lt;h4 id=&quot;machine-ethics&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Machine-Ethics-Michael-Anderson/dp/0521112354&quot;&gt;Machine Ethics&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Anderson and Susan Leigh Anderson, Editors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve read through a few of the papers in this anthology (and even &lt;a href=&quot;https://www.youtube.com/watch?v=-9V1TQ49vmI&quot;&gt;gave a talk&lt;/a&gt; on machine ethics a couple of years ago), and I think this text will be really generative (with regard to my interest in the intersection of human and machine problems).&lt;/p&gt;

&lt;h4 id=&quot;the-history-of-western-philosophy&quot;&gt;&lt;a href=&quot;https://www.amazon.com/History-Western-Philosophy-Bertrand-Russell/dp/0671201581&quot;&gt;The History of Western Philosophy&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Bertrand Russell&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve read bits and pieces starting in college (I think sections of it were required reading for one of my philosophy courses), but in 2020 I’d like to finally read the whole thing.&lt;/p&gt;

&lt;p&gt;And here are the new books I want to read in 2020:&lt;/p&gt;

&lt;h4 id=&quot;the-oxford-handbook-of-philosophy-of-mathematics-and-logic&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Oxford-Handbook-Philosophy-Mathematics-Handbooks/dp/0195325923&quot;&gt;The Oxford Handbook of Philosophy of Mathematics and Logic&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Stewart Shapiro, Editor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m particularly interested in the chapters on Wittgenstein, intuitionism in mathematics, and higher-order logic.&lt;/p&gt;

&lt;h4 id=&quot;an-elegant-puzzle-systems-of-engineering-management&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Elegant-Puzzle-Systems-Engineering-Management-ebook/dp/B07QYCHJ7V&quot;&gt;An Elegant Puzzle: Systems of Engineering Management&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Will Larson&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve read probably around a dozen books on engineering management, but this is the first one I’ve encountered that meshes the challenges of people management with systems thinking. I may end up writing a full blog post about this book later this year!&lt;/p&gt;

&lt;h4 id=&quot;elements-of-clojure&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Elements-Clojure-Zachary-Tellman/dp/0359360580&quot;&gt;Elements of Clojure&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Zachary Tellman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I cheated a bit and read the first several pages, and I’m already hooked. I get the feeling I’m going to learn a lot more about software engineering than just Clojure programming.&lt;/p&gt;

&lt;h4 id=&quot;naming-and-necessity&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Naming-Necessity-Saul-Kripke/dp/0631128018&quot;&gt;Naming and Necessity&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Saul Kripke&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This has been on my philosophy “to-read” pile for awhile, and given that it’s mentioned in the first chapter of  &lt;em&gt;Elements of Clojure&lt;/em&gt;, I think it’s time I read it.&lt;/p&gt;

&lt;h4 id=&quot;the-new-peoplemaking&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0831400706&quot;&gt;The New Peoplemaking&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Virginia Satir&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the first of several books (ending with &lt;em&gt;The Mismeasure of Man&lt;/em&gt;, below) recommended to me by Rein Henrichs, with whom I worked when I was consulting with &lt;a href=&quot;https://www.testdouble.com/&quot;&gt;Test Double&lt;/a&gt;. &lt;em&gt;The New Peoplemaking&lt;/em&gt; is about communication and interpersonal dynamics in the context of a family, but I get the sense it has a lot to teach about other domains as well (work, friend groups, other local communities).&lt;/p&gt;

&lt;h4 id=&quot;computer-power-and-human-reason&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0716704633&quot;&gt;Computer Power and Human Reason&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Joseph Weizenbaum&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is very much in the machine ethics/intersection of computation and philosophy area of my reading, and I’m particularly interested to see how prescient the author was in his arguments about the nature and future of AI (&lt;em&gt;Computer Power and Human Reason&lt;/em&gt; came out in 1976).&lt;/p&gt;

&lt;h4 id=&quot;having-thought-essays-in-the-metaphysics-of-mind&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0674382331&quot;&gt;Having Thought: Essays in the Metaphysics of Mind&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;John Haugeland&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;More philosophy! Having browsed the table of contents, I’m particularly interested in the chapters on Hume, supervenience, Dennett, and Searle.&lt;/p&gt;

&lt;h4 id=&quot;sources-of-power-how-people-make-decisions&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0262534290&quot;&gt;Sources of Power: How People Make Decisions&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Gary A. Klein&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In particular, this book is on how experts make decisions (rather than how someone makes decisions in a domain that’s brand-new to them).&lt;/p&gt;

&lt;h4 id=&quot;the-mismeasure-of-man&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0393314251&quot;&gt;The Mismeasure of Man&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Stephen Jay Gould&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the Amazon reviews on this one describes it as “an important reminder of what IQ measurement really is and the ugly racist history that has long plagued the field.” 💯 💯 💯&lt;/p&gt;

&lt;h4 id=&quot;the-anatomy-of-peace-resolving-the-heart-of-conflict&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B00SGET4BS&quot;&gt;The Anatomy of Peace: Resolving the Heart of Conflict&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;The Arbinger Institute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one was recommended to my by my friend and former colleague Michael Schoonmaker. Like &lt;em&gt;The New Peoplemaking&lt;/em&gt;, its focus is on family but I think it’ll be applicable in a wide variety of situations.&lt;/p&gt;

&lt;h4 id=&quot;managing-up&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Managing-Up-Move-Work-Succeed-ebook/dp/B07BB4QFDF&quot;&gt;Managing Up&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Mary Abbajay&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This will be our tech management book club pick for February, and I’m interested in reading it not just as an employee with a boss, but as someone who serves as someone else’s boss (and in that capacity, have my own habits and predispositions that others might need to manage).&lt;/p&gt;

&lt;h4 id=&quot;the-making-of-a-manager&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Making-Manager-What-Everyone-Looks/dp/0735219567&quot;&gt;The Making of a Manager&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Julie Zhuo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m particularly interested in this book because the author emphasizes her ramp-up into management, whereas most management books I read are more retrospective (written by leaders after they’ve worked as managers for many years, if not decades).&lt;/p&gt;

&lt;h4 id=&quot;the-art-of-readable-code&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B0064CZ1XE&quot;&gt;The Art of Readable Code&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Dustin Boswell and Trevor Foucher&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dustin did a lot of foundational work on our search team at ZipRecruiter, so I’m interested to get his general take on writing maintainable software.&lt;/p&gt;

&lt;h4 id=&quot;database-internals&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B07XW76VHZ&quot;&gt;Database Internals&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Alex Petrov&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m especially interested in this one as the informal textbook for my third Recurse Center-style deep-dive (see &lt;strong&gt;Programming&lt;/strong&gt;, above).&lt;/p&gt;

&lt;h4 id=&quot;designing-data-intensive-applications&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B06XPJML5D&quot;&gt;Designing Data-Intensive Applications&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Martin Kleppmann&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve heard nothing but great things about this book, which covers all sorts of tradeoffs, considerations, and challenges encountered while scaling distributed systems, and I am probably unreasonably excited to read it.&lt;/p&gt;

&lt;h4 id=&quot;the-left-hand-of-darkness&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0441007317&quot;&gt;The Left Hand of Darkness&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ursula K. LeGuin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I really enjoyed Cixin Liu’s &lt;em&gt;The Three-Body Problem&lt;/em&gt;, and I realized I’ve been neglecting my fiction reading for way too long. While poetry books aren’t super long, I tend to bucket my fiction and poetry reading together, so this year, I’m going to intentionally &lt;em&gt;not&lt;/em&gt; commit to reading any particular poetry collections in order to focus more on fiction. Further, none of this fiction is actually new—these are books I’ve been meaning to read forever and haven’t gotten to (and LeGuin is at the top of that list).&lt;/p&gt;

&lt;h4 id=&quot;riddley-walker&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/1408832240&quot;&gt;Riddley Walker&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Russell Hoban&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Modern dystopias call for dystopian science fiction!&lt;/p&gt;

&lt;h4 id=&quot;ringworld&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0575077026&quot;&gt;Ringworld&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Larry Niven&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m actually pretty sure I read &lt;em&gt;Ringworld&lt;/em&gt; in high school, but I remember pretty much none of it, so I’ll give it (another?) go.&lt;/p&gt;

&lt;h4 id=&quot;snow-crash&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0553380958&quot;&gt;Snow Crash&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Neal Stephenson&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is one I’ve been meaning to read since I first heard about it (which I think was something like 15 years ago).&lt;/p&gt;

&lt;h2 id=&quot;papers&quot;&gt;Papers&lt;/h2&gt;
&lt;p&gt;I did indeed read fewer papers in 2019 than when I was in grad school, though I managed to read all the ones I set out to. Here are the additional papers I read beyond those:&lt;/p&gt;

&lt;h4 id=&quot;the-part-time-parliament&quot;&gt;&lt;a href=&quot;https://lamport.azurewebsites.net/pubs/lamport-paxos.pdf&quot;&gt;The Part-Time Parliament&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Leslie Lamport&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper was actually pretty entertaining, though I have to admit I don’t understand the protocol well enough to implement it based on this paper. (Having the Raft paper, below, and talked with some of my coworkers, it sounds like I’m not alone here.)&lt;/p&gt;

&lt;h4 id=&quot;paxos-made-simple&quot;&gt;&lt;a href=&quot;https://lamport.azurewebsites.net/pubs/paxos-simple.pdf&quot;&gt;Paxos Made Simple&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Leslie Lamport&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper makes good on the promise of the title (at least, made simple&lt;em&gt;r&lt;/em&gt;).&lt;/p&gt;

&lt;h4 id=&quot;in-search-of-an-understandable-consensus-algorithm-extended-version&quot;&gt;&lt;a href=&quot;https://raft.github.io/raft.pdf&quot;&gt;In Search of an Understandable Consensus Algorithm (Extended Version)&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Diego Ongaro and John Ousterhout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AKA the Raft paper. This consensus algorithm was much more approachable than Paxos, and I thought the writing was particularly clear for an academic paper (one of the co-authors is the same Ousterhout as the author of &lt;em&gt;A Philosophy of Software Design&lt;/em&gt;, above!).&lt;/p&gt;

&lt;h4 id=&quot;dynamo-amazons-highly-available-key-value-store&quot;&gt;&lt;a href=&quot;https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf&quot;&gt;Dynamo: Amazon’s Highly Available Key-Value Store&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Giuseppe DeCandia &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The title pretty much says it all. (I’ll be pretty brief with my descriptions of these last several papers, since they’re more or less just descriptions of the underlying data models/algorithms, but I’ll note any surprising insights or interesting tradeoffs.)&lt;/p&gt;

&lt;h4 id=&quot;cassandra---a-decentralized-structured-storage-system&quot;&gt;&lt;a href=&quot;https://www.cs.cornell.edu/projects/ladis2009/papers/lakshman-ladis2009.pdf&quot;&gt;Cassandra - A Decentralized Structured Storage System&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Avinash Lakshman and Prashant Malik&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cassandra’s data model is derived from Google’s Bigtable (see next paper).&lt;/p&gt;

&lt;h4 id=&quot;bigtable-a-distributed-storage-system-for-structured-data&quot;&gt;&lt;a href=&quot;https://static.googleusercontent.com/media/research.google.com/en//archive/bigtable-osdi06.pdf&quot;&gt;Bigtable: A Distributed Storage System for Structured Data&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Fay Chang &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This &lt;a href=&quot;https://cloud.google.com/bigtable/docs&quot;&gt;powers a bunch of core Google services&lt;/a&gt;, including search and Gmail!&lt;/p&gt;

&lt;h4 id=&quot;kafka-a-distributed-messaging-system-for-log-processing&quot;&gt;&lt;a href=&quot;http://notes.stephenholiday.com/Kafka.pdf&quot;&gt;Kafka: a Distributed Messaging System for Log Processing&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jay Kreps, Neha Narkhede, and Jun Rao&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We’re starting to adopt Kafka for more and more use cases at work, so I thought it’d be a good idea to refer back to the paper (especially regarding delivery guarantees).&lt;/p&gt;

&lt;h4 id=&quot;mapreduce-simplified-data-processing-on-large-clusters&quot;&gt;&lt;a href=&quot;https://static.googleusercontent.com/media/research.google.com/en//archive/mapreduce-osdi04.pdf&quot;&gt;MapReduce: Simplified Data Processing on Large Clusters&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jeffrey Dean and Sanjay Ghemawat&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I think I expected this paper to be more groundbreaking/illuminating, but that’s likely because the general pattern for parallelizing computations over huge datasets isn’t really “new” anymore (this paper is over 15 years old!).&lt;/p&gt;

&lt;h4 id=&quot;spanner-googles-globally-distributed-database&quot;&gt;&lt;a href=&quot;https://static.googleusercontent.com/media/research.google.com/en//archive/spanner-osdi2012.pdf&quot;&gt;Spanner: Google’s Globally-Distributed Database&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;James C. Corbett &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I thought it was pretty cool that Spanner instances are Paxos state machines, and I particularly appreciated the details around the specifics of Google’s Paxos implementation.&lt;/p&gt;

&lt;h4 id=&quot;the-google-file-system&quot;&gt;&lt;a href=&quot;https://static.googleusercontent.com/media/research.google.com/en//archive/gfs-sosp2003.pdf&quot;&gt;The Google File System&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;First, component failures are the norm rather than the exception.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This paper really drove home for me the inevitability of failure in large, distributed systems, and part of the reason why our move to Kubernetes at work hasn’t been as conceptually difficult for me as it otherwise probably would be. (This is probably true of many of the distributed systems papers I’ve read, but few call out failure as the norm quite so explicitly.)&lt;/p&gt;

&lt;h4 id=&quot;amazon-aurora-design-considerations-for-high-throughput-cloud-native-relational-databases&quot;&gt;&lt;a href=&quot;https://www.allthingsdistributed.com/files/p1041-verbitski.pdf&quot;&gt;Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Alexandre Verbitski &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The paper is a good overview of Aurora, though there are a couple of areas that I would have preferred be more explicit. For instance, while the paper notes that:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The database engine is a fork of “community” MySQL/InnoDB and diverges primarily in how InnoDB reads and writes data to disk&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;…it doesn’t explicitly mention that it disables InnoDB’s change buffer (though a careful reader can infer this). As a result, it’s very possible to read the paper and not realize the performance penalty for tables with lots of secondary indices (normally, MySQL uses the change buffer to lazily merge updates to these indices, but without the change buffer enabled, these updates have to be write-through).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Finally, here the papers I want to read in 2020 (hopefully I’ll pick up a few more along the way):&lt;/p&gt;

&lt;h4 id=&quot;making-reliable-distributed-systems-in-the-presence-of-software-errors&quot;&gt;&lt;a href=&quot;http://erlang.org/download/armstrong_thesis_2003.pdf&quot;&gt;Making Reliable Distributed Systems in the Presence of Software Errors&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Joe Armstrong&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was Joe Armstrong’s doctoral thesis, and at almost 300 pages it’s probably more of a book than a paper, but I’ll include it here so I have an excuse when I only read one paper this year!&lt;/p&gt;

&lt;h4 id=&quot;similarity-of-neural-network-representations-revisited&quot;&gt;&lt;a href=&quot;http://www.cs.toronto.edu/~hinton/absps/similarity.pdf&quot;&gt;Similarity of Neural Network Representations Revisited&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Geoffrey Hinton &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These last three papers are all machine learning papers by Geoff Hinton’s team; this one’s on about comparing different neural network representations.&lt;/p&gt;

&lt;h4 id=&quot;when-does-label-smoothing-help&quot;&gt;&lt;a href=&quot;http://www.cs.toronto.edu/~hinton/absps/smoothing.pdf&quot;&gt;When Does Label Smoothing Help?&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Geoffrey Hinton &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Label smoothing is a common tool for improving generalization in multi-class neural networks, but it’s not really well understood &lt;em&gt;why&lt;/em&gt; it works. I’m hoping this paper sheds some more light on the topic.&lt;/p&gt;

&lt;h4 id=&quot;lookahead-optimizer-k-steps-forward-1-step-back&quot;&gt;&lt;a href=&quot;http://www.cs.toronto.edu/~hinton/absps/lookahead.pdf&quot;&gt;Lookahead Optimizer: &lt;em&gt;k&lt;/em&gt; steps forward, 1 step back&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Geoffrey Hinton &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, this paper is about a new optimization algorithm for improving stochastic gradient descent in deep neural networks.&lt;/p&gt;

&lt;p&gt;Off we go!&lt;/p&gt;
</description>
        <pubDate>Fri, 31 Jan 2020 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2020/01/31/reading-list-2020/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2020/01/31/reading-list-2020/</guid>
      </item>
    
      <item>
        <title>Reading List 2019</title>
        <description>&lt;p&gt;It’s that time of year again!&lt;/p&gt;

&lt;h2 id=&quot;goals&quot;&gt;Goals&lt;/h2&gt;
&lt;p&gt;This is a new section in my annual reading list blog post (see &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/learning/2017/12/23/reading-list-2018/&quot;&gt;2018&lt;/a&gt;, &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/2016/12/27/reading-list-2017/&quot;&gt;2017&lt;/a&gt;, and &lt;a href=&quot;http://ericweinste.in/reading/learning/2015/12/27/reading-list-2016/&quot;&gt;2016&lt;/a&gt;). I’ve realized it’s a really valuable way to structure my overall yearly reading (which in turn provides me with a metric for quitting books I don’t find useful—something I’ve always struggled with—as well as adding books as I discover new interests). This year, my goals are to (re)learn the following:&lt;/p&gt;

&lt;h3 id=&quot;math&quot;&gt;Math&lt;/h3&gt;
&lt;p&gt;While finishing my master’s degree in computer science at Georgia Tech, I realized that 1.) I really enjoy math, and 2.) most of why I believed I &lt;em&gt;didn’t&lt;/em&gt; enjoy math was because I don’t like how it’s taught in American schools, so I’m starting a self-study course in mathematics. This year I want to cover:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Logic, proofs, and set theory&lt;/li&gt;
  &lt;li&gt;Abstract algebra, group theory, and category theory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that (this is a fuzzier list, since it’s years-long and I haven’t gotten far enough into these topics to build out a solid self-study curriculum; topics and ordering may change):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Mathematical logic and boolean algebra&lt;/li&gt;
  &lt;li&gt;Number theory and ring theory&lt;/li&gt;
  &lt;li&gt;Field theory, algebraic topology, and point-set topology&lt;/li&gt;
  &lt;li&gt;The “rest of” discrete math (combinatorics, graph theory, tree theory, and finite state automata)&lt;/li&gt;
  &lt;li&gt;Real numbers &amp;amp; real analysis, complex numbers &amp;amp; complex analysis&lt;/li&gt;
  &lt;li&gt;Geometry and linear algebra&lt;/li&gt;
  &lt;li&gt;Functional analysis&lt;/li&gt;
  &lt;li&gt;Differential equations&lt;/li&gt;
  &lt;li&gt;Probability and statistics (review)&lt;/li&gt;
  &lt;li&gt;Game theory (review)&lt;/li&gt;
  &lt;li&gt;Single-variable differential and integral calculus (review) and multivariable calculus (some review, some new)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I imagine these as sort of self-driven survey courses, though I expect to do a deep dive on one or two topics that I find particularly interesting (I think I’m already inclined toward set theory, model theory, and other areas of &lt;a href=&quot;https://en.wikipedia.org/wiki/Mathematical_logic&quot;&gt;mathematical logic&lt;/a&gt;). In order to solidify my learning (and prove to myself that I have some sense of what I’m talking about), I’ve made a &lt;a href=&quot;https://twitter.com/ericqweinstein/status/1079524045224259584&quot;&gt;New Year’s resolution&lt;/a&gt; to create &lt;a href=&quot;https://wizardzines.com/&quot;&gt;Julia Evans-style ‘zines&lt;/a&gt; that teach the math topics I’m learning about! Specifically, I’m committing to quarterly ‘zines, tentatively on basic set theory, quantified predicate logic, group theory, and category theory, but hopefully I’ll get the chance to do more.&lt;/p&gt;

&lt;h3 id=&quot;foreign-languages&quot;&gt;Foreign Languages&lt;/h3&gt;
&lt;p&gt;A good friend of mine pointed out last year that I “half-speak” several languages, so I want to dedicate 2019 (and onward!) to fully speaking the languages I want to speak. Those languages are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;French (at my peak, I was probably at a &lt;a href=&quot;https://en.wikipedia.org/wiki/Common_European_Framework_of_Reference_for_Languages#Common_reference_levels&quot;&gt;C1 level&lt;/a&gt;; I’d like to regain that)&lt;/li&gt;
  &lt;li&gt;German (I was probably at a B1 level at my best; I’d like to get to a B2 or C1 level this year)&lt;/li&gt;
  &lt;li&gt;Spanish (I can read/understand a lot of Spanish, but have never studied it formally)&lt;/li&gt;
  &lt;li&gt;Mandarin (my wife and I took a class a couple of years ago and I continue to hover around &lt;a href=&quot;https://en.wikipedia.org/wiki/Hanyu_Shuiping_Kaoshi#Current_structure_(since_2010)&quot;&gt;HSK 1&lt;/a&gt;; I’d like to get to HSK 3 this year)&lt;/li&gt;
  &lt;li&gt;Japanese (I can slowly read hiragana and katakana, but my grammar and vocabulary are super, super basic)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This seems like a super tall order, mostly because it is. I think the goals for French, German, and Chinese are fairly clear and attainable; for Spanish, I’d like to take an introductory course sometime this year, and for Japanese, I’d like to be able to communicate with Japanese speakers at the next &lt;a href=&quot;https://rubykaigi.org/2019&quot;&gt;RubyKaigi&lt;/a&gt;. (Like my math self-study program, this language learning will probably be a years-long effort that evolves over time.)&lt;/p&gt;

&lt;p&gt;Whew! Okay. On to the reading list!&lt;/p&gt;

&lt;h2 id=&quot;books&quot;&gt;Books&lt;/h2&gt;
&lt;p&gt;I mostly read &lt;a href=&quot;http://ericweinste.in/programming/culture/reading/poetry/learning/2017/12/23/reading-list-2018/&quot;&gt;what I set out to read in 2018&lt;/a&gt; (see below for the ones I’m rolling into next year). Here are a few extras I read (as you can see, I took an interest in financial markets):&lt;/p&gt;

&lt;h4 id=&quot;bible-of-options-strategies-2nd-edition&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Bible-Options-Strategies-Definitive-Practical/dp/0133964027&quot;&gt;Bible of Options Strategies (2nd Edition)&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Guy Cohen&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been interested in derivatives markets for a bit, but 2018 was the first time I learned about (and traded!) options.&lt;/p&gt;

&lt;h4 id=&quot;the-little-book-of-currency-trading&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Little-Book-Currency-Trading-Profits/dp/047077035X&quot;&gt;The Little Book of Currency Trading&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Kathy Lien&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I initially picked this book up to better understand crypto markets (which I think are more akin to currency markets than equity markets), but ended up learning a lot about (and gaining an appreciation for) ForEx trading. I also learned some techniques to apply to equity and derivates markets (&lt;em&gt;e.g.&lt;/em&gt; time spent in range vs. in trend, setting stops, having exit strategies, knowing my psychological profile).&lt;/p&gt;

&lt;h4 id=&quot;what-i-learned-losing-a-million-dollars&quot;&gt;&lt;a href=&quot;https://www.amazon.com/What-Learned-Losing-Million-Dollars-ebook/dp/B00MNMHBA0&quot;&gt;What I Learned Losing a Million Dollars&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jim Paul and Brendan Moynihan&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wasn’t a huge fan of this book (I was turned off by Jim Paul’s folksy, swaggering, frat boy persona), but it did have some interesting takeaways: don’t internalize/personalize losses, cut losses quickly and let winning trades continue, your entry point should be a function of your exit point and not vice-versa (both were also mentioned in &lt;em&gt;The Little Book of Currency Trading&lt;/em&gt;), don’t overvalue low-probability, high-return opportunities, and don’t undervalue high-probability, low-return opportunities, get fresh/outside perspectives, and preoccupation with being right means you’re betting, not investing. I really liked this quote (clearly written by Moynihan rather than Paul):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;“To repeat the leitmotiv of the book thus far: people lose (really lose, not just have occasional losing trades) because of psychological factors, not analytical ones. They personalize the market and their positions, internalizing what should be external losses, confusing the different types of risk activities, and making crowd trades.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4 id=&quot;when-genius-failed&quot;&gt;&lt;a href=&quot;https://www.amazon.com/When-Genius-Failed-Long-Term-Management/dp/0375758259&quot;&gt;When Genius Failed&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Roger Lowenstein&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was a great account of the meteoric rise and brutal fall of &lt;a href=&quot;https://en.wikipedia.org/wiki/Long-Term_Capital_Management&quot;&gt;Long-Term Capital Management&lt;/a&gt;, and I wholeheartedly recommend it (not only for Lowenstein’s writing and storytelling, but to understand the extent to which Wall Street will let medium-talented white dudes repeatedly fail, burning horrifying amounts of time and money in the process).&lt;/p&gt;

&lt;h4 id=&quot;flash-boys&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Flash-Boys-Wall-Street-Revolt/dp/0393351599&quot;&gt;Flash Boys&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Lewis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I read a few of Michael Lewis’ books last year, and I’ve been interested in high-frequency trading since taking Machine Learning for Trading as part of my master’s degree, so I figured this would be a good read. This is another one I’d recommend, especially having just read &lt;em&gt;When Genius Failed&lt;/em&gt; (spoiler: you can crash and burn in spectacular ways as a trader and still be able to convince people to give you capital to manage, but back up the wrong file as a lowly software engineer and the Feds will be at your door).&lt;/p&gt;

&lt;h4 id=&quot;digital-gold&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Digital-Gold-Bitcoin-Millionaires-Reinvent/dp/006236250X&quot;&gt;Digital Gold&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Nathaniel Popper&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I &lt;a href=&quot;https://www.auxplatform.com/&quot;&gt;started a blockchain company&lt;/a&gt; in late 2017, so I’ve read a bunch of financial and cryptocurrency books/papers over the past year. Most of my work has been in &lt;a href=&quot;https://ethereum.org/&quot;&gt;Ethereum&lt;/a&gt;, and &lt;em&gt;Digital Gold&lt;/em&gt; is almost exclusively about &lt;a href=&quot;https://en.wikipedia.org/wiki/Bitcoin&quot;&gt;Bitcoin&lt;/a&gt; (specifically, its rise and the cast of characters that powered it). This was an entertaining read, but I’m not sure I learned much.&lt;/p&gt;

&lt;h4 id=&quot;blockchain-revolution&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Blockchain-Revolution-Technology-Cryptocurrencies-Changing/dp/1101980141&quot;&gt;Blockchain Revolution&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Don Tapscott and Alex Tapscott&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even though this is the updated 2018 edition (covering the ICO wave of 2017 and the rise of non-fungible tokens), again, I didn’t feel like I learned a ton from this one (though it could be that running the tech org for a blockchain startup forces me to stay hyper-current). I did like that this one focused on a range of crypto-assets, not just Bitcoin, and explored the broader implications of blockchain technology.&lt;/p&gt;

&lt;h4 id=&quot;the-five-rules-for-successful-stock-investing&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Five-Rules-Successful-Stock-Investing/dp/0471686174&quot;&gt;The Five Rules for Successful Stock Investing&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Pat Dorsey&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although Dorsey strikes me as something of a value investor (I tend to be more interested in growth stocks), I found a lot to like in this book. I particularly liked learning about the various accounting statements, the figures that appear on them, and their implications for company health (&lt;em&gt;e.g&lt;/em&gt; free cash flow divided by revenue tells us what proportion of each dollar in revenue the company is able to turn into excess profits).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Here are the books I want to read in 2019, starting with the eight books I’ve rolled over from 2018 (I rolled over more than usual; it turns out having a baby, finishing grad school, and &lt;a href=&quot;https://www.auxplatform.com/&quot;&gt;starting a company&lt;/a&gt; really eat into your free time):&lt;/p&gt;

&lt;h4 id=&quot;type-driven-development-with-idris&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/1617293024&quot;&gt;Type-Driven Development with Idris&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Edwin Brady&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I did some reading and work on &lt;a href=&quot;http://www.idris-lang.org/&quot;&gt;Idris&lt;/a&gt; a couple of years ago, and I’m finally starting to hit my stride as a Haskell programmer, so I’m really excited to finally read Edwin’s book this year.&lt;/p&gt;

&lt;h4 id=&quot;first-break-all-the-rules&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B002IU6LR6&quot;&gt;First, Break All the Rules&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Marcus Buckingham and Curt Coffman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As mentioned before, I’ve heard good things about this book at each of the last four places I’ve worked, so it’s probably high time I read it.&lt;/p&gt;

&lt;h4 id=&quot;a-billion-voices-chinas-search-for-a-common-language&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0734399596&quot;&gt;A Billion Voices: China’s Search for a Common Language&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;David Moser&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This book was recommended by my Mandarin teacher, and I think it’ll be really interesting to see how modern Mandarin arose from a highly fragmented set of spoken languages and traditions.&lt;/p&gt;

&lt;h4 id=&quot;the-three-body-problem&quot;&gt;&lt;a href=&quot;&quot;&gt;The Three-Body Problem&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Cixin Liu&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m also including the two sequels, &lt;a href=&quot;https://www.amazon.com/Dark-Forest-Remembrance-Earths-Past/dp/0765386690&quot;&gt;The Dark Forest&lt;/a&gt; and &lt;a href=&quot;https://www.amazon.com/Deaths-End-Remembrance-Earths-Past/dp/0765386631&quot;&gt;Death’s End&lt;/a&gt;!&lt;/p&gt;

&lt;h4 id=&quot;english-grammar-for-students-of-german&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0934034389&quot;&gt;English Grammar for Students of German&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Cecile Zorach &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As mentioned, my German has gone a bit downhill since I first started learning in high school, and while my pronunciation is still pretty good and vocabulary comes back to me quickly, I don’t feel I have as firm a grammatical footing as I’d like. Hopefully reading this book and practicing my spoken German helps with that!&lt;/p&gt;

&lt;h4 id=&quot;working-effectively-with-legacy-code&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0131177052&quot;&gt;Working Effectively with Legacy Code&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Feathers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Last year, I said that “this book has been recommended to me by too many people for me to continue not reading it.” This is still true.&lt;/p&gt;

&lt;h4 id=&quot;high-output-management&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B015VACHOK&quot;&gt;High Output Management&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Andrew S. Grove&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was recommended to me at a conference I attended last year. Andrew Grove was employee number three at Intel and has built some really impressive teams in the course of his career, so I’m looking forward to reading his story and learning from his mistakes.&lt;/p&gt;

&lt;h4 id=&quot;consciousness-explained&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B01N807LD2&quot;&gt;Consciousness Explained&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Daniel Dennett&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been a big fan of Dennett’s work since college (I focused on philosophy of physics and theory of mind), and I’m particularly interested in this book and its view of consciousness as a continuum.&lt;/p&gt;

&lt;h4 id=&quot;how-to-prove-it-2nd-edition&quot;&gt;&lt;a href=&quot;https://www.amazon.com/How-Prove-Structured-Approach-2nd/dp/0521675995&quot;&gt;How to Prove It, 2nd Edition&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Daniel J. Velleman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first of many math/logic books! This one is an introduction to basic set theory and proofs.&lt;/p&gt;

&lt;h4 id=&quot;introduction-to-logic-12th-edition&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Introduction-Logic-Irving-Cohen-Hardcover-dp-B011DARAA8/dp/B011DARAA8/&quot;&gt;Introduction to Logic, 12th Edition&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Irving M. Copi and Carl Cohen&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This isn’t a cover-to-cover read so much as a review of propositional and predicate logic (this was the textbook for my undergraduate logic coursework).&lt;/p&gt;

&lt;h4 id=&quot;set-theory-and-metric-spaces&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Theory-Metric-Spaces-Chelsea-Publishing/dp/0821826948&quot;&gt;Set Theory and Metric Spaces&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Irving Kaplansky&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was recommended to me as a good introduction to naïve set theory, which I plan to augment with &lt;em&gt;How to Prove It&lt;/em&gt; and &lt;em&gt;A Programmer’s Introduction to Mathematics&lt;/em&gt; (specifically, chapter four, “Sets”).&lt;/p&gt;

&lt;h4 id=&quot;gödel-escher-bach-an-eternal-golden-braid&quot;&gt;&lt;a href=&quot;https://www.amazon.com/G%C3%B6del-Escher-Bach-Eternal-Golden/dp/0465026567&quot;&gt;Gödel, Escher, Bach: An Eternal Golden Braid&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Douglas R. Hofstadter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is technically a re-read, but doesn’t really feel like it because my first read was so long ago (high school, I think). This book is about strange loops (cycles in which continued ascent eventually leads one back to a point in the cycle that’s already been visited), tangled hierarchies (hierarchies that include such loops), and three intertwined areas of art and science where these self-referential topologies appear: the music of Johann Sebastian Bach, the drawings of M. C. Escher, and Kurt Gödel’s incompleteness theorem.&lt;/p&gt;

&lt;h4 id=&quot;a-programmers-introduction-to-mathematics&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Programmers-Introduction-Mathematics-Dr-Jeremy/dp/1727125452&quot;&gt;A Programmer’s Introduction to Mathematics&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jeremy Kun&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is another one I may not read cover-to-cover (well, I probably will, but not in order). I want to start with sets and groups, but later move on to other topics in the intersection of math and programming: polynomials, graphs, linear algebra, and calculus.&lt;/p&gt;

&lt;h4 id=&quot;categories-for-the-working-mathematician&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Categories-Working-Mathematician-Graduate-Mathematics-dp-1441931236/dp/1441931236&quot;&gt;Categories for the Working Mathematician&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Saunders Mac Lane&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My first (passing) exposure to category theory was via &lt;a href=&quot;https://www.haskell.org/&quot;&gt;Haskell&lt;/a&gt;, and now I’d like to set up a firmer foundation for myself (including functors, monoids, and monads).&lt;/p&gt;

&lt;h4 id=&quot;abstract-algebra&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0471368792&quot;&gt;Abstract Algebra&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;I. N. Herstein&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was a recommendation from &lt;a href=&quot;https://twitter.com/nonintuitive&quot;&gt;Luke Underwood&lt;/a&gt;! I’d like to use this to finish firming up my foundation in set theory, then do a bit of a survey of groups, rings, and fields.&lt;/p&gt;

&lt;h4 id=&quot;coding-the-matrix&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Coding-Matrix-Algebra-Applications-Computer/dp/0615880991&quot;&gt;Coding the Matrix&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Philip N. Klein&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the first of three recommendations from &lt;a href=&quot;https://twitter.com/keystonelemur&quot;&gt;Brandon Weaver&lt;/a&gt; (the next two are the others). I taught myself basic linear algebra prior to doing my master’s degree, and I got to use a fair amount of it while studying machine learning (&lt;em&gt;e.g.&lt;/em&gt; linear regression, regularization, principal component analysis, neural network architecture). I saw a Coursera course a couple of years ago that used this book as a topic and was disappointed that it didn’t fit in my schedule, so I’m pleased to be able to tackle this material in 2019.&lt;/p&gt;

&lt;h4 id=&quot;the-art-of-logic-in-an-illogical-world&quot;&gt;&lt;a href=&quot;https://www.basicbooks.com/titles/eugenia-cheng/the-art-of-logic-in-an-illogical-world/9781541672482&quot;&gt;The Art of Logic in an Illogical World&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Eugenia Cheng&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One thing I struggle with is squaring rational arguments (mine and others’) with emotional responses (mine and others’), especially in this age of propaganda, “fake news,” and anti-intellectualism. This book is billed as “a lifeline to readers drowning in the illogic of contemporary life,” which sounds… pretty awesome, actually.&lt;/p&gt;

&lt;h4 id=&quot;beyond-infinity&quot;&gt;&lt;a href=&quot;https://www.hachettebookgroup.com/titles/eugenia-cheng/beyond-infinity/9780465094820&quot;&gt;Beyond Infinity&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Eugenia Cheng&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve struggled with the idea of infinity ever since I was introduced to transfinite arithmetic and the work of &lt;a href=&quot;https://en.wikipedia.org/wiki/Georg_Cantor&quot;&gt;Georg Cantor&lt;/a&gt;, so I’m excited to dig into this one.&lt;/p&gt;

&lt;h4 id=&quot;artificial-intelligence-a-modern-approach&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Artificial-Intelligence-Modern-Approach-3rd/dp/0136042597&quot;&gt;Artificial Intelligence: A Modern Approach&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Peter Norvig and Stuart Russell&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is another partial re-read—I think I first picked this up during my Recurse Center batch (summer 2013), but I’m delighted that my in-laws gifted me this book so I can work through it on my own.&lt;/p&gt;

&lt;h4 id=&quot;machine-ethics&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Machine-Ethics-Michael-Anderson/dp/1108461751&quot;&gt;Machine Ethics&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Anderson and Susan Leigh Anderson, Editors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I gave &lt;a href=&quot;https://www.youtube.com/watch?v=-9V1TQ49vmI&quot;&gt;a talk on machine ethics at RubyConf&lt;/a&gt; this year, and I spent a lot of time thinking about the moral and ethical implications of AI (not just for human agents building artificial intelligences, but for the artificial intelligences themselves) during my master’s degree. I’m excited to see what professional ethicists have to say on the subjects I’ve been mulling over (as well as learn about brand-new areas of study).&lt;/p&gt;

&lt;h4 id=&quot;four-dimensionalism&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Four-Dimensionalism-Ontology-Persistence-Association-Occasional/dp/0199263523&quot;&gt;Four Dimensionalism&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Theodore Sider&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve skimmed through this book a couple of times over the past few years, but I want to read it cover-to-cover in 2019. One of my main philosophical interests has to do with the mereology (study of parts and wholes) of spacetime, as well as whether three-dimensional objects endure in time, or perdure through it (that is, actually have temporal extent, and are therefore really four-dimensional); I suspect the latter.&lt;/p&gt;

&lt;h4 id=&quot;space-time-and-spacetime&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Space-Time-Spacetime-Lawrence-Sklar/dp/0520031741&quot;&gt;Space, Time, and Spacetime&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Lawrence Sklar&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is &lt;em&gt;mostly&lt;/em&gt; re-reading, but I’m actually not sure I’ve read this one in its entirety, so I want to commit to doing that this year. Like &lt;em&gt;Four Dimensionalism&lt;/em&gt;, this one is on the philosophy of physics, but is more of a survey of multiple topics than a meditation on perdurantism.&lt;/p&gt;

&lt;h4 id=&quot;the-history-of-western-philosophy&quot;&gt;&lt;a href=&quot;https://www.amazon.com/History-Western-Philosophy-Bertrand-Russell/dp/0671201581&quot;&gt;The History of Western Philosophy&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Bertrand Russell&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a classic that I haven’t read in its entirety yet (I think I read chapters here and there as assignments in college).&lt;/p&gt;

&lt;h4 id=&quot;turings-cathedral-the-origins-of-the-digital-universe&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/1400075998&quot;&gt;Turing’s Cathedral: The Origins of the Digital Universe&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;George Dyson&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was recommended to me on Twitter when &lt;a href=&quot;https://twitter.com/ericqweinstein/status/1070014596088397824&quot;&gt;I asked for a “multibiography” of 20th-century math and logic&lt;/a&gt;. I’m excited to read it!&lt;/p&gt;

&lt;h4 id=&quot;mr-wilsons-cabinet-of-wonder&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Mr-Wilsons-Cabinet-Wonder-Technology/dp/0679764895&quot;&gt;Mr. Wilson’s Cabinet of Wonder&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Lawrence Weschler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My friend Maggie gave this to me as a gift after we talked about how cool the &lt;a href=&quot;https://en.wikipedia.org/wiki/Museum_of_Jurassic_Technology&quot;&gt;Museum of Jurassic Technology&lt;/a&gt; is.&lt;/p&gt;

&lt;h4 id=&quot;friday-black&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Friday-Black-Nana-Kwame-Adjei-Brenyah/dp/1328911241&quot;&gt;Friday Black&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Nana Kwame Adjei-Brenyah&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I haven’t read a short story collection in awhile, and I’m particularly excited about this one (blurbed by both George Saunders &lt;em&gt;and&lt;/em&gt; Roxane Gay!).&lt;/p&gt;

&lt;h4 id=&quot;the-book-of-joshua&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Book-Joshua-Zachary-Schomburg/dp/1939568064&quot;&gt;The Book of Joshua&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Zachary Schomburg&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been reading Zachary Schomburg’s poems for awhile now (I often think about &lt;a href=&quot;https://www.poetryfoundation.org/poems/56022/the-fire-cycle&quot;&gt;“The Fire Cycle”&lt;/a&gt;), and given the parallels between Schomburg’s poetic interests and my own (as well as the title of this book; my younger brother, Joshua, passed away in 2016), I’m interested to see how this book moves me.&lt;/p&gt;

&lt;h4 id=&quot;surrounded-by-friends&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Surrounded-Friends-Books-Matthew-Rohrer/dp/1940696038&quot;&gt;Surrounded by Friends&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Matthew Rohrer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve known Matthew since 2010, and I’m always delighted to read his work.&lt;/p&gt;

&lt;h4 id=&quot;magical-negro&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Magical-Negro-Morgan-Parker/dp/1947793187&quot;&gt;Magical Negro&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Morgan Parker&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Morgan and I did our MFAs together at NYU, and I really enjoyed &lt;em&gt;&lt;a href=&quot;https://www.amazon.com/There-More-Beautiful-Things-Beyonce/dp/1941040535&quot;&gt;There Are More Beautiful Things Than Beyoncé&lt;/a&gt;&lt;/em&gt;. I’m excited to pick up her new book when it comes out next month!&lt;/p&gt;

&lt;h4 id=&quot;subcritical-tests&quot;&gt;&lt;a href=&quot;http://gorse.ie/gorse-editions/subcritical-tests/&quot;&gt;Subcritical Tests&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ailbhe Darcy and SJ Fowler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I frequently think about Darcy’s poem, &lt;a href=&quot;https://www.poetryfoundation.org/poetrymagazine/poems/58281/ansel-adams-aspens&quot;&gt;“Ansel Adams’ Aspens”&lt;/a&gt;, so when I saw this title (I’m always excited to read poems about the intersection of human experience and science), I knew I had to read it.&lt;/p&gt;

&lt;h4 id=&quot;mortal-republic&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Mortal-Republic-Rome-Fell-Tyranny/dp/0465093817&quot;&gt;Mortal Republic&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Edward J. Watts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now is probably the right time to read about the factors that contributed to the fall of the Roman Empire.&lt;/p&gt;

&lt;h4 id=&quot;fear-trump-in-the-white-house&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Fear-Trump-White-Bob-Woodward/dp/1501175513&quot;&gt;Fear: Trump in the White House&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Bob Woodward&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This oughtta be good. And terrifying. Here’s to that fatuous orange clown getting kicked to the curb in 2019.&lt;/p&gt;

&lt;h2 id=&quot;papers&quot;&gt;Papers&lt;/h2&gt;
&lt;p&gt;Spring 2018 was the last semester of my master’s degree, which meant I once again read a bunch of papers. While I may read fewer papers in 2019 without grad school to provide a framework, I hope to instead read &lt;em&gt;different&lt;/em&gt; papers: in this case, extending beyond computer science to include mathematics, language/linguistics, and philosophy (primarily ethics, theory of mind, and logic). But! We’ll get to those in a minute. Here are the additional papers I read in 2018 beyond the ones I set out to read:&lt;/p&gt;

&lt;h4 id=&quot;the-anatomy-of-a-large-scale-hypertextual-web-search-engine&quot;&gt;&lt;a href=&quot;http://snap.stanford.edu/class/cs224w-readings/Brin98Anatomy.pdf&quot;&gt;The Anatomy of a Large-Scale Hypertextual Web Search Engine&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sergey Brin and Larry Page&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the “PageRank” paper (which I assumed only had to do with ranking pages, and not also a play on Larry Page’s name).&lt;/p&gt;

&lt;h4 id=&quot;understanding-resiliency-of-internet-topology-against-prefix-hijack-attacks&quot;&gt;&lt;a href=&quot;https://ieeexplore.ieee.org/document/4272988&quot;&gt;Understanding Resiliency of Internet Topology Against Prefix Hijack Attacks&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Mohit Lad, Ricardo Oliveira, Beichuan Zhang, and Lixia Zhang&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I read this for my Computer Networks class at Georgia Tech, and it was really eye-opening (both in terms of the relationships between network topology and prefix hijacking as well as the relatively unmitigated security horror that is BGP).&lt;/p&gt;

&lt;h4 id=&quot;aswatch-an-as-reputation-system-to-expose-bulletproof-hosting-ases&quot;&gt;&lt;a href=&quot;https://conferences.sigcomm.org/sigcomm/2015/pdf/papers/p625.pdf&quot;&gt;ASwatch: An AS Reputation System to Expose Bulletproof Hosting ASes&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Maria Konte, Roberto Perdisci, and Nick Feamster&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a really cool paper: it proposes an autonomous system reputation system, ASwatch, that only uses the control plane (that is, routing behavior) to preemptively identify malicious/criminal ASes, rather than using data plane monitoring to identify malicious behavior after the fact. I definitely recommend this one (the authors report a 93% success rate and 5% false positive rate!).&lt;/p&gt;

&lt;h4 id=&quot;sizing-router-buffers&quot;&gt;&lt;a href=&quot;http://yuba.stanford.edu/~nickm/papers/sigcomm2004.pdf&quot;&gt;Sizing Router Buffers&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Guido Appenzeller, Isaac Keslassy, and Nick McKeown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another cool one: this paper demonstrates that the old heuristic for buffer sizing (B = RTT * C, where B is the buffer size, RTT is the average round-trip time of a flow passing over the link, and C is is the link’s data rate) is outdated: in reality, B = (RTT * C) / sqrt(N), where N is the number of flows over the link (since there’s now a much larger number of TCP connections multiplexed over individual backbone router links).&lt;/p&gt;

&lt;h4 id=&quot;the-crossfire-attack&quot;&gt;&lt;a href=&quot;https://www.ieee-security.org/TC/SP2013/papers/4977a127.pdf&quot;&gt;The Crossfire Attack&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Min Suk Kang, Soo Bum Lee, and Virgil D. Gligor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another Computer Networks paper (I’ll note when I pivot from networking to another topic). This one illustrates the crossfire attack, which allows a relatively small number of bots to undetectably take down server targets by flooding just a few links (using low-intensity flows that are indistinguishable from normal network traffic) to cut off the target server(s) from the rest of the Internet.&lt;/p&gt;

&lt;h4 id=&quot;cubic-a-new-tcp-friendly-high-speed-tcp-variant&quot;&gt;&lt;a href=&quot;https://www.cs.princeton.edu/courses/archive/fall16/cos561/papers/Cubic08.pdf&quot;&gt;CUBIC: A New TCP-Friendly High-Speed TCP Variant&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sangtae Ha, Injong Rhee, and Lisong Xu&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this paper, the authors present CUBIC, a TCP congestion control protocol that improves TCP scalability by replacing the previous linear window growth function with a cubic function. (As far as I know, CUBIC is currently the default TCP algorithm for the Linux kernel.)&lt;/p&gt;

&lt;h4 id=&quot;how-hard-can-it-be-designing-and-implementing-a-deployable-multipath-tcp&quot;&gt;&lt;a href=&quot;https://www.cs.princeton.edu/courses/archive/fall17/cos561/papers/MPTCP12.pdf&quot;&gt;How Hard Can It Be? Designing and Implementing a Deployable Multipath TCP&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Costin Raiciu &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper aims to answer the question: “Is it possible to extend TCP to enable it to support multiple paths for current applications on today’s Internet?” (Short answer: yes, but it’s not trivial.)&lt;/p&gt;

&lt;h4 id=&quot;the-performance-impact-of-buffer-sizes-for-multi-path-tcp-in-internet-setups&quot;&gt;&lt;a href=&quot;https://ieeexplore.ieee.org/document/7920883&quot;&gt;The Performance Impact of Buffer Sizes for Multi-Path TCP in Internet Setups&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Feng Zhou &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is another paper on MPTCP, and I found it interesting because of the results the authors obtained with regard to buffer sizing (in particular, due to packet reordering over various paths, the buffer size requirements are actually fairly small—see Table III in the paper).&lt;/p&gt;

&lt;h4 id=&quot;hold-on-protecting-against-on-path-dns-poisoning&quot;&gt;&lt;a href=&quot;http://www.icir.org/vern/papers/hold-on.satin12.pdf&quot;&gt;Hold-On: Protecting Against On-Path DNS Poisoning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Haixin Duan &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I first became familiar with DNS vulnerabilities through Dan Kaminsky’s work on DNS cache poisoning (Black Hat 2008), so I was particularly interested in this paper. The authors argue that DNS resolvers should wait after receiving an initial reply (what they call the “hold-on” period) in order to allow legitimate replies to also arrive (since DNS injection attacks often rely on malicious responses arriving at the resolver before legitimate ones).&lt;/p&gt;

&lt;h4 id=&quot;jellyfish-networking-data-centers-randomly&quot;&gt;&lt;a href=&quot;https://people.inf.ethz.ch/asingla/papers/jellyfish-nsdi12.pdf&quot;&gt;Jellyfish: Networking Data Centers Randomly&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ankit Singla, Chi-Yao Hong, Lucian Popa, and P. Brighten Godfrey&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I thought this paper was really cool because it demonstrated that a random graph topology (the “jellyfish”) is &lt;em&gt;more&lt;/em&gt; cost-effective than a &lt;a href=&quot;https://en.wikipedia.org/wiki/Fat_tree&quot;&gt;fat tree topology&lt;/a&gt;, supporting roughly 25% more servers (though at the cost of routing and wiring complexity).&lt;/p&gt;

&lt;h4 id=&quot;portland-a-scalable-fault-tolerant-layer-2-data-center-network-fabric&quot;&gt;&lt;a href=&quot;https://cseweb.ucsd.edu/~vahdat/papers/portland-sigcomm09.pdf&quot;&gt;PortLand: A Scalable Fault-Tolerant Layer 2 Data Center Network Fabric&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Radhika Niranjan Mysore &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was one of the few papers I read for Computer Networks that I didn’t find all that compelling (though the authors do a good job of describing a “plug-and-play” connection fabric comprising Ethernet-based routing and address resolution protocols for modern data centers).&lt;/p&gt;

&lt;h4 id=&quot;the-road-to-sdn-an-intellectual-history-of-programmable-networks&quot;&gt;&lt;a href=&quot;https://www.cs.princeton.edu/courses/archive/fall13/cos597E/papers/sdnhistory.pdf&quot;&gt;The Road to SDN: An Intellectual History of Programmable Networks&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Nick Feamster, Jennifer Rexford, and Ellen Zegura&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper is a history of &lt;a href=&quot;https://en.wikipedia.org/wiki/Software-defined_networking&quot;&gt;software-defined networking&lt;/a&gt;, which wasn’t mind-blowing but &lt;em&gt;was&lt;/em&gt; a good introduction to the topic.&lt;/p&gt;

&lt;h4 id=&quot;how-secure-are-secure-interdomain-routing-protocols&quot;&gt;&lt;a href=&quot;http://www.cs.yale.edu/homes/schapira/BGPAttack.pdf&quot;&gt;How Secure are Secure Interdomain Routing Protocols?&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sharon Goldberg, Michael Schapira, Peter Hummon, and Jennifer Rexford&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hint: not very.&lt;/p&gt;

&lt;h4 id=&quot;application-flow-control-in-youtube-video-streams&quot;&gt;&lt;a href=&quot;https://people.cs.umass.edu/~phillipa/CSE390/flowcontrol.pdf&quot;&gt;Application Flow Control in YouTube Video Streams&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Shane Alcock and Richard Nelson&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper is a case study on the flow techniques used by YouTube. Super interesting!&lt;/p&gt;

&lt;h4 id=&quot;formulas-for-bancor-system&quot;&gt;&lt;a href=&quot;http://meissereconomics.com/assets/abfe-lesson5-bancor.pdf&quot;&gt;Formulas for Bancor System&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Meni Rosenfeld&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Okay! Moving on from computer networks to cryptocurrencies and game theory. This paper details the math behind &lt;a href=&quot;https://about.bancor.network/&quot;&gt;Bancor&lt;/a&gt;’s autonomous converter contracts.&lt;/p&gt;

&lt;h4 id=&quot;first-price-auctions-dutch-auctions-and-buy-it-now-prices-with-allais-paradox-bidders&quot;&gt;&lt;a href=&quot;https://econtheory.org/ojs/index.php/te/article/viewFile/20110473/5742/199&quot;&gt;First-Price Auctions, Dutch Auctions, and Buy-It-Now Prices with Allais Paradox Bidders&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Daisuke Nakajima&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I read this paper shortly after we started &lt;a href=&quot;https://www.auxplatform.com/&quot;&gt;AUX&lt;/a&gt; to better understand the game theory underpinning first-price, Dutch (descending price), and “buy it now”-style auctions. (For a general text on auction theory, I highly recommend Krishna’s &lt;a href=&quot;https://www.amazon.com/Auction-Theory-Vijay-Krishna/dp/0123745071&quot;&gt;&lt;em&gt;Auction Theory&lt;/em&gt;&lt;/a&gt;.)&lt;/p&gt;

&lt;h4 id=&quot;snowflake-to-avalanche-a-novel-metastable-consensus-protocol-family-for-cryptocurrencies&quot;&gt;&lt;a href=&quot;https://ipfs.io/ipfs/QmUy4jh5mGNZvLkjies1RWM4YuvJh5o2FYopNPVYwrRVGV&quot;&gt;Snowflake to Avalanche: A Novel Metastable Consensus Protocol Family for Cryptocurrencies&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Team Rocket&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper was a good overview of several non-proof-of-work Byzantine fault tolerance protocols—I absolutely recommend it for those interested in the &lt;a href=&quot;https://en.wikipedia.org/wiki/Byzantine_fault_tolerance&quot;&gt;Byzantine generals’ problem&lt;/a&gt; and/or consensus algorithms as implemented in various cryptocurrencies (the paper demonstrates a Bitcoin-like system that can achieve throughput of 1300 transactions per second!).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Finally, here the papers I want to read in 2019 (starting with one rolled over one from 2018):&lt;/p&gt;

&lt;h4 id=&quot;polynomial-time-algorithms-for-prime-factorization-and-discrete-logarithms-on-a-quantum-computer&quot;&gt;&lt;a href=&quot;https://arxiv.org/pdf/quant-ph/9508027.pdf&quot;&gt;Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Peter W. Shor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Quantum computing sort of fell off my radar last year, and given all the activity in cryptocurrency markets over the past several months, I figure now’s the time to read up on the sorts of technology that would turn those markets upside-down…er.&lt;/p&gt;

&lt;h4 id=&quot;a-tutorial-implementation-of-a-dependently-typed-lambda-calculus&quot;&gt;&lt;a href=&quot;https://www.andres-loeh.de/LambdaPi/LambdaPi.pdf&quot;&gt;A Tutorial Implementation of a Dependently Typed Lambda Calculus&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Andres Löh, Conor McBride, and Wouter Swierstra&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been interested in dependent types ever since I first started programming in/contributing to &lt;a href=&quot;http://www.idris-lang.org/&quot;&gt;Idris&lt;/a&gt;, so I’m excited to work through this paper (including understanding when/whether type checking in dependently-typed programs becomes &lt;a href=&quot;https://en.wikipedia.org/wiki/Undecidable_problem&quot;&gt;undecidable&lt;/a&gt;).&lt;/p&gt;

&lt;h4 id=&quot;safer-smart-contracts-through-type-driven-development&quot;&gt;&lt;a href=&quot;https://publications.lib.chalmers.se/records/fulltext/234939/234939.pdf&quot;&gt;Safer Smart Contracts Through Type-Driven Development&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jack Pettersson and Robert Edström&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve &lt;a href=&quot;http://ericweinste.in/programming/smart/contracts/solidity/2018/07/12/complexity-completeness-smart-contracts/&quot;&gt;written about safety in smart contracts&lt;/a&gt;, and I’m interested to dig deeper into the intersection between smart contract design and dependent types.&lt;/p&gt;

&lt;h4 id=&quot;on-the-practical-nature-of-artificial-qualia&quot;&gt;&lt;a href=&quot;http://www.conscious-robots.com/papers/arrabales-a-paper-aiib10.pdf&quot;&gt;On the Practical Nature of Artificial Qualia&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Raúl Arrabales, Agapito Ledezma, and Araceli Sanchis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On to theory of mind! One of the things I find myself thinking about with regard to machine learning and AI is the nature of an artificially intelligent agent’s “inner life”: would a machine have experiences and sensations in a way we would recognize (&lt;em&gt;e.g.&lt;/em&gt; the color red, the taste of salt)? Hopefully this paper gives me something of a jumping-off point for investigating artificial &lt;a href=&quot;https://en.wikipedia.org/wiki/Qualia&quot;&gt;qualia&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;turing-machines&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Introduction-Philosophy-Classical-Contemporary-Readings/dp/0195112040&quot;&gt;Turing Machines&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Hilary Putnam&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper (and the next one) are from &lt;em&gt;Introduction to Philosophy, Third Edition&lt;/em&gt; by Perry and Bratman (continuing my reading on computability and the relationship between machinery and mind).&lt;/p&gt;

&lt;h4 id=&quot;minds-brains-and-programs&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Introduction-Philosophy-Classical-Contemporary-Readings/dp/0195112040&quot;&gt;Minds, Brains, and Programs&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;John K. Searle&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I first encountered Searle’s work in the context of his &lt;a href=&quot;https://en.wikipedia.org/wiki/Chinese_room&quot;&gt;“Chinese room” thought experiment&lt;/a&gt;, and I’m interested in a more explicit treatment of functionalism and artificial vs. natural intelligence.&lt;/p&gt;

&lt;p&gt;Off we go!&lt;/p&gt;
</description>
        <pubDate>Thu, 03 Jan 2019 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2019/01/03/reading-list-2019/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/culture/reading/poetry/learning/math/language/2019/01/03/reading-list-2019/</guid>
      </item>
    
      <item>
        <title>Complexity, Completeness, and Smart Contracts</title>
        <description>&lt;h3 id=&quot;some-background&quot;&gt;Some Background&lt;/h3&gt;
&lt;p&gt;Over the past several months, as the team at &lt;a href=&quot;http://auxtoken.com/&quot; target=&quot;_blank&quot;&gt;AUX&lt;/a&gt; has been building out &lt;a href=&quot;http://auxplatform.com/&quot; target=&quot;_blank&quot;&gt;the AUX Platform&lt;/a&gt;, I’ve had the opportunity to read and write several &lt;a href=&quot;https://en.wikipedia.org/wiki/Smart_contract&quot; target=&quot;_blank&quot;&gt;smart contracts&lt;/a&gt;. Smart contracts for the Ethereum blockchain can be written in a few different languages, but the most popular one is &lt;a href=&quot;http://solidity.readthedocs.io/&quot; target=&quot;_blank&quot;&gt;Solidity&lt;/a&gt;, which looks a little like a cross between JavaScript and C++ (with a little payment-specific DSL thrown in). Here’s an example from &lt;a href=&quot;https://openzeppelin.org/&quot; target=&quot;_blank&quot;&gt;OpenZeppelin&lt;/a&gt;’s &lt;a href=&quot;https://github.com/OpenZeppelin/openzeppelin-solidity/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC721/ERC721BasicToken.sol&quot; target=&quot;_blank&quot;&gt;ERC721 basic token contract&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;approve&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;uint256&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_tokenId&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;owner&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ownerOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_tokenId&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_to&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;sender&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;owner&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;isApprovedForAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;sender&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;tokenApprovals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;_tokenId&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;emit&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Approval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;_tokenId&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;approve&lt;/code&gt; function is called in the process of transferring an &lt;a href=&quot;http://erc721.org/&quot; target=&quot;_blank&quot;&gt;ERC721 asset&lt;/a&gt; from one owner to another. Owners are identified by their addresses, which in Ethereum are forty-character hexadecimal strings; non-fungible tokens are tracked in registry contracts by their ID numbers (usually in a 256-bit address space).&lt;/p&gt;

&lt;p&gt;First, the function looks up the owner of the token via the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ownerOf&lt;/code&gt; function (not shown here). Next, it ensures that we’re not attempting to transfer the token to the person who already owns it (the first &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;require&lt;/code&gt; statement) and that the person doing the transferring is either the item’s owner or someone who’s approved to transfer it on their behalf (the second &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;require&lt;/code&gt; statement). After that, it goes ahead and updates its mapping of which token is owned by which address. Finally, the contract emits an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Approval&lt;/code&gt; &lt;a href=&quot;http://solidity.readthedocs.io/en/v0.4.24/contracts.html#events&quot; target=&quot;_blank&quot;&gt;event&lt;/a&gt; to signal that the approval has taken place.&lt;/p&gt;

&lt;p&gt;While I find Solidity contracts relatively readable, I’ve come to believe that Solidity is not an ideal (or even a very good) language for smart contract development. I have three fundamental problems with it:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://solidity.readthedocs.io/en/v0.4.24/contracts.html#fallback-function&quot; target=&quot;_blank&quot;&gt;Fallback functions&lt;/a&gt; scare the hell out of me;&lt;/li&gt;
  &lt;li&gt;I don’t think the type system does enough to protect programmers from silly errors;&lt;/li&gt;
  &lt;li&gt;I fundamentally don’t think &lt;a href=&quot;https://en.wikipedia.org/wiki/Turing_completeness&quot; target=&quot;_blank&quot;&gt;Turing-completeness&lt;/a&gt; is necessary or desirable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;fallback-functions&quot;&gt;Fallback Functions&lt;/h3&gt;
&lt;p&gt;Fallback functions are anonymous functions that can accept no arguments and can have no return value. They’re called when a contract receives a function call for which there is no matching identifier (that is, someone called a function that the contract does not implement). An example might look like this:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;payable&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this case, the contract is designed to accept ether sent to it, even if no data are included or the intended function signature is incorrect. (Without this fallback function, the contract would instead throw an error and return the ether.) While contract writers might prefer this behavior, I think it’s surprising and confusing to users interacting with it (whether honestly maliciously), and this sort of behavior is ripe for abuse/misuse, as can be seen in the “King of the Ether Throne” examples found &lt;a href=&quot;https://applicature.com/blog/history-of-ethereum-security-vulnerabilities-hacks-and-their-fixes&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. Generally speaking, I agree with &lt;a href=&quot;https://www.python.org/dev/peps/pep-0020/&quot; target=&quot;_blank&quot;&gt;PEP 20&lt;/a&gt; that explicit is better than implicit, and these kinds of implicit behaviors are especially thorny when contracts and payments are involved.&lt;/p&gt;

&lt;h3 id=&quot;the-type-system&quot;&gt;The Type System&lt;/h3&gt;
&lt;p&gt;I think the only thing I like about the Solidity type system is that it’s static. String modifications almost always require casting to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bytes&lt;/code&gt; (including string concatenation: yes, this has to be done manually). While Solidity supports enums, &lt;a href=&quot;http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#if-i-return-an-enum-i-only-get-integer-values-in-web3-js-how-to-get-the-named-values&quot; target=&quot;_blank&quot;&gt;the ABI does not&lt;/a&gt;. As of this writing, Solidity &lt;a href=&quot;http://solidity.readthedocs.io/en/v0.4.24/types.html#fixed-point-numbers&quot; target=&quot;_blank&quot;&gt;still does not support fixed-point numbers&lt;/a&gt;, in which it is &lt;em&gt;much&lt;/em&gt; easier to reason about arithmetic operations like addition and subtraction. This seems like it would be a good feature for a language designed to handle financial transactions. Even if you argue that money shouldn’t be modelled this way, there are many non-currency values for which this kind of arithmetic would be really useful (risk modelling, logistics planning, and so on).&lt;/p&gt;

&lt;p&gt;While some of these problems will probably eventually be fixed by improvements to the EVM and/or Solidity language, I think they’re always going to feel like exactly that: fixes rather than core design decisions. To my mind, a language built to enforce smart contracts should prioritize correctness and security, and a more powerful type system would help further that goal. I think a dependently-typed language like &lt;a href=&quot;https://www.idris-lang.org/&quot; target=&quot;_blank&quot;&gt;Idris&lt;/a&gt; could be ideal. (NB: I really like Idris and have made small contributions to the language.) A type system that can enforce invariants like “non-negative integer” or “list of string where each member is at least three characters long” means more correctness can be confirmed by the compiler, leaving less to ever-incomplete testing and well-meaning but error-prone wetware. (Idris also has excellent tooling for formal verification and theorem proving; more on this in the next section.)&lt;/p&gt;

&lt;h3 id=&quot;turing-completeness&quot;&gt;Turing Completeness&lt;/h3&gt;
&lt;p&gt;Solidity is Turing-complete, meaning that a Solidity smart contract can simulate any Turing machine. While this makes a rich universe of contracts available to Solidity programmers, this necessarily includes programs that are valid but undesirable, such as those that loop forever (at least until they run out of gas), only throw exceptions, or don’t do anything at all. It’s hard enough to write correct, performant programs as it is, and I think that by excluding valid but useless programs, especially when coupled with a more powerful type system, we get a simpler language in which it is harder to make mistakes and lose people’s money.&lt;/p&gt;

&lt;p&gt;While it &lt;a href=&quot;https://hackernoon.com/smart-contracts-turing-completeness-reality-3eb897996621&quot; target=&quot;_blank&quot;&gt;has been argued&lt;/a&gt; that eliminating Turing completeness is not necessary to achieve provable correctness, it certainly makes things simpler, and since I’ve yet to see any compelling argument for why it’s necessary, I tend to think it’s better to exclude it until proven a requirement. Theorem proving and formal verification can be more easily accomplished in a less expressive language, and if there is no demonstrable, practical downside to that tradeoff, I think it should be made without hesitation.&lt;/p&gt;

&lt;h3 id=&quot;in-conclusion&quot;&gt;In Conclusion&lt;/h3&gt;
&lt;p&gt;While I find Solidity readable because I’m used to ALGOL-family languages like C++ or Java, I don’t think it’s a particularly good choice for developing smart contracts. So what is?&lt;/p&gt;

&lt;p&gt;There are a few newer languages that I think are promising. As mentioned, I think Idris or an Idris-like language with a powerful, dependent type system could be ideal. It’s also possible that such a language could be useful for proving the correctness of contracts written in existing languages like &lt;a href=&quot;https://github.com/ethereum/vyper&quot; target=&quot;_blank&quot;&gt;Vyper&lt;/a&gt; or &lt;a href=&quot;http://kadena.io/&quot; target=&quot;_blank&quot;&gt;Kadena&lt;/a&gt;’s &lt;a href=&quot;http://pact-language.readthedocs.io/en/latest/&quot; target=&quot;_blank&quot;&gt;Pact&lt;/a&gt;, both of which aim to improve on existing smart contract language designs (and the latter of which is intentionally Turing-incomplete). Although I do worry that Pact’s LISP-inspired syntax raises the barrier to entry, as someone who picked up Clojure after learning JavaScript and Ruby, I think that barrier is very surmountable.&lt;/p&gt;

&lt;p&gt;Ultimately, I think smart contracts are a fascinating area of software development, and the languages used to construct them, while imperfect, will have to improve as adoption increases. I’m really excited to see that evolution take place, and I’m lucky to witness it firsthand while building AUX.&lt;/p&gt;
</description>
        <pubDate>Thu, 12 Jul 2018 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/smart/contracts/solidity/2018/07/12/complexity-completeness-smart-contracts/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/smart/contracts/solidity/2018/07/12/complexity-completeness-smart-contracts/</guid>
      </item>
    
      <item>
        <title>Reading List 2018</title>
        <description>&lt;p&gt;It’s that time of year again! (Man, I really need to blog more.)&lt;/p&gt;

&lt;h2 id=&quot;books&quot;&gt;Books&lt;/h2&gt;
&lt;p&gt;I managed to get to &lt;em&gt;most&lt;/em&gt; of the books I wanted to read in 2017 (see below for the ones I’m rolling into next year). Here are a few extras I read:&lt;/p&gt;

&lt;h4 id=&quot;hillbilly-elegy&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B0166ISAS8&quot;&gt;Hillbilly Elegy&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;J.D. Vance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This book came on my radar not long after the 2016 presidential election. While I did gain some valuable insights into Appalachia through the lens of Vance’s personal experiences, I felt like some of the explanations he provides (basically that hillbillies—his term—have brought their misfortune on themselves through “learned helplessness” and a cultural opposition to education) are unnuanced and overly simplistic.&lt;/p&gt;

&lt;h4 id=&quot;the-cuckoos-egg&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B0083DJXCM&quot;&gt;The Cuckoo’s Egg&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Cliff Stoll&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I found this one after reading the &lt;a href=&quot;https://en.wikipedia.org/wiki/Markus_Hess&quot;&gt;Wikipedia article about Markus Hess&lt;/a&gt;. It was a fascinating look into the state of computer security and the Internet in the 1980s, and the writing and pacing made for a really good detective story.&lt;/p&gt;

&lt;h4 id=&quot;what-hedge-funds-really-do&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B00MYFT0TQ&quot;&gt;What Hedge Funds Really Do&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Philip J. Romero and Tucker Balch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This book was required reading for &lt;a href=&quot;https://www.omscs.gatech.edu/cs-7646-machine-learning-trading&quot;&gt;Machine Learning for Trading&lt;/a&gt; (also part of my masters degree program at Georgia Tech). It’s a pretty quick read (one afternoon/sitting) and provided me a decent overview of hedge funds’ history, how they work, and the theory behind risk mitigation. (Spoiler: the only decent way to make money with hedge funds is to run them.)&lt;/p&gt;

&lt;h4 id=&quot;a-random-walk-down-wall-street&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B00QH9NTSI&quot;&gt;A Random Walk Down Wall Street&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Burton G. Malkiel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is sort of a classic in terms of literature on investing in the stock market, so I figured I’d pick it up. It’s surprisingly long—a little over 450 pages—and I got tired about three quarters of the way through. The general sentiment is to invest in a diverse portfolio early in your career and invest as much as you can over time, adjusting your portfolio to become more conservative as you age. Nothing really groundbreaking, but his asides, anecdotes, and worked examples are worth slogging through the more repetitious parts.&lt;/p&gt;

&lt;h4 id=&quot;liars-poker&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B003E20ZRY&quot;&gt;Liar’s Poker&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Lewis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one has actually been on my “to-read” list since the 2008 financial crisis. I’d heard a lot about the culture of 1980s Wall Street, and it sounds like most of it was true: unchecked greed, no-neck traders gleefully ripping off anyone they could, little (if any) true oversight. This was a good mix of horrifying and entertaining, but the more I think about it, the more I find it the former than the latter. (I doubt much, if anything, has really changed in the banking industry over the intervening years. Maybe there’s less cocaine now.)&lt;/p&gt;

&lt;h4 id=&quot;the-big-short&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B003LSTK8G&quot;&gt;The Big Short&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Lewis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I really enjoyed &lt;em&gt;Liar’s Poker&lt;/em&gt;, so I figured I’d give this a shot as well. This book focuses on the forces that led to the 2008 financial crisis (specifically, the proliferation of credit default swaps and collateralized debt obligations). I highly recommend this book (I haven’t seen the film, but I’ve heard it’s good); however, if you just want the details of the crisis without the story elements, &lt;a href=&quot;http://crisisofcredit.com/&quot;&gt;this video&lt;/a&gt; is a good TL;DR.&lt;/p&gt;

&lt;h4 id=&quot;the-managers-path&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/1491973897&quot;&gt;The Manager’s Path&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Camille Fournier&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’d been meaning to read this since I first heard Camille (who was my CTO when I worked at Rent the Runway) was working on it, and I was not disappointed. I highly, highly recommend this book to managers in all industries, but especially those in tech (I found the chapters on managing more than one team and managing managers particularly relevant).&lt;/p&gt;

&lt;h4 id=&quot;the-first-90-days&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/1422188612&quot;&gt;The First 90 Days&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael D. Watkins&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I moved from Hulu to Fox Networks Group in July, and I figured then was as good a time as any to re-read &lt;em&gt;The First 90 Days&lt;/em&gt;. While I think some of the more salient points can be distilled into a blog post (which I’ll plan to tackle in early 2018), I think it’s still worth a full read, especially if you’re joining and/or leading a new team.&lt;/p&gt;

&lt;h4 id=&quot;practical-machine-learning&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920033172.do&quot;&gt;Practical Machine Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ted Dunning and Ellen Friedman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is really more of a long blog post/tutorial on &lt;a href=&quot;http://actionml.com/docs/ur&quot;&gt;PredictionIO’s universal recommender&lt;/a&gt; and its &lt;a href=&quot;https://arxiv.org/pdf/0909.3472.pdf&quot;&gt;correlated cross-occurrence algorithm&lt;/a&gt; for making recommendations, but I still enjoyed it. It’s a very quick read (only fifty or sixty pages).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Here are the books I want to read in 2018, starting with the five books I’ve rolled over from 2017.&lt;/p&gt;

&lt;h4 id=&quot;type-driven-development-with-idris&quot;&gt;&lt;a href=&quot;https://www.manning.com/books/type-driven-development-with-idris&quot;&gt;Type-Driven Development with Idris&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Edwin Brady&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I did some reading and work on &lt;a href=&quot;http://www.idris-lang.org/&quot;&gt;Idris&lt;/a&gt; in 2016, so I’m really excited to read Edwin’s book this year.&lt;/p&gt;

&lt;h4 id=&quot;mindset-the-new-psychology-of-success&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0345472322&quot;&gt;Mindset: The New Psychology of Success&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Carol S. Dweck&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I mentioned this book in &lt;a href=&quot;https://speakerdeck.com/ericqweinstein/booting-up-hiring-and-growing-boot-camp-graduates&quot;&gt;a talk&lt;/a&gt; I gave at RailsConf in May of 2016. I read a couple of Dweck’s papers while preparing for that talk, and I think there’s a tremendous amount I can learn from &lt;em&gt;Mindset&lt;/em&gt; for my growth as both an individual contributor and as an engineering leader.&lt;/p&gt;

&lt;h4 id=&quot;first-break-all-the-rules&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B002IU6LR6&quot;&gt;First, Break All the Rules&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Marcus Buckingham and Curt Coffman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve heard good things about this book at each of the last four places I’ve worked, so it’s probably high time I read it.&lt;/p&gt;

&lt;h4 id=&quot;a-billion-voices-chinas-search-for-a-common-language&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0734399596&quot;&gt;A Billion Voices: China’s Search for a Common Language&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;David Moser&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This book was recommended by my Mandarin teacher, and I think it’ll be really interesting to see how modern Mandarin arose from a highly fragmented set of spoken languages and traditions.&lt;/p&gt;

&lt;h4 id=&quot;the-three-body-problem&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0765382032&quot;&gt;The Three-Body Problem&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Cixin Liu&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the only novel on my reading list, but it’s been recommended to me by three completely separate groups of friends, so I’m expecting to really enjoy it. (It’s not that I don’t enjoy reading novels—I do—but they’ve been crowded out by my interests in poetry, philosophy, and computation over the past handful of years.)&lt;/p&gt;

&lt;h4 id=&quot;the-practice-of-programming&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/020161586X&quot;&gt;The Practice of Programming&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Brian W. Kernighan and Rob Pike&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ll read pretty much anything by Kernighan and Pike, and I’m particularly hoping for some good insights on the tougher aspects of engineering (balancing tradeoffs, identifying the human roots of technical problems, &amp;amp;c).&lt;/p&gt;

&lt;h4 id=&quot;english-grammar-for-students-of-german&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0934034389&quot;&gt;English Grammar for Students of German&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Cecile Zorach &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My German has gone a bit downhill since I first started learning in high school (wer rastet, der rostet, nicht wahr?), and while my pronunciation is still pretty good and vocabulary comes back to me quickly, I don’t feel I have as firm a grammatical footing as I’d like. Hopefully reading this book and practicing my spoken German helps with that!&lt;/p&gt;

&lt;h4 id=&quot;working-effectively-with-legacy-code&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0131177052&quot;&gt;Working Effectively with Legacy Code&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Feathers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This book has been recommended to me by too many people for me to continue not reading it.&lt;/p&gt;

&lt;h4 id=&quot;high-output-management&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B015VACHOK&quot;&gt;High Output Management&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Andrew S. Grove&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was recommended to me at a conference I attended earlier this year. Andrew Grove was employee number three at Intel and has built some really impressive teams in the course of his career, so I’m looking forward to reading his story and learning from his mistakes.&lt;/p&gt;

&lt;h4 id=&quot;eichmann-in-jerusalem&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B001RHOJSE&quot;&gt;Eichmann in Jerusalem&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Hannah Arendt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;“A report on the banality of evil” seems particularly relevant in our current political climate.&lt;/p&gt;

&lt;h4 id=&quot;what-i-learned-losing-a-million-dollars&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B00MNMHBA0&quot;&gt;What I Learned Losing a Million Dollars&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Brendan Moynihan&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I mentioned looking forward to learning from Andrew Grove’s mistakes in &lt;em&gt;High Output Management&lt;/em&gt;, and that’s doubly true for this book. Most of the narrative finance books I’ve read are more analyses of other people’s realizations and mistakes; I’m hoping to glean something a bit more qualitative (in terms of the psychology of investing) from this first-person account.&lt;/p&gt;

&lt;h4 id=&quot;consciousness-explained&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B01N807LD2&quot;&gt;Consciousness Explained&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Daniel Dennett&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been a big fan of Dennett’s work since college (I focused on philosophy of physics and theory of mind), and I’m particularly interested in this book and its view of consciousness as a continuum.&lt;/p&gt;

&lt;h2 id=&quot;papers&quot;&gt;Papers&lt;/h2&gt;
&lt;p&gt;In addition to the papers I set out to read in 2017, I picked up a &lt;em&gt;ton&lt;/em&gt; more (grad school will do that to you). Omitting some of the less compelling papers, they were:&lt;/p&gt;

&lt;h4 id=&quot;the-geometry-of-innocent-flesh-on-the-bone-return-into-libc-without-function-calls-on-the-x86&quot;&gt;&lt;a href=&quot;https://www.kapravelos.com/teaching/csc574-f16/readings/geometry.pdf&quot;&gt;The Geometry of Innocent Flesh on the Bone: Return-into-libc without Function Calls (on the x86)&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Hovav Shacham&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I read this paper for my introduction to information security class, and it was a good introduction to &lt;a href=&quot;https://en.wikipedia.org/wiki/Return-to-libc_attack&quot;&gt;return-to-libc attacks&lt;/a&gt; (I got to write my own exploit as part of my coursework!).&lt;/p&gt;

&lt;h4 id=&quot;on-the-effectiveness-of-address-space-randomization&quot;&gt;&lt;a href=&quot;https://web.stanford.edu/~blp/papers/asrandom.pdf&quot;&gt;On the Effectiveness of Address-Space Randomization&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Hovav Shacham &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another InfoSec paper (which is true of the next several, so I’ll just note when we move on from that topic). This one focused on the benefits of &lt;a href=&quot;https://en.wikipedia.org/wiki/Address_space_layout_randomization&quot;&gt;address-space layout randomization&lt;/a&gt;, or ASLR, in preventing attackers from jumping to known points in memory.&lt;/p&gt;

&lt;h4 id=&quot;aslr-guard-stopping-address-space-leakage-for-code-reuse-attacks&quot;&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/6588/630854bf12b190ae8f95ed8763f7cdb945f6.pdf&quot;&gt;ASLR-Guard: Stopping Address Space Leakage for Code Reuse Attacks&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Kangjie Lu &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ASLR is only effective if the address layout is truly random and no information about the randomization or ensuing layout is leaked. This paper discusses the possibility of information leakage and proposes ASLR-Guard as a measure to mitigate it (by rendering leaked pointer information useless).&lt;/p&gt;

&lt;h4 id=&quot;code-pointer-integrity&quot;&gt;&lt;a href=&quot;http://dslab.epfl.ch/pubs/cpi.pdf&quot;&gt;Code-Pointer Integrity&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Volodymyr Kuznetsov &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper covers Code-Pointer Integrity (CPI) as an augmentation to tools like ALSR. By enforcing CPI, it’s possible to prevent any kind of control-flow hijacking by an attacker (such as &lt;a href=&quot;https://en.wikipedia.org/wiki/Return-oriented_programming&quot;&gt;ROP exploits&lt;/a&gt;).&lt;/p&gt;

&lt;h4 id=&quot;control-flow-bending-on-the-effectiveness-of-control-flow-integrity&quot;&gt;&lt;a href=&quot;https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-carlini.pdf&quot;&gt;Control-Flow Bending: On the Effectiveness of Control-Flow Integrity&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Nicolas Carlini and Mathias Payer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another method of preventing control-flow hijacking, but with somewhat higher overhead than CPI.&lt;/p&gt;

&lt;h4 id=&quot;mining-your-ps-and-qs-detection-of-widespread-weak-keys-in-network-devices&quot;&gt;&lt;a href=&quot;https://factorable.net/weakkeys12.extended.pdf&quot;&gt;Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Nadia Heninger, Zakir Durumeric, Eric Wustrow, and J. Alex Halderman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I found this paper &lt;em&gt;really&lt;/em&gt; fascinating. It explores RSA and DSA failures caused by malfunctioning random number generators, particularly devices that generate predictable random numbers due to insufficient entropy in the input pool during boot (see Figure 5 in the paper). As is the case with all good security papers: really interesting, &lt;em&gt;really&lt;/em&gt; scary.&lt;/p&gt;

&lt;h4 id=&quot;q-learning-in-continuous-state-and-action-spaces&quot;&gt;&lt;a href=&quot;http://users.cecs.anu.edu.au/~rsl/rsl_papers/99ai.kambara.pdf&quot;&gt;Q-Learning in Continuous State and Action Spaces&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Chris Gaskett, David Wettergreen, and Alexander Zelinsky&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Moving on from InfoSec, we now enter the realm of reinforcement learning! (I took &lt;a href=&quot;https://www.omscs.gatech.edu/cs-8803-special-topics-reinforcement-learning&quot;&gt;Reinforcement Learning&lt;/a&gt; over the summer.) My first exposure to Q-learning was in Machine Learning for Trading (linked above), and that implementation relied on a Q-value table (requiring discrete action and state spaces). This paper covers Q-learning in environments with continuous action and/or state spaces.&lt;/p&gt;

&lt;h4 id=&quot;learning-to-predict-by-the-methods-of-temporal-differences&quot;&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/9c06/865e912788a6a51470724e087853d7269195.pdf&quot;&gt;Learning to Predict by the Methods of Temporal Differences&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Richard S. Sutton&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is another paper I found kind of mind-blowing. The general idea here is to incrementally improve predictions not by comparing predictions to actual outcomes, but by comparing &lt;em&gt;successive predictions&lt;/em&gt;. It’s the kind of thing that sounds like it shouldn’t work, but it absolutely does! It’s a bit long (36 pages), but definitely worth the read.&lt;/p&gt;

&lt;h4 id=&quot;knows-what-it-knows-a-framework-for-self-aware-learning&quot;&gt;&lt;a href=&quot;http://icml2008.cs.helsinki.fi/papers/627.pdf&quot;&gt;Knows What It Knows: A Framework For Self-Aware Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Lihong Li, Michael Littman, and Thomas J. Walsh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Knows-What-It-Knows, or KWIK, learning is a pretty cool idea, and the paper is a quick (pun super intended) read. The idea is to apply PAC (probably, approximately correct)-learnability to mistake-bound models, resulting in a learner that’s able to determine when it doesn’t know the answer. The example provided in section 2 of the paper is a great way to develop intuition around KWIK learning and is only about a page long.&lt;/p&gt;

&lt;h4 id=&quot;residual-algorithms-reinforcement-learning-with-function-approximation&quot;&gt;&lt;a href=&quot;http://www.leemon.com/papers/1995b.pdf&quot;&gt;Residual Algorithms: Reinforcement Learning with Function Approximation&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Leemon Baird&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another cool one. The idea here is that there are reinforcement learning algorithms (such as Q-learning) that perform well using lookup tables, but perform poorly when direct function approximation is used. Baird shows that residual algorithms permit direct approximation while maintaining stability and convergence.&lt;/p&gt;

&lt;h4 id=&quot;stable-function-approximation-in-dynamic-programming&quot;&gt;&lt;a href=&quot;http://www.cs.cmu.edu/~ggordon/ml95-stable-dp.pdf&quot;&gt;Stable Function Approximation in Dynamic Programming&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Geoffrey J. Gordon&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is one of the papers that really underscored for me the interrelation of reinforcement learning and dynamic programming (which each rely on the same mathematical underpinning: the Bellman equations). Though the equations themselves are not referenced, the proofs of convergence for multiple temporal difference learning algorithms that rely on function approximation (see also &lt;strong&gt;Baird&lt;/strong&gt;, above) are really cool.&lt;/p&gt;

&lt;h4 id=&quot;between-mdps-and-semi-mdps-a-framework-for-temporal-abstraction-in-reinforcement-learning&quot;&gt;&lt;a href=&quot;http://www-anw.cs.umass.edu/~barto/courses/cs687/Sutton-Precup-Singh-AIJ99.pdf&quot;&gt;Between MDPs and Semi-MDPs: A Framework for Temporal Abstraction in Reinforcement Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Richard S. Sutton, Doina Precup, and Satinder Singh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We read a few different papers on temporal abstraction in reinforcement learning for my RL class, but this one was my favorite. I particularly like the idea of &lt;em&gt;options&lt;/em&gt; in this paper, which are temporally variable, closed-loop policies that agents may take in the course of learning a game (&lt;em&gt;e.g.&lt;/em&gt; picking up an object, traversing a room). Abstracting time out in this way (rather than thinking in terms of discrete steps, each of uniform spatiotemporal duration) allows us to incorporate more intuitive, semantically valuable actions into Markov processes.&lt;/p&gt;

&lt;h4 id=&quot;a-polynomial-time-nash-equilibrium-algorithm-for-repeated-games&quot;&gt;&lt;a href=&quot;http://jmvidal.cse.sc.edu/library/littman03a.pdf&quot;&gt;A Polynomial-time Nash Equilibrium Algorithm for Repeated Games&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Littman and Peter Stone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is another cool one: determining a polynomial-time algorithm for finding Nash equilibria in general-sum games (&lt;em&gt;e.g.&lt;/em&gt; multiplayer online games).&lt;/p&gt;

&lt;h4 id=&quot;a-polynomial-time-nash-equilibrium-algorithm-for-repeated-stochastic-games&quot;&gt;&lt;a href=&quot;https://eprints.soton.ac.uk/266923/1/MunozLittman-sg.pdf&quot;&gt;A Polynomial-time Nash Equilibrium Algorithm for Repeated Stochastic Games&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Enrique Munoz de Cote and Michael Littman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Similar to the above, but for stochastic (non-deterministic) games.&lt;/p&gt;

&lt;h4 id=&quot;markov-games-as-a-framework-for-multi-agent-reinforcement-learning&quot;&gt;&lt;a href=&quot;https://www.cs.rutgers.edu/~mlittman/papers/ml94-final.pdf&quot;&gt;Markov Games as a Framework for Multi-Agent Reinforcement Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Michael Littman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper extends Q-learning beyond MDPs (Markov decision processes) and into Markov games. (Another good paper on this topic, also by Littman, is &lt;a href=&quot;https://www.cs.rutgers.edu/~mlittman/papers/icml01-ffq.pdf&quot;&gt;“Friend-or-Foe Q-Learning in General-Sum Games”&lt;/a&gt;.)&lt;/p&gt;

&lt;h4 id=&quot;correlated-q-learning&quot;&gt;&lt;a href=&quot;https://www2.cs.duke.edu/courses/spring07/cps296.3/correlated_q.pdf&quot;&gt;Correlated Q-Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Amy Greenwald and Keith Hall&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the last RL paper I’ll list here (and, I think, the last one I read for my class). Greenwald and Hall introduce correlated Q-learning, which is a Q-learning algorithm that relies on correlated equilibria to generalize both Nash-Q and Friend-or-Foe-Q (see Littman’s paper, above). I really enjoyed reading this paper, and it was a great place to end my reading for the course, knitting together Q-learning, Nash equilibria, MDPs, and Markov games.&lt;/p&gt;

&lt;h4 id=&quot;practical-network-support-for-ip-traceback&quot;&gt;&lt;a href=&quot;https://cseweb.ucsd.edu/~savage/papers/Sigcomm00.pdf&quot;&gt;Practical Network Support for IP Traceback&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Stefan Savage, David Wetherall, Anna Karlin and Tom Anderson&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the first of a few papers I read for &lt;a href=&quot;https://www.omscs.gatech.edu/cs-6262-network-security&quot;&gt;Network Security&lt;/a&gt; (as before, I’ll note when we switch gears). This one focuses on identifying the source of packet flooding attacks without the cooperation of the associated ISP (and using a surprisingly elegant sampling algorithm that relies on very little edge data to reconstruct a packet’s path).&lt;/p&gt;

&lt;h4 id=&quot;a-dos-limiting-network-architecture&quot;&gt;&lt;a href=&quot;https://djw.cs.washington.edu/papers/tva-sigcomm2005.pdf&quot;&gt;A DoS-Limiting Network Architecture&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Xiaowei Yang, David Wetherall, and Thomas Anderson&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper introduced me to the idea of &lt;em&gt;capabilities&lt;/em&gt;, which are a method by which routers can identify desired packets (packets encoding this kind of information are said to employ a capability). While the overhead involved in adopting this architecture is nontrivial, implementing capabilities (or their functional equivalent) would be a huge step forward in securing computer networks.&lt;/p&gt;

&lt;h4 id=&quot;zmap-fast-internet-wide-scanning-and-its-security-applications&quot;&gt;&lt;a href=&quot;http://tdc.iorc.depaul.edu/media/zmap.pdf&quot;&gt;ZMap: Fast Internet-Wide Scanning and Its Security Applications&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Zakir Durumeric, Eric Wustrow, and J. Alex Halderman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper taught me about ZMap, which is, well, “a modular, open-source network scanner specifically architected to perform Internet-wide scans and capable of surveying the entire IPv4 address space in under 45 minutes from user space on a single machine.” It’s a really cool tool, and I encourage you to &lt;a href=&quot;https://zmap.io/&quot;&gt;check it out&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;anomalous-payload-based-network-intrusion-detection&quot;&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/c441/1d48c00924f7ebc57d4e7ebaa8d2f23c973e.pdf&quot;&gt;Anomalous Payload-Based Network Intrusion Detection&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ke Wang and Salvatore J. Stolfo&lt;/strong&gt;
This was the first of two papers I read for one of my Network Security projects, which involved using PAYL to detect anomalous traffic. I particularly enjoyed this paper because it sits at the intersection of two of my main interests: information security and machine learning.&lt;/p&gt;

&lt;h4 id=&quot;polymorphic-blending-attacks&quot;&gt;&lt;a href=&quot;https://www.usenix.org/legacy/event/sec06/tech/full_papers/fogla/fogla_html/main.html&quot;&gt;Polymorphic Blending Attacks&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Prahlad Fogla &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was the second of two papers I read for the Network Security project I mention above. In this paper, the authors discuss polymorphic blending attacks, which can be used to hide anomalous traffic from detectors like PAYL. I even got to try my hand at obfuscating malevolent traffic and getting it past a PAYL-based model I’d built!&lt;/p&gt;

&lt;h4 id=&quot;dynamic-routing-between-capsules&quot;&gt;&lt;a href=&quot;https://arxiv.org/pdf/1710.09829.pdf&quot;&gt;Dynamic Routing Between Capsules&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sara Sabour, Nicholas Frosst, and Geoffrey E. Hinton&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These next two papers are on capsule networks, which are an augmentation to more traditional convolutional neural networks. The idea is to encode positioning information in the networks themselves to make them more robust to affine transformations; &lt;a href=&quot;https://medium.com/ai%C2%B3-theory-practice-business/understanding-hintons-capsule-networks-part-i-intuition-b4b559d1159b&quot;&gt;this series of Medium posts&lt;/a&gt; is a really good step-by-step breakdown of the material.&lt;/p&gt;

&lt;h4 id=&quot;matrix-capsules-with-em-routing&quot;&gt;&lt;a href=&quot;https://openreview.net/pdf?id=HJWLfGWRb&quot;&gt;Matrix Capsules with EM Routing&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Geoffrey E. Hinton &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This paper is also on capsule networks, but focuses on the expectation maximization algorithm used to route signals between layers. &lt;a href=&quot;https://medium.com/ai%C2%B3-theory-practice-business/understanding-hintons-capsule-networks-part-iii-dynamic-routing-between-capsules-349f6d30418&quot;&gt;This Medium post&lt;/a&gt; (from the same series as the post linked above) is a great explanation of (and addition to) the paper.&lt;/p&gt;

&lt;h4 id=&quot;white-paper-the-universal-recommender&quot;&gt;&lt;a href=&quot;https://arxiv.org/pdf/0909.3472.pdf&quot;&gt;White Paper: The Universal Recommender&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jérôme Kunegis, Alan Said and Winfried Umbrath&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finally, I read the white paper on the Universal Recommender (used by PredictionIO, mentioned under &lt;strong&gt;Books&lt;/strong&gt;). The underlying correlated cross-occurrence algorithm is interesting, and I think this is something of a must-read for anyone considering using the Universal Recommender (or honestly, anyone interested in building ML-based recommendation systems).&lt;/p&gt;

&lt;p&gt;I also read a bunch of cryptocurrency and cryptographic token white/yellow papers (including those for Ethereum (&lt;a href=&quot;https://github.com/ethereum/wiki/wiki/White-Paper&quot;&gt;white&lt;/a&gt; and &lt;a href=&quot;http://ethereum.github.io/yellowpaper/paper.pdf&quot;&gt;yellow&lt;/a&gt;), &lt;a href=&quot;http://golemproject.net/doc/DraftGolemProjectWhitepaper.pdf&quot;&gt;Golem&lt;/a&gt;, &lt;a href=&quot;https://basicattentiontoken.org/BasicAttentionTokenWhitePaper-4.pdf&quot;&gt;Basic Attention Token&lt;/a&gt;, &lt;a href=&quot;https://tokensale.civic.com/CivicTokenSaleWhitePaper.pdf&quot;&gt;Civic&lt;/a&gt;, &lt;a href=&quot;https://www.waxtoken.com/wp-content/uploads/WAX_White_Paper.pdf?1020&quot;&gt;WAX&lt;/a&gt;, and &lt;a href=&quot;https://github.com/EOSIO/Documentation/blob/master/TechnicalWhitePaper.md&quot;&gt;EOS&lt;/a&gt;). Since these aren’t peer-reviewed academic papers, though, I haven’t broken them out as I have for the others (though I do find them extremely interesting).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Finally, here the papers I want to read in 2018 (starting with two rolled-over ones from 2017):&lt;/p&gt;

&lt;h4 id=&quot;mastering-the-game-of-go-with-deep-neural-networks-and-tree-search&quot;&gt;&lt;a href=&quot;http://airesearch.com/wp-content/uploads/2016/01/deepmind-mastering-go.pdf&quot;&gt;Mastering the Game of Go with Deep Neural Networks and Tree Search&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Google DeepMind&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I followed some of the news about AlphaGo’s victory over Lee Sedol last year, but didn’t get a chance to read the paper, so it’s on my to-read list for the new year.&lt;/p&gt;

&lt;h4 id=&quot;everything-you-always-wanted-to-know-about-synchronization-but-were-afraid-to-ask&quot;&gt;&lt;a href=&quot;http://sigops.org/sosp/sosp13/papers/p33-david.pdf&quot;&gt;Everything You Always Wanted to Know About Synchronization but Were Afraid to Ask&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Tudor David, Rachid Guerraoui, and Vasileios Trigonakis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Synchronization is hard! Hopefully reading this paper makes it less so (for me, anyway).&lt;/p&gt;

&lt;h4 id=&quot;mastering-chess-and-shogi-by-self-play-with-a-general-reinforcement-learning-algorithm&quot;&gt;&lt;a href=&quot;https://arxiv.org/pdf/1712.01815.pdf&quot;&gt;Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;David Silver &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A continuation of the type of work explored in “Mastering the Game of Go…” (above). In this case, AlphaZero attained a superhuman level of play in chess, shogi, and go after only &lt;em&gt;twenty-four hours of self-play, with no prior domain knowledge&lt;/em&gt;.&lt;/p&gt;

&lt;h4 id=&quot;improving-elevator-performance-using-reinforcement-learning&quot;&gt;&lt;a href=&quot;https://papers.nips.cc/paper/1073-improving-elevator-performance-using-reinforcement-learning.pdf&quot;&gt;Improving Elevator Performance Using Reinforcement Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Robert H. Crites and Andrew G. Barto&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the only paper I didn’t read during my RL class, so I want to be sure to get to it.&lt;/p&gt;

&lt;h4 id=&quot;the-max-k-armed-bandit-a-new-model-of-exploration-applied-to-search-heuristic-selection&quot;&gt;&lt;a href=&quot;https://ocs.aaai.org/Papers/AAAI/2005/AAAI05-215.pdf&quot;&gt;The Max K-Armed Bandit: A New Model of Exploration Applied to Search Heuristic Selection&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Vincent A. Cicirello and Stephen F. Smith&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I became interested in &lt;em&gt;k&lt;/em&gt;-armed bandits when we covered them in my RL class, and given that this won the &lt;a href=&quot;http://jeffhuang.com/best_paper_awards.html&quot;&gt;best AAAI paper award in 2005&lt;/a&gt;, I figure this should be well worth the read.&lt;/p&gt;

&lt;h4 id=&quot;polynomial-time-algorithms-for-prime-factorization-and-discrete-logarithms-on-a-quantum-computer&quot;&gt;&lt;a href=&quot;https://arxiv.org/pdf/quant-ph/9508027.pdf&quot;&gt;Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Peter W. Shor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Quantum computing sort of fell off my radar this year, and given all the activity in cryptocurrency markets over the past twelve months, I figure now’s the time to read up on the sorts of technology that would turn those markets upside-down.&lt;/p&gt;

&lt;p&gt;Off we go!&lt;/p&gt;
</description>
        <pubDate>Sat, 23 Dec 2017 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/culture/reading/poetry/learning/2017/12/23/reading-list-2018/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/culture/reading/poetry/learning/2017/12/23/reading-list-2018/</guid>
      </item>
    
      <item>
        <title>How to Call Your Reps</title>
        <description>&lt;p&gt;Calling your representatives is one of the most direct methods you have for influencing US politics (this guide assumes an American audience). Aside from showing up in person (&lt;em&gt;e.g.&lt;/em&gt; at a town hall meeting or protest), calling is the most important thing you can do. There is no form of communication I hate more than the telephone, but I’ve managed to call my representatives every weekday this month and I’m going to keep calling every weekday until Donald Trump is out of office. If I can do it, you can do it!&lt;/p&gt;

&lt;h3 id=&quot;know-who-they-are&quot;&gt;Know who they are&lt;/h3&gt;
&lt;p&gt;This step is the simplest: you can &lt;a href=&quot;https://whoaremyrepresentatives.org/&quot;&gt;look them up&lt;/a&gt;! The ones you’ll call most often are probably your US senators (you have two) and your representative in the House (you have one of these). They can be reached by e-mail, Twitter, Facebook, and so on, but &lt;a href=&quot;https://www.nytimes.com/2016/11/22/us/politics/heres-why-you-should-call-not-email-your-legislators.html&quot;&gt;calling is the most effective&lt;/a&gt;. Like I said, I &lt;em&gt;really&lt;/em&gt; hate talking to people on the phone, but this is important enough that I’ve gotten over it. I sort of even look forward to calling on my walk to work each morning.&lt;/p&gt;

&lt;h3 id=&quot;be-persistent&quot;&gt;Be persistent&lt;/h3&gt;
&lt;p&gt;Senators and members of the House are, like you, extremely busy, so they and their staff aren’t always available when you happen to call; you may have to try a few times in order to get through. Don’t give up! If you call a few times and there’s no answer, try again in an hour or two. If you call several times and still can’t get through, leave a message with your contact information. As for what you should say in your message…&lt;/p&gt;

&lt;h3 id=&quot;have-a-script&quot;&gt;Have a script&lt;/h3&gt;
&lt;p&gt;Many people I’ve talked to have expressed interest in calling their representatives, but hesitate because they’re not sure what to say. This is understandable, but can be fixed with a bit of preparation. Here’s a sample script for calling about Trump’s Muslim ban:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hi, my name is (your name) and I’m a consitutent of (representative). I’m deeply concerned by Donald Trump’s executive order banning Muslim refugees and want to be sure (representative) is doing everything in (his/her) power to fight it and get it rescinded.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(Organizations like &lt;a href=&quot;https://5calls.org/&quot;&gt;5 Calls&lt;/a&gt; have sample scripts ready if you don’t want or have time to create your own.)&lt;/p&gt;

&lt;p&gt;Congressional staff members are generally very polite and will usually promise to pass your message along; they may ask you for a few details, like your ZIP code, to ensure that your message is relevant to their boss. If you call with multiple concerns, feel free to ask the staff member to read your request back to you to make sure they’ve gotten everything. Which reminds me:&lt;/p&gt;

&lt;h3 id=&quot;be-polite&quot;&gt;Be polite&lt;/h3&gt;
&lt;p&gt;Regardless of whether your representative shares your political views, it’s crucial to be polite: they (and their staff members) will be much less sympathetic to your viewpoint if you’re rude, combative, or abusive. If you’re calling a rep from your own party, feel free to mention that and reiterate how important your issue is to you (and, by extension, should be to them). If you’re calling a rep from another party, you can let their staff know how troubled you are by the direction they and/or their party is taking without directly stating your party affiliation.&lt;/p&gt;

&lt;p&gt;One last thing: take the time to call when your representatives have done something you think is good! Positive reinforcement goes a long way, and people are much more likely to remain motivated when they receive it.&lt;/p&gt;

&lt;h3 id=&quot;get-in-the-habit&quot;&gt;Get in the habit&lt;/h3&gt;
&lt;p&gt;Finally, it’s important to remember that civic engagement isn’t a one-time thing: it’s a commitment. Luckily, once you call your representatives one time, calling them repeatedly becomes easier. I recommend calling regularly (weekly or daily) and always calling at the same time of day. Calling only takes a minute or two, but the impact you have might be felt for years to come.&lt;/p&gt;
</description>
        <pubDate>Sun, 29 Jan 2017 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/politics/2017/01/29/how-to-call-your-reps/</link>
        <guid isPermaLink="true">https://ericweinste.in/politics/2017/01/29/how-to-call-your-reps/</guid>
      </item>
    
      <item>
        <title>Reading List 2017</title>
        <description>&lt;h2 id=&quot;books&quot;&gt;Books&lt;/h2&gt;
&lt;p&gt;I managed to read most of the books on &lt;a href=&quot;/reading/learning/2015/12/27/reading-list-2016/&quot;&gt;my 2016 reading list&lt;/a&gt; (see below for the three that I’m rolling over into 2017), along with some new ones I picked up along the way:&lt;/p&gt;

&lt;h4 id=&quot;lheure-bleue-or-the-judy-poems&quot;&gt;&lt;a href=&quot;https://www.amazon.com/LHeure-Bleue-Poems-Elisa-Gabbert/dp/193956817X&quot;&gt;L’Heure Bleue, or The Judy Poems&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Elisa Gabbert&lt;/strong&gt;
I’ve come across Elisa’s poems over the past few years in &lt;a href=&quot;http://thediagram.com/16_2/gabbert.html&quot;&gt;&lt;em&gt;DIAGRAM&lt;/em&gt;&lt;/a&gt; and &lt;a href=&quot;http://www.coconutpoetry.org/gabbert1.htm&quot;&gt;&lt;em&gt;coconut&lt;/em&gt;&lt;/a&gt;, so I ordered her new book as soon as I saw it come across my Twitter feed. The poems live partially inside the mind of Judy, a character in Wallace Shawn’s &lt;em&gt;The Designated Mourner&lt;/em&gt;. They’re really extraordinary, and I’m planning to read the rest of Elisa’s books (&lt;em&gt;French Exit&lt;/em&gt; and &lt;em&gt;The Self Unstable&lt;/em&gt;) in 2017. Every once in awhile I read a book of poems that jump-starts my own writing, and this is one of them; I haven’t written a review of a poetry collection in awhile, but this one has been turning over in my mind enough these past couple of weeks that I may give it a go in the new year.&lt;/p&gt;

&lt;h4 id=&quot;sensual-math&quot;&gt;&lt;a href=&quot;https://www.amazon.com/gp/product/0393037509&quot;&gt;Sensual Math&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Alice Fulton&lt;/strong&gt;
I picked this up shortly after my younger brother’s sudden death this summer. I enjoyed Fulton’s “fractal” poetry and found it really helpful, and this is another one that’s gotten me thinking about my own writing again (one of my goals for 2017 is to write more poems).&lt;/p&gt;

&lt;h4 id=&quot;it-cant-happen-here&quot;&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/It_Can&apos;t_Happen_Here&quot;&gt;It Can’t Happen Here&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sinclair Lewis&lt;/strong&gt;
Except, as you know, it can and it did.&lt;/p&gt;

&lt;h4 id=&quot;machine-learning&quot;&gt;&lt;a href=&quot;http://www.cs.cmu.edu/afs/cs.cmu.edu/user/mitchell/ftp/mlbook.html&quot;&gt;Machine Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Tom M. Mitchell&lt;/strong&gt;
This was required for the &lt;a href=&quot;http://omscs.gatech.edu/cs-7641-machine-learning&quot;&gt;machine learning course&lt;/a&gt; I took at Georgia Tech this fall. The text is surprisingly clear and conversational, and I really enjoyed both the reading and the coursework.&lt;/p&gt;

&lt;h4 id=&quot;modern-mandarin-chinese-grammar&quot;&gt;&lt;a href=&quot;https://www.amazon.com/gp/product/0415827140&quot;&gt;Modern Mandarin Chinese Grammar&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Claudia Ross and Jing-heng Sheng Ma&lt;/strong&gt;
Laura and I started learning Mandarin this year, so I picked up this book to go along with the texts assigned for &lt;a href=&quot;http://www.chineseacademyla.com/courses&quot;&gt;the class we’re taking&lt;/a&gt;. I’m probably around an &lt;a href=&quot;https://en.wikipedia.org/wiki/Hanyu_Shuiping_Kaoshi#Written_test&quot;&gt;HSK2&lt;/a&gt; level at this point (我会说一点点中文但是我的中文不好). I’m hoping to take the HSK4 exam in late 2017!&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Here’s what I want to read in the coming year (starting with rolled-over books from 2016). As you’ll sort of see from my book and paper choices, my interests are mostly poetry (20th/21st century), philosophy (all kinds, though recently mostly ethics and philosophy of science), and computer science/tech (machine learning, information security, artificial intelligence, and programming languages, particularly functional and dependently-typed languages):&lt;/p&gt;

&lt;h4 id=&quot;structure-and-interpretation-of-computer-programs&quot;&gt;&lt;a href=&quot;https://mitpress.mit.edu/sicp/&quot;&gt;Structure and Interpretation of Computer Programs&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Harold Abelson and Gerald Jay Sussman with Julie Sussman&lt;/strong&gt;
(Rolled over from 2016.) I wrote last year: “I’ve gotten about a third of the way through &lt;em&gt;SICP&lt;/em&gt; twice; in 2016, my goal is to finish it.” Here’s hoping third time’s the charm!&lt;/p&gt;

&lt;h4 id=&quot;seven-concurrency-models-in-seven-weeks&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/9781937785659.do&quot;&gt;Seven Concurrency Models in Seven Weeks&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Paul Butcher&lt;/strong&gt;
(Rolled over from 2016.) For me, the hardest thing about learning Clojure was learning its concurrency primitives: atoms, agents, refs, and STM were unlike anything I’d ever used before. After writing Clojure for nearly four years and using it in a production web and iOS app, I’ve gained a deep appreciation for new ways of thinking about and writing concurrent applications. This book seems like it has a thing or two (or seven!) to teach me.&lt;/p&gt;

&lt;h4 id=&quot;purely-functional-data-structures&quot;&gt;&lt;a href=&quot;http://www.amazon.com/dp/0521663504&quot;&gt;Purely Functional Data Structures&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Chris Okasaki&lt;/strong&gt;
(Rolled over from 2016.) I read part of the &lt;a href=&quot;https://www.cs.cmu.edu/~rwh/theses/okasaki.pdf&quot;&gt;paper&lt;/a&gt; (also on my 2016 list) before deciding to just focus on the book. While I was taking Algorithms: Design &amp;amp; Analysis, parts &lt;a href=&quot;https://www.coursera.org/course/algo&quot;&gt;one&lt;/a&gt; and &lt;a href=&quot;https://www.coursera.org/course/algo2&quot;&gt;two&lt;/a&gt; on Coursera, I became interested in applying what I’d learned to functional programming languages like Clojure (as opposed to Java or Python, which I figure are the languages most students are using), which led me to Okasaki’s work.&lt;/p&gt;

&lt;h4 id=&quot;deep-learning-a-practitioners-approach&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920035343.do&quot;&gt;Deep Learning: A Practitioner’s Approach&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Josh Patterson and Adam Gibson&lt;/strong&gt;
We haven’t gotten too much into deep learning and deep neural network architectures in my coursework, so I’d like to dig into that in 2017. I gave &lt;a href=&quot;https://speakerdeck.com/ericqweinstein/machine-learning-with-clojure-and-apache-spark&quot;&gt;a talk&lt;/a&gt; at this year’s &lt;a href=&quot;http://euroclojure.org/&quot;&gt;EuroClojure&lt;/a&gt; that involved some work with &lt;a href=&quot;https://deeplearning4j.org/&quot;&gt;DL4J&lt;/a&gt;, and I’d like to continue that kind of work in the new year.&lt;/p&gt;

&lt;h4 id=&quot;type-driven-development-with-idris&quot;&gt;&lt;a href=&quot;https://www.manning.com/books/type-driven-development-with-idris&quot;&gt;Type-Driven Development with Idris&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Edwin Brady&lt;/strong&gt;
I did some reading and work on &lt;a href=&quot;http://www.idris-lang.org/&quot;&gt;Idris&lt;/a&gt; in 2016 (more under &lt;strong&gt;Papers&lt;/strong&gt;, below), so I’m really excited to read Edwin’s book when it’s available next month.&lt;/p&gt;

&lt;h4 id=&quot;thoughtful-machine-learning&quot;&gt;&lt;a href=&quot;http://shop.oreilly.com/product/0636920032298.do&quot;&gt;Thoughtful Machine Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Matthew Kirk&lt;/strong&gt;
Ruby and ML are two of my favorite things! (I gave &lt;a href=&quot;https://speakerdeck.com/ericqweinstein/domo-arigato-mr-roboto-machine-learning-with-ruby&quot;&gt;a talk&lt;/a&gt; on machine learning with Ruby at RubyConf this fall.) There’s not a whole lot of machine learning work being done in Ruby, so I’m interested to see what Kirk has in store.&lt;/p&gt;

&lt;h4 id=&quot;effective-java&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683&quot;&gt;Effective Java&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Joshua Bloch&lt;/strong&gt;
As I’m getting the chance to write more Java at work, I’m re-reading this one to improve my code and better follow best practices. There’s a ton of great stuff in this book, and I wholeheartedly recommend it to anyone who writes Java (professionally or otherwise).&lt;/p&gt;

&lt;h4 id=&quot;the-hacker-playbook-2&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Hacker-Playbook-Practical-Penetration-Testing/dp/1512214566&quot;&gt;The Hacker Playbook 2&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Peter Kim&lt;/strong&gt;
I’m taking &lt;a href=&quot;http://omscs.gatech.edu/cs-6035-introduction-to-information-security&quot;&gt;an information security course at Georgia Tech&lt;/a&gt; in the spring, so I figured I’d do a little extracurricular reading (including this book on penetration testing). This is a bit of a follow-up to my earlier security reading (&lt;a href=&quot;https://www.nostarch.com/hacking2.htm&quot;&gt;Hacking: The Art of Exploitation&lt;/a&gt; and &lt;a href=&quot;https://www.nostarch.com/pentesting&quot;&gt;Penetration Testing&lt;/a&gt;). My guess is that 90% of my interest in computer security has to do with the current political climate and 10% from watching too much &lt;em&gt;Mr. Robot&lt;/em&gt;.&lt;/p&gt;

&lt;h4 id=&quot;ethical-hacking-and-penetration-testing-guide&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Ethical-Hacking-Penetration-Testing-Guide/dp/1482231611&quot;&gt;Ethical Hacking and Penetration Testing Guide&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Rafay Baloch&lt;/strong&gt;
Another book on information security and penetration testing, though this one has a bit more in the way of process and ethics.&lt;/p&gt;

&lt;h4 id=&quot;the-basics-of-hacking-and-penetration-testing-2nd-edition&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Basics-Hacking-Penetration-Testing-Second/dp/0124116442&quot;&gt;The Basics of Hacking and Penetration Testing (2nd Edition)&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Patrick Engebretson&lt;/strong&gt;
The third in my trio of “how to hack stuff” books! There’s probably going to be a fair amount of overlap among them, but I want to be sure I have a thorough grounding in practice as well as theory.&lt;/p&gt;

&lt;h4 id=&quot;computer-security-principles-and-practice-3rd-edition&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0133773922&quot;&gt;Computer Security, Principles and Practice (3rd Edition)&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;William Stallings and Lawrie Brown&lt;/strong&gt;
Speaking of theory, this is the required text for my information security course.&lt;/p&gt;

&lt;h4 id=&quot;artificial-intelligence-a-modern-approach&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0136042597&quot;&gt;Artificial Intelligence: A Modern Approach&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Stuart Russell and Peter Norvig&lt;/strong&gt;
I’ve read bits and pieces of this as part of my machine learning and AI coursework, and I’d like to dig deeper in 2017.&lt;/p&gt;

&lt;h4 id=&quot;mindset-the-new-psychology-of-success&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0345472322&quot;&gt;Mindset: The New Psychology of Success&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Carol S. Dweck&lt;/strong&gt;
I mentioned this book in &lt;a href=&quot;https://speakerdeck.com/ericqweinstein/booting-up-hiring-and-growing-boot-camp-graduates&quot;&gt;another talk&lt;/a&gt; I gave at RailsConf in May. I read a couple of Dweck’s papers while preparing for that talk, and I think there’s a tremendous amount I can learn from &lt;em&gt;Mindset&lt;/em&gt; for my growth as both an individual contributor and as a manager.&lt;/p&gt;

&lt;h4 id=&quot;first-break-all-the-rules&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/B002IU6LR6&quot;&gt;First, Break All the Rules&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Marcus Buckingham and Curt Coffman&lt;/strong&gt;
I’ve heard good things about this book at each of the last three places I’ve worked, so it’s probably high time I read it.&lt;/p&gt;

&lt;h4 id=&quot;hume-an-intellectual-biography&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0521837251&quot;&gt;Hume: An Intellectual Biography&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;James A. Harris&lt;/strong&gt;
I’ve been interested in Hume since I took an introductory philosophy course in college, and the reviews for this biography look pretty good.&lt;/p&gt;

&lt;h4 id=&quot;the-culture-industry&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Culture-Industry-Selected-Routledge-Classics/dp/0415253802&quot;&gt;The Culture Industry&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Theodor W. Adorno&lt;/strong&gt;
I’ve also been interested in Adorno since college, and in fact read this exact book for a cultural studies class I took. &lt;a href=&quot;http://www.newyorker.com/culture/cultural-comment/the-frankfurt-school-knew-trump-was-coming&quot;&gt;This &lt;em&gt;New Yorker&lt;/em&gt; article&lt;/a&gt; brought it back to my attention, and I think it’s overdue for a re-read.&lt;/p&gt;

&lt;h4 id=&quot;a-billion-voices-chinas-search-for-a-common-language&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0734399596&quot;&gt;A Billion Voices: China’s Search for a Common Language&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;David Moser&lt;/strong&gt;
This book was recommended by my Mandarin teacher, and I think it’ll be really interesting to see how modern Mandarin arose from a highly fragmented set of spoken languages and traditions.&lt;/p&gt;

&lt;h4 id=&quot;barely-composed-poems&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0393244881&quot;&gt;Barely Composed: Poems&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Alice Fulton&lt;/strong&gt;
Fulton is the author of &lt;em&gt;Sensual Math&lt;/em&gt;, which I read this past year and really enjoyed. This is a more recent collection of hers, and I’m interested to see how her poetry has evolved over time.&lt;/p&gt;

&lt;h4 id=&quot;the-nightingales-of-troy&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0393335445&quot;&gt;The Nightingales of Troy&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Alice Fulton&lt;/strong&gt;
This is a collection of linked short stories. I’m interested in this partly because I like her work, but also because I’m somewhat interested in writing short fiction, so I’m curious to see whether and how this will inform and provoke my own writing.&lt;/p&gt;

&lt;h4 id=&quot;french-exit&quot;&gt;&lt;a href=&quot;http://www.birdsllc.com/catalog/the-french-exit&quot;&gt;French Exit&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Elisa Gabbert&lt;/strong&gt;
As mentioned, I read Elisa’s &lt;em&gt;L’Heure Bleue, or The Judy Poems&lt;/em&gt; this year, and I’m excited to read her earlier work in 2017.&lt;/p&gt;

&lt;h4 id=&quot;the-self-unstable&quot;&gt;&lt;a href=&quot;http://www.blackocean.org/catalog1/the-self-unstable&quot;&gt;The Self Unstable&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Elisa Gabbert&lt;/strong&gt;
These are lyric essays rather than poems. In the vein of my interest in Fulton’s work (that is, reading non-poetry as well as poetry by the same author), I’m curious to see how Elisa’s writing changes between these two modes and to discover what implications this could have for my own writing.&lt;/p&gt;

&lt;h4 id=&quot;the-three-body-problem&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0765382032&quot;&gt;The Three-Body Problem&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Cixin Liu&lt;/strong&gt;
This is the only novel on my reading list, but it’s been recommended to me by three completely separate groups of friends, so I’m expecting to really enjoy it. (It’s not that I don’t enjoy reading novels—I do—but they’ve been crowded out by my interests in poetry, philosophy, and computation over the past handful of years.)&lt;/p&gt;

&lt;h4 id=&quot;the-voynich-manuscript&quot;&gt;&lt;a href=&quot;https://www.amazon.com/dp/0300217234&quot;&gt;The Voynich Manuscript&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Raymond Clemens (Editor)&lt;/strong&gt;
The &lt;a href=&quot;https://en.wikipedia.org/wiki/Voynich_manuscript&quot;&gt;Voynich manuscript&lt;/a&gt; is a fascinating illustrated codex from the fifteenth century. I’ve been interested in ciphers and cryptography generally (more under &lt;strong&gt;Papers&lt;/strong&gt;, below) and the Voynich manuscript in particular for years, and I’m so glad there’s finally an affordable reproduction. (Until Clemens’ edition, the &lt;a href=&quot;https://www.amazon.com/Code-Voynich-Jean-Claude-Gawsewitch/dp/2350130223&quot;&gt;only one available&lt;/a&gt; was roughly $250.00.)&lt;/p&gt;

&lt;h2 id=&quot;papers&quot;&gt;Papers&lt;/h2&gt;
&lt;p&gt;I read almost all the papers I set out to read this year (see below for the two I’m rolling over into 2017). I was especially glad to have read all the Idris papers I set out to read in 2016. I even managed to become an &lt;a href=&quot;https://github.com/idris-lang/Idris-dev/blob/master/CONTRIBUTORS#L73&quot;&gt;Idris contributor&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Here are some extra papers I read in 2016 (mostly as part of the Georgia Tech &lt;a href=&quot;http://omscs.gatech.edu/&quot;&gt;OMSCS&lt;/a&gt;):&lt;/p&gt;

&lt;h4 id=&quot;mimic-finding-optima-by-estimating-probability-densities&quot;&gt;&lt;a href=&quot;http://www.cc.gatech.edu/~isbell/papers/isbell-mimic-nips-1997.pdf&quot;&gt;MIMIC: Finding Optima by Estimating Probability Densities&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jeremy S. De Bonet, Charles L. Isbell, Jr., and Paul Viola&lt;/strong&gt;
This is a paper on the MIMIC algorithm, which is a randomized optimization algorithm that takes into account the structure of the solution as it searches for optima. If you’re familiar with other RO algorithms but not MIMIC in particular, I think you’ll really enjoy this paper.&lt;/p&gt;

&lt;h4 id=&quot;a-direct-adaptive-method-for-faster-backpropagation-learning-the-rprop-algorithm&quot;&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/916c/eefae4b11dadc3ee754ce590381c568c90de.pdf&quot;&gt;A Direct Adaptive Method for Faster Backpropagation Learning: The RPROP Algorithm&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Martin Riedmiller and Heinrich Braun&lt;/strong&gt;
We learned about backpropagation in neural networks in my machine learning course. I discovered RPROP while digging through the &lt;a href=&quot;https://github.com/pushkar/ABAGAIL&quot;&gt;ABAGAIL&lt;/a&gt; machine learning library, and discovered this paper while researching how the algorithm actually works.&lt;/p&gt;

&lt;h4 id=&quot;beyond-backpropagation-using-simulated-annealing-for-training-neural-networks&quot;&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/7889/592eb7b44b631bcb242e210b7c8b1de7d197.pdf&quot;&gt;Beyond Backpropagation: Using Simulated Annealing for Training Neural Networks&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Randall S. Sexton, Robert E. Dorsey, and John D. Johnson&lt;/strong&gt;
We also covered simulated annealing in the randomized optimization portion of my machine learning class, and I was fascinated to discover that it can be used to train neural networks. This is one of my favorite machine learning papers that I came across this past semester.&lt;/p&gt;

&lt;h4 id=&quot;towards-fully-autonomous-driving-systems-and-algorithms&quot;&gt;&lt;a href=&quot;https://www.cs.cmu.edu/~zkolter/pubs/levinson-iv2011.pdf&quot;&gt;Towards Fully Autonomous Driving: Systems and Algorithms&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jesse Levinson &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;
Before the semester started, I took Sebastian Thrun’s &lt;a href=&quot;https://www.udacity.com/course/intro-to-machine-learning--ud120&quot;&gt;Introduction to Machine Learning&lt;/a&gt; course. This paper is a great introduction to fundamental challenges in autonomous vehicle design (though slightly dated—it’s from 2011).&lt;/p&gt;

&lt;h4 id=&quot;confident-reasoning-on-ravens-progressive-matrices-tests&quot;&gt;&lt;a href=&quot;http://www.aaai.org/ocs/index.php/AAAI/AAAI14/paper/viewFile/8518/8445&quot;&gt;Confident Reasoning on Raven’s Progressive Matrices Tests&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Keith McGreggor and Ashok Goel&lt;/strong&gt;
This is the first of three papers I read for &lt;a href=&quot;http://omscs.gatech.edu/cs-7637-knowledge-based-artificial-intelligence-cognitive-systems&quot;&gt;Knowledge-Based AI&lt;/a&gt;, a course I took this fall as part of my master’s degree at Georgia Tech. The primary projects for the course centered around designing an AI agent that could solve &lt;a href=&quot;https://en.wikipedia.org/wiki/Raven&apos;s_Progressive_Matrices&quot;&gt;Raven’s Progressive Matrices&lt;/a&gt;. This paper is the most recent of the three (2012) and introduces an algorithm for solving RPM problems that includes a calculation of confidence in the answer.&lt;/p&gt;

&lt;h4 id=&quot;two-visual-strategies-for-solving-the-ravens-progressive-matrices-intelligence-test&quot;&gt;&lt;a href=&quot;http://www.aaai.org/ocs/index.php/AAAI/AAAI11/paper/viewFile/3644/4107&quot;&gt;Two Visual Strategies for Solving the Raven’s Progressive Matrices Intelligence Test&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Maithilee Kunda, Keith McGreggor, and Ashok Goel&lt;/strong&gt;
This is the next most recent of the three papers (2011) and covers both affine and fractal methods for solving RPM problems. (This paper appears in the citations for “Confident Reasoning,” which is how I found it.)&lt;/p&gt;

&lt;h4 id=&quot;addressing-the-ravens-progressive-matrices-test-of-general-intelligence&quot;&gt;&lt;a href=&quot;http://www.aaai.org/ocs/index.php/FSS/FSS09/paper/viewFile/954/1210&quot;&gt;Addressing the Raven’s Progressive Matrices Test of “General” Intelligence&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Ibid.&lt;/em&gt;&lt;/strong&gt;
Finally, this is the earliest of the three papers (2009, though I read the other two first) and covers applying the authors’ affine-extended algorithm to RPM problems.&lt;/p&gt;

&lt;h4 id=&quot;decipherment-with-a-million-random-restarts&quot;&gt;&lt;a href=&quot;http://www.aclweb.org/anthology/D13-1087&quot;&gt;Decipherment with a Million Random Restarts&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Taylor Berg-Kirkpatrick and Dan Klein&lt;/strong&gt;
This paper applies a randomized optimization approach to the &lt;a href=&quot;https://en.wikipedia.org/wiki/Zodiac_Killer#Communication_from_the_Zodiac&quot;&gt;unsolved 340-character Zodiac cipher&lt;/a&gt;. I’ve been interested in classical cryptography and ciphers for awhile now, and the Z340 is one of the most famous unsolved cryptograms (it’s one of the FBI’s &lt;a href=&quot;https://www.fbi.gov/services/laboratory/scientific-analysis/cryptanalysis-racketeering&quot;&gt;Cryptanalysis and Racketeering Records Unit&lt;/a&gt;’s top unsolved cases). I especially liked the way this tied into my machine learning coursework (in addition to MIMIC and simulated annealing, we also covered hill climbing with random restarts as part of the randomized optimization portion of the class).&lt;/p&gt;

&lt;h4 id=&quot;efficient-cryptanalysis-of-homophonic-substitution-ciphers&quot;&gt;&lt;a href=&quot;http://www.cs.sjsu.edu/~stamp/RUA/homophonic.pdf&quot;&gt;Efficient Cryptanalysis of Homophonic Substitution Ciphers&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Amrapali Dhavare, Richard M. Low, and Mark Stamp&lt;/strong&gt;
This paper covers efficient cryptanalysis of &lt;a href=&quot;http://practicalcryptography.com/ciphers/homophonic-substitution-cipher/&quot;&gt;homophonic substitution ciphers&lt;/a&gt; generally and attempts to decipher the Z340 in particular.&lt;/p&gt;

&lt;h4 id=&quot;bayesian-inference-for-zodiac-and-other-homophonic-ciphers&quot;&gt;&lt;a href=&quot;http://www.aclweb.org/anthology/P11-1025&quot;&gt;Bayesian Inference for Zodiac and Other Homophonic Ciphers&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Sujith Ravi and Kevin Knight&lt;/strong&gt;
This is another paper attempting to crack the Z340, this time using a Bayesian learning approach.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Finally, here the papers I want to read in 2017:&lt;/p&gt;

&lt;h4 id=&quot;out-of-the-tar-pit&quot;&gt;&lt;a href=&quot;http://shaffner.us/cs/papers/tarpit.pdf&quot;&gt;Out of the Tar Pit&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ben Mosely and Peter Marks&lt;/strong&gt;
(Rolled over from 2016.) This is a &lt;a href=&quot;http://blog.fogus.me/2011/09/08/10-technical-papers-every-programmer-should-read-at-least-twice/&quot;&gt;Fogus recommendation&lt;/a&gt;. It seems to mostly be “mutable state is the root of all misery,” and I’m curious to see where it will go.&lt;/p&gt;

&lt;h4 id=&quot;fundamental-concepts-in-programming-languages&quot;&gt;&lt;a href=&quot;https://www.itu.dk/courses/BPRD/E2009/fundamental-1967.pdf&quot;&gt;Fundamental Concepts in Programming Languages&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Christopher Strachey&lt;/strong&gt;
(Rolled over from 2016.) Another Fogus recommendation. I get the feeling I’m about to have a ton of knowledge dropped on me.&lt;/p&gt;

&lt;h4 id=&quot;concrete-problems-in-ai-safety&quot;&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/e86f/71ca2948d17b003a5f068db1ecb2b77827f7.pdf&quot;&gt;Concrete Problems in AI Safety&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Dario Amodei &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;
Given the level of concern about accidents and liability regarding autonomous vehicles (and, looking further ahead, from folks like Elon Musk and Stephen Hawking regarding general AI trying to murder us), AI safety seems like a thing worth learning more about.&lt;/p&gt;

&lt;h4 id=&quot;tensorflow-large-scale-machine-learning-on-heterogeneous-distributed-systems&quot;&gt;&lt;a href=&quot;http://download.tensorflow.org/paper/whitepaper2015.pdf&quot;&gt;TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Google Research&lt;/strong&gt;
Like the Millwheel paper, this wasn’t written by Google research generally; there are just way too many names for me to list. I haven’t gotten to dig too much into TensorFlow this year, and I’d like to rectify that in 2017.&lt;/p&gt;

&lt;h4 id=&quot;mastering-the-game-of-go-with-deep-neural-networks-and-tree-search&quot;&gt;&lt;a href=&quot;http://airesearch.com/wp-content/uploads/2016/01/deepmind-mastering-go.pdf&quot;&gt;Mastering the Game of Go with Deep Neural Networks and Tree Search&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Google DeepMind&lt;/strong&gt;
Ditto the above note regarding attribution. I followed some of the news about AlphaGo’s victory over Lee Sedol back in March, but didn’t get a chance to read the paper, so it’s on my to-read list for the new year.&lt;/p&gt;

&lt;h4 id=&quot;everything-you-always-wanted-to-know-about-synchronization-but-were-afraid-to-ask&quot;&gt;&lt;a href=&quot;http://sigops.org/sosp/sosp13/papers/p33-david.pdf&quot;&gt;Everything You Always Wanted to Know About Synchronization but Were Afraid to Ask&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Tudor David, Rachid Guerraoui, and Vasileios Trigonakis&lt;/strong&gt;
Synchronization is hard! Hopefully reading this paper makes it less so (for me, anyway).&lt;/p&gt;

&lt;h4 id=&quot;twenty-years-of-attacks-on-the-rsa-cryptosystem&quot;&gt;&lt;a href=&quot;https://crypto.stanford.edu/~dabo/papers/RSA-survey.pdf&quot;&gt;Twenty Years of Attacks on the RSA Cryptosystem&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Dan Boneh&lt;/strong&gt;
I’d like to learn more about electronic cryptography as part of my infosec reading this year (most of what I know is classical cryptography).&lt;/p&gt;

&lt;h4 id=&quot;the-moral-character-of-cryptographic-work&quot;&gt;&lt;a href=&quot;http://web.cs.ucdavis.edu/~rogaway/papers/moral-fn.pdf&quot;&gt;The Moral Character of Cryptographic Work&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Phillip Rogaway&lt;/strong&gt;
This seems like a nice intersection of information security and philosophy, and hopefully has some salient tie-ins with the &lt;em&gt;Ethical Hacking and Penetration Testing Guide&lt;/em&gt;, above.&lt;/p&gt;

&lt;h4 id=&quot;reflections-on-trusting-trust&quot;&gt;&lt;a href=&quot;http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf&quot;&gt;Reflections on Trusting Trust&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ken Thompson&lt;/strong&gt;
“To what extent should one trust a statement that a program is free of Trojan horses?” Another intersection of information security and philosophy.&lt;/p&gt;

&lt;h4 id=&quot;bitcoin-a-peer-to-peer-electronic-cash-system&quot;&gt;&lt;a href=&quot;https://bitcoin.org/bitcoin.pdf&quot;&gt;Bitcoin: A Peer-to-Peer Electronic Cash System&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Satoshi Nakamoto&lt;/strong&gt;
I’m taking &lt;a href=&quot;http://omscs.gatech.edu/cs-7646-machine-learning-trading&quot;&gt;Machine Learning for Trading&lt;/a&gt; in the spring, which has piqued my interest in the intersection between computation and finance. Also, apparently everyone else on the planet has read this paper, so I figure I might as well, too.&lt;/p&gt;

&lt;h4 id=&quot;practical-optional-types-for-clojure&quot;&gt;&lt;a href=&quot;http://frenchy64.github.io/papers/typed-clojure-draft.pdf&quot;&gt;Practical Optional Types for Clojure&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Ambrose Bonnaire-Sergeant, Rowan Davies, and Sam Tobin-Hochstadt&lt;/strong&gt;
I find that Clojure has very few pain points, but after working in languages like Haskell and Idris (and, to a lesser extent, Java), dynamic typing feels like it might be one of them. (I’m also curious to find out how ideas raised in this paper might interrelate with those behind &lt;a href=&quot;http://clojure.org/about/spec&quot;&gt;clojure.spec&lt;/a&gt;).&lt;/p&gt;

&lt;h4 id=&quot;rrb-trees-efficient-immutable-vectors&quot;&gt;&lt;a href=&quot;https://infoscience.epfl.ch/record/169879/files/RMTrees.pdf&quot;&gt;RRB-Trees: Efficient Immutable Vectors&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Phil Bagwell and Tiark Rompf&lt;/strong&gt;
This paper examines relaxed radix balanced (RBR) trees, a new data structure for backing immutable vectors in Clojure.&lt;/p&gt;

&lt;h4 id=&quot;a-history-of-haskell-being-lazy-with-class&quot;&gt;&lt;a href=&quot;http://research.microsoft.com/en-us/um/people/simonpj/papers/history-of-haskell/history.pdf&quot;&gt;A History of Haskell: Being Lazy with Class&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Paul Hudak, John Hughes, Simon Peyton Jones, and Philip Wadler&lt;/strong&gt;
I’ve been doing a fair amount of functional programming this year (mainly Clojure with some Haskell and Idris), and I’d like to better learn and understand the design behind Haskell in the coming year.&lt;/p&gt;

&lt;h4 id=&quot;advances-in-quantum-machine-learning&quot;&gt;&lt;a href=&quot;https://arxiv.org/pdf/1512.02900.pdf&quot;&gt;Advances in Quantum Machine Learning&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Jeremy Adcock &lt;em&gt;et al.&lt;/em&gt;&lt;/strong&gt;
I know nothing about quantum computing, so hopefully reading this paper partially rectifies that.&lt;/p&gt;

&lt;h4 id=&quot;towards-design-for-self-healing&quot;&gt;&lt;a href=&quot;http://software.imdea.org/~alessandra.gorla/papers/Gorla-DesignSH-SoQua07.pdf&quot;&gt;Towards Design for Self-Healing&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Alessandra Gorla&lt;/strong&gt;
I really enjoyed Carin Meier’s &lt;a href=&quot;https://www.youtube.com/watch?v=xvk-Gnydn54&quot;&gt;talk at EuroClojure 2016&lt;/a&gt;, which covered genetic programming and self-healing code in Clojure; she referenced this paper, so I’d like to read it to better understand how these principles could be applied to eventually write code that repairs itself.&lt;/p&gt;
</description>
        <pubDate>Tue, 27 Dec 2016 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/culture/reading/poetry/2016/12/27/reading-list-2017/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/culture/reading/poetry/2016/12/27/reading-list-2017/</guid>
      </item>
    
      <item>
        <title>The Second Language</title>
        <description>&lt;p&gt;If you were to ask me to summarize software engineering in one word, “tradeoffs” is the one I’d pick. We make tradeoffs every day: we choose one language over another based on some requirement or constraint, we opt for fast and cheap even though we know sacrificing quality means we’re incurring technical debt, we select a technology that scales to the extent we need at the cost of a steeper learning curve or implementation overhead.&lt;/p&gt;

&lt;p&gt;We don’t necessarily consider learning a new language to be a lesson in tradeoffs, but I think the second programming language you learn is exactly that. A programming language fundamentally represents how an engineer or group of engineers thinks about solving problems, and since solving problems is all about tradeoffs, it’s impossible for you to learn a language without coming to grips (consciously or not) with the tradeoffs its creators made (consciously or not).&lt;/p&gt;

&lt;p&gt;If you ask your friend who writes Haskell what a monad is (as you eventually must), you might discover that a monad is &lt;a href=&quot;http://stackoverflow.com/questions/3870088/a-monad-is-just-a-monoid-in-the-category-of-endofunctors-whats-the-issue&quot;&gt;a monoid in the category of endofunctors&lt;/a&gt;, or &lt;a href=&quot;http://book.realworldhaskell.org/read/monads.html&quot;&gt;a programmable semicolon&lt;/a&gt;, or &lt;a href=&quot;http://blog.plover.com/prog/burritos.html&quot;&gt;a burrito&lt;/a&gt;, or some similarly unhelpful combination of words. While any of these might be true, the fact is that none of them tells you what a monad &lt;em&gt;is for&lt;/em&gt;. (If you’re curious, &lt;a href=&quot;https://blog.jcoglan.com/2011/03/05/translation-from-haskell-to-javascript-of-selected-portions-of-the-best-introduction-to-monads-ive-ever-read/&quot;&gt;this post by James Coglan&lt;/a&gt; is the best explanation of what monads are for that I’ve ever read.)&lt;/p&gt;

&lt;p&gt;My first languages were JavaScript and Ruby: dynamically typed, object-oriented with a strong functional influence, and nothing preventing you from doing whatever silly things with state you so desired. When I first learned Clojure, I thought the tricky part would be balancing parentheses and composing programs with functions rather than objects. In fact, the hardest part for me was keeping concurrency primitives (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;agent&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;atom&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ref&lt;/code&gt;) straight; I tried memorizing their definitions and reading documentation, but to no avail. Finally, one day, I made myself go through a couple of examples in &lt;em&gt;&lt;a href=&quot;http://www.joyofclojure.com/&quot;&gt;The Joy of Clojure&lt;/a&gt;&lt;/em&gt;. Chapter 11 covers mutation, and in particular goes through the “ideal cases” for each state management primitive.&lt;/p&gt;

&lt;p&gt;As I worked through the examples, I discovered that atoms were great for managing independent stateful events (which I later used when &lt;a href=&quot;/programming/clojure/clojurescript/reagent/react/2016/03/04/dead-simple-reagent-components/&quot;&gt;swapping a default image for a broken &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; tag&lt;/a&gt;), refs were ideal for coordinating multiple events via transactions (think of transferring money from one bank account to another), and agents were best suited to asynchronous and I/O operations (say, firing an ad beacon). The kicker was that all this was clear as day when I went back and read the blog posts and documentation that had seemed impenetrable to me before, but I couldn’t wrap my head around it until I stopped caring about what things &lt;em&gt;were&lt;/em&gt; and focused on what they were &lt;em&gt;for&lt;/em&gt;. And once I understood that, I also began to understand the tradeoffs between these tools: the benefits and drawbacks of using each.&lt;/p&gt;

&lt;p&gt;Learning a second programming language is useful for all sorts of reasons, but I think the main benefit is this: via an understanding of what things are for (rather than simply what they are), you discover why a language’s inventors and users do things the way they do, and in reaching that understanding, you gain a deeper understanding of the tradeoffs involved.&lt;/p&gt;
</description>
        <pubDate>Tue, 12 Apr 2016 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/2016/04/12/the-second-language/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/2016/04/12/the-second-language/</guid>
      </item>
    
      <item>
        <title>Dead Simple Reagent Components</title>
        <description>&lt;p&gt;I’ve been using &lt;a href=&quot;https://github.com/clojure/clojurescript&quot;&gt;ClojureScript&lt;/a&gt; + &lt;a href=&quot;https://github.com/reagent-project/reagent&quot;&gt;Reagent&lt;/a&gt; for a couple of years now, and I’ve found the combination (with &lt;a href=&quot;https://github.com/bhauman/lein-figwheel&quot;&gt;Figwheel&lt;/a&gt; for live reloading) to be absolutely delightful. It’s been in production for the &lt;a href=&quot;http://www.cityshelf.com&quot;&gt;CityShelf web&lt;/a&gt; front end since May of 2015, and I’ve been continually impressed at how simple it is to write small, composable components that lead to code that’s easy to reason about and maintain.&lt;/p&gt;

&lt;p&gt;A good example is the component CityShelf uses to wrap &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;img /&amp;gt;&lt;/code&gt;s. The search API returns whatever cover image the bookstores in a given city provide, and occasionally these images are broken or missing. We felt it was a bad experience to pass a broken image along to CityShelf users, so I decided to make a lightweight wrapper around image tags to include additional behavior: specifically, an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onError&lt;/code&gt; handler to swap in our preferred default book image.&lt;/p&gt;

&lt;p&gt;The canonical JavaScript + jQuery solution to the problem looks something like this:&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;handleImageError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;onerror&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/path/to/default/image.jpg&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So you could do the following in your markup:&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;image.jpg&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;onerror=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;handleImageError(this);&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This may not immediately seem suboptimal as compared to ClojureScript: JavaScript (and therefore ClojureScript) is single-threaded, and the &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_transactional_memory&quot;&gt;lack of STM in ClojureScript&lt;/a&gt; means that state mutation isn’t really safer (read: transactional) as compared to plain JS. However, I think there are several disadvantages to the JavaScript approach:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Transient, mutable data structures&lt;/strong&gt;. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HTMLImageElement&lt;/code&gt; we’re passing into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;handleImageError()&lt;/code&gt; is modified directly; we have no access to previous versions of the data structure. The ClojureScript implementation (see below) accepts a map of the form &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{:src (reagent/atom &quot;image.jpg&quot;)}&lt;/code&gt; and returns a &lt;em&gt;new map&lt;/em&gt; with the modified &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:src&lt;/code&gt;; because ClojureScript data structures are &lt;a href=&quot;https://en.wikipedia.org/wiki/Persistent_data_structure&quot;&gt;persistent&lt;/a&gt;, we only need to allocate space commensurate with the changed data (in this case, the new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;src&lt;/code&gt; attribute). POJOs are neither immutable nor persistent.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Trivialized state mutation&lt;/strong&gt;. We so cavalierly mutate state in JavaScript that nothing about the language causes alarm bells to ring in our heads when we’re potentially doing something bad (&lt;em&gt;i.e.&lt;/em&gt; mutating state and passing it around). In this case we’re not necessarily passing anything around, but ClojureScript’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;atom&lt;/code&gt;s do make us (or at least, me) pause and think about what we’re doing.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Broken encapsulation&lt;/strong&gt;. There’s an argument to be made here for separation of concerns, but I think separating markup and behavior via templating is actually an antipattern: in this case, we have to remember to set the inline &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;onerror&lt;/code&gt; handler for every &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;img /&amp;gt;&lt;/code&gt;. Reagent + ClojureScript (or plain &lt;a href=&quot;https://facebook.github.io/react/&quot;&gt;React&lt;/a&gt; + &lt;a href=&quot;https://facebook.github.io/react/docs/jsx-in-depth.html&quot;&gt;JSX&lt;/a&gt;) has moved us closer to &lt;a href=&quot;http://webcomponents.org/&quot;&gt;web components&lt;/a&gt;, which I ultimately think are the Right Way™ to think about and write web applications.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The ClojureScript + Reagent component (which I think addresses the above concerns nicely) looks like this:&lt;/p&gt;

&lt;div class=&quot;language-cljs highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ns&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:doc&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Image component.&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:author&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Eric Weinstein &amp;lt;eric.q.weinstein@gmail.com&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cityshelf.components.image&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Image component. Takes a map of options and creates an
  &amp;lt;img /&amp;gt; from the supplied :src; if the source is broken
  or missing, swaps in a default book image instead.

  Example:

  [image {:src (reagent/atom \&quot;book-cover.jpg\&quot;)}]&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:src&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:img&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:className&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:className&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
           &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:src&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
           &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:onError&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;reset!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/img/defaultbook_green.png&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}]))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The production code actually works slightly differently than this—it uses a helper function to keep track of the root URL so we always serve the default book image correctly.&lt;/p&gt;

&lt;p&gt;The nice thing about this component is that it can be used all over the application—for instance, we use it both for the search results gallery view and the individual product detail view. Even better, we could use it in a host of other scenarios where a default image is needed, since it would be trivial to parameterize the component with a custom default image. You can also include other default behaviors that you might want for all images, such as lazy loading, but it’s important to remember not to try to do too much in your components. The more they do, the more likely they are to become special snowflakes that never see significant reuse.&lt;/p&gt;
</description>
        <pubDate>Fri, 04 Mar 2016 14:00:00 +0000</pubDate>
        <link>https://ericweinste.in/programming/clojure/clojurescript/reagent/react/2016/03/04/dead-simple-reagent-components/</link>
        <guid isPermaLink="true">https://ericweinste.in/programming/clojure/clojurescript/reagent/react/2016/03/04/dead-simple-reagent-components/</guid>
      </item>
    
  </channel>
</rss>
