<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://andhash39.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://andhash39.com/" rel="alternate" type="text/html" /><updated>2025-08-21T22:02:33+00:00</updated><id>https://andhash39.com/feed.xml</id><title type="html">andhash39</title><subtitle>Matthew O&apos;Donnell is a software developer who makes some apps for Apple platforms: Thought Path, a productivity inbox app, and Contextable, a language flashcards app. He also writes blog posts about development, history, whatever.</subtitle><entry><title type="html">When Your Code Should Break</title><link href="https://andhash39.com/25/08/01/when-you-code-should-break" rel="alternate" type="text/html" title="When Your Code Should Break" /><published>2025-08-01T15:00:00+00:00</published><updated>2025-08-01T15:00:00+00:00</updated><id>https://andhash39.com/25/08/01/when-your-code-should-break</id><content type="html" xml:base="https://andhash39.com/25/08/01/when-you-code-should-break"><![CDATA[<p>I recently broke production.</p>

<p>We’re going to have a retrospective next week: in that meeting, I will be helpful. There are things we could do as a software development team to limit our risk to production incidents.</p>

<p>Right now, I’m not going to be helpful. Right now, I’m <em>mad</em>. And if you’re mad, you should try and understand why.</p>

<hr />
<h2 id="the-setup">The Setup</h2>

<p>The user selects a number from a dropdown; my code does stuff depending on what the number is.</p>

<p>The user can also decline to pick a number. (Any developers reading this are now suspicious.)</p>

<p>For some reason, my code doesn’t receive numbers: it receives strings, that have numbers in them. Like so:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>"1", "4", "", "7", "", "13"
</code></pre></div></div>

<p>This isn’t great, but the web is a pile of hacks.</p>

<p>You can see that sometimes, we get empty strings, to represent “the user didn’t pick a number”. (The developers reading this are now concerned.)</p>

<p>When writing the code, I realised these values were strings, and asked the computer to turn them into numbers.</p>

<h2 id="the-problem">The Problem</h2>

<p>Specifically, I called the Ruby function <code class="language-plaintext highlighter-rouge">to_i</code>, which means “to integer”. Integer is just a fancy name for a number that isn’t a fraction or decimal.</p>

<p>This function makes a promise. You have a string; you want it to be a number. I (the function) will receive a string and give you a number.</p>

<p>But what to do when the string isn’t obviously a number?  How should we respond to “”, or “sdghiwqruhgqw”, or “th1s is not a numb3r”?</p>

<p>Clearly (!), we can’t allow <em>all</em> strings to become numbers. “” or “sdghiwqruhgqw” simply aren’t numbers, and there’s no way to decide what number they should become. We could pick a random number, but that would make the code behave randomly, which nobody wants. To any non-developers reading, this is obvious.</p>

<p>For the developers: if you’re asked to turn a string into a number, and what the number should be isn’t obvious, you should throw an exception. The program should crash. It should be as clear as possible, as early as possible, that the person who asked for that string to become a number is doing something wrong.</p>

<p>The people who wrote the <code class="language-plaintext highlighter-rouge">to_i</code> function in Ruby disagree. They think “” and “sdghiwqruhgqw” should become 0.</p>

<h2 id="the-payoff">The Payoff</h2>

<p>So “” becomes 0. Because the <code class="language-plaintext highlighter-rouge">to_i</code> function didn’t crash, everything seemed to work great from my end. My code was reviewed. It was deployed to a staging version of the website, and the relevant pages were tested. All fine, just like Ruby said it was.</p>

<p><em>Until</em> someone tried to do anything with that tricksy 0 value. The value was never supposed to be 0, so it made the website fall over. This didn’t happen until real users got at it.</p>

<p><strong>When behaviour in your code is undefined, please, make bad things happen.</strong></p>]]></content><author><name></name></author><category term="non-fiction" /><summary type="html"><![CDATA[I recently broke production.]]></summary></entry><entry><title type="html">LLMs are Unique</title><link href="https://andhash39.com/25/06/12/llms-1" rel="alternate" type="text/html" title="LLMs are Unique" /><published>2025-06-12T09:00:00+00:00</published><updated>2025-06-12T09:00:00+00:00</updated><id>https://andhash39.com/25/06/12/llms-are-unqiue</id><content type="html" xml:base="https://andhash39.com/25/06/12/llms-1"><![CDATA[<p>LLMS are unique among human technology, because they can have thoughts and make decisions.</p>

