Tags: blog

545

sparkline

Thursday, December 7th, 2023

HTML Web Components Are Having a Moment – Cloud Four

I suspect that in a few years’ time, we’ll look back at this month, and especially Jeremy and Eric’s articles as an inflection point. Similar to how Ethan managed to make responsive web design accessible to more people, I think we’re looking at the same thing happening right now for web components.

A great summary (with links) of all the recent buzz around HTML web components:

I don’t know about you, but I read every one of those articles, and for the first time, web components “clicked” for me. Suddenly, I understood how they could fit into our workflow, and where they’d be a good addition. I was excited about web components in a way I’d never been before.

Wednesday, November 8th, 2023

In the margins

John Willshire has been pondering web marginilia AKA stuff you put in your sidebar.

He has a particular fondness for the good ol’ blogroll. I’ve still got my analogue equivalent on my homepage—the bedroll. It’s a list of links to people who’ve stayed over. Maybe I should also have a regular blogroll, but I suspect it would just be a reproduction of feeds I’m subscribed to.

Then there’s marginalia at the level of a blog post, rather than a whole blog. Kevin Marks points out that this is something that Vannevar Bush described his theoretical memex doing—a device I was just talking about. Kevin created a proof of concept showing outbound and inbound links.

Outbound links are annoted versions of the A elements in a blog post. Inbound links are webmentions (which should now include this post of mine).

Kevin has those links in the margins on either side of the blog post. I’ve also got links that go with my blog posts, but they’re displayed linearly:

  1. the post itself,
  2. any responses (webmentions),
  3. related posts, something I only recently added, and
  4. posts from the same day further back in time.

Do they still count as marginalia when they’re presented vertically rather than alongside? For mobile devices, I’m not sure there’s any alternative.

Tuesday, October 31st, 2023

Indie Web Camp Nuremberg

After two days at border:none in Nuremberg, it was time for two days at Indie Web Camp, also in Nuremberg.

I hadn’t been to an Indie Web Camp since before The Situation. It felt very good to be back. I had almost forgotten how inspiring and productive they can be.

This one had a good turnout of around twenty people. We had ourselves an excellent first day of thought-provoking sessions. Then on day two it was time to put some of those ideas into action.

A little trick I like to do on the practical day is to have two tasks to attempt: one of them quite simple, and the other more ambitious. That way, as long as I get the simpler task done, I’ll always have at least something to demo at the end of the day.

This time I attempted three bits of home improvement on my website.

Autolinking Mastodon usernames

The first problem I set myself was ostensibly the simple one. But it involved regular expressions, so then I had two problems.

I wanted to automatically link up Mastodon usernames if I mentioned one in my notes. For example, during border:none I mentioned Brian’s mastodon username in a note: @briansuda@loðfíll.is.

That turned out to be an excellent test case. Those Icelandic characters made sure I wasn’t making unwarranted assumptions about character sets.

Here’s the regular expression I came up with. It’s not foolproof by any means. Basically it looks for @something@something.something.

Good enough. Ship it.

Related posts

My next task was a bit more ambitious. It involved SQL queries, something I’m slightly better at than regular expressions but that’s a very low bar.

I wanted to show related posts when you get to the end of one of my blog posts.

I’ve been tagging all my blog posts for years so that’s the mechanism I used for finding similar posts. There’s probably a clever SQL statement that could do this, but I ended up brute-forcing it a bit.

I don’t feel too bad about the hacky clunky nature of my solution, because I cache blog post pages. That means only the first person to view the blog post (usually me) will suffer any performance impacts from my clunky database queries. After that everything’s available straight from a cached file.

Let’s say you’re reading a blog post of mine that I’ve tagged with ten different keywords. I make a separate SQL query for each keyword to get all the other posts that use that tag. Then it’s a matter of sorting through all the results.

I loop through the results of each tag and apply a score to the tagged post. If the post shares one tag with the post you’re looking at, it has a score of one. If it shares two tags, it has a score of two, and so on.

