Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

How random are TOTP codes?

· 5 comments · 350 words · Viewed ~8,038 times


Histogram of distributions. 8 is clearly higher than the rest.

I'm pretty sure that the 2FA codes generated by my bank's TOTP app have a bias towards the number 8 - because eight is an auspicious number. But is that just my stupid meaty brain noticing patterns where none exist? The TOTP algorithm uses HMAC, which in turn uses SHA-1. My aforementioned brain is not clever enough to understand how that works. Although bigger, meatier brains have assured me it …

Running a Shortest Splitline Algorithm on the UK - and other mapping adventures

· 1,500 words · Viewed ~585 times


South Western tip of England split into three.

How do you fairly split a country into electoral subdivisions? This is a difficult problem. Whatever you choose, you'll piss off someone. A politician will be annoyed that their loyal voters are no longer in their district. And voters will be annoyed that they're now lumped in with people from the wrong side of the tracks. This is a very human problem. So let's ignore all the human aspects and…

Fitting 1 dimensional data into 2 dimensional space

· 600 words


Hilbert curves.

A few notes to myself. Let's consider a set of 1 dimensional data. For example, the alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ What do we mean by "1 dimensional"? Consider the element "B". From there you can go left to "A" or right to "C". Left and right are the only directions you can move. You cannot go up or down from "B". There's no way to go in or out. You're trapped in a single dimension. …

Book Review - Race After Technology: Abolitionist Tools for the New Jim Code

· 500 words


A Black woman, face sorrounded by circuits, looks to the future.

From everyday apps to complex algorithms, Ruha Benjamin cuts through tech-industry hype to understand how emerging technologies can reinforce White supremacy and deepen social inequity. Benjamin argues that automation, far from being a sinister story of racist programmers scheming on the dark web, has the potential to hide, speed up, and deepen discrimination while appearing neutral and even…

How to Hypnotise an Artificial Intelligence

· 950 words · Viewed ~916 times


A book cover in the style of a 1950's pulp sci-fi novel. An AI generated set of computers are connected by wires.

Last week I attended a talk by Dr Irina Higgins from Artificial Intelligence company DeepMind. It was a fascinating look at how their AI works, and how it is trained. Terence Eden is on Mastodon@edentIf you've ever played a video game online, it is likely you've been training an Artificial Intelligence agent without realising it.Ethical?❤️ 7💬 4🔁 020:06 - Thu 09 March 2017 Part of the problem is…

Use DRAKON to Generate Code from Flowcharts

· 850 words · Viewed ~17,577 times


It's 1986. You're working on the Russian's Buran space programme - trying to create a re-usable space vehicle which will exceed the capabilities of the American's "Space Shuttle". There's a problem. You have very complicated real-time algorithms which you need to review, improve, optimise, and then turn into code. How do you do it? Obviously, you invent DRAKON! ДРАКОН, "dragon" Backronym for…