Jeremy Keith's Blog, page 22
August 10, 2023
Crossing
I managed to get out and play in trad sessions for four days straight: Sunday, Monday, Tuesday, and Wednesday.
Today I rest. Or rather, I pack.
There won���t be any Irish music sessions in my calendar for at least the next two weeks. There won���t be much of anything in my calendar. I���m about to be incommunicado as I travel to Amerikay on the wide Atlantic ocean.
You might have seen that video that���s been doing the rounds about how cruise ships got so big. I���m not going on a cruise. I���m going on a crossing. That video ends with:
There are over 320 cruise ships sailing around the world right now. But there���s only one ocean liner left. The Queen Mary 2.
That���s going to be my mode of transportation and my home for the next week.
Then I���ll be in New York for a weekend, followed by most of a week lying on St. Augustine beach in Florida.
All of my sparklines are about to flatline for a while: no blog posts, no links, no notes. I won���t have any internet access on board the ship.
Time for me to switch off my work email. I thought about setting up an autoresponder to let people know that I won���t be replying to their email for a few weeks. But then I thought, how is that any different from how I normally respond to email?
August 9, 2023
Automation
I just described prototype code as code to be thrown away. On that topic���
I���ve been observing how people are programming with large language models and I���ve seen a few trends.
The first thing that just about everyone agrees on is that the code produced by a generative tool is not fit for public consumption. At least not straight away. It definitely needs to be checked and tested. If you enjoy debugging and doing code reviews, this might be right up your street.
The other option is to not use these tools for production code at all. Instead use them for throwaway code. That could be prototyping. But it could also be the code for those annoying admin tasks that you don���t do very often.
Take content migration. Say you need to grab a data dump, do some operations on the data to transform it in some way, and then pipe the results into a new content management system.
That���s almost certainly something you���d want to automate with bespoke code. Once the content migration is done, the code can be thrown away.
Read Matt���s account of coding up his Braggoscope. The code needed to spider a thousand web pages, extract data from those pages, find similarities, and output the newly-structured data in a different format.
I���ve noticed that these are just the kind of tasks that large language models are pretty good at. In effect you���re training the tool on your own very specific data and getting it to do your drudge work for you.
To me, it feels right that the usefulness happens on your own machine. You don���t put the machine-generated code in front of other humans.
Coding prototypes
We do quite a bit of prototyping at Clearleft. There���s no better way to reduce risk than to get something in front of users as quickly as possible to test whether you���re on the right track or not.
As Benjamin said in the podcast episode on prototyping:
It���s something to look at, something to prod. And ideally you���re trying to work out what works and what doesn���t.
Sometimes the prototype is mocked up in Figma. Preferably it���s built in code���HTML, CSS, and JavaScript. Having a prototype built in the materials of the medium helps establish a plausible suspension of disbelief during testing.
Also, as Trys said in that same podcast episode:
Prototypical code isn���t production code. It���s quick and it���s often a little bit dirty and it���s not really fit for purpose in that final deliverable. But it���s also there to be inspiring and to gather a team and show that something is possible.
I can���t reiterate that enough: prototype code isn���t production code.
I���ve written about the two different mindsets before:
So these two kinds of work require very different attitudes. For production work, quality is key. For prototyping, making something quickly is what matters.
Addy recently wrote an excellent blog post on the topic of prototyping. The value of a prototype is in the insight it imparts, not the code.
It’s crucial to remember that in a prototype, the code serves merely as a medium���a way to facilitate understanding. It’s a means to an end, not the end itself. The code of a prototype is disposable and mutable. In contrast, the lessons learned from a prototype, the insights gained from user interaction and feedback, are far more durable and impactful.
This!
It can be tempting to re-use code from a prototype. I get it. It seems like a waste to throw away code and build something from scratch. But trust me���and I speak from experience here���it will take more time to wrangle prototype code into something that���s production-ready.
The problem is that quality is often invisible. Think about semantics, performance, security, privacy, and accessibility. Those matter���for production code���but they���re under the surface. For someone who doesn���t understand the importance of those hidden qualities a prototype that looks like it works seems ready to ship. It���s understandable that they���d balk at the idea of just throwing that code away and writing new code. Sometimes the suspension of disbelief that a prototype is aiming for works too well.
As is so often the case, this isn���t a technical problem. It���s a communication issue.
August 7, 2023
Relative times
Last week Phil posted a little update about his excellent site, ooh.directory:
If you���re in the habit of visiting the Recently Updated Blogs page, and leaving it open, the times when each blog was updated will now keep up with the relentless passing of time.
Does that make sense? ���3 minutes ago��� will change to ���4 minutes ago��� and so on and on and on, until you refresh the page.
I thought that was a nice little addition, and I immediately thought of The Session. There are time elements all over the site with relative times as the text content: 2 minutes ago, 7 hours ago, 1 year ago, and so on. Those strings of text are generated on the server. But I figured it would be nice enhancement to periodically update them in the browser after the page has loaded.
I viewed source to see how Phil was doing it. The code is nice and short, using a library called Day.js with a plug-in for relative time.
���Hang on���, I thought, ���isn���t there some web standard for doing this kind of thing?��� I had a vague memory of some JavaScript API for formatting dates and times.
Sure enough, we���ve now got the Intl.RelativeTimeFormat object. It���s got browser support across the board.
I���ve got a function that loops through all the time elements with datetime attributes. It compares the current timestamp to that value to get the elapsed time. Then that���s formatted using the format() method and output as innerText.
You need to tell the format() method which units you want to use: seconds, minutes, hours, days, etc. So there���s a little bit of looping to figure out which unit is most appropriate. If the elapsed time is less than a minute, use seconds. If the elapsed time is less than an hour, use minutes. If the elapsed time is less than a day, use hours. You get the idea.
It���s a pity there isn���t some kind of magic unit like ���auto��� to do this, but it���s not much extra code to figure it out.
Anyway, that function runs periodically using setInterval(). I���ve set it to run every 30 seconds in my gist. On The Session I���ve set it to one minute.
You���ll notice that I���m grabbing all the relevant time elements���using document.querySelector('time[datetime]')���every time the function is run. That may seem inefficient. Couldn���t I just grab them once and then keep them stored as an array? But I want this to work even if the page contents have been updated with Ajax. (Do people even say ���Ajax��� any more? Get off my lawn, you pesky kids!)
I think I���ve written this code in an abstract way so that you should be able to drop it into any web page. For the calculations to work, you���ll need to either make sure that your datetime attributes are using timezones. Or, if there���s no timezone info, UTC is assumed.
This was a fun little piece of functionality to play around with. Now I know a little more about this Intl.RelativeTimeFormat object. The way I���m using it as a classic example of progressive enhancement. If a browser doesn���t support it, or if my code breaks, it���s no big deal. The funtionality is a little bonus that almost nobody will notice anyway. Just a small delighter ���if you���re the kind of person who finds it delightful when relative time strings automatically update.
August 5, 2023
Conduct
My week at the Belfast TradFest culminated in a cathedral.
Everyone who has been taking classes during the week made their way to Belfast cathedral for a communal finish. Every class played a short piece to round out their week of workshops.
The whole experience was quite lovely. At one point, I was unexepectedly moved to tears by the performance of the cello class (not a common instrument in Irish traditional music).
When I got home, I decided to send a message to Neil Martin who taught that class. It was just a quick line or two to tell him how special it was.
He responded, saying he found the whole experience of the closing concert very moving and powerful.
I was glad I sent that note of thanks.
Then, a day later, I received my own note of thanks. It wasn���t music-related. Someone I had met and chatted with at a conference last year told me that they had just watched the video of my talk, The State Of The Web. They were very moved by it. Then they took the time to send me an email to tell me. As you can imagine, I was really touched to be on the receiving end of that.
I resolved that I would do it more myself. Whether it���s a piece of music, writing, or anything else, I���m going to try to remember to pass on my appreciation more often.
That���s a good place to end, isn���t it? A nice heart-warming reminder that small acts of thoughtfulness can make a big difference to someone else���s well-being.
But there���s a corollary to that lesson. Acts of thoughtlessness will almost certainly make a very big difference to someone else���s well-being.
This is something I know in theory but struggle with in practice. I���ve experienced the regret of wishing I hadn���t acted so stupidly in my dealings with work colleagues, for example.
There���ll be some discussion happening on a topic that I might have strong feelings about, and I let those strong feelings take over my behaviour. Quite frankly, I act like a dickhead.
Sure, I can analyse it in hindsight and identify what causes this unintended behaviour, but that sounds an awful lot like excusing it. In the end, it doesn���t matter what my intentions were or what the circumstances were. It���s my actions that matter. More specifically, it���s the effect of my actions on other people that matter.
So, yeah, I am going to try to do more of those small thoughtful acts, like sending thank-you messages to people. But frankly, that���s a stretch goal. The shamefully low bar I first have to pass is to simply treat people with the respect they deserve. To paraphrase the Hypocratic oath: first, don���t be an asshole.
There���s an oft-quoted adage:
They may forget what you said, but they will never forget how you made them feel.
This is usually applied in the inspirational, positive sense: get out there and make people feel good! But it works equally well as a warning.
August 3, 2023
Immersed
I���ve been immersing myself in musical activities recently.
Two weeks ago I was in the studio with Salter Cane. In three days, we managed to record eleven(!) songs! Not bad. We recorded everything live, treating the vocals as guide vocals. We���ve still got some overdubbing to do but we���re very happy with the productivity.
Being in a recording studio for days is intense. It���s an all-consuming activity that leaves you drained. And it���s not just the playing that���s exhausting���listening can be surprisingly hard work.
For those three days, I was pretty much offline.
Then the week after that, I was in Belfast all week for the trad festival. I���ve written up a report over on The Session. It was excellent! But again, it was all-consuming. Classes in the morning and sessions for the rest of the day.
I don���t post anything here in my journal for those two weeks. I didn���t read through my RSS subscriptions. I was quite offline.
I say ���quite��� offline, because the week after next I���m going to be really offline.
Remember when I took an ocean liner across the Atlantic four years ago? Well, to celebrate a milestone birthday for Jessica we���re going to do it again!
I���m really looking forward to it. And I feel like the recent musical immersions have been like training for the main event in the tournament of being completely cut off from the internet.
August 2, 2023
Opportunity
You can split the web in many ways. Lionel Dricot wrote about one of those ways in a blog post called Splitting the Web. In it, he outlines an ever-increasing divide he sees on the web.
On the one hand you���ve got people experiencing the advertising-driven, tracking-addicted big players who provide a bloated and buggy user experience.
On the hand, you���ve got the more tech-savvy users with tracking blockers (misleadingly called ad blockers) using browsers and search engines that value privacy and performance.
It feels like everyone is now choosing its side. You can���t stay in the middle anymore. You are either dedicating all your CPU cycles to run JavaScript tracking you or walking away from the big monopolies. You are either being paid to build huge advertising billboards on top of yet another framework or you are handcrafting HTML.
Maybe the web is not dying. Maybe the web is only splitting itself in two.
This reminded me of a post by Chris. No, not The Great Divide, although that���s obviously relevant here. Chris wrote a post just yesterday called Other People���s Busted Software is an Opportunity:
One way to look at it is opportunity. If you make software that does work reliably, you���ve got a leg up. Even if your customers don���t tell you ���I like your software because it always works���, they���ll feel it and make choices around knowing it.
I like that optimistic take. If the majority seems to be doubling down on more tracking, more JavaScript, and more enshittification, then there���s a potential opportunity there (acknowledging that you���ve still got to battle against inertia and sunk cost).
This reminds of a fantastic talk that Stuart gave a few years ago called Privacy could be the next big thing:
How do you end up shaping the world? By inventing a thing that the current incumbents can���t compete against. By making privacy your core goal. Because companies who have built their whole business model on monetising your personal information cannot compete against that. They���d have to give up on everything that they are, which they can���t do. Facebook altering itself to ensure privacy for its users��� wouldn���t exist. Can���t exist. That���s how you win.
July 13, 2023
The syndicate
Social networks come and social networks go.
Right now, there���s a whole bunch of social networks coming (Blewski, Freds, Mastication) and one big one going, thanks to Elongate.
Me? I watch all of this unfold like Doctor Manhattan on Mars. I have no great connection to any of these places. They���re all just syndication endpoints to me.
I used to have a checkbox in my posting interface that said ���Twitter���. If I wanted to add a copy of one of my notes to Twitter, I���d enable that toggle.
I have, of course, now removed that checkbox. Twitter is dead to me (and it should be dead to you too).
I used to have another checkbox next to that one that said ���Flickr���. If I was adding a photo to one of my notes, I could toggle that to send a copy to my Flickr account.
Alas, that no longer works. Flickr only allows you to post 1000 photos before requiring a pro account. Fair enough. I���ve actually posted 20 times that amount since 2005, but I let my pro membership lapse a while back.
So now I���ve removed the ���Flickr��� checkbox too.
Instead I���ve now got a checkbox labelled ���Mastodon��� that sends a copy of a note to my Mastodon account.
When I publish a blog post like the one you���re reading now here on my journal, there���s yet another checkbox that says ���Medium���. Toggling that checkbox sends a copy of my post to my page on Ev���s blog.
At least it used to. At some point that stopped working too. I was going to start debugging my code, but when I went to the documentation for the Medium API, I saw this:
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.
I guessed I missed the memo. I guess Medium also missed the memo, because developers.medium.com is still live. It proudly proclaims:
Medium���s Publishing API makes it easy for you to plug into the Medium network, create your content on Medium from anywhere you write, and expand your audience and your influence.
Not a word of that is accurate.
That page also has a link to the Medium engineering blog. Surely the announcement of the API deprecation would be published there?
Crickets.
Moving on���
I have an account on Bluesky. I don���t know why.
I was idly wondering about sending copies of my notes there when I came across a straightforward solution: micro.blog.
That���s yet another place where I have an account. They make syndication very straightfoward. You can go to your account and point to a feed from your own website.
That���s it. Syndication enabled.
It gets better. Micro.blog can also cross-post to other services. One of those services is Bluesky. I gave permission to micro.blog to syndicate to Bluesky so now my notes show up there too.
It���s like dominoes falling: I post something on my website which updates my RSS feed which gets picked up by micro.blog which passes it on to Bluesky.
I noticed that one of the other services that micro.blog can post to is Medium. Hmmm ���would that still work given the abandonment of the API?
I gave permission to micro.blog to cross-post to Medium when my feed of blog posts is updated. It seems to have worked!
We���ll see how long it lasts. We���ll see how long any of them last. Today���s social media darlings are tomorrow���s Friendster and MySpace.
When the current crop of services wither and die, my own website will still remain in full bloom.
July 11, 2023
Permission
Back when the web was young, it wasn���t yet clear what the rules were. Like, could you really just link to something without asking permission?
Then came some legal rulings to establish that, yes, on the web you can just link to anything without checking if it���s okay first.
What about search engines and directories? Technically they���re rifling through all the stuff we publish and reposting snippets of it. Is that okay?
Again, through some legal precedents���but mostly common agreement���everyone decided that on balance it was fine. After all, those snippets they publish are helping your site get traffic.
In short order, search came to rule the web. And Google came to rule search.
The mutually beneficial arrangement persisted uneasily. Despite Google���s search results pages getting worse and worse in recent years, the company���s huge market share of search means you generally want to be in their good books.
Google���s business model relies on us publishing web pages so that they can put ads around the search results linking to that content, and we rely on Google to send people to our websites by responding smartly to search queries.
That has now changed. Instead of responding to search queries by linking to the web pages we���ve made, Google is instead generating dodgy summaries rife with hallucina��� lies (a psychic hotline, basically).
Google still benefits from us publishing web pages. We no longer benefit from Google slurping up those web pages.
With AI, tech has broken the web���s social contract:
Google has steadily been manoeuvring their search engine results to more and more replace the pages in the results.
Me, I just think it���s fuckin��� rude.
Google is a portal to the web. Google is an amazing tool for finding relevant websites to go to. That was useful when it was made, and it���s nothing but grown in usefulness. Google should be encouraging and fighting for the open web. But now they���re like, actually we���re just going to suck up your website, put it in a blender with all other websites, and spit out word smoothies for people instead of sending them to your website. Instead.
Ben proposes an update to robots.txt that would allow us to specify licensing information:
Robots.txt needs an update for the 2020s. Instead of just saying what content can be indexed, it should also grant rights.
Like crawl my site only to provide search results not train your LLM.
It���s a solid proposal. But Google has absolutely no incentive to implement it. They hold all the power.
Or do they?
There is still the nuclear option in robots.txt:
User-agent: GooglebotDisallow: /That���s what Vasilis is doing:
I have been looking for ways to not allow companies to use my stuff without asking, and so far I coulnd���t find any. But since this policy change I realised that there is a simple one: block google���s bots from visiting your website.
The general consensus is that this is nuts. ���If you don���t appear in Google���s results, you might as well not be on the web!��� is the common cry.
I���m not so sure. At least when it comes to personal websites, search isn���t how people get to your site. They get to your site from RSS, newsletters, links shared on social media or on Slack.
And isn���t it an uncomfortable feeling to think that there���s a third party service that you absolutely must appease? It���s the same kind of justification used by people who are still on Twitter even though it���s now a right-wing transphobic cesspit. ���If I���m not on Twitter, I might as well not be on the web!���
The situation with Google reminds me of what Robin said about Twitter:
The speed with which Twitter recedes in your mind will shock you. Like a demon from a folktale, the kind that only gains power when you invite it into your home, the platform melts like mist when that invitation is rescinded.
We can rescind our invitation to Google.
July 4, 2023
Talking about ���web3��� and ���AI���
When I was hosting the DIBI conference in Edinburgh back in May, I moderated an impromptu panel on AI:
On the whole, it stayed quite grounded and mercifully free of hyperbole. Both speakers were treating the current crop of technologies as tools. Everyone agreed we were on the hype cycle, probably the peak of inflated expectations, looking forward to reaching the plateau of productivity.
Something else that happened at that event was that I met Deborah Dawton from the Design Business Association. She must���ve liked the cut of my jib because she invited me to come and speak at their get-together in Brighton on the topic of ���AI, Web3 and design.���
The representative from the DBA who contacted me knew what they were letting themselves in for. They wrote:
I���ve read a few of your posts on the subject and it would be great if you could join us to share your perspectives.
How could I say no?
I���ve published a transcript of the short talk I gave.
Jeremy Keith's Blog
- Jeremy Keith's profile
- 56 followers

