Storing times, and precision of float64

Posted on Fri 26 September 2025 in Software • Tagged with data, math, physics

This is the second article about how working with temporal information in computer systems. The first article was about contained some definitions about astronomical time and timezones.

This article describes options for storing temporal values in your programs, and their limitations. In particular, it describes two pitfalls that can happen …


Continue reading

Pseudovectors and transformations

Posted on Thu 25 September 2025 in Physics • Tagged with math, teaching

Here are some notes for my Fluid Dynamics II students about vectors, pseudovectors and how they transform under reflections.

Let n be a unit vector and consider the reflection R in the plane perpendicular to n.

Quantities such as the position r and velocity v are regular vectors and transform …


Continue reading

Naming is power

Posted on Sun 21 September 2025 in Software • Tagged with religion

Many cultural and religious traditions place a lot of importance in names, and hold that names have power. There is something magical about them.

In Classical Greek tradition, Hades was feared and his name was not spoken. The Bible supposes that the name of God is to be used for …


Continue reading

Why learners find classes and objects confusing

Posted on Tue 05 August 2025 in Software • Tagged with python, object-oriented-programming, teaching

One reason why Python is such a popular and powerful language is that it is straightforward to learn and make good progress. Learners can quickly become comfortable with many aspects of the language, such as control flow and functions.

The first obstacle that many learners come across is when they …


Continue reading

Date, time and timezones

Posted on Sun 27 April 2025 in Physics • Tagged with data, math, physics

This is a collection of notes about time and related concepts. A future post will talk about the problems of representing time in computer systems, especially distributed systems. These notes will be occasionally updated.

Introduction

Time is taken to be a primitive concept that cannot be defined in terms of …


Continue reading

Does vibecoding make coding more accessible?

Posted on Sun 27 April 2025 in Software • Tagged with software-engineering, politics, teaching

I was a volunteer and organiser for codebar for several years and was heavily involved in outreach activities during my time at Cambridge. In the face of cuts to DEI initiatives, I believe that the lack of diversity at all levels of the tech sector seriously harms the sector.

Besides …


Continue reading

Category theoretic ideas in data engineering systems design

Posted on Sun 22 September 2024 in Software • Tagged with data, math, software-engineering

I have been reading – at a very shallow level – about category theory (wiki), and thinking about its applicability to software and system design for data engineering. This post is a loose collection of thoughts on the subject, and a manifesto for employing a more rigorous language when building such systems …


Continue reading

On regulation in software engineering

Posted on Sun 21 July 2024 in Software • Tagged with software-engineering, politics

Emergency services, GPs, hospitals, transportation systems and the like are funded, at least in part, by public money. When their computer systems go down, the public is badly affected and people can get hurt, and lives can be put at risk. So what regulations and quality controls are there on …


Continue reading

Logging in Python

Posted on Sun 07 July 2024 in Python • Tagged with python, backend

Having reliable, detailed but searchable logs is an essential part of any application, especially of long-running services that need to be debugged and monitored for uptime and stability. As one of the oldest modules in the Python standard library, the logging module provides a very powerful set of tools for …


Continue reading

Object creation patterns in Python: Static factory methods

Posted on Tue 21 May 2024 in Python • Tagged with python, object-oriented-programming, design-patterns

The basic way to create and initialize an object in Python is using the default constructor, defined as the __init__() method:

class MyClass:
    def __init__(self, x: float) -> None:
        self.x: float = x
        print(f"created an object with x = {x}")


obj = MyClass(5)

Usually, initial values of instance variables …


Continue reading