I decided that for a post to be considered related, it had to share at least three tags. I also decided to limit the list of related posts to a maximum of five.

It worked out pretty well. If you scroll down on my recent post about JavaScript, you’ll see links to related posts about JavaScript. If you read through a post on accessibility testing, you’ll find other posts about accessibility testing. If you make it to the end of this post about Mars colonisation you’ll see links to more posts about exploring our solar system.

Right now I’m just doing this for my blog but I’d like to do it for my links too. A job for a future Indie Web Camp.

Link rot

I was very inspired by Remy’s recent post on how he’s tackling link rot on his site. I wanted to do the same for mine.

On the first day at Indie Web Camp I led a session on link rot to gather ideas and alternative approaches. We had a really good discussion, though it’s always worth bearing in mind that there’ll never be a perfect solution. There’ll always be some false positives and some false negatives.

The other Jeremy at Indie Camp Nuremberg blogged about the session. Sebastian Greger was attending remotely and the session inspired him to spend the second day also tackling linkrot.

In the end I decided to stick with Remy’s two-pronged approach:

  1. a client-side script that—as a progressive enhancement—intercepts outbound links and re-routes them to
  2. a server-side script that redirects to the Internet Archive if the link is broken.

Here’s the JavaScript I wrote for the first part.

It’s very similar to Remy’s but with one little addition. I check to see if the clicked link is inside an h-entry and if it is, I pass on the date from the post’s dt-published value.

Here’s the PHP I wrote for the server-side redirector. The comments tell the story of what the code is doing:

  • Check that the request is coming from my site.
  • There also has to be a URL provided in the query string.
  • Make a very quick curl request to get the response headers from the URL. The time limit is set to 1 second.
  • If there was any error (like a time out), give up and go to the URL.
  • Pick the response headers apart to get the HTTP status code.
  • If the response is OK, go to the URL.
  • If the response is a redirect, go around again but this time use the redirect URL.
  • Construct the archive.org search endpoint.
  • If we have a date, provide it. Otherwise ask for the latest snapshot.
  • Ping that archive.org URL. This time there’s no time limit; this might take a while.
  • If there’s an archived copy, redirect to that.
  • There’s no archived copy. Give up and go the URL anyway.

Not perfect by any means, but it works for the most common cases of link rot.

For the demo at the end of the day I went back into my archive of over 10,000 links and plucked out some old posts, like this one from December 2005. It takes a little while to do the rerouting but eventually you get to see the archived version from the same time period as when I linked to it.

Here’s another link from 2005. Here’s another. Those links are broken now, but with a little patience, you’ll still get to read them on the Internet Archive.

The Internet Archive’s wayback machine really is a gift. I can’t imagine how would it be even remotely possible to try to address link rot on my site without archive.org.

I will continue to donate money to the Internet Archive and I encourage you to do the same.

Monday, October 23rd, 2023

POSSE: a better way to post on social networks - The Verge

A good overview of syndicating from your own website to social network silos:

The platform era is ending. Rather than build new Twitters and Facebooks, we can create a stuff-posting system that works better for everybody.

References and contributors include Cory Doctorow, Manton Reece, Matt Mullenweg and, of course, Tantek.

P&B: Jim Nielsen – Manu

I enjoyed reading this interview with Jim Nielsen, much as I enjoy reading Jim’s blog. He says:

The best part of blogging is what you discover and learn experientially along the way.

That chimes with what Matthias says in the first issue of his new newsletter:

On your personal site, getting it wrong is not a bug, it’s a feature. It’s a chance to start small, take first steps, learn, edit, and improve. It’s an invaluable opportunity to evolve and to grow.

Tuesday, October 17th, 2023

Community Guidelines for Kottke.org

I like Jason’s guidelines—very in keeping with The Session’s house rules.

And I really like his motivation for trying out comments:

The timing feels right. Twitter has imploded and social sites/services like Threads, Bluesky, and Mastodon are jockeying to replace it (for various definitions of “replace”). People are re-thinking what they want out of social media on the internet and I believe there’s an opportunity for sites like kottke.org to provide a different and perhaps even better experience for sharing and discussing information. Shit, maybe I’m wrong but it’s definitely worth a try.

