Besides writing text, I also like to write computer software. Over time I have written vast amounts, ranging from small code snippets to big applications. The majority was done for work, and I can’t publicly share it. Most of that would be pretty boring for a general audience anyway.
Here I share a few programs that I wrote for fun. The (Windows 10) installers can be downloaded from my software sharing site, and the (C#) source code of some of the programs is available on the software sharing site github; links are provided below.
I wrote this program after reading Sean Carroll’s book From Eternity To Here, which explores the origin of time and offers extremely low entropy conditions at the Big Bang as an explanation. A system’s entropy is a quantity that expresses its degree of disorder (or chaos), and the Second Law of Thermodynamics famously states that this quantity can only ever increase, which Carroll proposes as the cause of the phenomenon that we perceive as the progression of time.
We are all familiar with the notorious absence of a broken glass spontaneously un-breaking, a molten ice cube spontaneously un-melting, spilled red wine spontaneously moving back into the glass, etcetera. These are all examples of entropy decreasing, and while the laws of physics allow a system’s entropy to do so locally — i.e., for these kinds of phenomena to happen in the universe — the likelihood of such a thing actually happening is negligibly small. That is a good thing because otherwise, ignoring leaks, all air molecules of the room you are in might spontaneously migrate to one corner, essentially creating a vacuum and suffocating you.
The ‘Entropy’ program relates to the latter and aims at exploring just how unlikely it is for randomly moving particles to cluster together. It is a simple simulation of a collection of 2D particles (circles) bouncing around in a 2D enclosure (a ‘box’ of size NxN). The program visualizes the motion of these particles — fascinating to watch in and of itself — and keeps track of the degree of chaos in the box, i.e., the degree to which the particles are spread out over the box. The system’s entropy is estimated as the logarithm of the average distance between the particles. The simulation can be sped up significantly by not displaying the motion for some time; resuming the display then lets you inspect the lowest entropy configuration encountered during the run.
This extensive tool, inspired by an exploration of ontologies, lets you document and explore family relations. It is based on the concepts of Person, representing a real person with a birth date, birth name, birth gender etc., and Life Events that specify when a person gets married, changes name, has a child, gets divorced, etc. Using this information, the app can determine and lets you interactively explore each person’s relatives, from great grandparents to half and step siblings to second cousins-in-law:
add person → add events → infer → explore relatives
The tool comes with an example database that has the members of the current British Royal House.
A simple scramble square puzzle. Each piece contains the top or bottom half of a colored triangle on each side. The objective is to rearrange the pieces such that all halves match up to form full, monochrome triangles.
This simple, stick-notes-like task tracking tool that supports task lists and collaboration resulted from wanting to have just such a tool for home and work use. After not finding one that I liked, I decided to code one up myself; I use it all the time now.
This program stems from my fascination with traffic flow. I wrote it to answer a friend’s question about why, when you have been sitting in a traffic jam for a long time, it can suddenly end without there seeming to be anything that caused it. The program simulates a 2-lane highway with cars and trucks, with a variety of settings for speeds. A traffic jam can be created by starting the simulation with a road block about half-way down the track. When this roadblock gets removed by clicking a button, one can see how the vehicles in front start moving again while vehicles approaching the jam still have to slow down and possibly stop, until the jam eventually dissolves.
There are a few other things to play with, like adding speeders and slow pokes, and allowing vehicles to pass only on the left or both on the left and on the right. Many more features could be added.
This tool brings together my fascinations for writing text and writing software. After finishing the first draft of A Mind Exposed, I was curious about two particular statistics of my document: how many unique words did it have, and how often did each of these unique words occur? Moreover, I wanted to know what these words were. Lastly, I wanted the analysis to recognize two different languages (English and Dutch) and differentiate between words in each language.
I couldn’t find a tool that suited my needs online, so I decided to write my own. The result, called WordStats, extracts a variety of statistics from documents in plain text format. Besides word count, unique word count and word frequency, these include number count and hyperlink count; sentence and paragraph count; and average and maximum characters per word, syllables per word, words per sentence, and sentences per paragraph.
WordStats is multi-lingual; word count and frequency can be established for two different, user-selected languages per analysis. Various results can be saved to CSV files for further analysis with external tools.