<p>You may think: this describes all software! When I try to log in to an online service, it makes a decision about whether to log me in or not based on my provided credentials.</p>

<p>In one sense, this is correct. A common metaphor is to say that our login-bot is given instructions (code) about how to process a login request, which allows it to make a decision.</p>

<p>But consider: if the login-bot makes logs me in to an account that isn’t mine, is the login-bot at fault? No, of course not. The software engineer who wrote the instructions is at fault. That software engineer thought up the login instructions and made all the decisions about their implementation.</p>

<p>Now, let’s switch out our login-bot for an LLM. I give the LLM some credentials, and it logs me in to an account that isn’t mine. Who is at fault now?</p>

<p>Clearly, the LLM has <em>made a decision</em> to log me in, independent of any human instruction. I could make the same request again and it might do something else.</p>

<p>Is the LLM at fault? Perhaps this could be sensible if it were alive, but it is not. It is not part of our community or our society, so judging it for its decisions simply serves no sense - what would it achieve?</p>

<p>Maybe the person who trained the LLM is at fault. Training gave the bot its ability to make decisions, and the matrix by which it does so. This feels analogous to the login-bot’s instructions.</p>

<p>But the person who did the training had no way of knowing this would be the outcome: they could not shape all possible outcomes of the LLM’s decisions. They cannot be at fault for an outcome they could never have predicted.</p>

<p>No, the person at fault is the person who decided to use an LLM for this purpose in the first place. The blame lies with leadership.</p>

<p>As we scramble to cram LLMs into everything, from government to finance to healthcare, I wonder if they’ll accept it.</p>

<p>(Spoiler alert: they won’t.)</p>]]></content><author><name></name></author><category term="non-fiction" /><summary type="html"><![CDATA[LLMS are unique among human technology, because they can have thoughts and make decisions.]]></summary></entry><entry><title type="html">‘Tidy First?’ - A Tiny Takeaway</title><link href="https://andhash39.com/24/08/19/tiny-takeaways-1" rel="alternate" type="text/html" title="‘Tidy First?’ - A Tiny Takeaway" /><published>2024-08-19T18:00:00+00:00</published><updated>2024-08-19T18:00:00+00:00</updated><id>https://andhash39.com/24/08/19/tiny-takeaways-1</id><content type="html" xml:base="https://andhash39.com/24/08/19/tiny-takeaways-1"><![CDATA[<p>I recently read Kent Beck’s latest book, <a href="https://uk.bookshop.org/p/books/tidy-first-a-personal-exercise-in-empirical-software-design-kent-beck/7537994">Tidy First?</a>. I find the value of such books to be variable. Quite often, the whole exercise can be worth it for a few well-written sentences that <em>crystallise</em> a thought in your brain. The book doesn’t impart any new information, but helps you think about something in a new way.</p>

<p>Equally often though, there are whole chapters to wade through that are sufferable yet forgettable. So I thought I might save people some time by sharing the main thing I got from the book:</p>

<h2 id="more-prs-more-gooder">More PRs More Gooder</h2>

<p>If you’re going to do a refactor (or a tidy, which the book tries to distinguish from refactors), ship the refactor in a separate commit (and/or PR) to the actual behaviour change you’re making. This advice is ambivalent to whether you do the refactor before or after the behaviour change.</p>

<p>This has a big advantage in clarity of purpose, for you and anyone reviewing the code.</p>

<p>The downside to this is increased review and testing burden, due to the fixed costs of both. It was discussing this point that the book crystallised something for me:</p>

<blockquote>
  <p>If code gets reviewed rapidly, then you’re encouraged to create more, smaller PRs. These more-focused PTs encourage even more rapid reviews. Equally, this reinforcing loop can run backward, with slow reviews encouraging larger PRs, further slowing future reviews.</p>
</blockquote>

