Blog

Go Interfaces and the Handle/Body Idiom

The interface construct in the Go language is one of its most immediately visible features. Interfaces in Go are ubiquitous, but I am afraid that the best way to use them has not yet fully been explored. Moreover, in practice, Go interfaces seem to be used in ways that were not intended, and are not necessarily entirely beneficial, such as an implementation shortcut to the classic Handle/Body idiom that hides interchangeable implementations behind a common, well, interface.

Laplace's Theorem

Let $G$ be a finite group with $n$ elements, and $H$ a subgroup of $G$ with $m$ elements. Then $m$ is a divisor of $n$: for a finite group, the order of any subgroup divides the order of the group.

A Mathematical Mystery

In my previous post on one-dimensional heat flow, I encountered sums of the form:

$$ \sum_{n=0}^\infty \frac{\pm 1}{2n+1} \exp \left( - (2n+1)^2 x \right) $$

A plot (involving the first 1000 terms) is shown below, and looks reasonable enough. Is this curve, which forms the limit of the series, a known function?

Heat Flow

Heat Flow

Imagine a rod that is initially at temperature $T_1$ and then brought into an environment with a lower temperature $T_0 < T_1$. How quickly does the body cool down? When will it have reached the environment’s temperature? What is the temperature profile throughout the rod, as a function of time?

This is essentially a worked homework set: a complete, step-by-step solution of the diffusion (or heat) equation in one dimension.

A Guide to git: Three Essential Hidden Concepts

Like many other people, I have struggled with git. It was obviously all very clever, but somehow inexplicably difficult and frustrating to use.

Eventually, I realized that my difficulties stemmed from three misconceptions: areas, where git did something different from what I thought it did, or different from what I was led to believe it did.

SSG is not CMS - Or is it?

About a year ago, to put a cap on my struggles with Hugo, I wrote up some thoughts on the whole static-site-generator (SSG) concept. One point I made concerned the amount of “meta-data management” that the typical SSG does: creating tag collections; creating sitemaps, and so on. And what a pity it is, that most SSGs don’t seem to surface this information in a way that would be usable by other tools.