Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

Is enhancement the same as manipulation?

· 4 comments · 850 words · Viewed ~517 times


Screenshot of a BBC news article. Jurors shown video 'of felling of Sycamore Gap tree'

How far can you enhance an image or video before you cross the line into manipulation? The UK is currently prosecuting two men accused of a crime. Part of the prosecution's evidence is a video. In showing it to the jury, the prosecution have said: the two minute and 41 second-long video is "extremely dark" but the "unmistakeable" noise of a chainsaw can be heard followed by the sound of a tree…

Who is responsible for missing money?

· 2 comments · 1,000 words · Viewed ~582 times


A tiny lego Storm Trooper eats a chocolate coin.

I have a simple rule of thumb when it comes to news reports. The real story is always in the penultimate paragraph. Let's look at this inflammatory headline: Woman’s 'spree' after $158k banking error, refuses to return pensioner’s life savings An Auckland beneficiary is under investigation for an alleged “spending spree” after $158,000 was mistakenly transferred to her account. […] pensioner lo…

HTML Oddities: Is a newline just another whitespace in attribute values?

· 600 words · Viewed ~468 times


The HTML5 Logo.

Consider these two HTML elements: <div class="a b">…</div> <div class="a b">…</div> Is there any semantic difference between them? Is there any way to target one but not the other? In other words, are they logically different? I think the answer is no. On every browser I've tested, both are the same. Whether using JS or CSS, there's no difference between them. You could replace every \n wit…

Using Tempest Highlight with WordPress

· 1 comment · 300 words · Viewed ~242 times


The HTML5 Logo.

I like to highlight bits of code on my blog. I was using GeSHi - but it has ceased to receive updates and the colours it uses aren't WCAG compliant. After skimming through a few options, I found Tempest Highlight. It has nearly everything I want in a code highlighter:  PHP with no 3rd party dependencies.  Lots of common languages.  Modern, with regular updates.  Easy to use fun…

Reverse Geocoding is Hard

· 7 comments · 850 words · Viewed ~28,396 times


Two men are confused by a paper map

My wife and I run OpenBenches - a crowd-sourced database of nearly 40,000 memorial benches. Every bench is geo-tagged with a latitude and longitude. But how do you go from a string of digits to something human readable? How do I turn -33.755780,150.603769 into "42 Wallaby Way, Sydney, Australia"? Luckily, that's a (somewhat) solved problem. Services like OpenCage, StadiaMaps, OpenStreetMap,…

HTML Oddities: Does the order of attribute values matter?

· 7 comments · 550 words · Viewed ~1,451 times


The HTML5 Logo.

HTML elements can have attributes. For example id, class, src, alt, and many others. These attributes can contain values - an img element's src attribute has a value which is a link to an image. An id attribute's value is a single string. But some attributes can contain multiple values. Here's a thought experiment for you. Consider these two HTML elements: <p class="alpha bravo charlie">………</p> …

A small PHP update to GeSHi

· 250 words


The PHP logo.

The faithful old GeSHi Syntax Highlighter hasn't seen an update in a many a long year. It's a tried and trusted way to do server-side code highlighting - turning a myriad of programming languages into beautiful HTML & CSS. A few weeks ago, I noticed someone had proposed an update to its HTML rendering. The changes were mostly adding in new element names. PHP has been updated several times…

Book Review: It's Not That Radical - Climate Action to Transform Our World by Mikaela Loach

· 1,350 words


Book cover.

I think I mostly agree with everything this book is saying, but after almost every paragraph I found myself scribbling the same note "Yes! But what action should I take though?" The author has an excellent and accessible way of showing the problems caused by the Climate Crisis - but the "action" part is mostly missing. Take this example: So something you can do right now to tackle them is to…

Book Review: Murder Your Employer - The McMasters Guide to Homicide by Rupert Holmes

· 1 comment · 200 words


Book cover featuring an old fashioned line drawing of an employee holding a knife behind his back.

What if the Discworld's Assassin's Guild existed in the real world? That's it. That's the plot. Go to a university where they'll teach you to be a better class of murderer. The first half is excellent. Chuckles all the way through. A heady mix of every boarding-school novel you've ever read, and funny little twists and turns. Lots of the dialogue is straight out of Terry Pratchett (and I can't…

Gadget Review: 6-Colour ePaper Name Badge

· 2 comments · 1,200 words · Viewed ~1,158 times


Skintones rendered on eInk.

The good folks at SmartDisplayer Technology Co have sent me a six colour eInk badge to play about with. Here's a quick video and then a walk-through of its features. You can also view SmartDisplayer's official video. The Badge It is a single block of plastic. There are no seams, screws, or rough edges. The ePaper appear right on the surface of the badge, there's no recessing or anything…

Introducing Pretty Print HTML for PHP 8.4

· 550 words · Viewed ~514 times


The HTML5 Logo.

I'm delight to announce the first release of my opinionated HTML Pretty Printer for new versions of PHP. Grab the code from Packagist Contribute on GitLab There are several prettifiers on Packagist, but I think mine is the only one which works with the new Dom\HTMLDocument class. Table of ContentsWhatHowLimitationsWhyNext Steps What This takes hard-to-read HTML like: <!doctype…

Is this the smallest USB-C hub?

· 3 comments · 350 words · Viewed ~786 times


Tiny hub nestled in the palm of my hand.

The gadget wizards at Benfei know that I'm a sucker for any sort of USB-C gadget. So when they offered to send me their micro-hub to review, how could I refuse? It is dinky! Here's what you get for your tenner USB-C PowerDelivery HDMI USB-A Frankly, I'm impressed that they managed to fit that much in! If you'll excuse my lacklustre photo-editing skills, here are the two output ports: …