As I said in my comment:

Yes! More experiments like this please! Experiments that aren’t just “let’s clone Twitter”.

Saturday, October 14th, 2023

P&B: Ana Rodrigues – Manu

This makes feel all warm and fuzzy:

At the time, I was disheartened by the tech industry and terrified of doing a tech post. I thought those things were for everyone else but me.

Only at the end of 2017 did something shift inside me, thanks to Jeremy Keith’s talk at the ViewSource conference. I discovered the IndieWeb community, and with that came the reassurance that my “nicheless” blog was absolutely okay.

Thanks to that feeling of acceptance, from 2018 onwards, my confidence really picked up, and I was blogging frequently, including web development things!

Saturday, September 30th, 2023

No more 404

I really, really like the progressive enhancement approach that Remy is taking here with outbound links:

When a real user clicks on a link, it’s swapped out to be redirected through my own endpoint that checks if the URL is still OK, and if so permanently redirects the visitor, otherwise my endpoint checks the Web Archive for the URL and permanently redirects to that instead.

I think I’m going to do the same! I’d have to rewrite the server-side code in PHP, but that shouldn’t be too tricky.

This could a project for the next Indie Web Camp I attend.

Thursday, September 28th, 2023

Brian Koberlein

What a beautiful website!

Friday, September 1st, 2023

Educational Sensational Inspirational Foundational

A historical record of foundational web development blog posts.

Every one of these 42 articles are gold!

It warms my heart to see Resilient Web Design included in this list.

Tuesday, August 29th, 2023

The 100-Year Plan on WordPress.com

Some really interesting long-term thinking from Matt—it’ll be interesting to see the terms and conditions.

Sunday, July 30th, 2023

Nobody cares about your blog.

I just don’t care what you think, here’s my post and you can do nothing about it :)

Thursday, June 15th, 2023

Fifteen, or one-third | A Working Library

Mandy’s been blogging for fifteen years:

The new stuff sits next to the old but doesn’t supplant it, doesn’t shove it out of the way. Each new post lays atop the next like sediment, and all the old layers remain exposed for you to meander through, with their mediocre sentences and lapsed claims, all the sloppy thinking ever on display. It’s a great exercise in humility, keeping a blog for this many years. But in exchange for the keen awareness of how far I still have to go as a writer, I have the space to keep going. I have the home to keep coming back to. And I will. I will return, again and again.

Saturday, June 10th, 2023

Some blogging myths

  • myth: you need to be original
  • myth: you need to be an expert
  • myth: posts need to be 100% correct
  • myth: writing boring posts is bad
  • myth: you need to explain every concept
  • myth: page views matter
  • myth: more material is always better
  • myth: everyone should blog

Monday, April 17th, 2023

Erin Kissane

Erin is back! Add this beautiful blog’s RSS feed to your reader now.

Friday, March 24th, 2023

Hello, internet | Sam O’Neill

I have been reminded time and time again of the utility of writing. How it is a way to turn messy thoughts into coherent ideas, and how – as we all know – practice makes perfect. So I’m going to give it a go.

Welcome to the indie web, Sam!

Monday, March 6th, 2023

I doubled-down on RSS – Eric Bailey

In which Eric says:

Jeremy Keith, you magnificent son of a bitch.

I’ll take it.

Appropriately enough, I read this post in my feed reader.

Thursday, February 16th, 2023

Montaigne

This is an interesting little blogging tool: it turns a folder of notes on your Mac into a website.

  1. Create dedicated folder in the Apple Notes.
  2. Connect it to Montaigne.
  3. Add notes with your content.
  4. Everything will be published to the web automatically.

Wednesday, February 8th, 2023

WriteFreely

I hadn’t come across this before: a barebones blogging tool with built-in fediverse support—neat!

Wednesday, January 11th, 2023

Colin Devroe - Blogging is alive and well

The past, present and future of blogs.