The Fair Exchange Rate

Written 2021

In ‘What Makes Human Unique?’, I thought about the role exchange could have played as a significant driving force in human evolution. While I was thinking about this, and in particular how calculation skills may be relevant to exchange, it became natural to ask whether calculation could ever have been useful for determining the fair exchange rate? And more generally, is it even possible to calculate the fair exchange rate?
Continue reading

Posted in Economics, Mathematics | Leave a comment

The ‘Subschema’ Relation on JSON Schemas

JSON1 is one of the most popular formats for language-agnostic data communication between software services. This could be synchronous communication as in HTTP REST apis, or asynchronous communication as in Kafka messages. When services communicate we need to ensure that the messages produced by the producer can be understood by the consumer. Within a service, this is the role of static types to check at compile time that all the intra-service communication is structurally valid2; between services, this is the role of the “JSON schema”3.
Continue reading

Posted in Category Theory, Computer Science | Leave a comment

Classifying Software Testing

There are so many terms used for different kinds of software testing:

Software Testing Word Wall

There’s a lot of overlap between some of these terms, and some terms such as ‘Integration Testing’ mean different things in different contexts or to different people1. Also, without some kind of mental framework, it can be difficult to understand how all these kinds of testing relate to each other and fit together, and without that understanding, how can we know for sure we’ve covered all conceivable kinds of software testing?

The aim of this post is to create a framework which can help with these things2. Continue reading

Posted in Computer Science | Leave a comment

What Makes Humans Unique?

There are many features of humans that differentiate us from all other species, but there is one that stands out to me as a key influence for many of the others and the main reason for our huge success as a species, and that is our practice of the Division of Labour, facilitated through trade1. We are the only species where each individual specialises, and depends on the specialised skills and resources of other unrelated individuals for their survival2. Continue reading

Posted in Economics, Evolution, Philosophy, Psychology | Leave a comment

Are Humans Special?

Written 20171

We instinctively believe there is something which sets humans apart from other species. One day I was thinking about why it is we think this, and it suddenly occurred to me the most obvious reason – It’s because we ARE humans! Continue reading

Posted in Evolution, Philosophy, Psychology | Leave a comment

Tragedy of the Commons – Part 2

Tragedy of the Commons is the natural extension of the Prisoner’s Dilemma to an arbitrary number of players. Just as we used Prisoner’s Dilemma as a model to understand the limitations of pairwise cooperation1, so too Tragedy of the Commons is an essential model for understanding the limitations of group cooperation.
Continue reading

Posted in Economics, Ethics, Evolution, Politics | Leave a comment

Infix Order Reversal

In Haskell, given any function with two arguments (curried) we can choose to use it infix position. The syntax for this depends on how we name the function; if we name the function in the form (s) then s is the infix form of the function, and otherwise an arbitrary function f can be converted to infix form by wrapping in backticks, as in `f`.

In either case, the infix form of the function expects the arguments in a certain order, and the order used in Haskell is:

(s) x y := x s y

I think it would be more natural if the order was the other way around, so:

(s) x y := y s x
Continue reading

Posted in Computer Science, Functional Programming, Linguistics | 3 Comments

Anonymous Algebraic Data Types

In functional programming, there is a nice symmetry between types and values. While we often think of types and values as playing different roles – the types as being the ‘objects’ and the values as being the ‘arrows’ (or the inhabitants of types) in the category of types (Hask) – we can also look at types as ‘values’ themselves, of an object called ‘Type’ (often denoted ‘*’), in a higher level category. Continue reading

Posted in Category Theory, Computer Science, Functional Programming | Leave a comment

From Sex Cells to Gender Behaviours and Mating Systems

In a previous post, ‘Why 2 sexes?’, I explained a hypothesis for why the sexes first diverged (the original asymmetry was that the females pass on the mitochondria to their offspring whereas the males don’t). In this post I want to hypothesise and speculate1 in more detail about how this initial asymmetry could naturally lead to the (statistical) differences between male and female behaviours and roles with which we are familiar with today, in the context of the species’ mating system.
Continue reading

Posted in Evolution, Philosophy, Psychology | Leave a comment

GCSE Maths Takeaway – Simultaneous Equation Word Problems

If I had to choose one thing you should have as a takeaway from GCSE maths i.e. one ‘poster’ topic to represent GCSE maths, I think it should be simultaneous equations – in particular word problems leading to simultaneous equations 1.
Continue reading

Posted in Education, Mathematics | Leave a comment

Grammar is like a Type System

In an analogy between natural language and programming language, grammar can be compared to a type system, which provides a great way to learn about one if you know about the other1.
Continue reading

Posted in Category Theory, Functional Programming, Linguistics | Leave a comment

Tragedy of the Commons – Part 1

Edited 2020-10-27

‘Tragedy of the commons’, and it’s special two player case which is known as ‘Prisoner’s Dilemma’, is a game (or class of game) in game theory; which is interesting, both in it’s own right as a mathematical concept because it is so simple and yet has a surprising – even paradoxical feeling – result, but also because it is such a useful and natural model in evolution, economics and ethics, for understanding the limits of cooperation.1
Continue reading

Posted in Economics, Ethics, Evolution, Mathematics | Leave a comment

The Real Numbers

The real numbers are often introduced as an extension of the natural numbers. While this is how they developed historically, and is often how they are formally constructed, it is not possible to seamlessly extend the concept of a natural number into the concept of a real number – they are used for different purposes. Continue reading

Posted in Category Theory, Education, Mathematics, Philosophy | 1 Comment

Why 2 Sexes?

Why do we have 2 sexes? It’s something we take for granted, but is there an evolutionary reason for it? The standard evolutionary arguments of ‘survival of the fittest’ don’t seem to easily apply here, but that doesn’t necessarily mean it is just an accident of history. There is a story1 behind it, and it’s beautiful. Continue reading

Posted in Evolution | Leave a comment