<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Programming on Patrick Stevens</title><link>/categories/programming/</link><description>Recent content in Programming on Patrick Stevens</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sat, 13 Dec 2025 09:41:00 +0000</lastBuildDate><atom:link href="/categories/programming/index.xml" rel="self" type="application/rss+xml"/><item><title>LLM arithmetic</title><link>/posts/2025-12-13-llm-arithmetic/</link><pubDate>Sat, 13 Dec 2025 09:41:00 +0000</pubDate><guid>/posts/2025-12-13-llm-arithmetic/</guid><description>I keep seeing people going on about the 3.9 - 3.11 = 0.79 thing, but we already know why they do that and how to avoid it!</description></item><item><title>Robocop: automated code review</title><link>/posts/2025-11-10-robocop/</link><pubDate>Mon, 10 Nov 2025 17:25:00 +0000</pubDate><guid>/posts/2025-11-10-robocop/</guid><description>I wrote a basic LLM-based code review tool that&amp;rsquo;s distressingly effective.</description></item><item><title>LLMs sanding off the edges</title><link>/posts/2025-10-06-llm-concerns/</link><pubDate>Mon, 06 Oct 2025 22:59:00 +0100</pubDate><guid>/posts/2025-10-06-llm-concerns/</guid><description>I&amp;rsquo;m a bit concerned about a failure mode that is increasingly arising with LLMs: the divorce between how something looks, and its quality.</description></item><item><title>Boolean blindness</title><link>/posts/2025-08-29-boolean-blindness/</link><pubDate>Fri, 29 Aug 2025 10:23:00 +0100</pubDate><guid>/posts/2025-08-29-boolean-blindness/</guid><description>Why booleans are an advanced technique that should be used with care.</description></item><item><title>Some Python surprises</title><link>/posts/2025-06-21-python-pitfalls/</link><pubDate>Sat, 21 Jun 2025 00:00:00 +0100</pubDate><guid>/posts/2025-06-21-python-pitfalls/</guid><description>I am forever astonished that people describe Python as a simple language. Here are some of the things I found very surprising about it.</description></item><item><title>Things I've learned about the .NET runtime</title><link>/posts/2025-06-20-dotnet-runtime-learnings/</link><pubDate>Fri, 20 Jun 2025 00:00:00 +0100</pubDate><guid>/posts/2025-06-20-dotnet-runtime-learnings/</guid><description>While writing an MSIL interpreter, I discovered a bunch of unexpected things about the .NET runtime.</description></item><item><title>Announcing WoofWare.Expect</title><link>/posts/2025-06-17-woofware-expect/</link><pubDate>Tue, 17 Jun 2025 00:00:00 +0100</pubDate><guid>/posts/2025-06-17-woofware-expect/</guid><description>A basic but functional expect-testing framework for F#.</description></item><item><title>LLM effect on my programming (2025 edition)</title><link>/posts/2025-06-16-llms-redux/</link><pubDate>Mon, 16 Jun 2025 09:28:00 +0100</pubDate><guid>/posts/2025-06-16-llms-redux/</guid><description>Since my last post about this in 2024-03, LLMs have become a distinctly positive addition to my ability.</description></item><item><title>Unhinged rant about software</title><link>/posts/2024-09-27-software-rant/</link><pubDate>Fri, 27 Sep 2024 18:14:00 +0100</pubDate><guid>/posts/2024-09-27-software-rant/</guid><description>Modern software practices and their sadness.</description></item><item><title>ChatGPT's effect on my programming</title><link>/posts/2024-03-27-chatgpt-and-programming/</link><pubDate>Wed, 27 Mar 2024 12:01:00 +0000</pubDate><guid>/posts/2024-03-27-chatgpt-and-programming/</guid><description>After a decent while programming with ChatGPT, I&amp;rsquo;m not sure it&amp;rsquo;s even a net positive on my ability.</description></item><item><title>YAML is not a superset of JSON</title><link>/posts/2024-03-14-yaml-superset-json/</link><pubDate>Thu, 14 Mar 2024 00:12:00 +0000</pubDate><guid>/posts/2024-03-14-yaml-superset-json/</guid><description>All the reasons I know for why YAML is not a superset of JSON.</description></item><item><title>Why does no-confusion use equality rather than a recursive call?</title><link>/posts/2024-03-01-no-confusion/</link><pubDate>Fri, 01 Mar 2024 13:51:00 +0000</pubDate><guid>/posts/2024-03-01-no-confusion/</guid><description>A question about the definition of a no-confusion type.</description></item><item><title>Starting a suspended process</title><link>/posts/2024-01-19-starting-suspended-process/</link><pubDate>Fri, 19 Jan 2024 18:51:00 +0000</pubDate><guid>/posts/2024-01-19-starting-suspended-process/</guid><description>How to start a process into a suspended state on Linux</description></item><item><title>Squashed stacked PRs workflow</title><link>/posts/2023-10-18-squash-stacked-prs/</link><pubDate>Wed, 18 Oct 2023 20:36:00 +0100</pubDate><guid>/posts/2023-10-18-squash-stacked-prs/</guid><description>How to handle stacked pull requests in a repository which requires squashing all history on merge.</description></item><item><title>Nix fireside chat outline</title><link>/posts/2023-10-05-nix-fireside-chat/</link><pubDate>Thu, 05 Oct 2023 20:00:00 +0100</pubDate><guid>/posts/2023-10-05-nix-fireside-chat/</guid><description>A talk I gave at work about the Nix build system.</description></item><item><title>Property-based testing introduction</title><link>/posts/2023-10-01-property-based-test-talk/</link><pubDate>Sun, 01 Oct 2023 20:53:00 +0100</pubDate><guid>/posts/2023-10-01-property-based-test-talk/</guid><description>A talk I gave at work introducing property-based testing and then giving some more advanced techniques.</description></item><item><title>Notes for a Git fireside chat</title><link>/posts/2023-09-06-git-showcase/</link><pubDate>Wed, 06 Sep 2023 13:51:00 +0000</pubDate><guid>/posts/2023-09-06-git-showcase/</guid><description>A syllabus for a fireside chat to give at work, on Git</description></item><item><title>Crates (existentials in F#)</title><link>/posts/2021-10-19-crates/</link><pubDate>Tue, 19 Oct 2021 00:00:00 +0000</pubDate><guid>/posts/2021-10-19-crates/</guid><description>An introduction to the crate pattern for representing existential quantification in F#.</description></item><item><title>Metatesting your property-based tests</title><link>/posts/2021-02-06-property-based-metatesting/</link><pubDate>Thu, 27 May 2021 00:00:00 +0000</pubDate><guid>/posts/2021-02-06-property-based-metatesting/</guid><description>A rather little-known but very easy and high-reward way to sanity-check your property-based tests.</description></item><item><title>In praise of `--dry-run`</title><link>/posts/2021-02-20-in-praise-of-dry-run/</link><pubDate>Fri, 21 May 2021 00:00:00 +0000</pubDate><guid>/posts/2021-02-20-in-praise-of-dry-run/</guid><description>First-class support for a &amp;ndash;dry-run mode makes a tool more maintainable, more testable, and more user-friendly.</description></item><item><title>Continuation-passing style</title><link>/posts/2021-03-22-continuation-passing-style/</link><pubDate>Mon, 22 Mar 2021 00:00:00 +0000</pubDate><guid>/posts/2021-03-22-continuation-passing-style/</guid><description>Motivating the technique of continuation-passing style, by looking at recursive functions.</description></item><item><title>Rewriting the Technical Interview, in Mathematica</title><link>/posts/2021-03-17-rewriting-technical-interview/</link><pubDate>Wed, 17 Mar 2021 00:00:00 +0000</pubDate><guid>/posts/2021-03-17-rewriting-technical-interview/</guid><description>An exploration into reaching into the internals of Mathematica to natively evaluate C code.</description></item><item><title>Software engineer syllabus</title><link>/posts/2021-02-03-senior-engineer-syllabus/</link><pubDate>Wed, 03 Feb 2021 00:00:00 +0000</pubDate><guid>/posts/2021-02-03-senior-engineer-syllabus/</guid><description>An incomplete but growing list of things I would make mandatory reading if I were building a software engineering syllabus.</description></item><item><title>Cyclic dependencies (a note from Hacker News)</title><link>/posts/2021-01-30-cyclic-dependencies/</link><pubDate>Sat, 30 Jan 2021 00:00:00 +0000</pubDate><guid>/posts/2021-01-30-cyclic-dependencies/</guid><description>A quick note from Hacker News about how to model in F# something that might look like cyclic dependencies.</description></item><item><title>Find the Bug, C# edition</title><link>/posts/2021-01-18-find-the-bug/</link><pubDate>Mon, 18 Jan 2021 00:00:00 +0000</pubDate><guid>/posts/2021-01-18-find-the-bug/</guid><description>A cute little exercise in bug-spotting.</description></item><item><title>A bug in Git</title><link>/posts/2020-12-28-a-bug-in-git/</link><pubDate>Mon, 28 Dec 2020 00:00:00 +0000</pubDate><guid>/posts/2020-12-28-a-bug-in-git/</guid><description>A bug I found and reported in Git.</description></item><item><title>Nulls and options (a note from Hacker News)</title><link>/posts/2020-10-10-null-and-option/</link><pubDate>Sat, 10 Oct 2020 00:00:00 +0000</pubDate><guid>/posts/2020-10-10-null-and-option/</guid><description>A quick note from Hacker News about why we want optional types but why &amp;rsquo;null&amp;rsquo; is unintuitive.</description></item><item><title>In favour of recursive functions, not imperative constructs, to make loops</title><link>/posts/2020-07-22-tailrecursion/</link><pubDate>Wed, 22 Jul 2020 00:00:00 +0000</pubDate><guid>/posts/2020-07-22-tailrecursion/</guid><description>How to write loops immutably and safely.</description></item><item><title>Static config (a note from Hacker News)</title><link>/posts/2020-04-05-static-config/</link><pubDate>Sun, 05 Apr 2020 00:00:00 +0000</pubDate><guid>/posts/2020-04-05-static-config/</guid><description>A quick note from Hacker News about my preference for static config rather than dynamic.</description></item><item><title>Defunctionalisation</title><link>/posts/2020-03-04-defunctionalisation/</link><pubDate>Wed, 04 Mar 2020 00:00:00 +0000</pubDate><guid>/posts/2020-03-04-defunctionalisation/</guid><description>An underappreciated tool for writing good software.</description></item><item><title>MIT Mystery Hunt 2020 answers</title><link>/posts/2020-01-16-mystery-hunt/</link><pubDate>Thu, 16 Jan 2020 00:00:00 +0000</pubDate><guid>/posts/2020-01-16-mystery-hunt/</guid><description>A couple of solution documents I made during the progress of the 2020 MIT Mystery Hunt.</description></item><item><title>MIT Mystery Hunt 2019 answers</title><link>/posts/2019-01-16-mystery-hunt/</link><pubDate>Wed, 16 Jan 2019 00:00:00 +0000</pubDate><guid>/posts/2019-01-16-mystery-hunt/</guid><description>A couple of solution documents I made during the progress of the 2019 MIT Mystery Hunt.</description></item><item><title>Chatting with Don Syme about the F# compiler</title><link>/posts/2018-09-10-don-syme/</link><pubDate>Mon, 10 Sep 2018 00:00:00 +0000</pubDate><guid>/posts/2018-09-10-don-syme/</guid><description>Notes from a chat with the creator of F#, about how to contribute to the compiler.</description></item><item><title>Dependent types overview</title><link>/posts/2018-07-21-dependent-types-overview/</link><pubDate>Sat, 21 Jul 2018 00:00:00 +0000</pubDate><guid>/posts/2018-07-21-dependent-types-overview/</guid><description>A quick overview of dependent types.</description></item><item><title>JSON comments (a note from Hacker News)</title><link>/posts/2018-06-02-json-comments/</link><pubDate>Sat, 02 Jun 2018 00:00:00 +0000</pubDate><guid>/posts/2018-06-02-json-comments/</guid><description>A quick note from Hacker News about why the comment-handling situation in JSON is bad.</description></item><item><title>Clojure and Exercism</title><link>/posts/2016-03-28-clojure-exercism/</link><pubDate>Mon, 28 Mar 2016 00:00:00 +0000</pubDate><guid>/posts/2016-03-28-clojure-exercism/</guid><description>I&amp;rsquo;ve been trying to learn Clojure through Exercism, a programming exercises tool. It took me an hour to get Hello, World! up and running, so I thought I&amp;rsquo;d document how it&amp;rsquo;s done. I&amp;rsquo;m using Leiningen on Mac OS 10.11.4.</description></item><item><title>Python, script shadowing</title><link>/posts/2014-08-26-python-script-shadowing/</link><pubDate>Tue, 26 Aug 2014 00:00:00 +0000</pubDate><guid>/posts/2014-08-26-python-script-shadowing/</guid><description>&lt;p&gt;&lt;em&gt;A very brief post about the solution to a problem I came across in Python.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In the course of my work on &lt;a href="https://launchpad.net/ensoft-sextant"&gt;Sextant&lt;/a&gt; (specifically the project to add support for accessing a &lt;a href="https://neo4j.com"&gt;Neo4j&lt;/a&gt; instance by SSH), I ran into a problem whose nature is explained &lt;a href="http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html"&gt;here&lt;/a&gt; as the Name Shadowing Trap. Essentially, in a project whose root directory contains a &lt;code&gt;bin/executable.py&lt;/code&gt; script, which is intended as a thin wrapper to the module &lt;code&gt;executable&lt;/code&gt;, you can&amp;rsquo;t &lt;code&gt;import executable&lt;/code&gt;, because the &lt;code&gt;bin/executable.py&lt;/code&gt; shadows the module &lt;code&gt;executable&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Introduction to functional programming syntax of Mathematica</title><link>/posts/2014-01-24-introduction-to-functional-programming-syntax-of-mathematica/</link><pubDate>Fri, 24 Jan 2014 00:00:00 +0000</pubDate><guid>/posts/2014-01-24-introduction-to-functional-programming-syntax-of-mathematica/</guid><description>&lt;p&gt;Recently, I was browsing the &lt;a href="http://community.wolfram.com"&gt;Wolfram Community&lt;/a&gt; forum, and I came across the following question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What are the symbols @, #, / in Mathematica?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I remember that grasping the basics of functional programming took me quite a lot of mental effort (well worth it, I think!) so here is my attempt at a guide to the process.&lt;/p&gt;
&lt;p&gt;In Mathematica, there are only two things you can work with: the Symbol and the Atom. There is only one way to combine these things: you can provide them as arguments to each other. We denote &amp;ldquo;\(x\) with arguments \(y\) and \(z\)&amp;rdquo; by &amp;ldquo;&lt;code&gt;x[y,z]&lt;/code&gt;&amp;rdquo;.&lt;/p&gt;</description></item></channel></rss>