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…
Continue reading →
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…
Continue reading →
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…
Continue reading →
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…
Continue reading →
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,…
Continue reading →
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> …
Continue reading →
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…
Continue reading →
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…
Continue reading →
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…
Continue reading →
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…
Continue reading →
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…
Continue reading →
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: …
Continue reading →