RSSAmplifier

Blog

jezenthomas.com

Thoughts on Haskell, Business, Unix, and more.

jezenthomas.comRSS feed ↗10 posts

Latest posts

Nix Overrides That Expire Themselves

I recently published yesod-form-1.7.10 to Hackage. My project gets all of its dependencies from nixpkgs, and nixpkgs gradually adopts Haskell packages from Hackage. That means that there’s some time between when the package lands in nixpkgs, and when I need to use the package in my project, which is right now. You can write an override in your flake.nix to get the newer package you need, but what…

Announcing DocCharm

At Supercede, our Zendesk help center kept falling behind the product. Every release changed some behaviour that was documented somewhere, and updating the articles was nobody’s job in particular, so it happened late or not at all. So, I built DocCharm . It keeps a help center current automatically by watching pull requests as they land in your GitHub repository. When a change affects something…

NewBusinessMonitor is Closed

If you’ve landed here, you were probably looking for NewBusinessMonitor ( newbusinessmonitor.co.uk ) or its later incarnation, CompanyQuery ( companyquery.co.uk ). Both are now closed, and the old addresses redirect to this page. For a few years I ran these as a hobby business. The original idea was simple: let people search for UK companies within a given radius of a postcode. From there it grew…

When Test Coverage Isn't Enough

Robert Roskam made a point on social media about the inadequacy of test coverage. 100% test coverage is not enough. Here’s an example as to why in Python: def division ( x , y ): return x / y If you pass in 0 for y , it’ll raise an error. You have to know to test for the value specifically. Test coverage won’t save you here. With 100% line coverage or branch coverages, it won’t be found. That’s…

Test Spies in Haskell

When testing a web application, you often want to make sure that a certain email would be sent — without actually sending it. How do you test that? Take something like a transactional email: a user signs up, resets their password, or completes a purchase — and your application needs to send a notification. You don’t care how the email gets sent — just that it was triggered correctly. The simplest…

A 10x Speedup in GHCi

Many of us at Supercede use GHCi directly when developing Haskell projects. It runs the local development server, and the automated test suite, and serves as a scratch pad for ad hoc expression evaluation and type inspection. We make heavy use of integrated tests with the yesod-test framework. One of our projects now has more than 500 tests. Running the tests in GHCi takes about 150 seconds. Not…

HTTP Verbs in Yesod Forms

The main function provided by the yesod-form library for processing form submissions is runFormPost . As the name implies, this function processes POST requests. But what if you want to use a different verb, like PUT ? The library is a little confusing in this way, because the post in runFormPost doesn’t actually refer to the HTTP method that triggered the execution of the handler code. The point…

My Technological Regrets

After several years working on Supercede, I’ve had time to reflect on some of the technical choices we made. Some of them worked well, others I’d approach differently if I were starting again. Here’s what I regret, and why. Elm Was the Wrong Choice for Our UI When I started working on Supercede, I had the idea that any more complex parts of the UI should be written in Elm, rather than with React…

Supercede's House Style for Haskell

Over the years, a house style has emerged for all the Haskell code we write at Supercede. We expect all new code to generally follow this style, and since style pertains to more than just the language itself, this style guide will touch on some aspects of the Yesod ecosystem and software design more broadly. Philosophy Style is taste, and taste is subjective 1 . There isn’t one right way to write…

2024 in Retrospect

Year 2024 has come and gone. Number of bones broken this year — only one. Here are some other thoughts on how I kept busy. Personal I bought a motorcycle. It’s a Ducati SuperSport 937 . I didn’t think I would ever like motorcycles, but they’ve very much grown on me. Part of it is escapism from a career where I mostly sit in front of a computer. Another part of it is escapism from traffic and high…