<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by arthur johnston on Medium]]></title>
        <description><![CDATA[Stories by arthur johnston on Medium]]></description>
        <link>https://medium.com/@the_ajohnston?source=rss-106fbec9adc1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*40UHepi_kZld_H2qUsd2Fw.jpeg</url>
            <title>Stories by arthur johnston on Medium</title>
            <link>https://medium.com/@the_ajohnston?source=rss-106fbec9adc1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 03:45:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@the_ajohnston/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to get pragmatists to use F#]]></title>
            <link>https://medium.com/@the_ajohnston/how-to-get-pragmatists-to-use-f-7ad94a728b68?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ad94a728b68</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Fri, 23 Jan 2015 14:27:35 GMT</pubDate>
            <atom:updated>2015-02-07T15:03:39.095Z</atom:updated>
            <content:encoded><![CDATA[<h3>Don’t talk about monads and other tips for evangelists</h3><p>I recently read Eric Sink’s article on <a href="http://ericsink.com/entries/fsharp_chasm.html">Why your F# evangelism isn’t working</a> It’s a great article and anyone who cares about introducing better tools and languages or anyone who wants to know why a language gets popular should read it. But one of the things he doesn’t spend a lot of time on is how to identify and convince a “pragmatist in pain” to adopt F#. This isn’t a lapse in the article because it was not the main point however it was something that beared exploring</p><p>I recently had a case to use F# at work. Convincing the other pragmatists to use F# was surprisingly easy. Some of that was the open-mindedness of my coworkers. But it was also helped by how we ‘sold’ it to them.</p><h4>1. Don’t emphasize the differences</h4><p>When introducing F#, or any new technology, developers have a tendency to emphasize how mind-blowingly awesome and better it is than what everyone else is currently using.In the case of F# evangelists normally say how much better it is than C#.</p><p>Don’t do this</p><p>F# may be a better language than C#, I certainly think so. But saying that makes people defensive. Which makes them less likely to be open minded.</p><p>That’s not how you sell a pragmatist on F#. You sell them on it by emphasizing how much easier/faster/cheaper it will make their projects, how easily it works in the .NET stack and how easy it is for C# programmers to pick up.</p><blockquote>The first rule of evangelizing functional programming is, you don’t talk about monads</blockquote><p>As great as monads are all most pragmatists have heard is that they are confusing and hard. In general if your evangelizing something those aren’t traits you want to emphasize. By not introducing the more complicated things at first you get a gradual learning curve, which gets you more buy in.</p><p>A good example of doing it the right way is Jon Skeet and <a href="http://www.amazon.com/Tomas-Petricek/e/B002BMI8B8/ref=dp_byline_cont_book_1">Tomas Petricek</a>’s book “<a href="http://www.amazon.com/gp/product/1933988924/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1933988924&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=BW7ESJ67LIVDHS3Z">Real World Functional Programming</a>” it introduces F# and functional programming by showing how similar functionality would be written in C#. It doesn’t even introduce monads until 340 pages into the book.By that point in the book the reader is already comfortable with functional programming so the new feature is less daunting.</p><p>As a side note the entire book is full of great examples on how and why to write functional code. It has the added “brand recognition” of being co-authored by Jon Skeet so most C# programmers will respect it. If you are trying to introduce F#/functional programming to an experienced C# programmer it’s a good place to start</p><h4>2. Make sure the project is self contained and small</h4><p>The problem we decided to tackle was parsing, processing and converting a CSV file that we got from a 3rd party vendor. This has the advantage of being fully self contained. So we didn’t need to interact with any of our existing C# code.</p><p>Although F# (and I assume Scala) both have the advantage of playing nicely with more mainstream languages, interacting with other languages and their idioms is never seamless. If you’re trying to get a pragmatist to try out or adopt F# you want it to be as painless as possible. So you want to make sure it’s self contained.</p><p>Semi-relatedly make sure it’s a small project. Pragmatists know that adopting a new language is risky. You want to start with a small project because the small scope gives the pragmatist confidence that if your new language doesn’t live up to the hype they can quickly go back and rewrite it in a more ‘conventional’ language. In this case the project only took about a day and a half. However if we had written it in C# the source code would have been 4–5 times longer. Which leads me to my next point</p><h4>3. Make sure the problem is one F# is preposterously better at</h4><p>If you are trying to get a pragmatist to adopt your language you want it to shine. In this case I was parsing a CSV file that contained the results of a survey. FSharp.Data has the CsvProvider tool which handled parsing the file. It lets you work with the data in the CSV file in a statically typed way. It takes the header row and generates a type with those properties, automatically.</p><p>In addition to that library F# as a language supports discriminate unions which are conveniently the best way of representing survey answers. If the question is “What type of pet do you have?” the best way to represent the space of possible answers</p><pre>type Pet =<br> | Dog<br> | Cat<br> | Camel<br> | Snake<br> | Other string</pre><p>In addition since all the questions were optional the answers were of type</p><pre>Pet option </pre><p>Instead of Pet. Using Seq.Choose along with pattern matching allowed us to easily group the surveys based off of their (optional) answer to that question. These features let us iterate on the project quickly while writing less code than the C# solution</p><p>Overall the project went well early adopters were excited that we were using F# and pragmatists were happy that the problem was solved. It was successful because the project was small, suited for F# and didn’t depart to radically from code people were comfortable with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ad94a728b68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t use the word reschedule]]></title>
            <link>https://medium.com/@the_ajohnston/dont-use-the-word-reschedule-a0726248cdaf?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0726248cdaf</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Tue, 06 Jan 2015 14:21:25 GMT</pubDate>
            <atom:updated>2015-01-06T14:21:25.949Z</atom:updated>
            <content:encoded><![CDATA[<h4>A DDD view of what a reschedule is</h4><p>tl;dr Don’t use the word reschedule. It’s ambiguous so people get confused. If you are moving an appointment it’s easier to treat it as a cancel and new appointment</p><p>This article won’t cause world peace, or make you a million dollars. If you are designing or building a scheduling system it will probably save you at least a few hours of arguments and confusion over what a reschedule is and how to handle it. So overall it will probably save you time, which makes it a better deal than most articles on the internet.</p><p>I wrote this article after the third time I had a 15 minute conversation explaining the different ways people use the word reschedule. If I have to explain something more than a few times it’s worth the effort to write down the explanation. In this case business owners, product managers and developers were all using the word reschedule but it was not properly part of our <a href="http://martinfowler.com/bliki/UbiquitousLanguage.html">Ubiquitous Language</a> . Everyone had a different idea of what it meant.</p><h3>Defining Reschedule</h3><p>The word reschedule is too ambiguous to be used for anything where precision is required.</p><blockquote>A human being can use reschedule in every day speech because in every day speech we don’t care about precision.</blockquote><p>But if you need to speak precisely e.g. when programming a computer, looking at metrics, or designing a project, you need to define exactly what you mean. In every day speech a human being could reasonably utter the following sentences</p><p>“The 9:30 AM appointment is rescheduled to 9:45 AM.”<br>“The 9:30 AM appointment is rescheduled to 2:30 PM.”<br>“The 9:30 AM appointment is rescheduled. We haven’t decided when we’ll have it”</p><p>An appointment in these sentences is a meeting between (at least) two parties. Probably people. A tutor’s appointment, or an appointment to get your oil changed are the types of appointments I’m talking about. The three cases might be handled differently depending on what you care about.</p><p>Take the first case. If you have an appointment with you mechanic to get your oil changed at 9:30 and your mechanic finds out at 9:00 AM that the lift that he needs to put your car up on is going to be in use for the next 45 minutes the mechanic won’t call you to say they are running 15 minutes late.</p><p>The change in start time is so small that it is not worth informing you because it won’t change when you come in. However the mechanic may need to track when they started to work on your car for insurance or legal reasons, so they need to track the time change in their system. The change in start time is small enough that it is reasonable that only one party (the mechanic) know that the appointment has been moved.</p><p>The second case is different. Maybe the repair shop had someone call out sick or maybe the customer has a morning meeting that they can’t get out of. Either way the appointment start time has changed enough that both the mechanic and the customer need to know about it. For this type of reschedule both parties need to agree to the new time</p><p>If the two parties can’t agree on a new time to reschedule the appointment to this can lead to the third case. This case looks a lot like a cancellation. The only difference being that there is an intention to still have the appointment at some unspecified future time. In most cases though you can just treat them like a special form of cancellation. Even though a human would say that these are all “rescheduled” they are clearly different cases.</p><blockquote>When you need to differentiate between the three cases you can call them delayed appointments, moved appointments, and cancelled appointments.</blockquote><p>You need to call them different names because your software needs to handle them differently. Cancelled appointments are normally straightforward to handle. But with moved/delayed appointments you must also decide how to track the move/delay.</p><h3>Implementing moving appointments</h3><p>There are two ways commonly used to implement moving an appointment in software. You can update the time on the old appointment to the new time and (optionally) associate the old time with the history of the appointment. The other way to do it is to treat the old appointment as being cancelled and create a new appointment at the new time and add a link between them if needed.</p><p>An advantage of the former design is that you normally only care about the most up to date version of the appointment. The history of it being rescheduled is normally less used, mainly only for auditing. In addition from a DDD perspective if an appointment is an Entity, then the time of an appointment is just an attribute. Changing an attribute (start time) should not make a new entity (the appointment)</p><p>The advantage of treating a move as a cancel followed by a new appointment is that it is easier to implement and reason about. Every scheduling system already has the functionality for cancellations and adding an appointment. Moving an appointment is just combining the functionality. If you don’t need to track the history of an appointment it is a much simpler implementation. The downside is that if you want to measure cancellation then you need to distinguish between appointments that were “really” cancelled and appointments that were cancelled because they were moved.</p><p>Overall though if you don’t have another reason to track all the changes to an appointment it is generally a better idea to implement it using the second method. Besides being easier to implement it is easier to explain to non-technical people that “A move is cancel then a new appointment” than explaining your historical system</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0726248cdaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How many rhymes are there in English?]]></title>
            <link>https://medium.com/@the_ajohnston/how-many-rhymes-are-there-in-english-9ab81029ebdf?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ab81029ebdf</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Wed, 10 Dec 2014 14:09:14 GMT</pubDate>
            <atom:updated>2014-12-10T14:09:14.897Z</atom:updated>
            <content:encoded><![CDATA[<h4>10,726 but it depends on how you count</h4><p><a href="https://github.com/arthurjohnston/blanker">source code</a></p><h4>The Problem</h4><p>I’ve always enjoyed word play, puns, <a href="http://en.wikipedia.org/wiki/Double_dactyl">double dactyls</a>, spoonerisms but especially rhymes. I’ve actually written 2 books of poetry for my wife. Something you don’t really think about until you are writing your 236th poem is that coming up with a rhyme you haven’t used before is simply impossible. There are only so many rhymes in the english language. Pretty much all you can try for is not to use the same ‘type’ of rhyme too much.</p><p>I’m defining a ‘type’ of rhyme or rhyme group as a group of words that all rhyme with each other. An example would be:</p><p>plad, sad, mad ,dad, bad</p><p>When you are writing poetry in the couplet form, AABBCCDD, you don’t want to use to much from the same rhyme group because it can sound odd. I wondered how many groups of rhyming words there were in English. To get a computer to figure this out for me though I needed a precise definition of a rhyme.</p><p>Looking at the wiki articles on <a href="http://en.wikipedia.org/wiki/Perfect_rhyme">Perfect Rhyme</a> it says there are 2 requirements.</p><p>1. The stressed vowel and everything after must be the same.<br>2. The articulation before it must be different</p><p>The first rule is there because to rhyme two words must end with the same sound. So for example tricky and icky rhyme because everything after the ‘i’ sound is the same.</p><p>The second rule is there because “leave” and “believe” do not sound like a rhyme to most native English speakers. This is because the stressed vowel is preceded by the ‘l’ sound in both cases</p><h4>Solution.</h4><p>Python has the Natural Language Toolkit, which among its many packages includes the cmudict. This has a dictionary that maps an English spelling to its pronunciation represented as a list of phonemes. Phonemes are the sounds that make up words in English. A nice property of this dictionary is that the vowel phonemes are already marked as stressed or unstressed.</p><p>From this dictionary I generated two additional dictionaries. One was a simple reverse dictionary that mapped a pronunciation to the English spelling it represented. An interested point is that one pronunciation can represent multiple written words, i.e. homophones such as “two”, “too”,”to” all have the same pronunciation which the cmudict gives as</p><pre> [‘T’, ‘UW1&#39;]</pre><p>The second dictionary I created was really just a way of grouping words by their ending sound, so the phonemes</p><pre>[‘B’, ‘EH1&#39;, ‘R’] </pre><p>which is the pronunciation of “bear” and</p><pre>[‘DH’, ‘EH1&#39;, ‘R’] </pre><p>which is the pronunciation of “there” are both in the same list of values with the key</p><pre>[EH1&#39;, ‘R’] </pre><p>The rule for the grouping of this dictionary is rule 1 of what makes a rhyme from the Wikipedia article. What this means in practice is that the words “tricky” and “picky” which have the pronunciations</p><pre>[‘T’, ‘R’, ‘IH1&#39;, ‘K’, ‘IY0&#39;], [‘P’, ‘IH1&#39;, ‘K’, ‘IY0&#39;] </pre><p>would be in one group and that “see”and “bee” which are represented by</p><pre>[‘S’, ‘IY1&#39;], [‘B’, ‘IY1&#39;] </pre><p>would be in a different group, which is what we want because “tricky” doesn’t rhyme with “bee”. I called this dictionary rhymeToPros since it maps a rhyme to pronunciations.</p><p>At this point I had 3 dictionaries that I needed to combine values from, the CMU pronunciation dictionary, the reverse dictionary and the rhymeToPros dictionary. To make it easier to work with I added a rhymeGroup class which has 3 properties, The ending part of the word that matched, the pronunciations associated with it and the words associated with those pronunciations.So for “tricky” and “picky” the properties of the rhymeGroup would be:</p><pre>rhyme:[‘IH1&#39;, ‘K’, ‘IY0&#39;]<br> pronunciations:[‘T’, ‘R’, ‘IH1&#39;, ‘K’, ‘IY0&#39;] [‘P’, ‘IH1&#39;, ‘K’, ‘IY0&#39;] <br> words: tricky, picky</pre><p>After filtering out any rhymegroups that only had one pronunciation or word associated with them Rule 1 is enforced.</p><h4>Being “conscious” of Rule 2</h4><p>The second rule was that the articulation before the stressed syllable has to be different. A naive version of this would be just to check that the phonemenes before the stressed syllable are different. Unfortunately just looking at the phonemes before the stressed sound leads to false positives.</p><p>“conscious” is represented by the phonemes</p><pre>[‘K’, ‘AA1&#39;, ‘N’, ‘SH’, ‘AH0&#39;, ‘S’] </pre><p>“unconscious” is represented by</p><pre> [‘AH2&#39;, ‘N’, ‘K’, ‘AA1&#39;, ‘N’, ‘SH’, ‘AH0&#39;, ‘S’]</pre><p>The phoneme ‘AA1&#39; is the stressed syllable and the phonemes before them are different however a person would not describe this as a rhyme. These are what the Wikipedia described as identical rhymes.</p><blockquote>Humans hear words as syllables not as phonemenes.</blockquote><p>So to handle this type of issue you need to look at how a word is syllabified. Syllabification is how words are broken into different sounds. An English syllable has 4 properties</p><ol><li>A nucleus, which is the core part of the syllable</li><li>An optional sound before the nucleus, called an onset</li><li>An optional sound after the nucleus, called a coda.</li><li>Whether the syllable is stressed or unstressed</li></ol><p>Fortunately code to syllabify is available from <a href="http://www.ling.upenn.edu/phonetics/p2tk/">UPenn</a> which breaks a list of phonemes into syllables, with the stress.</p><h4>Running it on the previous example:</h4><p>The word ‘conscious’ only has two syllables:<br>(1, [‘K’], [‘AA’], [‘N’]) 1 means this is the stressed syllable,’K’ is the onset, ‘AA’ is the nucleus and ‘N’ is the coda<br>(0, [‘SH’], [‘AH’], [‘S’]) 0 means it is the unstressed syllable,’SH’ is the onset, ‘AH’ is the nucleus and ‘S’ is the coda</p><p>‘Unconscious’ has three syllables:<br>(2, [], [‘AH’], [‘N’]) 2 means this is a secondary stressed syllable, there is no onset, ‘AH’ is the nucleus and ‘N’ is the coda<br>(1, [‘K’], [‘AA’], [‘N’]) stressed syllable, ‘K’ is the onset, ‘AA’ is the nucleus and ‘N’ is the coda<br>(0, [‘SH’], [‘AH’], [‘S’]) unstressed syllable, ‘SH’ is the onset, ‘AH’ is the nucleus and ‘S’ is the coda</p><p>By looking at this example it becomes obvious that the onset of the stressed syllable for ‘conscious’ and ‘unconscious’ are the same, which is why most people would not think they rhyme.</p><p>So a better rule would be to check that the onset of the stressed syllable are different, but that the coda is the same. In this case both “conscious” and “unconscious”’s stressed syllable’s onset is ‘K’ so they do not rhyme. The next step was to filter out rhymegroups that did not have any rhymes in them.</p><h4>Edge cases</h4><p>Comparing the stressed syllable’s onset seems to work (in fact the number is very close to our final count) but I decided to look at what was being filtered out. Most of them were non-rhymes but one of the rhyme groups being filtered was paternity/fraternity/maternity which sounds like it rhymes to my ears. Looking at the syllabification</p><pre>fraternity:<br>(0, [‘F’, ‘R’], [‘AH’], [])<br>(1, [‘T’], [‘ER’], []) <br>(0, [‘N’], [‘IH’], []) <br>(0, [‘T’], [‘IY’], [])</pre><pre>paternity:<br>(0, [‘P’], [‘AH’] [])<br>(1, [‘T’], [‘ER’], [])<br>(0, [‘N’], [‘IH’], [])<br>(0, [‘T’], [‘IY’], [])</pre><p>The stressed syllable has the same onset, which is why it was treated as not rhyming. However the syllable before the stressed syllable, (0, [‘F’, ‘R’], [‘AH’], []) and (0, [‘P’], [‘AH’] []) would rhyme if they were stressed. The nucleus and coda are the same and the onset [‘F’, ‘R’] and [‘P’] are different. Which is why they sound like they rhyme. They were not counted as a rhyme because it was not the stressed syllable.</p><p>So the rule for rhyming needs to be amended, so that if the stressed syllable is identical but a preceding syllable has identical nucleus and coda but different onset then they rhyme.</p><h4>Conclusion</h4><p>Running this code on the words in the cmudict got me 10,762 rhyme groups. So barring any other edgecases that’s the number of rhymes in English.</p><p>As with most programming problems properly defining it took the majority of the time and effort. To get a computer to calculate it required that I precisely define what a rhyme was, since the rules from Wikipedia were meant for humans not computers. The actual code is only ~70 lines with another ~50 lines of unit tests on checking if two syllables rhyme</p><p>Some other interesting results</p><ol><li>Rhymes do not need to be on the stessed sylllable (paternity, fraternity)</li><li>Rhymes are not transitive. “Leave” rhymes with “Steve”. “Steve” rhymes with “believe”. But “leave” does not rhyme with “believe”.</li><li>The largest rhyme group is words that end in ‘nation’</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ab81029ebdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Questions about the debt in tech debt]]></title>
            <link>https://medium.com/@the_ajohnston/questions-about-the-debt-in-tech-debt-d651fa08980a?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d651fa08980a</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Mon, 15 Sep 2014 12:16:59 GMT</pubDate>
            <atom:updated>2014-09-15T12:16:59.986Z</atom:updated>
            <content:encoded><![CDATA[<p>Tech debt is a term that gets thrown around a lot. It gets used as short hand for a lot of different problems/design decisions/errors/ without people really considering what debt means. Ward Cunningham (who coined the term) describes it as</p><blockquote>“I thought that rushing software out the door to get some experience with it was a good idea, but that of course, you would eventually go back and as you learned things about that software you would repay that loan by refactoring the program to reflect your experience as you acquired it.”</blockquote><p>v<a href="http://c2.com/cgi/wiki?WardExplainsDebtMetaphor">ideo</a></p><p>I like to think of it as with tech debt you’re getting some speed of development now for slow some down later. At its simplest you are trading development time now for development time later. That pretty much defines tech debt as we currently think about it.</p><p>But if you know anything about finance you know there are a variety of types of financial debt. Similarly there are lots of different types of technical debt. Normally we only think of tech debt as either slowing us down (this decision means it takes us a few extra hours to roll out the servers every week) or preventing us from doing something later (if we want to scale we’re going to have to go in and change our architecture to switch to micro-services). But the different things we lump together as tech debt have the same variety of features as financial debt. This means we can ask interesting questions about tech debt by framing it as a question about financial debt.</p><h3>What is securing this tech debt?</h3><p>When you take out a car loan or a mortgage if you fail to pay your car or house can be repossessed. If you fail to pay this tech debt what product or feature stops working? It is useful to ask this question when you are deciding what tech debt to pay and what tech debt to defer payment on. Tech debt is not fungible. Paying off tech debt in a MVP to open up a new market is not the same as paying off tech debt in your core infrastructure.</p><p>Conversely you have more freedom in how you handle tech debt in the MVP than the core product. If the debt in the MVP is too high you have the option of just walking away from the product, or rebuilding it. Just as people walk away from underwater mortgages you should not be afraid to walk away from underwater projects.</p><h3>Does this technical debt require periodic payments?</h3><p>Usually this is the type of tech debt that manifests itself as something not being automated. On the <a href="http://www.joelonsoftware.com/articles/fog0000000043.html">Joel Test</a> step 2 is can you make the build in a single step. Not having the build be automated requires dev effort every time you want to build. Similarly part of why Puppet and Chef are popular is that not automating the dev-ops effort of managing servers, especially when they may be making the same change multiple times a day, is a huge waste of resources. Anecdotally it seems anything that happens with a frequency of a fortnight or more gets ‘payed off’ and anything less frequent does not. It would be interesting to look at any technical tasks you do on a monthly basis and see if they are worth automating.</p><p>A large portion of tech debt does not require payments, it is only when you want to change something that it costs you. Product managers and tech-leads want to distinguish between debts that require payments and debts that do not.</p><blockquote>From a developer perspective even technical debt with out payments is a form of psychic baggage.</blockquote><h3>Does this technical debt accrue interest?</h3><p>Technical debt is always harder to pay off the longer you wait. Part of this is simply context switching and the passing of time. It is easier to fix something when it was the last thing you worked on and it was last week versus it was three months and four projects ago. By not paying off technical debt right away the cost goes up because the developer needs to regain familiarity with the problem. The more time that passes the less familiarity the team will have with the code. This interest is cappped at whatever the cost of a completely new person working on it is.</p><p>The more insidious interest is that the longer the tech debt remains the more likely another system will start relying on it. The original tech debt ossifies through other features having dependencies on it. Any time you add a feature that indirectly relies on the technical debt you make it more expensive to go back and fix. For example if you are rolling out a new product and your current database schema does not really support the actual data model but can be munged to fit. The product is a success and the business starts pulling data from the old database schema. Now if you want to fix the schema to support the actual data model you need to fix metrics also.</p><h3>Can we pay it off whenever we want?</h3><p>If you had two weeks right now could you fix the problem? If your software is installed on users computers you have to work within the release cycle. If you chose to do some preprocessing on the client side and want to move it to the server side you can’t just fix the code, you also need to get it deployed to all those computers.</p><p>Similarly if you have an API to support then you can only make changes or deprecate it while coordinating with others. Technical debt on deployed code or APIs has an early repayment fee of either having to support the old system.</p><h3>Does it have a maturity date?</h3><p>Will there be a point where you absolutely have to pay off this technical debt no matter what the costs. Normally these are issues of scale. Any sentence that sounds like “This solution won’t work when we have a floppity jillion users” is talking about this type of tech debt. If you make decisions early on that won’t scale and then your products does well then you have to go back in and pay off the tech debt.</p><blockquote>If the product never does well enough to scale then you never have to pay off that debt.</blockquote><p>Although scaling is probably the most common form of tech debt with a maturity date others do occur. Y2K was a literal date where 30 years of tech debt needed to be paid off by.</p><p>These are obviously not all the financial style questions to help think about tech debt, but they are a start. Using the questions of financial debt provides you with some useful tools to think about your tech debt without having to reinvent the entire apparatus. Some other avenues of inquiry that I left out because they deserve their own article:</p><p>How is choosing what tech debt to incur and what tech debt not to incur like options trading?</p><p>Is there a survivorship bias associated with projects that incur (certain types of) tech debt? Why do most successful projects have tech debt?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d651fa08980a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reading the Classics: A Review of Rapid Development]]></title>
            <link>https://medium.com/@the_ajohnston/reading-the-classics-a-review-of-rapid-development-88bf1c67e8cd?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/88bf1c67e8cd</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Thu, 14 Aug 2014 11:03:03 GMT</pubDate>
            <atom:updated>2014-08-14T11:03:03.677Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently finished <a href="http://www.amazon.com/gp/product/1556159005/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1556159005&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=C2KCHSRZ6BWEGGAV">Rapid Development</a> which I half-jokingly refer to as an encyclopedia of software development practices. That might seem unfair but I mean it as a compliment. I actually tried to read the encyclopedia when I was around 12 because I was so impressed with it. I think I made it up to the Bs before I went back to watching G.I. Joe. A less loaded way to describe this book is as a treatise on software development. McConnell obviously put a lot of effort and systemic thought into this book. One of the reasons the encyclopedia comment is only half joking is that the references and bibliography are thorough throughout the entire 600 page book.</p><p>McConnell is probably best known for <a href="http://www.amazon.com/gp/product/0735619670/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0735619670&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=VWVKZESLAEXC7HNA">Code Complete 2</a>. That book cover how to code well in a similarly encyclopedic manner. Code Complete 2 is a lot more applicable when you first start developing (although there are <a href="https://medium.com/@the_ajohnston/three-books-developers-should-read-when-they-graduate-5ee228251dd2">other books I recommend for college hires</a>). Rapid Development is more useful when you’ve been doing it for a few years. I was reminded of it after running across Coding Horror’s article that mentions it called “<a href="http://blog.codinghorror.com/escaping-from-gilligans-island/">Getting Off of Gilligan’s Island</a>” and decided to pick it up.</p><h3>Summary</h3><p>The first 100 pages (part 1 Efficient Development) is about how to develop software efficiently and rapidly. To develop software rapidly means different things, increasing speed, decreasing risk and increased visibility to business owners are all dimensions to rapid software development. And at some point you have to make trade-offs between these types of rapidity. The other big takeaway from this section is that developing software successfully is more about not screwing up than doing one thing really well. He actually has a checklist of common mistakes (which can be found online <a href="http://www.stevemcconnell.com/rdenum.htm">here</a>) that lead to projects being delayed. If you make any of the common mistakes then the project is likely to be delayed or fail.</p><p>He groups the problems into four categories peoples, process, product and technology. Even when the book was written in the early 90s the people and products category had three times more problems than technology and product. Since then the ratio has become even more skewed. Technology problems are the ones we concentrate the most on because they are the most comfortable for us to solve. But we often to don’t notice people or process problems or just accept them as the cost of doing business. The checklist was what initially got me interested in the book, and it was nice to see the reasoning behind each item on it.</p><p>The second section is the meat of the book and covers in detail the areas that affect development speed. He covers every topic that can affect it from estimation, to teamwork, feature control, life cycle planning, etc. Each of these topics gets between 20 to 50 pages, with an extensive further reading section at the end of each chapter. These chapters are designed for people to skip parts of so if you find a certain section dragging it’s easy (and even encouraged) to go to the next one. If you want a fuller understanding of all the issues related to developing software on time though it’s worth reading every chapter. A nice thing about the encyclopedic nature of this book is that each section will reference the other related sections. This means the book is set up for wiki-walk style reading, once you find an issue that you’re interested in you can jump into the related topics and those topics have related topics, etc</p><p>McConnell finishes with some rapid development practices that can be used to improve the different dimensions of rapid development (speed,risk,visibility). These practices can be used together or in a alone and McConnell lists the pros and cons of each. Getting your team to do “Voluntary Overtime” for the project will get it done much faster but has a high chance of burnout. A lot of these practices seem to be standard practice if you’re doing some form of agile, although they may go by different names. One I had not seen before that seemed especially useful was having the developers maintain a top 10 risks list for a project.</p><h3>Conclusion</h3><p>This book was an interesting mix of (current) best practice, dated ideas and timeless advice. At almost 20 years old that is to be expected but it still threw me for a loop. When the book goes on about the importance of source control, nightly builds, and iterative design I had to remind myself that those things became standard practice in part because of this book. In that way it is a victim of its own success. Other parts like hearing about 4GLs and RAD just reminded me that the next big thing can fall to the wayside quickly. The parts of this book I found most helpful were the parts on estimation, feature scrubbing and development styles. Good technique in these categories has not changed huge amount. Process and people change slower than product and technology.</p><p>This is a book I would recommend to a developer with two caveats. One it covers the people and process topics amazingly in depth and you should concentrate on those parts. The product and technology part seem to have aged the poorest and the advice in it may be out of date so you may just want to skim them. Secondly some of the process suggestions felt specific to shrink-wrap software. Which has different maintenance and development costs than web development. It’s still worth reading and if you can’t read the book at least print out a copy of the checklist of common mistakes, laminate it, hang it next to your Kanban board and think about if you’re making a mistake on it every day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88bf1c67e8cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four words programmers should know]]></title>
            <link>https://medium.com/@the_ajohnston/four-words-programmers-should-know-57596a3ca74e?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/57596a3ca74e</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Mon, 04 Aug 2014 11:32:15 GMT</pubDate>
            <atom:updated>2014-08-04T11:32:15.455Z</atom:updated>
            <content:encoded><![CDATA[<p>I like words, I subscribe to <a href="http://www.reddit.com/r/logophilia">r/logophilia</a>, own multiple dictionaries and am visibly delighted when I come across a word I have never heard. One of the things I love about words is that they take a concept or a pattern and make it easier to talk about by naming it[1]. Schadenfreude being the classic example. The word resonates with people because they have felt it and it gives them a way to talk about the emotion.</p><p>In programming we haven’t yet come up with names for all the concepts that we see on a regular basis. Since naming something helps define it and makes it easier to work with I’d like to propose some words for some concepts I have seen. Instead of coining new words though it’s easier to appropriate another profession’s words for our use. People may already know the words and if they don’t it’s easier to look up an already existing word than scour the internet for someone’s a made up word. So these are words from other professions that I find myself wishing other programmers knew.</p><h3>Apophenia</h3><p>Have you ever been looking at conversion rates, trying to make sense of why changing the landing page’s font size improved conversion rates by 23%. Or why the server’s memory utilization went up by 2GBs after you made the front page of Hacker News, but nothing else changed. Then you may have suffered from apophenia. It is “the experience of seeing patterns or connections in random or meaningless data” and is something programmers easily fall prey to.</p><p>Figuring out cause and effect is something we spend a lot of time doing (debugging) so it’s something we’re good at. But sometimes things just happen and none of the data we have can explain why. Admitting this fact is hard but can save you a lot of time over the long run. It’s important to note the difference here between not being able to explain why something happened and not being able to explain why something happened *with the data we have*. The former hurts our ego the latter is just saying we were given insufficient data to solve the problem. Sample sentence “We aren’t seeing any relationship between the two, are you sure we have enough data and aren’t suffering from apophenia”</p><h3>Iatrogenesis</h3><p>Have you ever just tweaked the layout and the user could no longer submit the form on IE9. Or have you ever said “Well the only thing that changed was Ted increased the monitoring so let’s see if that could have cause the slow down”[2]. Iatrogenesis is “any consequence of medical treatment or advice to a patient” with the implication that it was unintended. Chemo killing cancer is not iatrogenic. Chemo making you bald is.</p><p>When I use iatrogenesis I use it to encompasses “side affects”, new bugs, regressions, performance profile changes, surprises etc. Pretty much any changes that were unintended by the person who introduced them is describable as iatrogenic, but so are things that changes behavior that users were relying on. If I improve logging speed, but change the file name and that breaks a back up script the user was running they would describe that as a bug while I would describe it as working as intended.</p><p>Similarly if you are changing a core part of the system the system is more likely to suffer iatrogenisis than if you are changing a feature. This is especially true of ‘secondary’ systems like logging, monitoring and metrics which often get broken because people sometimes forget about how they are used when making changes. A useful question to ask is “What are the iatrogenic risks associated with this change”. This word is more useful as your system grow larger and has more users, while on greenfield projects you won’t use it as much.</p><h3>Provenance</h3><p>Figuring out the sequence of events that caused a particular problem to occur, especially since most problems are unexpected, is no fun. A ficticious example:”Our CC processor timed out for this one card so we locked the associated account. The client signed in, saw their account was locked for failure of payment and called customer service. That opened a help desk ticket but by then the account had unlocked because the CC authorization had finally gone through. But that meant the customer service representative couldn’t resolve the ticket.” That story involves at least three different systems. at least 8 states of those systems and how they interact. (It’s also a good example of why you should always build in some type of override but that’s a different essay). Without a full history of each of those systems states it would be nearly impossible to reconstruct the chain of events.</p><p>Talking about the full state history of an object is a pain so instead I’m co-opting the word provenance. It actually means<br>“The history of the ownership of an object, especially when documented or authenticated” but I’m using it to mean “the history of states of an object and how/why it transitioned from one state to the next” In the previous example the credit card charge transitioned from not charged to pending to timed out to successfully charged. You could easily imagine a system that only tracked the not charged and successfully charged state.</p><p>If you have this information it makes figuring out the full history of your system much easier, which may or may not be worth it to you. You may make the decision not to know the full provenance of everything in your system. Maybe it’s not worth tracking when each user got their first cookie from your system. But it’s worth having a word to describe what you are lacking.</p><h3>Gadarene</h3><p>if I co-opted the meaning of provenance, iatrogenic and apohphenia, gadarene can be used without changing an iota of meaning”involving or engaged in a headlong or potentially disastrous rush”. Everyone has been on a project that had to be finished “right now” no matter what technical debt was added. Or had someone tell them to switch everything over to the hot new language or they would fall behind. An element of the definition I want to highlight is that the decision’s rightness is irrelevant to using the word. It’s that you’re concentrating on the speed instead of the rightness of the choice</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57596a3ca74e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You should bet more]]></title>
            <link>https://medium.com/@the_ajohnston/you-should-bet-more-fef081c5ac62?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fef081c5ac62</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Thu, 24 Jul 2014 12:18:02 GMT</pubDate>
            <atom:updated>2014-07-24T12:18:02.510Z</atom:updated>
            <content:encoded><![CDATA[<p>You should bet more about the things that affect you. Not on sports, not on politics but on day to day things that actually matter to you. Betting is a good meta-habit that spawns other good habits by creating a feedback loop. Bets require that they be structured in such a way that they are decidable, which means you must measure what your’e betting on. Bets makes you think more clearly, otherwise you’ll lose. Bets makes prediction more like a game, which makes it more fun. Bets create a sense of camraderie. Bets change how you think.</p><p>About a year ago I was inspired to bet more when I reread Alex Tabarrok’s post <a href="http://marginalrevolution.com/marginalrevolution/2012/11/a-bet-is-a-tax-on-bullshit.html">“A Bet is a Tax on Bullshit”</a>. In it he says that pundits should bet their beliefs so that it will decrease the amount of bullshit in the world. Bullshit is a tragedy of the commons problem. The bullshitter gets the benefit of making their statement but bullshitting decreases the signal to noise ratio in public debate. Bullshit’s cost is borne by society since bullshitters are rarely held to account. By betting against them you can force them to pay some of the cost.</p><blockquote>The commons are a little less tragic when the cow’s owner has to pick up the patties.</blockquote><p>But that’s an argument for why it would be good for society for pundits to bet more, it is a reason that the public should be in favor of betting. I’m not a pundit but I deal with a decent amount of bullshit so this made me want to bet more in my day to day life. My thinking was that betting would improve my life, not just decrease the amount of bullshit.</p><p>If you want to get better at something you need a feedback loop. A lot of what we do in the modern world is long term prediction which doesn’t have a feedback loop built in and betting can serve as a substitute. If Steve thinks the company can hit a sales number by next quarter and they miss it by 15% what are the odds he’s going to remember he was wrong next quarter. We remember our wins more easily than our losses. But if he and John have a bet about it John will remind him at the end of three months.</p><blockquote>By having someone bet against you you’re outsourcing keeping yourself honest.</blockquote><p>If you actually want to get better at something you need a feedback loop and betting is an easy way to create one.</p><p>Part of this is the bet makes it socially permissible to tell someone “I told you so”, which is normally taboo. If at the end of the quarter John said “Steve you were wrong” then he’s an ass but if he says “Steve pay up” then it’s fine. In addition by making a bet your belief has been manifested as something separate from you. This means Steve can admit he was wrong without his ego being hurt, while still learning from the experience. “I overestimated last quarters numbers, but that’s cause marketing lied to me, I’ll take that into account this time.” Saying “I lost a bet” is easier than saying “I was wrong”</p><p>The corollary of this is if you don’t care if you’re right then you should not bet on it. If making a prediction is just a way of signalling that you agree with your boss, or that you’re a team player or that you’re “thinking positively” then you should ’t bet on it because the actual prediction doesn’t matter. Just agree with the groupthink and move on. But if predicting well actually does matter then you should be willing to be on it</p><p>Betting makes you to track the numbers. If you really care about something you should be doing this already, but making predictions requires it. If you aren’t tracking something you can’t bet on it. But if you don’t track the numbers do you actually care about it? Obviously some things are hard to track than other, customer satisfaction is harder to measure than new sales. Luckily there is a whole book on this topic, <a href="http://www.amazon.com/gp/product/0470539399/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470539399&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=BHEWOJB2OQLEW6VK">How to Measure Anything</a>. It can help you discover what you really care about. For example If you care about customer satisfaction because you care about keeping them on as customers. So you actually care about customer retention, which is easily measurable. So you would bet on customer retention rate.</p><p>Betting makes you think clearly or lose. In fact thinking clearly is usually a side affect of losing a few bets. Usually when people come up with a prediction it’s some combination of hand-waving and wishful thinking. They don’t bother to think clearly about what they’re predicting most of the time. But if we’re betting on it most people will <strong>actually</strong> think about what they’re predicting, do some research and maybe even some math. My proof of this is the amount of time wasted on fantasy sports. American businesses lose 18 billion dollars in productivity on employees researching and managing their teams for fantasy sports. Part of the popularity is that unlike predicting next quarter’s numbers playing in a fantasy league actually gives you feedback. Another part of it is that fantasy leagues are a game and people don’t like to lose at games.</p><blockquote>Betting gamifies making predictions which makes it more fun which means people will put more energy into it.</blockquote><p>This is related to why the bonding level is so high with people who bet against each other. Nothing brings people together like competing with each other over something with small stakes. This is why we have children play sports, why you can make friends playing online games and why bowling leagues exist. The semi-structured nature of the interaction and the fact that the stakes don’t matter means betting breeds friendship.</p><p>Sooner or later people who bet together start to bond over not just the betting but also they form a sense of camaraderie around the fact that they <strong>are</strong> betting unlike other people. Bryan Caplan puts it in a purposefully hyperbolic way in his <a href="http://econlog.econlib.org/archives/2012/05/the_bettors_oat.html">bettor’s oath</a></p><blockquote>“a betting loser has far more honor than the mass of men who live by loose and idle talk”</blockquote><p>People who have bet against each other can trust the other’s predictions because they know each other’s limits. They have won money when the person was overconfident and lost money when the person was right. It builds trust in each other.</p><p>Betting changes your thinking though. As I’ve bet more I notice I get more frustrated by people who won’t at least give me odds when I ask them “How likely do you think this is?” If the question matters “Pretty likely” is not an acceptable answer. They should give me the odds. Preferrably with a decent payout.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fef081c5ac62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three books developers should read when they graduate]]></title>
            <link>https://medium.com/@the_ajohnston/three-books-developers-should-read-when-they-graduate-5ee228251dd2?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ee228251dd2</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Tue, 01 Jul 2014 12:59:56 GMT</pubDate>
            <atom:updated>2015-02-07T15:02:46.658Z</atom:updated>
            <content:encoded><![CDATA[<h4>Books for CS majors who become software developers</h4><p>It’s been a month or so since you graduated and started your first developer job. You figured out how to get to the office before noon and all those other niceties. You fixed some minor bugs but you haven’t had to implement quicksort or construct a consistent hashing algorithm or anything from your CS program. To someone unfamiliar with the field it would seem weird that most CS graduates end up becoming software developers and most developers are CS majors. This is because although CS is a young field software development is still in diapers and the demand for software developers far outstrips the supply. CS majors are the closest college hire to developers that currently exists.</p><p>The problem lies in the gaps between the two fields. A lot of what a developer needs to do day to day is not covered as part of the computer science curriculum (and rightly so). What this means is when you graduate you’re not done learning your just done with people telling you what you should learn. A lot of this can be picked up on the job but it’s easier with some structure.</p><blockquote>Learning by osmosis is a poor substitute when you have other options.</blockquote><p>There are lots of lists out of books developers should read and most of them are great reading lists for developers. So why am I adding another? For a recent CS graduate many of these books are only helpful in the long term. <a href="http://www.amazon.com/gp/product/0465026567/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0465026567&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=WHPIZ5RTEBFTMGLX">G</a>ö<a href="http://www.amazon.com/gp/product/0465026567/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0465026567&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=WHPIZ5RTEBFTMGLX">del Escher Bach</a> will make you a better programmer in the long run but it won’t help you figure out how to get your pull request to pass code review. The other issue is that these lists usually lump general programming books together with domain specific ones. A front end developer is going to pick different books then a full stack start-up developer and those two list won’t have much in common with a list made by a big data dev. Roughly the categories that recommended books fall into are</p><ul><li>Development practices — how to write good code and good software</li><li>Software Engineering — how to create a complete system</li><li>Computer Science — data structures, algorithms, etc. This should be the area you’re most comfortable in</li><li>Products — how to make a product people will buy</li><li>Front End Development — how to write software the user will see</li><li>Back End Development — how to write software the user won’t see</li><li>Data Analysis — figuring out what to measure and and what it means</li><li>Management — working with other people</li></ul><p>A new graduate you mainly care about the first 3 topics and some combination of the next 4 depending on what you’re doing (the last is there for completeness). Although there is overlap between all the topics, especially the first 2 I’m going to concentrate on good development practices since that’s the most important for a new graduate and the one they’re most likely to be lacking in.</p><p>Good development practices aren’t just about quickly writing software that isn’t awful. That’s required but not sufficient. It’s also about how to solve or avoid common problems while developing software. Coding in college is about passing the assignment, as long as it runs for the professor you’re good. At work developing software is about more than just solving the problem, but coding well is still fundamental. No matter what type of development you’re doing you need to learn how to code well and design good software. That’s what these books are about</p><h4><a href="http://www.amazon.com/gp/product/020161622X/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=020161622X&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=JHWJ6BIXZ5PSEHYG">Pragmatic Programmer</a></h4><p>This book appears on pretty much every list of books for programmers and for good reason. It’s the best high level coverage of concepts that are useful in day to day programming but that you might not think of or learn in school. Each of the concepts is described with the problem it will help you solve. Need to generate a large set of test data? Write a throw-away program that generates it. Need to change the business logic constantly? Store it in a config file. The paper version of the book I have comes with an insert of the 70 key points in the book, along with checklists for common tasks, if you buy an e-reader version you can get the print out <a href="http://blog.codinghorror.com/a-pragmatic-quick-reference/">here</a>.</p><p>This book is full of ideas that seem obvious in hindsight or after you have a few years of experience. When I recommended this book to someone who was learning to code he put it best “It’s things that are second nature to experienced programmers but I wouldn’t have thought of.” If you’re experienced parts of this book are going to seem obvious but with some new ideas you had not thought of. It’s also nice to have someone give concrete explanations for the habits you’ve picked up over the years</p><h4><a href="http://www.amazon.com/gp/product/0131177052/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0131177052&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=Y7KT57VSRNJOYM4B">Working Effectively with Legacy Code</a></h4><p>Most of the time you’ll be changing code that’s already been written, so should know how to do it well. The number of greenfield projects you’ll get to do, especially as a junior developer are fairly low. Usually you’ll be making changes or fixing bugs in code that someone else wrote. The quality of that code can vary from good to spaghetti and it’s important to follow the boy-scouts rule of always leave it cleaner than it was when you got there. Which is why this book is on the list.</p><p>The book is part tract on the importance of testing and part how-to guide on refactoring/redesigning. Feathers argues that if code does not have tests for it you can’t be confident altering or debugging it. Even if you aren’t 100% sold on the idea of “Everything must be testable” the parts on refactoring and how to work with spaghetti code are worth it. Each chapter is titled with a complaint you’ll say when working with legacy code “I’m changing the same code all over the place” or “I need to change a monster method” followed by techniques to handle those issues. Also the arguments for testing, especially TDD are better reasoned than most of the arguments you’ll get following <a href="https://twitter.com/search?q=%23tddisdead">#TDDisDead</a> on Twitter.</p><h4><a href="http://www.amazon.com/gp/product/0596007124/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596007124&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=FMENQKYA5EGPIDUE">Head first design patterns</a></h4><p>Unlike the other 2 books which are useful no matter what type of coding you’re doing this book is less helpful if you’re just doing frontend, DBA work or programming in an non object oriented way. Caveats aside if you’re programming in an object oriented language (statistically you will be) it gives you a great introduction to common design patterns that you see in the OO world. At some point in your career you’re going to be programming OO so you should at least know how to do it well</p><p>There are certain patterns of abstraction you see repeatedly when you’re programming. The repetition is not so straight forward that you can replace it with a component but HFDP explains some of the more common ones and how to work with them. So when you see a problem you can say “If we just create an adapter we can reuse the code instead of rewriting” More importantly it will get you up to speed with the common terminology so instead of flailing around for 10 minutes to explain that you vary your sorting algorithm based off of the results and which service was querying you can simply say “We used the the strategy pattern” and everyone will know what you’re talking about.</p><p>It’s an easier read than the original GoF book and the 600+ pages contain a lot of diagrams so it’s not as hard as it looks. It’s actually the easiest read of the three.</p><p>These three books won’t make you an expert but they will help you get up to speed. They cover the a lot of the gap between CS grad and professional developer but they don’t cover everything. I chose them because most developers don’t read at all so getting them to read just 3 would be great. If you are one of those developers who reads below are books that I recommend for new developers but didn’t make it into my top 3.</p><h4><a href="http://www.amazon.com/gp/product/0735619670/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0735619670&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=NPKU3NH5H756YUNN">Code complete 2</a></h4><p>I own a dog eared heavily underlined copy of this book. It was one of the first books I read outside of college and I still think it’s the most comprehensive book on writing good programs. It covers a lot of the same material on coding as Pragmatic but in even more depth. The reason it didn’t usurp it is because:</p><p>1. It’s over 800 pages and dense, meaning most people won’t get through it.<br>2. It’s most helpful OO/imperitive style of coding.<br>3. Most of it has become ‘common’ wisdom meaning you’ll pick up a lot in this book between Stack Overflow and code reviews</p><p>That being said if you’re programming in one of those languages and think you have the fortitude to make it through this I still recommend it as an amazing book.</p><h4><a href="http://www.amazon.com/gp/product/0201485672/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0201485672&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=X7K3P2ZWT2RBKQAJ">Refactoring</a></h4><p>The seminal book on refactoring. When I was reading Working with Legacy Code it felt like an updated version of this. Part of the reason this book doesn’t make the list is because it was so successful. A lot of the points the book makes seem like common sense now because people adopted the advice in it. But things like the evils of enums and writing code that generates code are still underutilized. If nothing else the author even suggests you can read the first few chapters and skim the rest which I suggest you do. A lot of the refactoring techniques in this book have been automated by Resharper.</p><h4><a href="http://www.amazon.com/gp/product/0201835959/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0201835959&amp;linkCode=as2&amp;tag=youtubeplayli-20&amp;linkId=3L4EFTNV6Q67YGQL">Mythical Man Month</a></h4><p>This is a fascinating book since it’s the first well known book about software engineering and it gives you a glimpse into what it was like to program in the 70s. It falls more into the category of software engineering than coding/developing. In addition although the advice is still relevant the examples are anachronistic. That said every developer should at least read the essay “No Silver Bullets” though and keep it in mind whenever someone says “This new tool I read about on HN will cut our development time in half”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ee228251dd2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Features you shouldn’t build]]></title>
            <link>https://medium.com/@the_ajohnston/features-you-shouldnt-build-82a5136a2fef?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/82a5136a2fef</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Sun, 18 May 2014 21:56:22 GMT</pubDate>
            <atom:updated>2014-05-18T21:56:22.627Z</atom:updated>
            <content:encoded><![CDATA[<p>As a developer if someone comes to me with a problem my brain starts working on a solution. It’s not a conscious decision and it’s not something I can stop. It’s that developers are compelled to fix problems, it’s how our brains are wired. To fix a problem you use the tools at hand and as a developer the tool closest to hand for us is to build software.</p><p>But for a lot of problems writing more code is the wrong solution.</p><blockquote>Remember every line of code you spend on solving this problem is a line of code you can’t spend somewhere else.</blockquote><p>You’re going to have to test, roll-out and maintain it. And new developers are going to have to get up to speed on it. You normally think of product managers as the ones weighing the costs and benefits of new features but the developer needs to be weighing the technical costs and looking out for features whose costs outweigh the benefits.</p><p>A lot of proposed internal features fall into this category. You’re eating lunch with the sales guys and they are complaining about how with all the steps they have to do it takes 2 hours to onboard customers. They ‘need’ a better tool to make onboarding the customer go faster. If you work in a high touch sales business and each salesman is only onboarding 10 clients a month then that’s only 20 hours a month they are spending onboarding. How much time is that new tool going to save them? As a rule of thumb for coding process improvements, if it doesn’t cut a tasks time in half it’s probably not worth doing.</p><p>Internal tools that aren’t just speeding up an existing process but are actually something new should be evaluated differently. They should be evaluated like any new product, is there a market for them? Since people aren’t actually paying the questions is “Will people use this?” People will only use a new tool if it makes their job easier. A good practice is to build an MVP and see if people actually use it. If the MVP doesn’t actually get adoption it’s unlikely there is demand for the full solution</p><blockquote>A lot of internal tools get built because you hear about your coworkers problems a lot more than you hear about your customers problems.</blockquote><p>If most internal tools are a bad idea because they might not be valuable enough business analytics are a bad idea because they are valuable. I’m defining business analytics as when you take all that raw data you have and crunch it to get information out of it. Pretty much everybody on the the business side wants this data because it helps them make better decisions and make more money.</p><p>So why shouldn’t you code up a solution for that? The problem is that business analytics are never done. The business side is going to be constantly looking at those numbers and wanting to tweak the analysis to get more information. Needing a developer for every minor tweak is going to frustrate them and the developer. In addition the business world has it’s own edge cases that you need to keep in mind. Why were sales down last month? Because it was February, which has fewer days. Why were sales up last month? Because it was December and customers needed to spend the rest of their budget.</p><p>A better solution is to give the raw data to the business side and let them do the analytics in Excel. If the business side doesn’t know how to use Excel you should start looking for a new job because your company is probably doomed.</p><p>The common thread between projects you shouldn’t do is that they aren’t using developer time on things that scale. A tool that only makes people marginally more effective only scales across a very large number of users. A tool that isn’t used doesn’t have the chance to scale. And a tool that requires constant developer input doesn’t scale at all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82a5136a2fef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Questions to ask when building a scheduling system]]></title>
            <link>https://medium.com/@the_ajohnston/questions-to-ask-when-building-a-scheduling-system-84987f50bf57?source=rss-106fbec9adc1------2</link>
            <guid isPermaLink="false">https://medium.com/p/84987f50bf57</guid>
            <dc:creator><![CDATA[arthur johnston]]></dc:creator>
            <pubDate>Tue, 31 Dec 2013 19:14:50 GMT</pubDate>
            <atom:updated>2013-12-31T19:14:50.962Z</atom:updated>
            <content:encoded><![CDATA[<p>“Software is eating the world” isn’t just a great sound bite, we’re automating more and more things and one of those things is scheduling. It used to be you called and talked to a human if you were reserving a table, making a doctor’s appointment or getting an oil change. Now you can do all of them online. The time saving and convenience for consumers are huge. From the business’s perspective having customers book online is easier and since a web presence is now mandatory this is a trend that’s going to continue.</p><blockquote>The downside of scheduling being done by a computer is you have to make explicit some rules that the maitre d’, office manager, or mechanic knew implicitly</blockquote><ul><li>We want to keep 20% of the tables open for walk-ins</li><li>The doctor needs to be gone by 3 on alternative Tuesdays to pick up his kids</li><li>We only have 4 lifts, so even though I have 6 mechanics working I can’t book any more oil changes, but I can patch tires</li></ul><p>Scheduling software is coming to more and more industries and unfortunately every industry has there own rules and terminology, so each implementation will be different. This essay is an attempt at cataloging some common features that scheduling systems need and some questions you should ask when building a scheduling system.</p><h3>Questions to ask</h3><p>In journalism they have the 5 Ws to get a story. For scheduling you can ask similar questions to get an idea of the features required, roughly in order of importance:</p><ul><li>When should the appointment happen?</li><li>What needs to happen?</li><li>Who needs to be there?</li><li>Why is it happening?</li><li>Where is it happening?</li></ul><h4>When</h4><p>If you don’t have a When, then it’s not a scheduling system it’s an issue tracking system. The other 4 questions may not be necessary depending on exactly what you’re building but When is mandatory.</p><p>An appointment <strong>at minimum </strong>needs to designate a start time but normally has an end time also. If you’ve ever gotten a party invitation that says “from 9 PM to whenever” or you’ve ever been told by a mechanic you can pick your car up “sometime after 4&quot; you’ve had an appointment without a definitive end.</p><p>Just having a start time and end time may not be enough though. Baking a cake takes 2 hours total. 30 minutes to mix everything at the start 60 minutes to bake then 30 minutes at the end to put on the icing. Is that 60 minutes in the middle free for the baker? If so how do you represent that?</p><p>Is the appointment recurring?. Does it happen every week, every other week, once a month etc. Outlook actually does this pretty well, letting you schedule repeating appointments on a fairly arbitrary basis. What it doesn’t let you do is exclude from the calendar i.e. “I do a sales call every Friday, except for the 2nd Friday of the month when I play golf”</p><h4>What</h4><p>What is the reason for the appointment? If you try to schedule an appointment with a car mechanic they want to know if it’s for an oil change, a check up or because your break light is out. Part of this is because changing your break light will take 15 minutes, while doing a full check up takes 2 hours.</p><p>Another reason to ask What is that scheduling systems are used to gather data for other systems. For example when you schedule a check up with your mechanic they’re actually doing multiple things:</p><ul><li>an oil change</li><li>rotating your tires</li><li>replacing your break pad</li><li>replacing your batteries</li><li>checking your engine</li></ul><p>All of which is billed individually so the scheduling system needs to ask What for the billing system. Similarly if you have engine trouble and your car is under warranty they want to know what model it is so their defect tracking system can detect models that are having issues across the board.</p><blockquote>Will your scheduling system be collecting data for some other purpose? (The answer is always yes)</blockquote><h4>Who</h4><p>Is the appointment with a specific person? When my mom gets her nails done there’s only one nail technician she trusts, when I schedule my iPhone to get fixed I don’t care who at the genius bar fixes it. In the first scenario my mom is scheduling with a specific technician in the latter I’m really just saying what needs to done and when it needs to be done, I don’t care about the who at all.</p><p>Those are the two ends of the spectrum but this doesn’t have to be binary. When you schedule a hotel room you can specify 2 doubles or 1 queen bed, or a non-smoking room, or a room with a beach view. These are all properties of certain rooms. Is there any characteristic the scheduler might want to differentiate on?</p><p>Are multiple resources needed for this? In the mechanic example if an oil change requires a mechanic and a lift then both of those resources have to be free at that time for someone to schedule an oil change at that time.</p><p>Relatedly in the cake baking example if it takes 30 minutes of prep work 60 minutes to bake and 30 minutes to put on the icing the chef is only busy for the first 30 minutes and the last 30 minutes while the oven is busy for the 60 minutes in the middle. So even if multiple resources are needed for the appointment it may not be for the entire time, so they can be scheduled for other things (incidently in cooking this is called dovetailing).</p><h4>Why</h4><p>Why is asked to get to the root cause of why you’re booking an appointment. It’s used to add context/detail and what the system does with the answer is industry specific.</p><blockquote>Why is where human judgement comes in and is usually the hardest part to automate.</blockquote><p>When you call a restaurant to make a reservation and the maitre d’ asks if this is for a special occasion, they are asking so that they can have birthday cake or champagne ready. Similarly if you call your mechanic because your car won’t start and you’re missing work they’ll fit you in to their schedule because it’s a higher priority than a regular check up.</p><h4>Where</h4><p>Are there multiple locations this could take place? If I want to book a dinner reservation at the restaurant Candle 79 then the location is going to be 154 E 79th St, New York, New York because that’s their only location so their scheduling system doesn’t have to worry about location. However if I want to rent a car from Enterprise I need to specify which office I’m picking up at because they have a dozen locations.</p><p>Answering these 5 questions is necessary for the basics of building a scheduling system. There are other features such as double booking, overlapping appointments, floating lunch breaks, and time restrictions that you may need to think about but the 5 Ws get you the common features that aren’t domain specific.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84987f50bf57" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>