Jekyll2024-03-13T00:08:24-04:00https://pragmati.st/feed.xmlpragmatistPatrick Joyce's website.Patrick JoyceWhat I Read in 20232024-03-12T00:00:00-04:002024-03-12T00:00:00-04:00https://pragmati.st/2024/03/12/what-i-read-in-2023<p>Took me long enough to write this one up :)</p>
<h2 id="january">January</h2>
<ul>
<li><a href="https://www.amazon.com/Last-Days-Roger-Federer-Endings/dp/0008475219">The Last Days of Roger Federer: And Other Endings</a></li>
</ul>
<h2 id="february">February</h2>
<ul>
<li><a href="https://www.amazon.com/Blindsight-Peter-Watts/dp/0765319640"><strong>Blindsight</strong></a> - This book is bonkers (in that it posits a world where Vampires are real) but was very interesting and made me reflect on the nature of consciousness.</li>
</ul>
<h2 id="march">March</h2>
<ul>
<li><a href="https://www.amazon.com/Four-Thousand-Weeks-Management-Mortals/dp/0374159122">Four Thousand Weeks: Time Management for Mortals</a> - A philosophical meditation on how to ensure you accomplish the important stuff and enjoy your life from a self-described “recovered productivity obsessive”.</li>
</ul>
<h2 id="april">April</h2>
<ul>
<li><a href="https://www.amazon.com/Dopamina-mol%C3%A9cula-condiciona-enamoramos-Behavioral/dp/8411000109">Dopamine: The Molecule of More</a> - <em>Spanish translation</em></li>
<li><a href="https://www.amazon.com/Hackers-Computer-Revolution-Steven-Levy/dp/1449388396">Hackers</a> - Never read this before. Pretty cool stories from the people who created so much of the culture of programming.</li>
<li><a href="https://www.amazon.com/-/es/Mike-Isaac-ebook/dp/B08JNPQYVN">Super Pumped</a> - <em>Spanish translation</em> - I knew a lot of the story but not all of it. There is something resembling a greek tragedy in the story of Uber in that the things that made Travis Kalanick uniquely suited to lead Uber to success when they were upstarts combatting evil taxi monopolies (insane drive, pathological competitiveness, and a willingness to flout regulations) is also what made him uniquely ill-suited to lead a multi-billion dollar global company. This was fun to read in Spanish and pick up a bunch of startup vocabulary.</li>
<li><a href="https://www.amazon.com/Echopraxia-Peter-Watts/dp/0765328039">Echopraxia</a> - Sequel to Blindsight. I enjoyed it significantly less than Blindsight.</li>
</ul>
<h2 id="june">June</h2>
<ul>
<li><a href="https://www.amazon.com/AI-Revolution-Medicine-GPT-4-Beyond-ebook/dp/B0BXNVM6FC/">The AI Revolution in Medicine</a> - A team of medical doctors and researchers got early access to GPT-4 to see how it affected care. This mirrored a lot of my thoughts about the possibilities and limitations of generative AI. I am convinced widespread AI will be a society altering change, probably a bigger change than the adoption of personal computers and the internet.</li>
<li><a href="https://www.amazon.com/Proyecto-Hail-Mary-Spanish/dp/841805413X"><strong>Project Hail Mary</strong></a> - <em>Spanish translation</em> - I loved this book so much.</li>
</ul>
<h2 id="august">August</h2>
<ul>
<li><a href="https://www.amazon.com/Creative-Act-Way-Being/dp/0593652884">The Creative Act</a> - Rick Rubin is a weird and uniquely talented dude. The book sometimes veers into faux mysticism that I’m constitutionally allergic to, but also contained some really good prompts to unblock thinking.</li>
<li><a href="https://www.amazon.com/Whats-Our-Problem-Self-Help-Societies/dp/0143136675">What’s Our Problem?</a> - I love <a href="https://waitbutwhy.com">Wait But Why</a>. Tim Urban makes a lot of very good points as he tries to figure out how societal discourse seems to have gone off the rails. I also think he oversimplifies quite a bit and falls victim to false equivalencies in several places. We should all aspire to consistently be high rung thinkers.</li>
<li><a href="https://sheaserrano.gumroad.com/l/actionheroscoutingreport">Action Hero Scouting Report</a> - Shea Serrano is one of my favorite writers and I enjoy how much fun he’s having with little projects like this.</li>
<li><a href="https://www.amazon.com/Do-Hard-Things-Resilience-Toughness/dp/0593192385">Do Hard Things: Why We Get Resilience Wrong and the Surprising Science of Real Toughness</a></li>
</ul>
<h2 id="october">October</h2>
<ul>
<li><a href="https://www.amazon.com/Going-Infinite-Rise-Fall-Tycoon/dp/1096473926"><strong>Going Infinite: The Rise and Fall of a New Tycoon</strong></a> - FTX is another story I’d followed and was fairly informed on but there still were <em>a lot</em> of absoluely amazing stories in here. I feel like Michael Lewis wrote this about as sympathetic to SBF as possible and I still read it as “he committed massive financial fraud”</li>
</ul>
<h2 id="november">November</h2>
<ul>
<li><a href="https://www.amazon.com/Los-detectives-salvajes-Savage-Detectives/dp/8433966633"><strong>Los Detectives Salvajes</strong></a> - <em>Spanish</em> - I spent 4½ months with with this book. I went into it pretty much entirely blank with only a vague recollection that Roberto Bolaño was a big deal when I was in Spain in 2003, died young, and occupies sort of a Spanish language David Foster Wallace niche in my mind. I won’t attempt to summarize the book, but it is very, <em>very</em> good. I’m glad I read it and am confident it’s going to stick with me for a long time.</li>
</ul>
<h2 id="december">December</h2>
<ul>
<li><a href="https://www.amazon.com/Resumen-Historia-Ecuador-Spanish/dp/9978301160">Resumen de Historia del Ecuador</a> - <em>Spanish</em> - We were going to Ecuador and I didn’t know anything about the history of the country so I found this 200 page cliff’s notes history written for Ecuadorean high school students.</li>
<li><a href="https://www.amazon.com/Savage-Detectives-Reread-Rereadings/dp/1509887178">The Savage Detectives Reread</a> - I had a feeling I was missing quite a bit so sought out this academic English language book to get deeper context.</li>
<li><a href="https://www.amazon.com/Origin-Species-150th-Anniversary/dp/0451529065">On the Origin of Species</a> - We were going to the Galapagos, and I’d never actually read Darwin so I figured now was the time. Victorian prose is <em>rough</em>, but it is amazing how much he got right. I enjoyed <a href="https://scienceblogs.com/bloggingtheorigin">this series of an evolutionary biologist blogging through reading the book</a> in 2009.</li>
</ul>Patrick JoyceTook me long enough to write this one up :)Monitor For The Absence Of Success, Not Just the Presence of Failures2023-08-13T00:00:00-04:002023-08-13T00:00:00-04:00https://pragmati.st/2023/08/13/monitor-for-the-absence-of-success<p>Let’s start with a brief story: last year one of my teams built a new system that was in a limited beta. The system was dependent on receiving messages from an upstream system owned by a different team in an entirely different part of the company. It processed those messages, using them to display something to customers that had a meaningful positive impact on purchase conversion for the small number of merchants that were using the new feature.</p>
<p>After an intense and successful Black Friday / Cyber Monday period, most of the team was looking forward to taking a well-earned rest around the end of the year. We were confident that our on-call rotations and monitoring would let people mostly unplug and recharge, while knowing that if anything went wrong, we’d know about it.</p>
<p>Unfortunately, when we came back from a week off, we realized that the buyer-facing feature had essentially been disabled for a week and <em>we didn’t know</em>.</p>
<h2 id="what-happened">What happened?</h2>
<p>The upstream team got nervous about their ability to support the new system and turned it off before they went on break. This could have been a valid business decision, but unfortunately they forgot to tell us. So we were surprised to learn that this new and valuable feature was essentially disabled for a week.</p>
<h2 id="how-did-we-miss-it">How did we miss it?</h2>
<p>We <em>did</em> have monitoring in place.</p>
<p>We had alerts configured to page us if the job that processed the messages failed. And we had other alerts configured that would page us if there was a backup of messages.</p>
<p>What we <em>didn’t</em> have was an alert that paged us if <em>no messages</em> were sent.</p>
<h2 id="the-lesson">The Lesson</h2>
<p><strong>When setting up comprehensive monitoring you must monitor both for the absence of success as well as the presence of failure.</strong></p>
<p>Monitoring for the absence of success is monitoring for when something you expect to happen <em>didn’t happen</em> as opposed to only monitoring for when an unexpected failure <em>did happen</em>.</p>
<p>I’ve found that teams naturally monitor for failures. The first alerts that get set up are generally for spikes in 500s, errors, or failed background jobs. And those are good! But they aren’t sufficient.</p>
<p>The goal of monitoring is to have confidence that your system is working as expected. To do that you need to monitor whether the key outcomes of your system are succeeding.</p>
<h2 id="common-challenges">Common Challenges</h2>
<h3 id="monitoring-at-the-right-level-of-abstraction">Monitoring At The Right Level of Abstraction</h3>
<p>I find that when monitoring for the absence of success it is important to define the success at the right level of abstraction. In the instance above we could have directly monitored for the number of messages successfully processed.</p>
<p>But we might have been better off monitoring at even an even higher level of abstraction (the number of times we displayed the buyer facing feature)</p>
<p>Monitoring at higher levels allows you to catch more issues with a single monitor. For instance, monitoring that the expected number of messages have been processed would have caught the issue where the upstream system stopped sending messages, but it wouldn’t have caught an issue where we failed to display the buyer facing feature. Monitoring the number of times we displayed the buyer facing feature is better because it would have caught an error in any part of the system and also is monitoring the action that directly created business value.</p>
<h3 id="seasonality">Seasonality</h3>
<p>Many systems have a natural seasonality of usage within a day. If you run a service with overwhelmingly North American user base there won’t be a lot of usage at 4am ET / 1am PT.</p>
<p>There are a couple of ways to handle this. The simplest is to configure your monitoring to only alert during times of day where there is generally enough usage to confidently detect abberations.</p>
<h3 id="high-cardinality-of-data">High Cardinality of Data</h3>
<p>High cardinality refers to having a large number of groupings of values in a dataset. In the context of monitoring, it can make detecting specific anomalies more complex due to the sheer variety of potential failures.</p>
<p>For example, at LivingSocial, we negotiated different rates for each of our business lines in various countries, resulting in a unique merchant account for every country and business line. This high cardinality made it challenging to monitor success rates for specific combinations like travel purchases in New Zealand, which were rare and therefore too noisy to detect changes in success rate in the same way we did for higher volume merchant accounts.</p>
<p>One way to manage high cardinality is to set up less granular monitoring that checks for the presence of success over a longer period of time. For instance, after an issue with the configuration at our payment gateway led to a days long outage of the New Zealand/travel combination I set up a monitor to check that there had been at least one successful transaction in the last 12 hours for the New Zealand/Travel combination. This might be slower to a alert than the finer grained alerting we had in higher volume countries but it was effective in detecting anomalies within highly granular data without leading to false positives.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Effective monitoring goes beyond merely watching for failures. Remember, it’s not just about what could go wrong; it’s also about ensuring what should go right, does. Your users, your team, and your bottom line will thank you.</p>Patrick JoyceLet’s start with a brief story: last year one of my teams built a new system that was in a limited beta. The system was dependent on receiving messages from an upstream system owned by a different team in an entirely different part of the company. It processed those messages, using them to display something to customers that had a meaningful positive impact on purchase conversion for the small number of merchants that were using the new feature.What I Read in 20222023-01-01T00:00:00-05:002023-01-01T00:00:00-05:00https://pragmati.st/2023/01/01/what-i-read-in-2022<h2 id="january">January</h2>
<ul>
<li><a href="https://www.amazon.com/Enemy-All-Mankind-Historys-Manhunt/dp/0735211604">Enemy of All Mankind</a> - Interesting and relatively light read of piracy and the world’s first international manhunt at the dawn of modern nation states.</li>
<li><a href="https://www.amazon.com/Soccermatics-Mathematical-Adventures-Pro-Bloomsbury/dp/1472924142/">Soccermatics: Mathematical Adventures in the Beautiful Game</a> - It was fine. I have a much better soccer book later in the year though.</li>
</ul>
<h2 id="february">February</h2>
<ul>
<li><a href="https://www.amazon.com/Dilla-Time-Afterlife-Producer-Reinvented/dp/0374139946"><strong>Dilla Time</strong></a> - This is one of the best books I have read in the last 10 years. It is about J.Dilla, possibly my favorite producer of all time, but it is also about the history of Black music in America, technological development and disruption, the entire neo soul movement, and the cost of enabling a single minded obsession. This book left me speechless.</li>
</ul>
<h2 id="march">March</h2>
<ul>
<li><a href="https://www.amazon.com/Cien-años-soledad-Aniversario-Illustrated/dp/0525562443/ref=sr_1_1?keywords=cien+anos+de+soledad+spanish&qid=1672695612&sprefix=cien+%2Caps%2C83&sr=8-1">Cien Años de Soledad</a> - This was a bucket list book for me. After I got back from Spain and my Spanish was at its peak I started this book. Then the semester started back up, and I had to set it down. Then on the next break I tried again. I’d probably read the first 75 pages 3 times, but had never gotten through it. This time I did. Technology helps: I’d read the kindle book, while listening to the spanish audio book with Audible. Then after finishing a chapter in Spanish, I’d read it in English, then re-read it in Spanish. It’s a difficult book and probably wasn’t a wise choice for my first foray back into reading in Spanish but I’m glad I did it.</li>
<li><a href="https://www.amazon.com/Scout-Mindset-People-Things-Clearly-ebook/dp/B07L2HQ26K/">The Scout Mindset: Why Some People See Things Clearly Others Don’t</a> - Essentially a book long exploration of how to defeat confirmation bias.</li>
<li><a href="https://www.amazon.com/Scorecasting-Hidden-Influences-Behind-Sports-ebook/dp/B004C43GC4/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr=">Scorecasting</a> - This was a fine beach read but nothing special. It had a “freakanomics but for sports” vibe but wasn’t as engaging as I remember Freakanomics being (althogh it has been 15+ years since I read that)</li>
</ul>
<h2 id="april">April</h2>
<ul>
<li><a href="https://www.amazon.com/Origin-Genetic-Americas-Jennifer-Raff-ebook/dp/B08B6F2YFX/">Origins: A Genetic History of the Americas</a> - Using ancient DNA to trace human migration to the Americas.</li>
<li><a href="https://www.amazon.com/Upheaval-Turning-Points-Nations-Crisis-ebook/dp/B07H2997W4/">Upheaval: Turning Points for Nations in Crisis</a> - The stories of how different countries responded to crises in different ways were interesting. The attempt to construct an underlying theory for how nations respond to crisis from an N of ~8 was… a stretch.</li>
</ul>
<h2 id="may">May</h2>
<ul>
<li><a href="https://www.amazon.com/Most-Never-Want-Have-Again/dp/1481867954/">The Most Fun I Never Want To Have Again: A Mid-Life Crisis in Community Banking</a> - A first person narrative of launching a community bank on the outskirts of Atlanta in the run up to the 2008 financial crisis.</li>
</ul>
<h2 id="june">June</h2>
<ul>
<li><a href="https://www.amazon.com/Talent-Identify-Energizers-Creatives-Winners/dp/1250275814">Talent: How to Identify Energizers, Creatives, and Winners Around the World</a> - Interesting and thought provoking read. But I was left with the feeling that the specific techniques suggested by the authors wouldn’t necessarily generalize to normal recruiting without some additional guardrails. Tyler Cowen is a professor and a lot of his interviewing is part of grantmaking and Daniel Gross is an early stage VC who is interviwing founders. In both of those scenarios you’re seeking outlier performers and high variance is fine (it is fine if most grants / investments don’t pan out if you find one or two “hits”). But in interviewing at a normal company, even a top notch company with very high standards, your downside risk is higher.</li>
</ul>
<h2 id="july">July</h2>
<ul>
<li><a href="https://www.amazon.com/Locos-ricos-y-asiáticos-Spanish-ebook/dp/B07F17Z633">Locos, Ricos, and Asiáticos</a> - After Cien Años de Soledad I needed something lighter so went with the Spanish translation of Crazy Rich Asians. Wasn’t quite as easy as I was hoping for as there is a ton of luxury goods vocabulary that I didn’t know. Fun read though overall. I had enjoyed the movie, but, as always, the book is better.</li>
<li><a href="https://www.amazon.com/Hábitos-atómicos-Spanish-James-Clear-ebook/dp/B07PLNHHDP/"><strong>Hábitos Atómicos</strong></a> - Now this was more my speed. Turns out that mass market business / personal development books are written with relatively clear language so this was a way easier read. Also a good book. Emphasis on</li>
<li><a href="https://www.amazon.com/Rome-Empires-Story-Greg-Woolf-ebook/dp/B008FK84EQ">Rome: An Empire’s Story</a> - We went to Italy in July and I like to learn a bit about the places I went. This wasn’t a comprehensive history of the Roman Empire, but was more a history of the development of the <em>concept of empire</em>.</li>
<li><a href="https://www.amazon.com/Florentines-Galileo-Transformation-Civilization-Histories-ebook/dp/B08LDY4WD1">The Florentines: From Dante to Galileo: The Transformation of Western Civilization</a> - This I found more compelling. It is a history of the emergence of the Reannaisance in Florence focused on specific people.</li>
</ul>
<h2 id="august">August</h2>
<ul>
<li><a href="https://www.amazon.com/Extra-Life-History-Living-Longer-ebook/dp/B08H18J8S4/">Extra Life: A Short History of Living Longer</a> - A look at how we have doubled global life expectancy from ~40 in 1920 to ~80 today.</li>
</ul>
<h2 id="september">September</h2>
<ul>
<li><a href="https://www.amazon.com/Anarchy-Company-Corporate-Violence-Pillage-ebook/dp/B07W952J1F/ref=sr_1_1?keywords=the+anarchy&qid=1672696626&s=digital-text&sprefix=the+anarc%2Cdigital-text%2C71&sr=1-1">The Anarchy</a> - A history of the East India company and more specifically the 100 year period of chaos following the East India company’s toppling of the Mughal empire. Almost everything in this book is insane, from a private company essentially acting as sovereign of one of the largest nations on earth to descriptions of torture more depraved than anything in Game of Thrones.</li>
</ul>
<h2 id="november">November</h2>
<ul>
<li><a href="https://www.abramsbooks.com/product/net-gains_9781419758911/"><strong>Net Gains</strong></a> - I’m a sucker for analytical soccer books. I really enjoyed that this book was written by an American who came up in our youth development system and played through college. Good overview of the evolution of an analytical understanding of the game. Not a ton here that is new if you’ve read “Football Hackers” but I thoroughly enjoyed it and highly recommend.</li>
</ul>
<h2 id="december">December</h2>
<ul>
<li><a href="https://www.amazon.com/MINDSET-Spanish-CAROL-DWECK-ebook/dp/B0744LQGH9/">Mindset: La Actitud del Éxito</a> - I’ve been familiar with the concept of Growth Mindset and have found it a useful tool for thinking about how I approach challenges and how I attempt to steer my children. The book is a bit of a mixed bag, particualrly because I was already coming convinced that Growth Mindset was a real thing (they even did a well [designed replication study(https://marginalrevolution.com/marginalrevolution/2018/03/growth-mindset-replicates.html)]). There are some good examples of how to phrase praise to. But I think the book at time veered into labeling anything the authour liked as “Growth Mindset” and anything they didn’t like as “Fixed Mindset”. In particular, I found the chapter arguing for Jack Welch—famous for living in an $80,000/month GE owned apartment <em>even after he retired</em>—as a down to earth, man of the people, Growth Mindset CEO boderline hilarious because he cut the executive dining room. Reading it in Spanish I learned <em>a lot</em> of synonyms for “challenge”</li>
</ul>Patrick JoyceJanuary Enemy of All Mankind - Interesting and relatively light read of piracy and the world’s first international manhunt at the dawn of modern nation states. Soccermatics: Mathematical Adventures in the Beautiful Game - It was fine. I have a much better soccer book later in the year though.A Brief Morality Play About A Cool, User Friendly Feature2022-08-11T00:00:00-04:002022-08-11T00:00:00-04:00https://pragmati.st/2022/08/11/a-brief-morality-play-about-a-cool-user-friendly-feature<p>I saw a feature request from my friend and former colleague Ellen Beldner last night on Twitter:</p>
<blockquote>
<p>i simply want a protocol that embeds password requirements into the form field html and that password managers can use to create a matching PW</p>
<footer>
<strong>Ellen Beldner</strong>
<cite>
<a href="https://mobile.twitter.com/ellenbeldner/status/1557405353674825728">Twitter</a>
</cite>
</footer>
</blockquote>
<p>What follows is a running diary of my thoughts for the next five minutes where I:</p>
<ol>
<li>Get super excited about her idea</li>
<li>Figure out how it could work technically with current standards</li>
<li>Realize why it wouldn’t do much good in the real world</li>
</ol>
<hr />
<p><strong>0m:01s</strong> — That sounds amazing! I <strong>hate</strong> when the password 1Password generates is rejected. How would I implement that?</p>
<p><strong>0:10</strong> — Wait, doesn’t HTML5 have support for client side validation built in? Wouldn’t that cover it? I bet I could figure out how to make this work and impress my friend.</p>
<p><strong>00:30</strong> — It does! There isn’t a full protocol, but HTML5 allows for specifying regex patterns that an input is required to match. There’s even a <a href="https://www.w3schools.com/howto/howto_js_password_validation.asp">w3schools tutorial</a> on how to set up regex validation for a password field complete with an example:</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="o"><</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s2">"password"</span> <span class="nb">id</span><span class="o">=</span><span class="s2">"psw"</span> <span class="nb">name</span><span class="o">=</span><span class="s2">"psw"</span> <span class="n">pattern</span><span class="o">=</span><span class="s2">"(?=.*</span><span class="se">\d</span><span class="s2">)(?=.*[a-z])(?=.*[A-Z]).{8,}"</span> <span class="n">title</span><span class="o">=</span><span class="s2">"Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"</span> <span class="n">required</span><span class="o">></span></code></pre></figure>
<p><strong>0:35</strong> — OK, so I’ve got a regex, what would do I need to know to make sure that my generated password matches?</p>
<p><strong>0:45</strong> — Here are the options for a new password in 1Password:</p>
<p><img src="/images/1Password-new-password-screen.png" alt="1Password New Password Options" /></p>
<p><strong>1:00</strong> — Alright, I think I just need to know four things:</p>
<ol>
<li><strong>Is there a minimum length?</strong> But this doesn’t seem very important because it is unlikely your password manager will try to generate a password that is too <em>short</em>.</li>
<li><strong>Is there a <em>maximum</em> length?</strong> <em>This one matters</em>. This is probably the most common failure reason when 1Password generated passwords exceed the arbitrarily short password lengths that some sites mandate.</li>
<li><strong>Are there any characters that are forbidden?</strong> This is the next most common reason I’ve had a generated password fail. Normally when there is a blocklist of certain symbols.</li>
<li><strong>Are there any classes of characters that are required</strong> “Must contain at least one number, one lowercase letter, and one capital letter”. Won’t worry about this one, because I haven’t seen it prevent a generated password from working.</li>
</ol>
<p><strong>1:30</strong> — So… how do you extract that information from an arbitrary regex. Well, I’m sure that there are smart ways to do this, probably something with an AST of the regex?</p>
<p><strong>2:15</strong> — But “perfect is the enemy of the good” and I can already think of two pretty dumb ways to do this so I don’t need to use my CS degree today:</p>
<ol>
<li><em>mostly</em> dumb: I could probably parse out just the max length and any characters that are globally blocked fairly easily.</li>
<li><em>really</em> dumb: When generating a password I could just feed the regex in, try a few variations with my current rules, then loosen the rules if it fails, and try again. Generate 5 random passwords, if they all fail remove the requirement for symbols, generate 5 more, if those all fail shorten the length by one, repeat until something works or we hit an arbitrary minimum size. Voila!</li>
</ol>
<p><strong>2:45</strong> — Alright… I feel like we’re getting somewhere! That may be a dumb, inefficient implementation but I bet it would work for 99% of cases.</p>
<p><strong>2:46</strong> — But… if I can figure out how to make this work in 5 minutes of thinking, wouldn’t the people who spend their whole working lives thinking about password managers have thought of this? I’m sure they dogfood their products and they have to be extra annoyed every time a site rejects their password…</p>
<p><strong>3:00</strong> — I have a feeling that the sites with annoying password requirements that reject strong passwords aren’t implementing a ton of the newest HTML5 stuff.</p>
<p><strong>3:01</strong> — How can I test that hunch? I’ve had autogenerated passwords rejected, but I don’t remember <em>where</em> off the top of my head.</p>
<p><strong>3:30</strong> — Thankfully everything exists on the Internet! A quick search for “<a href="https://www.google.com/search?client=safari&rls=en&q=sites+with+dumb+password+requirements&ie=UTF-8&oe=UTF-8">sites with dumb password requirements</a>” brings me to <a href="https://github.com/duffn/dumb-password-rules/blob/master/README.rst">Dumb Password Rules</a> on GitHub.</p>
<p><strong>3:45</strong> — And… I have accounts with a couple of these sites so let’s check and see if they look like they’re implementing anything modern like HTML5 form hints.</p>
<p>(checks the HTML for the password reset forms for two sites from the list)</p>
<p><strong>4:55</strong> — <em>They decidedly are not.</em></p>
<p><strong>5:00</strong> — OK… so this feature could totally exist! <em>But only if sites with annoying password requirements added something to their HTML</em>. And if I worked on a password manager I wouldn’t build this feature, because I doubt it would meaningfully reduce how many autogenerated passwords get rejected in real world usage. What we have is a problem of adverse selection:</p>
<ol>
<li>The sites that implement new, user friendly features like standards based, HTML5 form validation are the least likely to have arbitrary and restrictive password requirements that reject password manager generated passwords <em>and</em></li>
<li>The sites with dumb requirements like “Passwords must be between 6 and 10 characters and can only be letters and numbers” are the <em>last</em> sites that would add a validation regex pattern to help password managers.</li>
</ol>
<hr />
<p>And thus I conclude this edition of “Patrick gets excited about a feature idea, figures out how it could work, and then crushes his own dreams in 5 minutes.”</p>
<hr />
<p>I wish I had a more useful lesson here. Maybe some form of <a href="https://fs.blog/chestertons-fence/">Chesterton’s Fence</a> like “If you have an idea for an obvious feature in someone else’s product, ask yourself why they haven’t built it before you propose it”</p>
<p>But I don’t think that is particularly useful.</p>
<p>Because you don’t get any credit for calling that something will fail. The <em>default</em> is that things don’t work.</p>
<p>So I’ve spent the last decade training myself to look for “<em>how could it work?</em>” and “<em>how much would it matter if it did?</em>”</p>
<p>At the same time, quickly eliminating ideas that seem good but wouldn’t actually work is necessary to spend time on the ideas that really matter, so being able to quickly eliminate plausible sounding ideas <em>is</em> valuable.</p>Patrick JoyceI saw a feature request from my friend and former colleague Ellen Beldner last night on Twitter:What I Read in 20212022-03-05T00:00:00-05:002022-03-05T00:00:00-05:00https://pragmati.st/2022/03/05/what-i-read-in-2021<h2 id="january">January</h2>
<ul>
<li><a href="https://www.amazon.com/Pachinko-National-Book-Award-Finalist/dp/1455563935"><strong>Pachinko</strong></a> - Epic multi-generational story of Koreans in Japan.</li>
<li><a href="https://www.amazon.com/Station-Eleven-Emily-John-Mandel-ebook/dp/B00J1IQUYM"><strong>Station Eleven</strong></a> - Excellent. I’m not sure that reading about a world ending pandemic was great for my mental state last January. The HBO show currently airing is also beautifully shot. It is meaningfully different than the book owing to the need to have the characters, you know, meet. The book is better, but the TV show is different enough that you can enjoy each separately.</li>
</ul>
<h2 id="february">February</h2>
<ul>
<li><a href="https://www.amazon.com/Influence-Without-Authority-Allan-Cohen-ebook/dp/B075MSLV6W/">Influence Without Authority</a> - I find most business books overly transactional but if I can learn one thing from them that makes me better I consider it time well spent. In this case that one thing was that people value different things, so paying attention to what your coworkers value makes it possible to give them things they care about. Which in turn makes it more likely that they’ll be able to help you. Sounds cynical, but mostly is about treating people how <em>they</em> want to be treated.</li>
<li><a href="https://www.amazon.com/Lords-Strategy-Intellectual-History-Corporate/dp/1591397820">Lord of Strategy</a> - I’ve worked with a lot of ex-management consultants, but have never been a management consultant. Interesting history of the creation and development of management consulting and modern business schools.</li>
</ul>
<h2 id="may">May</h2>
<ul>
<li><a href="https://leanpub.com/theMLbook"><strong>The Hundred-Page Machine Learning Book</strong></a> - I’ve worked closely with Data Scientists for years, but I didn’t really have any hands-on experience. This was an excellent—and brief—overview that laid the conceptual groundwork to do a deeper hands-on dive during my break between jobs. Recommended to any engineer who works with data scientists.</li>
<li><a href="https://www.amazon.com/Idea-Factory-Great-American-Innovation/dp/0143122797"><strong>The Idea Factory</strong></a> - History of Bell Labs. They invented <em>everything</em></li>
<li><a href="https://www.amazon.com/Outsider-History-Goalkeeper-Jonathan-Wilson-ebook/dp/B00GU3560U">The Outsider: A History of the Goalkeeper</a> - Very British centric. Wanted to enjoy this more than I did.</li>
<li><a href="https://www.amazon.com/dp/B08V1N49ZN/">The Bomber Mafia</a> - Malcom Gladwell is a great story-teller. Not his best book but very enjoyable and one of the better produced audio books I’e ever listened to.</li>
<li><a href="https://www.amazon.com/gp/product/B074C3123B">Veronica Mars: The Thousand Dollar Tan Line</a> - We watched Veronica Mars a few years ago and I quite enjoyed it. Kristen Bell read the audio book version. Not the worst way to spend a cross-country flight.</li>
<li><a href="https://www.amazon.com/Veronica-Mars-Original-Mystery-Thomas-ebook/dp/B00KAFX8HM/">Veronica Mars: Mr. Kiss and Tell</a></li>
<li><a href="https://www.amazon.com/dp/B08V91YY8R">The Premonition</a> - Michael Lewis is a great writer. Scathing on the CDC.</li>
</ul>
<h2 id="june">June</h2>
<ul>
<li><a href="https://www.amazon.com/Goliath-Monopolies-Secretly-Took-World/dp/1501183087">Goliath</a> - This book made me <em>angry</em>. There are plenty of problems with large companies but this felt like Matt Stoler started with the conclusion “big = EVIL” and then portrayed every scenario in the most negative possible light. For instance, he wrote in scandalized tones that the A&P ruthlessly bullied food distributors for lower prices in the 1930s and I wanted to scream “You mean they achieved lower food prices for millions of Americans!”</li>
<li><a href="https://www.amazon.com/Big-Business-Letter-American-Anti-Hero/dp/1250110548">Big Business: A Love Letter to an American Anti-Hero</a> - I deliberately read this next as a contrast to Goliath and found it a much more compelling argument.</li>
<li><a href="https://www.amazon.com/Entangled-Life-Worlds-Change-Futures/dp/0525510311/"><strong>Entangled Life: How Fungi Make Our Worlds, Change Our Minds & Shape Our Futures</strong></a> - Fungi are super weird and break a bunch of my assumptions about how life works.</li>
<li><a href="https://www.amazon.com/Working-Backwards-Insights-Stories-Secrets-ebook/dp/B08BYCQBZN/">Working Backwards</a> - Detailed view of how Amazon worked (at least how Amazon worked at some point in the past). I’ve worked with several ex-Amazon people and can see the value of many of these practices. A meeting that consists of reviewing a rigorously prepared 6-pager that everyone has read will lead to better discussion and decision than walking through a presentation live. However, these practices evolved in a very specific environment at Amazon and they can only be successful if the environment shares the values that produced them.</li>
<li><a href="https://www.amazon.com/Hands-Machine-Learning-Scikit-Learn-TensorFlow-ebook-dp-B07XGF2G87/dp/B07XGF2G87/ref=mt_other?encoding=UTF8&me=&qid="><strong>Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow</strong></a> - Practical introduction to a broad array of machine learning techniques. Reading “The Hundred Page Machine Learning Book” before this gave me some conceptual understanding. Doing all the exercises in this book gave me a much deeper understanding of those concepts.</li>
<li><a href="https://www.amazon.com/Lying-Money-Legendary-Frauds-Workings-ebook/dp/B078WFT5JV">Lying for Money: How Legendary Frauds Reveal the Workings of Our World</a> - Building stuff on the Internet means dealing with fraud. This was a fun history of the ways in which humans defraud each other and the very human vulnerabilities those frauds exploit.</li>
</ul>
<h2 id="july">July</h2>
<ul>
<li><a href="https://www.amazon.com/gp/product/B08TB1TP7H/ref=dbs_a_def_rwt_bibl_vppi_i0">Amazon Unbound</a> - Amazon is one of the most impactful organizations in the world today. This was a deeply researched history of how they went from a large e-commerce retailer to one of the most important companies in the world.</li>
<li><a href="https://www.amazon.com/Range-Generalists-Triumph-Specialized-World/dp/0735214484">Range</a> - I <em>loved</em> David Epstein’s first book “The Athlete Gene”. This is an equally well written book about the benefits of avoiding early specialization.</li>
<li><a href="https://www.amazon.com/Guide-Good-Life-Ancient-Stoic/dp/1522632735??tag=dailystoic07-20"><strong>A Guide to the Good Life: The Ancient Art of Stoic Joy</strong></a> - Excellent personal advice on how to apply the lessons of ancient stoic philosophy to live a good life in the modern world. When I’ve practiced the principles in this book I’ve felt more peaceful and joyful.</li>
<li><a href="https://www.amazon.com/How-Be-Epicurean-Ancient-Living-ebook/dp/B07NCV1D94/">How to Be an Epicurean: The Ancient Art of Living Well</a> - I thought I should examine some of the other ancient schools of philosophies. This didn’t feel as applicable.</li>
</ul>
<h2 id="august">August</h2>
<ul>
<li><a href="https://www.amazon.com/gp/aw/d/B001D1SRRS/">The Machine That Changed the World: The Story of Lean Production</a> - Lean manufacturing is a background influence on a lot of modern software development. Two things were striking in the book that originally coined the term: how incredibly <em>inefficient</em> American auto manufacturing was in the 1970s and the palpable fear of Japanese economic domination in the 1980s.</li>
<li><a href="https://www.amazon.com/Ministry-Future-Kim-Stanley-Robinson-ebook/dp/B084FY1NXB/">The Ministry for the Future: A Novel</a> - I loved the Red Mars trilogy when I was a kid. This was a hard science fiction look at a near future ravished by climate change. This book made me deeply anxious. Which I think was the author’s intention.</li>
<li><a href="https://www.amazon.com/Finite-Infinite-Games-James-Carse-ebook/dp/B004W3FM4A/">Finite and Infinite Games</a> - The concept of finite and infinite games is central to how Shopify looks at the world. I didn’t love the writing but I do love the concept.</li>
<li><a href="https://www.amazon.com/Cost-These-Dreams-Stories-Business/dp/014313387X">The Cost of These Dreams: Sports Stories and Other Serious Business</a> - Wright Thompson has written two of my favorite magazine articles ever: <a href="http://www.espn.com/espn/feature/story/_/page/Michael-Jordan/michael-jordan-not-left-building">Michael Jordan Has Not Left The Building</a> and <a href="http://www.espn.com/espn/feature/story/_/id/10984370/portrait-serial-winner-luis-suarez-soccer-most-beautiful-player">Portrait of a Serial Winner</a> about Luis Suarez. This is an anthology where each article seems to deal with the deep pain and sacrifice that comes from a pursuit of greatness.</li>
</ul>
<h2 id="september">September</h2>
<ul>
<li><a href="https://www.amazon.com/Why-We-Sleep-Unlocking-Dreams-ebook/dp/B06ZZ1YGJ5/"><strong>Why We Sleep: Unlocking the Power of Sleep and Dreams</strong></a> - Pretty amazing overview on the importance of sleep. I’m not sure I believe <em>everything</em> in the book, but it has changed my habits: I haven’t had any caffeine since September.</li>
<li><a href="https://www.amazon.com/gp/aw/d/9814841900/">Crossroads: A Popular History of Malaysia and Singapore</a> - Singapore is a <em>tiny</em> nation that has become wealthy through a relentless prioritization of growth and rising living standards over all else—including basic personal freedoms.</li>
</ul>
<h2 id="october">October</h2>
<ul>
<li><a href="https://www.amazon.com/gp/aw/d/B017QL8UOS/ref=tmm_kin_title_0?ie=UTF8&qid=1466257955&sr=8-1">The Perfect Bet</a> - I don’t gamble, but I very much enjoy <em>thinking about gambling</em>.</li>
<li><a href="https://www.amazon.com/Pie-Sky-Remy-Lai/dp/1250314097"><strong>Pie in the Sky</strong></a> - I generally don’t include the books I read with my kids here, but this book was <em>beautiful</em>. It is the story of an 11 year old boy who immigrates to Australia with his mother and little brother after the death of his father. Funny and heart wrenching. JoJo ended up having to read the last few pages out loud because I couldn’t get the words out through my sobs.</li>
<li><a href="https://www.amazon.com/Success-Luck-Good-Fortune-Meritocracy-ebook/dp/B017I2M8ZC/">Success and Luck</a> - I have led an <em>unbelievably</em> fortunate life. I read this as part of a conscious exercise in gratitude to appreciate that luck. The book also makes a strong argument for dramatically higher marginal tax rates on the wealthy and how that would deflate top-end asset prices but increase utility… even for those who are being taxed dramatically higher. This <a href="https://www.theatlantic.com/magazine/archive/2016/05/why-luck-matters-more-than-you-might-think/476394/">adaptation of the introduction</a> is worth reading.</li>
<li><a href="https://www.amazon.com/Team-Teams-Rules-Engagement-Complex-ebook/dp/B00KWG9OF4/">Team of Teams</a> - Solid personal narrative of building organizations that can adapt quickly to changing conditions.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></li>
</ul>
<h2 id="november">November</h2>
<ul>
<li><a href="https://www.amazon.com/Hip-Hop-Other-Things-Shea-Serrano-ebook/dp/B093GP147K/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=&sr="><strong>Hip Hop (And Other Things)</strong></a> - I love Shea Serrano. Thoroughly enjoyed this. I also very much enjoyed his podcast “No Skips” (particularly The Miseducation of Lauren Hill episode)</li>
<li><a href="https://www.amazon.com/Estonia-A-Modern-History/dp/1787383377">Estonia: A Modern History</a> - I was more interested in the recent history about the extremely digital savvy nation that emerged after Communism, but this was more focused on early to mid 20th century. Despite not being what I hoped I learned a lot more about the Baltic states than I previously new.</li>
<li><a href="https://www.amazon.com/gp/product/0593087682">Trillions: How a Band of Wall Street Renegades Invented the Index Fund and Changed Finance Forever</a> - I invest in index funds because I know I’m not smarter than the market. The indifference and hostility that met the first index funds is amazing given that index funds eventually became the default form of investment.</li>
<li><a href="https://www.amazon.com/Rational-Optimist-Prosperity-Evolves-P-s/dp/0061452068">The Rational Optimist</a> - There is a lot of pessimism about the future. I intentionally seek out well argued thinking about why we should be optimistic for the future.</li>
</ul>
<h2 id="december">December</h2>
<ul>
<li><a href="https://www.amazon.com/Box-Shipping-Container-Smaller-Economy-ebook/dp/B003U2TR5O">The Box: How the Shipping Container Made the World Smaller and the World Economy Bigger</a> - Fascinating, but also one of those books I think might have been better as 2 or 3 long magazine articles.</li>
<li><a href="https://www.amazon.com/dp/B08QGKHYHT/">The Last Shadow</a> - I <em>love</em> the Ender series. This… didn’t really need to exist, but wasn’t the worst beach read.</li>
<li><a href="https://www.amazon.com/One-Billion-Americans-Thinking-Bigger-ebook/dp/B082ZR6827"><strong>One Billion Americans</strong></a> - For the US to maintain its global influence we need to grow. The policy recommendations are reasonable and seem like they should be achievable if we committed to increasing growth. This is similar to Derek Thompson’s <a href="https://www.theatlantic.com/ideas/archive/2022/01/scarcity-crisis-college-housing-health-care/621221/">Abundance Agenda</a>. I work in growth companies because—for all the challenges—everything is better when a company is growing. In a stagnant or slow-growing company there is a zero-sum competition for resources and promotions. But in a growth company there is an abundance of opportunity and it is clear that when person succeeds it makes it more likely that everyone else also succeeds. I’d like to see the US become a growth country again, and I think we can do it.</li>
<li><a href="https://www.amazon.com/Mans-Search-Meaning-Viktor-Frankl-ebook/dp/B009U9S6FI">Man’s Search for Meaning</a> - A personal story of surviving the Holocaust paired with a practical approach to finding a meaning and therefore satisfaction in the less dire situations of everyday life.</li>
</ul>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>Warning: The repeated references to Michael Flynn as a valuable and competent member of senior military leadership as opposed to a crazy person actively working to overthrow the US government are… jarring. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>Patrick JoyceJanuary Pachinko - Epic multi-generational story of Koreans in Japan. Station Eleven - Excellent. I’m not sure that reading about a world ending pandemic was great for my mental state last January. The HBO show currently airing is also beautifully shot. It is meaningfully different than the book owing to the need to have the characters, you know, meet. The book is better, but the TV show is different enough that you can enjoy each separately.What I Read in 20202021-02-14T00:00:00-05:002021-02-14T00:00:00-05:00https://pragmati.st/2021/02/14/what-i-read-in-2020<p>I read far fewer books in 2020 than in past years. Pandemic stress and the lack of commute as I moved to 100% remote work really cut down on my reading time.</p>
<p>Looking back it also influenced my selection: a greater percentage of fiction and books about sports than in usual needs.</p>
<p>Favorites in <strong>bold</strong>.</p>
<h2 id="february">February</h2>
<ul>
<li><a href="https://www.amazon.com/dp/B07TRNVTZQ/"><strong>Why We’re Polarized</strong></a> - An examination of the structural issues that explain the outcome of our two party system. Good to read, did not provide a confidence about a way to improve things.</li>
</ul>
<h2 id="june">June</h2>
<ul>
<li><a href="https://www.amazon.com/How-Buildings-Learn-Happens-Theyre-dp-0670835153/dp/0670835153/">How Buildings Learn: What Happens After They’re Built</a> - About buildings but really about evolutionary design.</li>
<li><a href="https://www.amazon.com/dp/B0798NPPSN/"><strong>An Absolutely Remarkable Thing</strong></a> - Really enjoyed this. Royela recommended it to me, I couldn’t put it down, and it blew my mind when I got to the end, read the “About the Author” and realized it was the nerdy guy from the <a href="https://www.youtube.com/user/scishow">SciShow youtube channel</a> I’ve been watching with the kids for years.</li>
<li><a href="https://www.amazon.com/Football-Hackers-Science-Data-Revolution-ebook/dp/B07NQM3YGK/">Football Hackers: The Science and Art of a Data Revolution</a> - Soccer is an extremely difficult to quantify but there has been a lot of progress. Soccer analytics feel 5 years behind basketball analytics.</li>
</ul>
<h2 id="september">September</h2>
<ul>
<li><a href="https://www.amazon.com/gp/product/B081Y4Q86K">A Beautifully Foolish Endeavor</a> - The sequel to “An Absolutely Remarkable Thing.” I also enjoyed this.</li>
</ul>
<h2 id="august">August</h2>
<ul>
<li><a href="https://www.amazon.com/Once-Future-King-T-White-ebook/dp/B00AEDDSQG/">The Once and Future King</a> - This was my father’s favorite book when he was growing up. In the lamest act of teenage rebellion I refused to read it. Finally, made that right this year. The Arthur as child book was repetitive, but I really enjoyed the Lancelot focused book.</li>
</ul>
<h2 id="october">October</h2>
<ul>
<li><a href="https://www.amazon.com/Inner-Game-Tennis-Classic-Performance-ebook/dp/B003T0G9E4/">The Inner Game of Tennis</a> - Heard about this in the second season of Michael Lewis’ <a href="https://atrpodcast.com/episodes/the-coach-in-your-head-s1!82597">Against The Rules</a> podcast which I thoroughly enjoyed and highly recommend. The book was fine.</li>
<li><a href="https://www.amazon.com/Pakistan-Hard-Country-Anatol-Lieven-ebook/dp/B0077BONPS/">Pakistan: A Hard Country</a> - One of the reasons I read so few books this year is that I started reading this in about March. It took a while. I didn’t realize how little I knew about Pakistan. In particular the very loose central control of large parts of the country. The book ends in 2010. I wish there was an updated version covering the last 10 years.</li>
<li><a href="https://www.amazon.com/MVP-Machine-Baseballs-Nonconformists-Players-ebook/dp/B07J4WG7FF/"><strong>The MVP Machine</strong></a> - Baseball is far from my favorite sport but its highly discrete nature means it is generally at the lead of analytics. Where the first part of the analytics revolution chronicled in Moneyball was about roster building, this book examines how new tools are influeing dramatically changing player development. For instance, high speed cameras and specialized radar allows pitchers to develop new pitches faster than ever before. This book made me thing about the competitive advantage of creating better performance feedback loops.
<h2 id="december">December</h2>
</li>
<li><a href="https://www.amazon.com/Inverting-Pyramid-History-Soccer-Tactics-ebook/dp/B07CLJJQTV/">Inverting The Pyramid</a> - Definitive history of soccer tactics starting before the standardization of rules in the 1800s and continuing through geigenpressing. The older stuff was mildly interesting but found the more recent stuff much more interesting. There is a very good chapter on Marcelo Bielsa who is a fascinating person.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></li>
</ul>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>If you like soccer you should watch the first season of <a href="https://www.amazon.com/Take-Us-Home-United-Season/dp/B07W5D9X3R">Take Us Home: Leeds United</a>. The press conference where Bielsa breaks down his degree of preparation after getting caught filming opposing teams training is amazing. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>Patrick JoyceI read far fewer books in 2020 than in past years. Pandemic stress and the lack of commute as I moved to 100% remote work really cut down on my reading time.OKRs: Delivery Results, Adoption Results, and Impact Results2020-06-16T00:00:00-04:002020-06-16T00:00:00-04:00https://pragmati.st/2020/06/16/okrs-delivery-results-adoption-results-impact-results<p><a href="http://pragmati.st/2013/06/20/how-do-you-end-up-with-a-great-product-a-year-from-now/">Years ago I wrote about</a> identifying and focusing on the key metrics that make your product successful as opposed to focusing on a roadmap of tasks.</p>
<p>As Stitch Fix has grown to more than 35 cross-functional product teams we needed a structured goal setting process to make sure we’re all working together to achieve our company goals. About two years ago we began using Objectives and Key Results (OKRs) as the primary way we ensure teams focus on impact. OKRs create clarity <em>within</em> our teams, alignment <em>across</em> our teams, and autonomy <em>for</em> our teams.<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>
<p>Moving from a roadmap-focused view of the world (the features we’re going to deliver this quarter) to an impact-focused view of the world (the outcomes we are going to drive this quarter) can be hard. Early in that transition I’ve often seen teams share “Key Results” that are really just a list of tasks they’re going to complete.</p>
<p>One technique I’ve found for better key results is to think of
three types of results:</p>
<p><img src="/images/types-of-results.png" alt="Delivery Results (OK) ⮕ Adoption Results (Better) ⮕ Impact Results (Best)" /></p>
<p>Each type of key result can be valuable, but the ones to the right are better than the ones to the left. By thinking about what type of result we’re using we can better achieve our objectives.</p>
<h2 id="delivery-results">Delivery Results</h2>
<p>Delivery Results are the most straightforward. These are results of the format “Ship X by Y date”</p>
<p>Sometimes this is the best that we can do. We may have no idea what the impact will be, or there may be a hard compliance requirement that simply must happen by a given date.</p>
<p>An example of a delivery result is “Launch a shopping cart to enable multi-item orders by May 31st”</p>
<p>However, in the vast majority of cases I think we can do better.</p>
<h2 id="adoption-results">Adoption Results</h2>
<p>Adoption results move from ensuring that something is <em>shipped</em> to that something is <em>used</em>.</p>
<p>This is an improvement because it focuses the team on ensuring that what they built is good enough to be used.</p>
<p>An example of a adoption result is “80% of purchase orders created using new tool”</p>
<h2 id="impact-results">Impact Results</h2>
<p>Impact results move from measuring whether something is <em>used</em> to whether it <em>created value</em>.</p>
<p>This is an improvement because you’re now directly measuring metrics that drive outcomes. Without impact results you run the risk of building something that is good enough to be used but does not have the impact you intended.</p>
<p>An example of an impact result is “Increase 7-day signup to first purchase conversion rate by 10%”</p>
<h2 id="example">Example</h2>
<p>Let’s look at a concrete example. Imagine an engineering team focused on building the platform used by other engineers at the company to run applications.</p>
<p>They have the following objective:</p>
<blockquote>
<p>Objective: Make it easy for developers to provision the correct amount of server resources</p>
</blockquote>
<p>The simplest way to write a result would be a <em>delivery</em> result:</p>
<blockquote>
<p>Objective: Make it easy for developers to provision the correct amount of server resources</p>
<p>Key Results:</p>
<ul>
<li>Deploy autoscaling capability</li>
</ul>
</blockquote>
<p>We could do <em>better</em> by re-working the result to be an <em>adoption</em> result:</p>
<blockquote>
<p>Objective: Make it easy for developers to provision the correct amount of server resources</p>
<p>Key Results:</p>
<ul>
<li>85% of apps have enabled autoscaling capability</li>
</ul>
</blockquote>
<p>And we can do <em>even better</em> by writing <em>impact</em> results:</p>
<blockquote>
<p>Objective: Make it easy for developers to provision the correct amount of server resources</p>
<p>Key Results:</p>
<ul>
<li>25% reduction in Aggregate Container Memory Usage</li>
<li>Reduce Out of Memory Errors from 30 per month to 0.</li>
</ul>
</blockquote>
<h2 id="impact-results-increase-clarity">Impact Results Increase Clarity</h2>
<p>Impact results increase clarity within a given team. In the delivery and adoption results examples above there is a fair amount of scope ambiguity. It isn’t clear to the team what can be cut and still count as “autoscaling capability”.</p>
<p>The impact result makes tradeoffs much easier: is a given feature necessary to achieve the results? If not, it can be dropped without jeopardizing the overall objective.</p>
<h2 id="impact-results-increase-alignment">Impact Results Increase Alignment</h2>
<p>The greater clarity driven by impact results also helps improve alignment <em>across</em> teams. Maybe when the product engineering teams see those results they say “we don’t have a problem with overprovisioning, what we have a problem with is we’re spending way too much time manually adjusting capacity”. Then a conversation will happen where the results can be improved to better match the core of the objective.</p>
<h2 id="impact-results-increase-autonomy">Impact Results Increase Autonomy</h2>
<p>Finally, impact results allow teams to find creative ways of changing course to better deliver value.</p>
<p>Imagine the team above is using the delivery result. They’ve pre-suppposed the solution and will focus on building the autoscaling capability to the exclusion of considering other options. There may be iterative development and releases, but the team’s “success” or “failure” will be defined as “did you complete <em>this</em> spec?”. Ship the whole thing on the last day of the quarter and they “achieved their result” even though there has been no concrete improvement towards in the overarching objective. Deviations from shipping the defined autoscaling capability will be avoided.</p>
<p>The adoption result encourages slightly better behavior. If half of the applications can get moved over without every feature in the full system being built maybe they will get migrated earlier.</p>
<p>But the best is the impact result because it encourages the team to focus on creating real value. If, as part of creating the autoscaling system the team first audits resource consumption, they may then realize they can manually adjust capacity to the proper levels for over or underprovisioned apps <em>before</em> they’ve built out the autoscaling system. This would drive reduced resource usage (and cost) and reduced out of memory errors (and better reliability) while the team is building out the full autoscaling system.</p>
<h2 id="always-be-improving">Always Be Improving</h2>
<p>Delivery results and adoption results aren’t inherently bad and you shouldn’t be afraid to use them. But in most cases we can better achieve our objectives by asking how we’d move one step further along that continuum towards directly measuring impact.</p>
<p>If you’re using delivery results then ask how you can turn them into adoption results. If you’ve defined adoption results then ask how you could change them into impact results. Follow those steps regularly and your teams will achieve better results faster.</p>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>If you’d like to learn more about OKRs <a href="https://www.amazon.com/gp/product/0525536221?tag=randohouseinc20127-20">Measure What Matters</a> is a great book detailing OKRs. If you don’t want to read an entire book—even though it is a very quick read—you can probably get 80% of the benefit by reading <a href="https://assets.ctfassets.net/cn6v7tcah9c0/4snZXJ821G6KYUoc08masK/58ffcbc7c607d7c6056c7da507727135/Google_OKR_Playbook_V1JS.pdf">Google’s 6-page OKR Playbook</a>. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>Patrick JoyceYears ago I wrote about identifying and focusing on the key metrics that make your product successful as opposed to focusing on a roadmap of tasks.What I Read in 20192020-03-17T00:00:00-04:002020-03-17T00:00:00-04:00https://pragmati.st/2020/03/17/what-i-read-in-2019<p>A little later than usual getting this up, but particularly given that everyone is staying at home with a little extra reading time—I thought I’d get my act together and share what I read last year (with my favorites in <strong>bold</strong>):</p>
<h2 id="january">January</h2>
<ul>
<li><a href="https://www.amazon.com/Superforecasting-Science-Prediction-Philip-Tetlock-ebook/dp/B00RKO6MS8">Superforecasting</a> - Disciplined, probabalistic thinking can lead to consistent outperformance in predictions.</li>
<li><a href="https://www.amazon.com/Creative-Quest-Questlove/dp/0062670557">Creative Quest</a> - Questlove writing about the creative process. There was a workmanlike nature to discussing the process of creating someting I found really comforting. The story of how D’Angelo was creatively spent after Voodoo and writing new songs seemed too daunting so he worked on covers, but on really making the covers <em>his</em> stuck with me. Plus, I really love a bunch of those covers.</li>
<li><a href="https://www.amazon.com/gp/product/B000FCK206/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0"><strong>Genghis Khan and the Making of the Modern World</strong></a> There is a strong argument to be made that no individual was as influential in creating the modern world than Genghis Khan. Massive improvements in trade, administration, technology, and communication. The stories of his early life are insane but seem grounded in the best available historical information.</li>
<li><a href="https://www.amazon.com/Wizard-Prophet-Remarkable-Scientists-Tomorrows/dp/0307961699"><strong>The Wizard and the Prophet</strong></a> this traces two opposing world views thorough the lives of two men: Norman Borlaug and William Vogt. Borlaug is the technocratic optimist who believed that humanity can innovate out of our problems and pioneered high intensity high yield architecture. Vogt was arguably the father of modern environmentalism and argued that humanity needed to dramatically reduce our footprint on the planet our suffer famines of apocalyptic proportions. The competing philosophies they espoused remain central to current debates over genetic engineering and climate change.</li>
<li><a href="https://www.amazon.com/10-Happier-Self-Help-Actually-Works/dp/0062265431">10% Happier</a> - Memoir of a person discovering meditation.</li>
</ul>
<h2 id="february">February</h2>
<ul>
<li><a href="https://www.amazon.com/Walt-Disney-Triumph-American-Imagination/dp/0679757473"><strong>Walt Disney</strong></a> Read this in preparation for our first trip to Disneyland. I was struck by how the story of the founding and growth of Disney the company resembled the growth of every modern tech company.</li>
<li><a href="https://www.amazon.com/Measure-What-Matters-Google-Foundation/dp/0525536221">Measure What Matters</a> Objectives and Key Results are a very good system for structured goal setting. If you are interested this is a very good introduction. One interesting thing is how some of the examples prove that OKRs—like any goal setting framework—aren’t a panacea. Specifically, youtube’s focus on total time viewing videos drove amazing engagement and built a great business. It also incentivized promoting conspiracy theories and misinformation to extremely negative societal impact. Also, one of the examples was Zume, and no execution framework can save you if your fundamental thesis is “robot pizza vans!”</li>
</ul>
<h2 id="march">March</h2>
<ul>
<li><a href="https://www.amazon.com/Designing-Your-Life-Well-Lived-Joyful/dp/1101875321">Designing Your Life</a> How to apply design principles like research and prototyping to create a satisfying life. I’m quite happy with my life but feel like this should be a required read for everyone in their late teens / early 20s.</li>
<li><a href="https://www.amazon.com/Crack-Creation-Editing-Unthinkable-Evolution/dp/0544716949"><strong>Crack in Creation</strong></a> CRISPR could be one of the most important discoveries in human history. This is a good primer for a layperson on how it was discovered, why it matters, and how it could change the world.</li>
</ul>
<h2 id="april">April</h2>
<ul>
<li><a href="https://www.amazon.com/Good-Go-Athlete-Strange-Recovery/dp/039325433X"><strong>Good to Go</strong></a> Most everything that is done for recovery is a placebo (no good evidence for stretching or icing) but compression can reduce soreness (although reducing inflammation may also reduce adaptation)</li>
<li><a href="https://www.amazon.com/Uberland-Algorithms-Rewriting-Rules-Work/dp/0520298578">Uberland</a> - I found this very underwhelming.</li>
</ul>
<h2 id="may">May</h2>
<ul>
<li><a href="https://www.amazon.com/Guns-Germs-Steel-Fates-Societies/dp/0393354326/"><strong>Guns, Germs, and Steel</strong></a> - Diamond’s theory of geographic determinism may be a bit overstated, but I found it a pretty compelling argument for a starting point to understanding the relative growth of human civilizations.</li>
<li><a href="https://www.amazon.com/Private-Equity-Playbook-Managements-Working/dp/1544513267">The Private Equity Playbook</a></li>
<li><a href="https://www.amazon.com/Halo-Effect-Business-Delusions-Managers/dp/1476784035">The Halo Effect</a></li>
</ul>
<h2 id="june">June</h2>
<ul>
<li><a href="https://www.goodreads.com/book/show/43503819-oil-fall">Oil Fall</a> - I read this after seeing <a href="https://www.tbray.org/ongoing/When/201x/2019/01/06/Oil-Fail">Tim Bray mention it</a>. Data driven argument that improvements in solar and electric vehicles will create a feedback loop that accelerates the move away from fossil fuels and that it has already started.</li>
<li><a href="https://www.amazon.com/Thanks-Obama-Hopey-Changey-White/dp/0062568450">Thanks, Obama</a> - Memoir of an Obama speech writer. Funny if overly self-important.</li>
<li><a href="https://www.amazon.com/Bad-Blood-Secrets-Silicon-Startup/dp/152473165X"><strong>Bad Blood</strong></a> - I’d only tangentially paid attention to Theranos. This story is <em>insane</em>. The complete failure of oversight of the board is pretty staggering. Theranos keeps getting pushed as a parable of startup excess. In one sense it definitely is. In another sense I was struck by how few experienced tech people were involved and how obvious many of the red flags would be to anyone experienced in growth companies.</li>
<li><a href="https://www.amazon.com/Homo-Deus-Brief-History-Tomorrow/dp/0062464310">Homo Deus</a></li>
<li><a href="https://www.amazon.com/Fifth-Risk-Michael-Lewis/dp/1324002646">The Fifth Risk</a> - Michael Lewis can write. Not a ton new here, but I just love his prose.</li>
<li><a href="https://www.amazon.com/Lessons-21st-Century-Yuval-Harari/dp/0525512179">21 Lessons for the 21st Century</a></li>
</ul>
<h2 id="july">July</h2>
<ul>
<li><a href="https://www.amazon.com/How-Be-Stoic-Ancient-Philosophy/dp/0465097952">How to Be a Stoic</a></li>
<li><a href="https://www.amazon.com/American-Gods-Neil-Gaiman/dp/0380973650"><strong>American Gods</strong></a> - This was great. Listened to the audiobook while driving to and from Yosemite. Highly original. I’m told the Starz series is quite good as well.</li>
</ul>
<h2 id="august">August</h2>
<ul>
<li><a href="https://www.amazon.com/Moonwalking-Einstein-Science-Remembering-Everything/dp/0143120530">Moonwalking with Einstein</a> - A reporter’s personal account of becoming the 2006 US Memory champion. The author gave a talk at LivingSocial years ago that I missed but my brother said was very impressed. This book made me hopeful I could begin remembering people’s names better. (I have not)</li>
</ul>
<h2 id="september">September</h2>
<ul>
<li><a href="https://www.amazon.com/Getting-Yes-Negotiating-Agreement-Without/dp/0140157352">Getting to Yes</a> - Realized 50 pages in that I’d already read this. Worth a refresher.</li>
<li><a href="https://www.amazon.com/Talking-Strangers-Should-about-People/dp/0316478520">Talking to Strangers</a> - Gladwell is a great writer. This isn’t his best work, but the production quality on the audiobook was amazing.</li>
<li><a href="https://www.amazon.com/Ultralearning-Master-Outsmart-Competition-Accelerate/dp/006285268X"><strong>Ultralearning</strong></a> - Learning how to learn is one of the most important skills. Not everyone needs to take quite this extreme of an approach but I wish this book had existed when I was a teenager or young adult.</li>
<li><a href="https://www.amazon.com/Mixer-Story-Premier-League-Tactics-ebook/dp/B01N2QBCOJ">The Mixer</a> - It was amazing to be reminded how primitive the early premier league was.</li>
</ul>
<h2 id="october">October</h2>
<ul>
<li><a href="https://www.amazon.com/Years-That-Matter-Most-College/dp/0544944488">The Years That Matter Most</a> - Average is Over in colleges leads to insanity and inequity in admissions prep. I don’t think the current path of higher education is sustainable, but I’m also not sure what replaces it.</li>
<li><a href="https://www.amazon.com/Fentanyl-Inc-Chemists-Creating-Deadliest/dp/0802127436"><strong>Fentanyl, Inc.</strong></a> - The story of novel psychoactive substaces, synthetic opioids, and our complete lack of societal preparation for them.</li>
<li><a href="https://www.amazon.com/Endure-Curiously-Elastic-Limits-Performance/dp/0062499866"><strong>Endure</strong></a> - Wide ranging examination of the interplay of mental and physical limits at the bounds of human endurance.</li>
</ul>
<h2 id="november">November</h2>
<ul>
<li><a href="https://www.amazon.com/Helping-Children-Succeed-What-Works/dp/0544935284">Helping Children Succeed</a></li>
<li><a href="https://www.amazon.com/Original-Gangstas-Tupac-Shakur-Eazy/dp/0316344850">Original Gangstas</a> - Thoroughly reported history of west coast gangster rap.</li>
<li><a href="https://www.amazon.com/Predictably-Irrational-Revised-Expanded-Decisions/dp/0061353248">Predictably Irrational</a></li>
<li><a href="https://www.amazon.com/Thinking-Bets-Making-Smarter-Decisions/dp/0735216355">Thinking in Bets</a></li>
</ul>
<h2 id="december">December</h2>
<ul>
<li><a href="https://www.amazon.com/Complications-Surgeons-Notes-Imperfect-Science/dp/0312421702">Complications</a></li>
<li><a href="https://www.amazon.com/Better-Surgeons-Performance-Atul-Gawande/dp/0312427654">Better</a> - I love the clarity of Atul Gawande’s writing and this fit solidly into my meta-learning kick along with “Ultralearning”</li>
<li><a href="https://www.amazon.com/We-Need-Talk-Conversations-Matter/dp/0062669001">We Need to Talk</a> By an NPR reporter about how to be a better conversationalist. I feel it did a good job of naming mistakes people make in conversations. I’m not sure I’m better at talking to people now, but I’m now more aware of when I’m doing things that aren’t effective (for instance, immediately relating someone else’s story to my own experience or including irrelevant detains in a story I’m telling)</li>
<li><a href="https://www.amazon.com/Things-Fall-Apart-Chinua-Achebe/dp/0385474547"><strong>Things Fall Apart</strong></a> There is a reason this is in the 20th century canon. A shame that I hadn’t read it until now. Possibly the best last paragraph of a novel I’ve ever read. It is <em>blistering</em>.</li>
<li><a href="https://www.amazon.com/Being-Mortal-Illness-Medicine-Matters/dp/1250081246"><strong>Being Mortal</strong></a> - We spend most of our lives pretending death doesn’t exist. That isn’t an option for a surgeon. As mentioned before I love Dr. Gawande’s writing and he weaves the professional, personal, and historical to highlight that how our aversion to facing death gets in the way of living the life we would want.</li>
<li><a href="https://www.amazon.com/More-Less-Surprising-Learned-Resources_and/dp/1982103574">More from Less</a> A compelling data-driven case for capitalism, technological progress, and liberalism as the best path to better stewardship of the planet. Not pollyanish but not apocalyptic.</li>
<li><a href="https://www.amazon.com/Movies-Other-Things-Shea-Serrano/dp/1538730197"><strong>Movies (And Other Things)</strong></a> Shea Serrano’s writing feels like shooting the shit with my college friends over a beer. My brother got me a signed copy of this with the best author’s inscription ever<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></li>
</ul>
<p>parkway</p>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>“Pat, Merry Christmas! Farts will always be funny, Shea” <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>Patrick JoyceA little later than usual getting this up, but particularly given that everyone is staying at home with a little extra reading time—I thought I’d get my act together and share what I read last year (with my favorites in bold):How to Make Crabcakes2019-04-21T00:00:00-04:002019-04-21T00:00:00-04:00https://pragmati.st/2019/04/21/how-to-make-crabcakes<p><img src="/images/crabcakes.jpg" alt="Crabcakes" /></p>
<p>One of the key pieces of fatherly wisdom I’ve imparted on my children is “Never order crabcakes outside of Maryland.”</p>
<p>I’m not sure why the rest of the country can’t get them right, but they can’t. So since moving to Pennsylvania and now Californa I’ve had to step my game up.</p>
<p>The key to a good crabcake is that they should be overwhelmingly <em>crab</em>. You want just enough binder to hold the crabmeat together and add some flavor, but you want as little filler as possible.</p>
<p>I bake my crabcakes in a 425℉ oven. Pan fried crabcakes are delicious but it is easy to over or undercook them and difficult to cook a bunch at once.</p>
<p>Here’s how we make them in our house.</p>
<p><img src="/images/joanna-crabcakes.jpg" alt="Joanna Proud of Her Work" /></p>
<h2 id="recipe">Recipe</h2>
<p><em>Yield: 4 4½ oz crabcakes.</em></p>
<p>Adapted from <a href="https://www.finecooking.com/recipe/classic-maryland-crab-cakes">Fine Cooking</a><sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>
<h3 id="ingredients">Ingredients</h3>
<ul>
<li>1 lb. jumbo lump or lump crabmeat (I prefer 50/50 lump and jumbo lump)</li>
<li>1 large egg</li>
<li>1/4 cup mayonnaise</li>
<li>1/2 tbsp. Dijon mustard</li>
<li>1/2 tbsp. Old Bay</li>
<li>1 tsp. fresh lemon juice</li>
<li>1/2 tsp. Worcestershire sauce</li>
<li>1/4 tsp. Kosher salt</li>
<li>1/4 cups plain breadcrumbs</li>
<li>Cooking Spray</li>
<li>1 Tbs. chopped fresh flat-leaf parsley (optional)</li>
<li>2 Tbs. unsalted butter (optional)</li>
</ul>
<h3 id="instructions">Instructions</h3>
<ol>
<li>
<p>Open the cans of crabmeat and pour out any extra liquid. Empty the crab in a medium mixing bowl, gently pick through for any fragments of shell (being careful not to break up the lumps too much) and set aside.</p>
</li>
<li>
<p>In a different bowl, combine the egg, mayonnaise, mustard, Old Bay, lemon juice, Worcestershire sauce, and 1/4 tsp. salt. Whisk until smooth then use a silicone spatula to scrape the mixture over the crabmeat. Get the bowl clean. Mix the crab and sauce gently with the spatula. Make sure the crab meat is well coated but do not overmix.</p>
</li>
<li>
<p>Sprinkle the breadcrumbs and the parsley (if using) over the crabmeat mixture. Use your hands to gently incorporate the breadcrumbs. If the mixture still has visible liquid you can add a bit more breadcrumbs but don’t overdo it—you want to eat <em>crab</em> not bread. Cover with plastic wrap and refrigerate for 1 to 3 hours.</p>
</li>
<li>
<p>Spray a sheet pan with cooking spray. Cover a kitchen scale with plastic wrap. Portion out 4½ oz of the crab mixture then gently shape into a disk. You want to apply <em>just</em> enough preasure that the crabcake won’t fall apart but not so much that you make a hockey puck. Repeat with the rest of the mixture. Cover the sheet pan with plastic wrap and put back in the refrigerator while you preheat the oven.</p>
</li>
<li>
<p>Preheat oven to 425℉ with a rack in the center. When oven is preheated put the sheet pan with the crabcakes in. Bake 12-16 minutes until tops are golden. If you want to be extra decadent, brush the tops with melted butter about halfway through baking.</p>
</li>
</ol>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>Their recipe served as my starting point on ratios for the binder. Only problem is that they use about five times too much breadcrumbs. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>Patrick JoyceAn Overly Serious Analysis of Hi-Ho! Cherry-O2019-01-21T00:00:00-05:002019-01-21T00:00:00-05:00https://pragmati.st/2019/01/21/an-overly-serious-analysis-of-hi-ho-cherry-o<p>We bought my 4 year-old <a href="https://www.amazon.com/Hi-Cherry-Game-Amazon-Exclusive/dp/B00000IWGQ">Hi-ho! Cherry-O</a> for Christmas. It is apparently a classic game that I was previously unfamiliar with that helps children practice counting skills.</p>
<p>The rules are simple. Each player starts with 10 cherries on their tree. Starting with the youngest player and then proceeding in age order you take turns spinning a spinner. Depending on the spin you either remove some cherries from the tree or add some back. First player to get all 10 cherries off the tree wins.</p>
<p>We had fun playing. We took turns doing the counting in English, Spanish, and Korean.</p>
<p>However, I’m the oldest in the family <em>and</em> I’m a crazy person who <em>might</em> have a problem with being too competititve, so I was bothered by the disadvantage of going last in a game where each spin increases your chance of winning. I wanted to figure out exactly how much of a difference starting position makes for your chance to win the game.</p>
<p>I’ve also conceptually understood <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method">Monte Carlo simulations</a> but had never had a problem that required one. This seemed like a good toy problem to actually use them.</p>
<p>So… I did what any completely well adjusted adult who is frustrated by a small disadvantage against their 4 year-old in an educational game does: I coded up a Ruby version of the rules of the game and then used my laptop to play 1 million games and record the results.</p>
<p>Code is <a href="https://github.com/KeeperPat/hi-ho-cherry-o-simulator">available here</a>.</p>
<p>Here’s what I learned:</p>
<h2 id="probability-of-winning">Probability of Winning</h2>
<p>In a four person game the first player (my 4 year-old) has about a 5% advantage against the fourth player (me).</p>
<h3 id="results-of-playing-1000000-4-person-hi-ho-cherry-o-games">Results of playing 1,000,000 4-person Hi-Ho! Cherry-O games:</h3>
<table class="table">
<thead>
<tr>
<th align="left">Player</th>
<th align="left">% of Games Won</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Player 1</td>
<td align="left">27.6827%</td>
</tr>
<tr>
<td align="left">Player 2</td>
<td align="left">25.7844%</td>
</tr>
<tr>
<td align="left">Player 3</td>
<td align="left">24.0927%</td>
</tr>
<tr>
<td align="left">Player 4</td>
<td align="left">22.4402%</td>
</tr>
</tbody>
</table>
<p>In the long term the winning probability converges. But, much like coin flips, randomness in the short run can easily outweigh the long run averages as you can see in this graph showing the cumulative win percentage.</p>
<p><img src="/images/hi-ho-cherry-o-intermediate-results.png" alt="Graph of Cumulative Win Percentages" /></p>
<p>In this simulation, after several hundred games Player 4 had actually won <em>more</em> games than Player 1. It also took until about 4,000 games had been played before the players’ ranking settled into the order of their win probability.</p>
<p>Using the simulation I also figured out the probabilities for 3-person and two-person games. Starting position still matters, but the difference isn’t as great.</p>
<h3 id="results-of-playing-1000000-3-person-hi-ho-cherry-o-games">Results of playing 1,000,000 3-person Hi-Ho! Cherry-O games:</h3>
<table class="table">
<thead>
<tr>
<th align="left">Player</th>
<th align="left">% of Games Won</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Player 1</td>
<td align="left">35.7807%</td>
</tr>
<tr>
<td align="left">Player 2</td>
<td align="left">33.3239%</td>
</tr>
<tr>
<td align="left">Player 3</td>
<td align="left">30.895%</td>
</tr>
</tbody>
</table>
<h3 id="results-of-playing-1000000-2-person-hi-ho-cherry-o-games">Results of playing 1,000,000 2-person Hi-Ho! Cherry-O games:</h3>
<table class="table">
<thead>
<tr>
<th align="left">Player</th>
<th align="left">% of Games Won</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Player 1</td>
<td align="left">51.872%</td>
</tr>
<tr>
<td align="left">Player 2</td>
<td align="left">48.128%</td>
</tr>
</tbody>
</table>
<h2 id="game-length">Game Length</h2>
<p>I also recorded game length (defined as total number of turns from the winning player. That is, if Player 4 wins on their third spin I counted that as 3 turns)</p>
<p>In theory, a game of Hi-Ho Cherry-O could continue forever. The probability of longer games just gets vanishingly small.</p>
<p>In the 1,000,000 4-player simulation I ran:</p>
<ul>
<li>The shortest game was 3 turns</li>
<li>The average took 6.44 turns</li>
<li>The longest game took <em>46</em> turns!</li>
</ul>
<h2 id="ruby-performance">Ruby Performance</h2>
<p>Ruby is not a particularly efficient computational langauage and I was running this on a 5-year old MacBook Air.</p>
<p>Still, Hi-Ho Cherry-O is a pretty simple game, so the simulations ran very quickly.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>2.6.0 :019 > Benchmark.measure{ Simulation.new(4, 1_000_000).run }
=> #<Benchmark::Tms:0x00007fac0d048a10 @label="", @real=11.479035999625921, @cstime=0.0, @cutime=0.0, @stime=0.136068, @utime=11.156594000000002, @total=11.292662000000002>
</code></pre></div></div>
<p>Pretty crazy that you can run a million games in less than 12 seconds.</p>Patrick JoyceWe bought my 4 year-old Hi-ho! Cherry-O for Christmas. It is apparently a classic game that I was previously unfamiliar with that helps children practice counting skills.