July 2020

The Argleton affair, and the Wikification of the World-Wide Web

How a non-existent English village ended up on maps, and the implications this has for how we handle information.

Categories: general computing

Extending the bash 'cd' command in Linux

The built-in cd command in the bash shell is not as smart as it could be; but it's a little fiddly to extend its functionality.

Categories: Linux

Using an ammo box as portable 12V power supply

A military-surplus steel ammunition box makes a great housing for a high-current, outdoor 12V power supply. This article gives some ideas about how to build one.

Categories: science and technology

Bayesian statistics for dummies

An explanation from first principles of this much-misunderstood principle of statical inference.

Categories: mathematics

Unicode combining and graphemes -- how two identical Java Strings can be different

Java's strict adherence to Unicode standards for text representation ought to make life easier for developers, and usually it does. But not always.

Categories: software development

A ten-minute guide to electrical theory

Volts, amps, ohms, and watts, for complete beginners. This article explains electrical circuit theory in the context of domestic wiring installation.

Categories: science and technology

An overview of character encoding for developers

How character encoding actually works, and the implications for developers of choosing one character set over another.

Categories: software development

Why you can't play Bach on a piano

Well, perhaps you can play Bach on a piano, if you have the skill and the patience; but you can't hear Bach's music the way he and his contemporaries would have heard it because, in general, we don't using the same tuning schemes. This is an article about the mathematics of music tuning, from Pythagoras to the modern equally-tempered scale.

Categories: mathematics, music

Ten simple rules for passing an examination

Advice for students on how to do well in university level examinations, fairly and honestly. There are no secrets here, but it's amazing how many students do less well than they should because they haven't understood how university teaching works.

Categories: education

Making a Java JAR file self-executing (on Linux)

A quick-and-dirty way to make it possible to execute Java JAR files at the prompt, without needing to invoke the JVM.

Categories: software development, Java, Linux

How the Fabric8 Maven plug-in deploys Java applications to OpenShift

This article describes in detail the steps the Fabric8 Maven plug-in carries out when deploying an application to OpenShift.

Categories: software development, Java, OpenShift

Extracting software from the Raspbian repository, for assembling a custom Linux image for the Raspberry Pi

Using the official Raspian repository to assist the construction of a custom Linux for embedded applications is quick and convenient, compared to building everything from source. However, this approach has certain hazards.

Categories: Linux, Raspberry Pi, embedded computing

Compiling a Java program to native code using GraalVM, from the ground up

The GraalVM 'Native Image' plugin has the capability to compile to stand-alone binaries languages like Java that are normally compiled on the fly. This article describes step-by-step how to install GraalVM and the plug-in, and use it on some simple Java examples.

Categories: software development, Java

Building native graphical applications in C for MS Windows, using GTK+ and open-source tools

This article describes how to use free, open-source tools to develop graphical applications in C for Microsoft Windows, which run natively. By 'natively' I mean that they don't need any supporting infrastructure (as Cygwin does), and can be packaged and distributed just as any other Windows application, and will look and behave like one.

Categories: software development, C

A brief history of English land law

What the Normans did for us.

Categories: law

How to give a presentation

Some guidance, mostly for students, on how to make a scientific or technical presentation.

Categories: education

A collection of Java curiosities and oddities

Why does Java have a NullPointerException when it doesn't support pointers? Why does the equality operator compare object references, but the collections framework comparison methods compare object contents? These questions and many more like them will comprehensively fail to be answered in this article.

Categories: software development, Java

Why use of the @Override annotation is essential in Java

Developers don't use @Override enough. Java's method visibility rules, when classes are in different packages, make polymorphic inheritance behave in odd ways. Careful use of @Override can prevent these problems, and make applications much easier to maintain.

Categories: software development, Java

Generating simple MIDI files using Java, without using the Java Sound API

Although the Java Media Framework can do some very sophisticated things, it remains relatively difficult to generate simple musical tones using Java. The de-facto method for specifying musical notes remains the MIDI file, although there are now more sophisticated approaches. It's surprisingly difficult to generate even a simple MIDI file in Java, not least because of the lack of unsigned data types. I wrote this article years (perhaps decades) ago, but it's recently become popular again, because of the use of Java in Android, and the lack of any Java API in Android for playing musical tones, other than by reading a MIDI file.

Categories: software development, music, Java

An introduction to Perl for Java programmers

A quick-start guide that highlights the similarities and differences between the Java and Perl programming languages.

Categories: software development, Java, Perl

An introduction to joint, marginal, and conditional probabilities

An explanation from first principles of the concepts of probability applied to two random discrete variables.

Categories: mathematics

A Linux storage management cheat-sheet

This article outlines, with step-by-step examples, how to carry out the most fundamental Linux storage management tasks: partitioning a disk, creating a filesystem, setting up swap space, managing a logical volume management (LVM) storage pool, and configuring a RAID mirror.

Categories: Linux

Lua quick-start for Java programmers

The essentials of Lua programming in one page, for experienced Java programmers.

Categories: software development, Java, Lua

Building a Lua extension library for Linux in C/C++

Lua is an embeddable scripting language, which can be extended in a number of useful ways. This article describes in detail how to create a Lua extension in C (or, with a bit of fiddling, C++) as a loadable (.so) library.

Categories: software development, Lua, C

Why switching high currents using a MOSFET and a Raspberry Pi is not as straightforward as it looks

Using a single MOSFET transistor for power switching in microcontroller applications is simple and low-cost, but it often doesn't work as well as expected. Either the switched device doesn't run at full capacity, or the MOSFET gets hot. This article explains why.

Categories: Raspberry Pi, electronics, embedded computing

Handling GPIO-connected switches robustly in C on the Raspberry Pi

It's surprisingly difficult to detect switch actuations in a robust way, dealing with contact bounce and other quirks. This article describes one approach to the problem in C.

Categories: Raspberry Pi, electronics, embedded computing

Raspberry Pi 4 -- is it good news for experimenters and enthusiasts?

Faster, more of everything, same price -- what's not to like?

Categories: Raspberry Pi

Prototyping a large Raspberry Pi case

Using high-density vinyl board to construct a practical prototype case without specialist tools or materials

Categories: Raspberry Pi

Using the Raspberry Pi official 7-inch touch-screen in embedded applications

The official Raspberry Pi 7-inch touchscreen is a useful and well-designed piece of equipment but, if you're using it in a custom (hardware and/or software) build, you'll notice a lack of any relevant technical information. This article tries to supply some of that information.

Categories: Raspberry Pi, electronics, embedded computing

C development for Linux without a standard library

There are relatively few good reasons for writing C code without using a standard C library. However, doing so provides valuable insights into how compilers and operating systems work, and is worth doing if only for its educational value.

Categories: software development, C, embedded computing

An introduction to steam locomotive technology

Oh yes it's great to be an engine... But how did the driving force of the industrial revolution actually work?

Categories: science and technology

The titles game: can you buy nobility?

This article is about whether you can legally and openly buy a British noble title. Spoiler alert: no, you can't. People still keep asking, though.

Categories: law

Law and small woodlands

An exploration of various aspects of English law, as they apply to the owners and managers of small, private woodlands.

Categories: law

Night of the living differential equations -- modeling the zombie apocalyse

Using a simple application of Euler's method to estimate the solutions of non-linear differential equations, and work out your chances of surviving the zombie apocalypse. No, really.

Categories: mathematics

Night of the living drag coefficients -- ballistics applied to zombie control

An introduction to the science of exterior ballistics -- tracking the flight of a projectile under the influence of gravity and drag.

Categories: mathematics