tarquin-the-brave

Some things I think.

— All Posts —

  • yes, please clear my terminal

    We’ve all been there. You’ve been running some commands. You switch focus away from your terminal. You come back. And your terminal is full of crap you’re not interested in anymore.

    Read more…
  • Why I Found Microsoft Office So Jarring

    Like a lot of people. I was brought up on Microsoft Office: Word, Powerpoint, etc. You did what you needed to do, save it to your computer, and if you wanted to take it elsewhere you copied it onto a pendrive or disc, and haphazardly left it on a train for a journalist to find.

    Read more…
  • A Thought on CLI Design

    Recently I was using a wrapper around a CLI tool. It does what you might expect a CLI wrapper to do: set up some peripheral things, environment variables and such like, then runs the underlying CLI tool with some CLI parameters set and passes argument given to the wrapper down to provide extra parameters.

    Read more…
  • Generating a Config File Reference for a CLI Tool in Rust

    There’s something missing from the documentation of CLI tools. They often have home pages that do a great job of explaining the core concepts, giving a “Quick Start” guide, and demonstrating some use cases.

    Read more…
  • Why I Scatter Use Statements Throughout My Rust

    A standard pattern across pretty much every language I’ve worked with at least, is to stick statements that import modules and libraries at the top of the page. Some languages make you do this.

    Read more…
  • Re-Learning Haskell with Advent of Code - Part 3

    After Part 2, I wanted to go and do some reading. I felt like I could crack on with the Advent of Code problems with the tools I had at my disposal, but felt if I learned more Haskell I could be doing better.

    Read more…
  • Collecting All the Errors - Rust

    A common way to handle iterating over results, Result<T, E>, in Rust is to use collect() to collect an iterator of results into a result. To borrow the example from Rust by Example:

    Read more…
  • We All Write Monads, Whether We Know It or Not

    Recently I’ve been rebooting my Haskell by working through Advent of Code, and bogging about it: Re-learning Haskell with Advent of Code - Part 1, Re-learning Haskell with Advent of Code - Part 2, and it’s got me thinking.

    Read more…
  • Re-Learning Haskell with Advent of Code - Part 2

    In Part 1, I skipped the day 2, 5, & 7 problems that get you to build and use a Intcode computer. Each problem provides an Intcode program to run: A series of integers that can each either represent an instruction or data, and can mutate itself.

    Read more…
  • DRY Shouldn't be a Goal in Itself

    DRY, “Don’t Repeat Yourself”, is often described as a “principle” of software engineering. I looked up what “principle” is defined to mean and Google says: a fundamental truth or proposition that serves as the foundation for a system of belief or behaviour or for a chain of reasoning.

    Read more…
  • Re-Learning Haskell with Advent of Code - Part 1

    A few years ago I learned myself a Haskell for greater good from a book “Learn you a Haskell for greater good”1 and the first few chapters of another book “Haskell from first principles”2.

    Read more…
  • Itertools - A Force for Good?

    Itertools are a way of bringing along a bunch of list manipulating goodies from functional languages into procedural languages. I’ve encountered it as a Python library and a Rust crate. A quick bit of google’ing shows some evidence of this existing in other languages.

    Read more…
  • Rust - Converting between file formats - JSON, YAML, & TOML

    Rust’s serde library is a generic serialize-deserialize framework that has been implemented for many file formats. It’s an incredibly powerful framework and well worth giving the documentation a read. It can deserialize a file format into a strongly typed rust data structure, so that the data in code has no affiliation to the data format it was read from, then can be serialized into another file format.

    Read more…
  • Language Servers Are Cool

    In slight contrast to my previous post where I espoused the virtue of code being text and not relying on developer tooling to interact with it: language servers are cool.

    Read more…
  • You Shouldn't Need an IDE to Read Code

    This is important. Code is read far more often than it’s written. Primarily, it’s read through a web GUI. You want to read the source code of a library you’re using.

    Read more…
  • Testing Microservices with Mockserver

    Mockserver is a great piece of tooling that takes a huge amount of heavy lifting away from testing microservices. There’s no need to mock out downstream dependencies or client APIs. There’s no need to write complex test code to synchronously handle the mechanics of requests going back and forward while also trying to embody some comprehensible declaration of the designed behaviour.

    Read more…