Website hosting

On the cheap...

Hugo So this whole site is generated from markdown using the Hugo blog engine. And it’s hosted on GitLab completely free. See how I did it. 000webhost / Hostinger Free hosting is available from 000webhost – albeit with an advert. But you can go pro for as little as $2 a month. It did amuse me that I hit two verification issues on the registration page! Please use an email address from a reputable email provider (like GMail or Outlook). [Read More]


Challenger banks

  • Aldermore
  • Atom Bank
  • Metro Bank
  • Monzo
  • N26
  • OakNorth
  • Shawbrook Bank
  • Starling Bank
  • Tandem Bank

Investment banks



Ports blocked over VPN

Or are they?

A problem that has followed me around for the last two jobs: I can’t access the git server using ssh authentication when I’m tethered. Yet cloning via https is fine… it kinda feels like ports are being blocked by the VPN. However, 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

Aims Develop towards the centre Castle early and castle often State When both sides have similarly active pieces it’s known as an even or balanced position Relative/absolute pins Notation Symbol Meaning + Check ++ Double check # Checkmate 0-0 Castles kingside 0-0-0 Castles queenside ! Good move ? [Read More]

Big data

A consolidated list of sources

Sources of big data Big data communities and platforms Kaggle Statista Data World Data Hub AWS open data Google public data Crime Internet Reddit datasets Government Mathematics I got 717 problems… Project Euler problems Health 1000 Genomes project USDA food composition Business https://www. [Read More]

Profiling resources


  • valgrind
  • perf
  • /usr/bin/time --verbose
  • Tracy
  • htop

Compiler options

Enabling in gcc

Use -p for prof and -pg for gprof. But it will take longer to run.



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