<p>This reframed the entire trade-off discussion for me. You aren’t just making a decision about code style, you’re making a decision about your team culture. Even if your team is just you, it still has a culture; and fom this position, it’s obvious that you should foster a culture than supports clarity and speed.</p>]]></content><author><name></name></author><category term="non-fiction" /><summary type="html"><![CDATA[I recently read Kent Beck’s latest book, Tidy First?. I find the value of such books to be variable. Quite often, the whole exercise can be worth it for a few well-written sentences that crystallise a thought in your brain. The book doesn’t impart any new information, but helps you think about something in a new way.]]></summary></entry><entry><title type="html">The 8th Wonder of the World</title><link href="https://andhash39.com/24/05/28/the-eighth-wonder-of-the-world" rel="alternate" type="text/html" title="The 8th Wonder of the World" /><published>2024-05-27T18:00:00+00:00</published><updated>2024-05-27T18:00:00+00:00</updated><id>https://andhash39.com/24/05/28/the-eighth-wonder-of-the-world</id><content type="html" xml:base="https://andhash39.com/24/05/28/the-eighth-wonder-of-the-world"><![CDATA[<p>There’s an attraction on TripAdvisor called the <a href="https://www.tripadvisor.co.uk/Attraction_Review-g190804-d12865329-Reviews-Bude_Tunnel-Bude_Bude_Stratton_Cornwall_England.html">Bude Tunnel</a>.  At the time of writing, it has 1401 reviews, and mine is pending to become 1402.</p>

<p>The Bude Tunnel is a dull plastic tunnel that connects a Sainsbury’s car park to the actual building, to stop people getting rained on. (Sainsbury’s is a supermarket chain the UK.) It happens to be in a popular seaside/surfer town called Bude in Cornwall.</p>

<div style="margin-top: 24px; margin-bottom: 24px;">
	<img src="/assets/images/bude_tunnel.jpg" alt="The Bude Tunnel" style="max-width:100%; height:auto;" />
	<p class="caption">In all it's glory</p>
</div>

<p>If you read the reviews, you’ll find out that people really, really like this tunnel.</p>

<p>“The Bude Tunnel transcended not only my expectations of this pretty Cornish town, but of all future tunnels I may have the privilege to pass through for the rest of my days.”</p>

<p>“When travelling through The Tunnel one is hit with the unmistakable, yet ineffable, feeling of fulfilment and serenity that I have yet to have experienced in my 22 years on this planet.”</p>

<p>“The 8th wonder of the world?”</p>

<p>It’s hilarious. My partner and I discovered the tunnel years ago, and for the better part of our relationship, we have on disparate rainy evenings loaded up the reviews and laughed together. (Sometimes this devolves into laughing at the names of Cornish towns, about 60% of which are funny just to say.)</p>

<p>Last week though, we went on a trip together through that part of England. The tunnel was <strong>not</strong> the driving force of the trip. We had plenty of places that “deserved” to be seen on the itinerary: Stonehenge, <a href="https://www.edenproject.com">the Eden Project</a>, <a href="https://www.minack.com">the Minack Theatre</a>. And those places were not especially close to Bude. But when we’ve laughed at the thing for years, how could we not?</p>

<p>And that’s a bit weird, isn’t it? If we’d discovered the tunnel while researching the trip, the idea of visiting would’ve been just as funny, but we wouldn’t have gone out of our way to visit. Something about the long period of time <em>knowing</em> about the tunnel turned it into something we had to see. Our shared experience, and the whimsy of the internet, made an event from nothing.</p>

<p>And the point I’m building to is that it <em>was</em> an event. Reaching the Bude Tunnel, after knowing about it for so long, felt like the end a pilgrimage. To reach for a metaphor only some people will be able to get (sorry): when you first find yourself among Americans, and they’re talking like all human beings do, with false starts and all at once and no laugh tracks, it can feel weird. A thing that’s lived pressed and varnished in your mind suddenly comes flailing into the real, 3D world, full of experiences. It’s in you peripheral vision, and it’s under your feet.</p>

<p>The Bude Tunnel was just a silly internet joke, but my mind made it into an experience with value. For someone privileged enough for existential problems about meaning and purpose and achievement to be among my primary concerns, that was… kinda shocking. And nice.</p>

