Influential technology by year

  • 2021 – Tracy profiler
  • 2020 – Blender, Media servers, GPUs, ZeroMQ
  • 2019 – Cloud computing, R (and the whole notebooks thing), GitLab, Hugo
  • 2018 – Docker (containers)
  • 2017 – Cryptocurrency, blockchain
  • 2016 – C++1z (the precursor to C++17)
  • 2015 – git / GitHub

Ports blocked over VPN

Or are they?

A problem that has followed me around the last two jobs: I can’t access the git server when I’m tethered using ssh authentication. But cloning via https is fine… it feels like ports are being blocked by the VPN. So it seems to be my EE phone not working correctly over IPv6, or rather not switching back to IPv4 correctly. And the fix is to create another APN with only IPv4 enabled. [Read More]


Tips and tricks

Develop towards the centre Castle early and castle often When both sides have similarly active pieces it’s known as an even or balanced position Relative absolute pins Weakest pawns F2 and F7 Only the kings are defenders Phases of the game Opening All your opening moves should support these goals. Establish control of the centre: the most important part of the board Get your pieces onto active squares towards the centre Get your king to safety by castling Middle game TBD [Read More]


Hash tables

A hash table (hash map) is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found.

Hashing derives a fixed size result from an input. See Hash table.

Properties of a hashing algorithm

  • Stable: the same input generates the same output every time
  • Uniform: the hash values should be uniformly distributed through the available space
  • Efficient: the cost of generating a hash must be balanced with application need
  • Secure: the cost of finding data that produces a given hash is prohibitive

String hashing

  • Sum ASCII values – not uniform, not secure
  • Fold bytes of every four characters into an integer – not secure
  • CRC32 – not secure
  • MD5 – not efficient, not secure
  • SHA2 – stable, uniform, not efficient, secure

Handling collisions

  • Chaining
  • Open addressing
  • Load/fill factor – the ratio of filled hash table array slots
  • DFS/BFS – depth-first search versus breadth-first
  • Brute force
  • Greedy algo – stall at local maxima
  • Dynamic programming
  • Longest common subsequence
  • Simulated annealing
  • Random solutions
  • Polynomial
  • PTAS – approximation scheme
  • More Hash Function Tests
  • Linear probing
  • Robinhood hashing
  • Cuckoo hashing
  • Preimage (attack)
  • URL shortener

Leaving commented code

What are the alternatives to leaving commented old code in a codebase as a reference? Many times I’ve been saved by something that had been commented, but does the overhead of littering the code outweigh the occasional convenience? Add an extended comment to remind your future self what was removed Document in a third party tool Get used to using git log -p GitLab blame Some other change visusalisation tool? [Read More]


Non-const global variables have external linkage by default Const global variables have internal linkage by default Functions have external linkage by default What’s the “static initialization order ‘fiasco’ (problem)”? C++ scoped static initialization is not thread-safe, on purpose! (pre-C++11) constinit static vs std::call_once vs double checked locking DCLP Double-Checked Locking Pattern const and static variables don’t have external linkage. Variables with static storage duration are zero initialised. [Read More]


  • GeoJSON is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. It is based on the JSON format.”
  • Sequalize
  • GIS – geographical information standard
  • GML – geography markup language is the XML grammar defined by the Open Geospatial Consortium (OGC) to express geographical features.”
  • PostGIS is an open source software program that adds support for geographic objects to the PostgreSQL object-relational database.”

Run Apache

In Docker

docker run --detach --rm --publish 80:80 deanturpin/aws-apache FROM ubuntu # Install dependencies RUN apt update RUN apt -y install apache2 vim # Install apache and write hello world message RUN echo 'Kem chho!' > /var/www/html/index.html # Configure apache RUN echo '. /etc/apache2/envvars' > /root/ RUN echo 'mkdir -p /var/run/apache2' >> /root/ RUN echo 'mkdir -p /var/lock/apache2' >> /root/ RUN echo '/usr/sbin/apache2 -D FOREGROUND' >> /root/ RUN chmod 755 /root/ EXPOSE 80 CMD /root/run_apache. [Read More]