Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

Should HTML's code blocks be translated?

· 2 comments · 450 words · Viewed ~283 times


The HTML5 Logo.

I was recently prompted to test my blog's layout when rendered in right-to-left text. Running a website through an automatic translator into a language like Arabic or Hebrew will show you any weird little layout glitches which might occur. But mechanical translation is a bit of an unthinking brute. In this example, I had a code snippet which contained the word "link". Should that word be…

1KB JS Numbers Station

· 7 comments · 700 words · Viewed ~11,754 times


Random monochrome tiles with the word Numbers Station superimposed.

Code Golf is the art/science of creating wonderful little demos in an artificially constrained environment. This year the js1024 competition was looking for entries with the theme of "Creepy". I am not a serious bit-twiddler. I can't create JS shaders which produce intricate 3D worlds in a scrap of code. But I can use slightly obscure JavaScript APIs! There's something deliciously creepy about…

Are there any modern closed-source programming languages?

· 4 comments · 550 words · Viewed ~1,382 times


Four generated images of William Shakespeare programming a computer.

At a recent OpenUK meetup, one of the participants declared that Open Source had comprehensively won. While businesses might not always release their proprietary source code, 100% of everything they wrote used an open source programming language. I wondered how true that was. You can, perhaps, moan about the shenanigans around Java's licencing and you mutter about whether it is easy to get…

You can't screenshot or right click this image

· 14 comments · 550 words · Viewed ~1,838 times


A badly drawn cartoon of a monkey in a t-shirt.

People contact me with all sorts of weird opportunities. Some are fun. Some are not. I've lost count of the number of NFT grifters who've asked me to "revolutionise" the art space. I'm generally not a fan. But I had one chat with someone who wanted to do something intriguing. They were worried about people right-clicking or screenshotting their precious images and had a plan to stop that. I…

Book Review: The Programmer's Brain - What every programmer needs to know about cognition by Felienne Hermans

· 7 comments · 500 words · Viewed ~11,294 times


Book cover for the Programmer's Brain.

There are some books which make you feel smarter just by having them on your shelf. This is one of them! I would consider it essential for anyone working with code - whether a wide-eyed newbie or grizzled veteran. How do human brains understand code? What neurological quirks do we all have? Which common mistakes can be easily avoided? Only by understanding our puny hardware ("Isn’t it a miracle …

Smart Quotes and Coding Examples

· 3 comments · 500 words · Viewed ~535 times


Screenshot of a command line which has curly quotes.

Every so often, I copy and paste some code from a website and it utterly fails. This is probably a good reminder not to practise ✂️ & 📋 development, but it is also a reminder that "smart" formatting often trips up new students. Here are a few examples I've seen recently - produced as a result of computers trying to be cleverer than humans, and humans not checking if computers are being stupid. C…

How not to do coding examples

· 6 comments · 100 words · Viewed ~512 times


A pet cat typing on a computer keyboard.

As part of my MSc, I'm getting a few lessons in technologies I'm not familiar with. I've found some of these lessons extremely confusing - even when I'm proficient in the language. Here's an example of a coding fragment from one of the tutorials in the R language. Let me explain everything that I think is wrong with it. barplot(H, names.arg =M, col=“blue” xlab ='Country', ylab="Population") so…

Please Stop Inventing New Software Licences

· 3 comments · 700 words · Viewed ~4,015 times


Binary code displayed on a screen.

A few weeks ago, I received an unsolicited email inviting me to try out an exciting new "quantum resistant" cryptography app called Cyph. Because I hate myself, I signed up. Of particular interest to me was the fact that the homepage loudly proclaimed that it was "Open Source" - and had a public GitHub repo. That was handy, because there were some glaring usability flaws on the sign-up screen.…

Do any Open Source Licences require source history?

· 10 comments · 200 words · Viewed ~2,245 times


Binary code displayed on a screen.

A question to the void. Are you entitled to get the source history of open source projects? Lots of Open Source licences give the consumer of software the right to a copy of the source code. For example, GPLv3 says that distributors of software have to: give anyone who possesses the object code ... a copy of the Corresponding Source What is "Corresponding Source"? The "Corresponding Source"…

Relaunching @edent_solar. Part 3 - API & Code

· 2 comments · 200 words · Viewed ~226 times


Solar Graph.

I'm hooking my solar panels up to Twitter! Installation Inverter Fronius provide a comprehensive API guide - I wish more companies did this. There are lots of unofficial libraries in a variety of different languages. I've written this code in Python3. This is a general tidy-up of the code I wrote several years ago. Here's how it works.... Every minute, the script runs from crontab. If it…

Add review to Goodreads from Schema markup

· 600 words


The Goodreads Logo.

I write book reviews on my blog. I also want to syndicate them to Goodreads. Sadly, Goodreads doesn't natively read the Schema.org markup I so carefully craft. So here's the scrap of code I use to syndicate my reviews. Goodreads API Keys Get your Keys from https://www.goodreads.com/api/keys You will also need to get OAuth tokens For this documentation, I'll use the example keys - please…

Redirect GitHub ID to Username

· 200 words · Viewed ~4,026 times


A screen of JSON code showing my details.

Scratching my own itch here... GitHub users have a username (mine is @edent) and have a user ID number (mine is #837136). If you want to redirect a user ID to a username, you can use the little service I've cobbled together: https://edent.github.io/github_id/#837136 That will take your browser to my GitHub page, using nothing but my ID. Why? Some login services only give you the GitHub…