<p>Life really is what you make it. Go make some experiences.</p>]]></content><author><name></name></author><category term="non-fiction" /><summary type="html"><![CDATA[There’s an attraction on TripAdvisor called the Bude Tunnel. At the time of writing, it has 1401 reviews, and mine is pending to become 1402.]]></summary></entry><entry><title type="html">Frontier</title><link href="https://andhash39.com/24/03/09/frontier" rel="alternate" type="text/html" title="Frontier" /><published>2024-03-09T09:00:00+00:00</published><updated>2024-03-09T09:00:00+00:00</updated><id>https://andhash39.com/24/03/09/frontier</id><content type="html" xml:base="https://andhash39.com/24/03/09/frontier"><![CDATA[<p>As I write this, I’m sat in a coffee shop I’ve never been to before. It’s really not very far from my flat at all; my gym is only two minutes up the road, and I walk there almost every day.</p>

<p>My <a href="https://www.youtube.com/watch?v=NVGuFdX5guE">theme for this year</a> is Frontier, and it’s shaping up to be an interesting one. Let me tell you what it means.</p>

<p>When I choose my themes, I usually choose my word first, and let meaning follow. Frontier felt right; in my experience, that’s good enough. Meaning will find you. Here are the ones that have found me so far:</p>

<h3 id="i---expanding-radius">I - Expanding Radius</h3>

<p>At first blush, Frontier means to be at the edge, to push into things foreign or unknown. The new coffee shop I’m sat in is a great example of this, and so is this blog post. More travel is so obvious it’s boring.</p>

<p>There’s something more to the concept of your personal radius though, beyond what coffee shops you frequent or what cities you’ve been to. We can say your radius is <strong>the set of actions you can perform without discovering</strong>. Discovering what? New places, new patterns, new people; anything.</p>

<p>Discovery is not the same as learning, in the same way that reading about Peru is not the same thing as <em>going</em> to Peru. You can discover by reading, but you can only learn, rather than discover, the direct contents of the book. Rather, a book can help you discover things about yourself or your life that you previously hadn’t considered: things that were outside your radius.</p>

<h3 id="ii---self-sufficiency">II - Self Sufficiency</h3>

<p>On the Frontier, you need to provide for yourself. Pushing into the unknown requires a more conservative attitude than staying put, where you have support networks to help you if you fail.</p>

<p>This has an important direct meaning for me, after burning out at the end of last year to finish <a href="/portfolio/thought-path">my latest iOS app, Thought Path</a> (<em>wink wink, nudge nudge</em>). I pushed too far, and cut myself off from my support systems.</p>

<p>Another meaning has grown out of self sufficiency in my mind, though, where our metaphor falls down. This is the least defined of my Frontier meanings, and maybe the most important.</p>

<h3 id="iii---the-dance">III - The Dance</h3>

<p>How do you achieve success and not burn out?</p>

<p>There’s a certain amount of swagger to all people who can do this. These people trust in their own abilities and opinions, and are masters of the old maxim that people make their own history, but they do not make it on terms of their choosing. They can cultivate their environment to match their desires just as easily as they modify their desires to meet the demands of the world around them.</p>

<p>This dance, of pushing and pulling, of changing the world and changing yourself, seems to be the key.</p>

<p>Aiming straight at your long term goals is doomed to fail: you’ll burn out before you get there. Instead, you want to zig-zag: get the lay of the land; establish forward bases; <strong>never make any step you aren’t comfortable making, but always be moving in the right direction.</strong></p>

<p>It can’t go unsaid that for a lot of people, perhaps even most such people, this attitude comes from a background of privilege. The environment may be unfavourable to you; regardless, you must cultivate the confidence to change it, ever so slightly, to be more favourable.</p>

<p>That’s the dance of life.</p>

<hr />

<p>Future posts to this blog will probably be less about me, and more my takes on things out in the world. (Hey, that’s on-theme!) This was just to test the RSS feed - and to say hi :)</p>

<p>Which reminds me, you can <a href="/feed.xml">subscribe to all future posts with RSS</a>!</p>]]></content><author><name></name></author><category term="non-fiction" /><summary type="html"><![CDATA[As I write this, I’m sat in a coffee shop I’ve never been to before. It’s really not very far from my flat at all; my gym is only two minutes up the road, and I walk there almost every day.]]></summary></entry></feed>