I take great delight in seeing people reply to my blog posts. I use WebMentions to collect replies from social media and other sites. But which of my posts has the most comments? Here's a snipped to stick in your functions.php file. It allows you to add ?comment-order to any WordPress URl and have the posts with the most comments on top. // Add ordering by comments add_action( 'pre_get_posts', 'pre_get_posts_by_comments' ); function pre_get_posts_by_comments( $query ) { // Do nothing if …
Continue reading →
Why do so many vastly-wealthy tech personalities go mad? My ideal job involves being employed by a millionaire tech-bro. Just before they get on stage, or moments before they file a lawsuit, or an instant before they publish their thought leadership - I will appear to them. I will be dressed in rags, body smeared with excrement, weeping sores blotching my face. I will sidle up to them, lean down, and whisper into their ear "Sic Transit Gloria Mundi!" This used to be the way, of course. When a …
Continue reading →
I've written over 3,000 blog posts throughout the years. This blog has become a repository of my thoughts, feelings, experiments, hopes, and creations. It has also become outdated, buggy, and suffers from link-rot. So, every day, I tend to my digital garden. I go in to old posts and check that the links are still pointing somewhere relevant. Are the embeds still live or do they need replacing? Has my writing somehow been mangled by me buggering about with CSS? Oh, I could use automated…
Continue reading →
I logged into Twitter using a fresh account last week. No followers, no preferences set. The default experience was an unending slurry of racism and porn. I don't care to use Twitter any more. Whatever good that was there is now drowned in a cess-pit of violent filth. I still have a lot of Tweets embedded on this blog. Using WordPress, it was easy to paste in a link and have it converted to an embed. But I don't want to direct people to a dangerous site. So here's a somewhat automated way to …
Continue reading →
(Inspired by this conversation between Jukesie and Himal) Lots of companies encourage their staff to blog. It's free PR! It makes them look like they're on the cutting edge of technology! It helps with recruitment! It can also be a corporate nightmare. What if the developer says something stupid? What if it accidentally reveals something top secret? What if the CEO doesn't like it? And so, gradually, any free-wheelin' developer blog gradually succumbs to the tender mercies of the comms team. …
Continue reading →
If you explore this blog's archives, you'll see that I've been blogging continuously every day since the start of 2020. Before that, I was blogging every month since mid-2008. Today, I am very hungover. Although I usually write a bunch of posts a few days and weeks in advance, I find myself looking at my publishing calendar and seeing it blissfully empty. Part of the reason I blog is that I truly want to learn something new every day - and I want to share that knowledge. Whether it's a cool…
Continue reading →
I wrote my first public blog post on 2004-05-11. I immediately followed it up with a brief review of my BlackBerry. I kept up the blogging for a few months, then it trickled off. I preferred posting on Usenet and other primitive forms of social media. But, by 2007, I was back to blogging on my own site again, and I never really stopped. This blog fluctuates between being a diary, an excuse to rant, and technical writing. It's my site and I can do whatever I want with it. That's rather…
Continue reading →
While attending IndieWebCamp in Brighton a few weeks ago, a bunch of us were talking about blogging. What is post? What should it contain? What's optional? Someone (probably Jeremy Keith said: A blog post doesn't need a title. In a literal sense, he was wrong. The HTML specification makes it clear that the <title> element is mandatory. All documents have title. But, in a practical sense, he was right. This blog post has an empty <h1> element - the document might be semantically invalid,…
Continue reading →
This is the 3,000th blog post I've published on this site! Bloody hell! I first started a blog on Blogger.com in 2004 - twenty years ago. Like all blogs, I managed half a dozen posts before I forgot about it. Cut to 2007 and I decided to launch shkspr.mobi as a weird site dedicated to rendering Shakespeare's plays in txt spk. Judging by Archive.org I was still using Blogger. By 2008 I was blogging most months. And then I never really stopped. In early 2009 I switched to WordPress which led…
Continue reading →
In the IndieWeb movement there's a concept of "POSSE" - Publish Once, Simultaneously Syndicate Elsewhere. You should publish your words, pictures, songs, reviews on your own site. And then you can choose to share them out to where your audience is. Perhaps that's posting the link on Facebook, or a copy of a photo on Instagram, or sharing the episode on YouTube. There's no shame in meeting your audience where they are - but the canonical version should be somewhere you control. But what about …
Continue reading →
One of the things I love about having a database-backed blog like WordPress is that's it opens up a delightful range of possibilities for displaying content. I've read and reviewed around 300 books over the last few years. So I wrote a scrap of code which goes through all my book reviews, grabs their cover and rating, and displays them in a nice grid. You can visit it at shkspr.mobi/blog/library You know how when you're at a friend's home you rummage through their bookshelf? That's the same…
Continue reading →
I have written a lot of blog posts. In some of those posts I link to other posts on my site. What's the easiest way of displaying those internal incoming links? Here's what it looks like: Code All we need to do is search WordPress for the URl of the current page. Loop through the results. Then display those links. $the_query = new WP_Query( array( 's' => get_the_permalink(), // This post 'post_type' => 'post', // Only posts, not pages "posts_per_page" =>…
Continue reading →