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 involved with C++'s JTC1/SC22/WG21 - but the core tech behind the two is open. Anyone can read the…
Continue reading →
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 tried to explain to them that DRM always fails; you can't make data which can't be copied. I…
Continue reading →
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 that humans can do anything with no more than 1 byte of memory") can we understand how we should r…
Continue reading →
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. Curly Quotes Is this code valid? <a href=“example.html”>read more</a> Yes! Let's read the HTML S…
Continue reading →
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") something <- lm( mydata$Col1~mydata$Col2) What are H and M? They are defined earlier in the doc…
Continue reading →
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. So, being a responsible nerd, I decided to send a pull request to fix them. Aren't I nice?! The…
Continue reading →
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" means all the source code needed to generate, install, and run the object code That, to me,…
Continue reading →
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 is after sunrise and before sunset, it takes a reading and writes it to today's CSV file. If it is…
Continue reading →
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 substitute them with your own keys. from rauth.service import OAuth1Service, OAuth1Session # Get a…
Continue reading →
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 user's ID. GitHub users can change their username - but their ID stays the same. How? Inspired by…
Continue reading →
Play with the demo I was lucky enough to go to Number 10 Downing Street for a meeting a few weeks ago. A perfect opportunity for a photo of me by that famous door. Being the vain man that I am, I wanted to set it as my avatar photo. But Twitter and other social networks now use circular avatars. The "10" has been obliterated and part of my head is missing. So I've created a quick way to preview avatar images to see how they'll look on both squares and circles. It places a simple…
Continue reading →
Last year, I wrote about how to extract Location History from Google. Once again, Google have changed their URLs to make it even harder to get one's current location out of their data-greedy hands. It used to be the case that Latitude gave that information - but they killed it. Then they promised it in Google+ - but never delivered. Now they offer you a data-dump which they will email to you. Hardly convenient if you want a single day! sigh Recently Google released Timeline - an…
Continue reading →