Mucking about with eleventy (again)

If I haven’t updated my blog recently, I’m afraid the reason is something of a cliche: I’ve been mucking about with some website software in an effort to build a new blog. Silly.

Ironically, that began alongside me writing little updates about the process called letters, while I tried to quickly style up the posts themselves to look like little letters.

I did actually achieve this – but as a standalone page. That should have been enough, but what I really wanted was a way to produce these letters like blog posts, and in a way that meant I could easily adjust the design across multiple pages all at once, and repeat certain elements like headers, footers and navigation elements.

What this meant, of course, was trying to learn to use a static site generator again. So this time I really chucked myself in with eleventy/11ty (no idea which is the correct form), and it also meant setting up a kind of developer environment on my Chromebook.

The Chromebook is a decent little developer machine – at least for my needs:

It’s small and portable, and has a really long battery life. This has meant I’ve been carrying it with me on my twice-weekly commutes, giving me some time on the train in the morning and evening to dick around with code. It also has reasonably good sleep/wake which means I can with reasonable confidence just leave my ‘dev environment’ running and then pick up where I left off.

It also runs some kind of Linux container, which is where I’ve been doing a lot of this stuff. I’ve been using a mixture of three discrete types of apps: a web browser; a code editor; and a terminal:

    • The web browser is Chrome. On a Chromebook, unsurprisingly, Chrome is the only viable web browser. You can install and run others as Linux apps, but it’s a pain, and they don’t run well. It’s not quite like Android where you can install any browser and run it natively. But Chrome is perfect for my needs on this Chromebook, both as a web dev browser, and just as my daily driver.
    • The code editor is Caret, which is a native Chrome OS app. This means it is pretty fast and lightweight, and it does most of the things I want it to, like opening a folder/directory tree in the lefthand panel, and the ability to open multiple files in a tabbed interface. It also has syntax highlighting. It does a few other code editor-y type things I haven’t learned how to use yet.
      • I have also been trying Visual Studio Code as a Linux app. Running graphical Linux apps on this Chromebook works reasonably well, but there are definite bottlenecks in performance, and it’s a bit finicky. I can see the appeal of VS Code – I was able to set up an environment like Caret above, but also with a terminal built into the same window. But it has often felt clunky, even just scrolling up and down long lists. This is to do with my extremely low-powered Chromebook’s resources rather than the app itself. I’d probably just use that if I had a different machine.
    • And finally the terminal. Most of the setup for 11ty has been done via the command line. This is inevitably quite a learning curve, particularly when I’m not overly familiar with command line stuff in general. But the tutorials I’ve been following online have been useful. And it’s one of those things where you only really need to learn a handful of commands to achieve what you want to do. So I’ve been cding and lsing and mkdiring and npm starting and toping and clearing and I’ve been able to make 11ty do what I want it to do.

The beauty of running 11ty this way is that you can start a session where 11ty will ‘watch’ a given directory for any new changes to saved files, and then immediately run in the background, then refresh the browser automatically, which will show your new changes if they’re on that page.

It’s an automated version of the type of web design I grew up with: make a change in notepad.exe, ctrl+s to save, switch to the web browser, ctrl+r to refresh. So it’s a nice feature.

11ty’s debugging is also mostly helpful: whenever I’ve b0rked something, the debug output will generally pinpoint what I did and I’ll know how to fix it – or at least Google what I’ve done to figure out why it hasn’t worked.

The final feature of Chrome OS (and others) that I’ve really started to use again is desks or spaces or whatever they might be called: alternate desktop views with sets of windows that you can easily switch between. On Chrome OS you can switch between them with search+] or search+[ (‘search’ here is the key where Caps Lock is on any normal keyboard; you get used to it). Or you can four-finger-swipe on the trackpad, but I don’t really use that.

For my ‘web dev’ purposes, I like having four spaces or virtual desktops running:

  1. a web browser just for general web use – either to take a break and browse the web, or to Google some help docs or tutorials
  2. the terminal, generally with 11ty’s server thing running, and maybe a second tabbed terminal for other things (I only recently learned that you can run more than one terminal at a time and this was mindblowing. I am an idiot.)
  3. my code editor
  4. another web browser pointing at the localhost so I can quickly switch over to see the changes I just made – the automatic browser refresh is usually so quick that by the time the desktop has switched over, the page has refreshed, or is in the process of refreshing. It’s lovely.

I’ve also taken to using these virtual desktops or spaces on other machines. It’s handy to have a ‘work’ space for my remote session to my office PC in addition to my ‘home’ session. I might also have one open running some stuff to do with the Flightradar I have running on my Raspberry Pi. And I occasionally have other spaces running dedicated to a given project (such as proofing articles for a local community newspaper) where it’s helpful to have a browser open as well as a file manager and a document editor.

This is all to say, I guess, that I feel as though I’ve been productive. In the sense of learning to use a set of tools, at least. I did also produce a few ‘letters’ in that time, but I don’t know what to do with those yet.

The most interesting thing for me has been seeing how the initial idea – a series of blog posts that look like letters – has changed over time. It started as a single page with a stack of letters one above the other. I was drawn to the simplicity of a single page with an index at the top to anchors for each letter. But this was tricky to scale, and it makes more sense to have standalone pages… I think.

So I went to each letter having its own page, which really unlocked the potential of 11ty for me – being able to build pages based on set layouts, metadata, and repeated page elements meant that I could treat the content of each letter as one blob, and then construct the pages around them. It also meant I could easily build an index to them as 11ty has some simple tag-based collection tools for listing all items in one collection. The ability to create a set of pages or posts with a pre-determined style and then an index to them is, essentially a simple blog engine. I could also leverage the same metadata – scraping each post’s title, URL and any tags or snippets – to build an RSS feed if I wanted to. That’s definitely something I want to explore.

To that end, I did also try and import my WordPress blog posts into 11ty. I found a neat tool for this which scrapes the contents of an exported set of posts and quickly converts them into markdown, which 11ty seems to like the taste of.

This worked reasonably well but, as with any time I’ve tried to move posts to or from WordPress, the problem was the images. Oh god, the images.

For years now I’ve used a combination of simple img tags as well as proprietary gallery tools whether in WordPress, Tumblr or wherever else, and the former are fine but good god the latter just… break. Sometimes they even break within the same platform when that platform just decides to change how its own gallery tags work. It’s a nightmare.

So I gave up on that.

What I think I’ve settled on is keeping (for now) my WordPress blog as a main blog/website for these purposes, and I may use my letters project as a sort of meta blog in which I can give updates or whatever, rather than blog posts in and of themselves.

This will enable me to tinker with 11ty while not completely rebuilding my WordPress-based blog from scratch. Again – yet. I’d love to get away from the clunky server-side nature of WordPress and have a fully static website, and I feel like I’m significantly closer to that than I was a month ago. But Rome wasn’t built in a day and all that.

So for now I have a sort of offline letters project which I’ll tinker with some more until In can find a simple way to ‘push’ the changes online. This is a whole other topic; 11ty spits out a nice, simple directory of basic HTML files which it’s then up to you to put online somewhere. It’s up to you to figure out how you want to do this, whether github, netlify, or just dumping the files on a web server.

For me, the idea of producing nice clean HTML in a nice neat offline dev environment and then having to use one or possibly even two third-party services just to put the files online seems… backwards. I’d far rather just have a way to rsync (or whatever) the updated files onto the server, replacing the old versions in place. But so far any of the graphical-based methods I’ve tried have not allowed me to move an entire folder structure across without creating each folder individually etc. So I need to work out the simplest method for this which works for me.

I’d ideally like to stick the letters project online as a subdomain of this blog, but that feels like a fiddly integration at the moment. For now, I’ve stuck it on Neocities fairly anonymously, as that seems like a handy place to tinker with things.

So that’s where I am. Some tools learned or re-learned, a new ‘dev environment’ which mostly works for me, and a project that is basically working, but which I hope to improve and tweak to my heart’s content.

The usual cast of characters

It’s a grey morning, although we keep getting glimpses of the summer to come. As the seasons unfold in our new house, with its new garden, in our new location, there is much to observe, learn, and anticipate. It is very exciting.

I’ve been remiss in capturing these events and feelings in writing both public and private. I have at least tried to keep up a decent pace in photographic form – again both public and private. But it’s impossible, this relentless tide. You can only stare at the waves for so long before you have to grab something and wedge it into the ground to try and demark things somehow, disrupting the flow – at least briefly.

Or, more realistically, awkwardly disturbing the natural flow of things before getting overwhelmed and retreating and quietly observing once more.

Despite my lack of writing about things, I of course continue to read and capture stray signals of a wide-ranging cast of characters who inspire, tickle, and infuriate me with their seemingly effortless greatness. But deep down I know how much effort goes into it. I raise a glass to each one of them.

As usual, Mr Reeves has come up with the goods – providing me just what I needed to read and hear at just the right moment – and Mr Rukavina has yet again surprised me with unexpected flattery and kindness. Perhaps I should stop being surprised by now.

I can see dunnocks entering and leaving the hedge outside the window of my home office. It’s extremely satisfying to think they are nesting in there, though it is not without a small background radiation of anxiety. I shouldn’t worry. The birds have been doing this for a long time. Much longer than the time I’ve become aware of it.

The sparrows in the back garden continue to rampage through as many mealworms as I can give them. We recently spotted a terrace of birdboxes under the eaves of a nearby house, which was especially nice after reading this recent Country Diary on the nesting of sparrows (or spuggies!).

Meanwhile, Lev Parikian’s recent entry for that column, in which the lyrical writer simply loses his shit at the prospect of nesting blue tits, perfectly captures sentiments shared by myself and M.

Spring festivals – both human-curated and entirely natural – continue to explode around us with an energy I try to feed upon.

It’s nearly the middle of the year, and I am nearly another year older. Projects and priorities simultaneously come into focus and then blur or shapeshift when I try and catch sight of them again. Crafty devils.

Hastings Rock 87.7FM

The other morning I was doing a bandscan on one of my radios – I do this surprisingly often, even when I don’t expect to find anything new, but it sometimes produces results. It did this week: at the bottom of the FM band I found a signal on 87.7fm playing music, and of a genre that I don’t expect to find at the end of the dial more usually associated with BBC Radios 2, 3 and 4.

I listened for a little longer and as the currently playing track ended, the song faded to silence. A few seconds later another track started playing. Different artist, similar genre. The gap felt like music playing from a CD or some other music library, and I immediately assumed I’d found someone’s micro FM transmitter they were using in their car. Sure enough, that track finished, followed by a short gap of silence, and then yet another song in the same genre began playing, just as though someone was listening on shuffle.

It was just before 9am and our road regularly fills with cars belonging to parents dropping their kids off at a nearby primary school. I left my radio tuned in, as much to see what songs they played next as to test my theory and see if the signal suddenly disappeared as a car drove away.

Well, that never happened.

At about 9am, suddenly there was a voice, and it was actually a radio station I’d found. They’d been having issues with their playout software and had resorted to CDs, and their internet stream was down but their FM signal was okay. I briefly considered that it might be a pirate, but it turned out not to be.

It was, they announced, Hastings Rock, which had got itself a restricted service licence (RSL) to broadcast locally on 87.7MHz for the month of May.

(The station still has the vibes of a pirate – but with a licence to broadcast. Just the mix of enthusiastic spirit and government regulation I seem to find comfort in!)

They’ve been on the air since 30 April. Since then, they’ve sorted out the gremlins: the web stream is apparently working, and the FM broadcast has been rock solid – if you’ll pardon the pun.

In the meantime I’ve seen plenty of advertising around town as well, so hopefully a fair few people have tuned in.

The shows I’ve listened to so far have been slick, with charming and enthusiastic DJs playing songs they seem to love, all based in the genre of rock music. It’s been a mix of eras and sub-divisions of that vast genre – stalwarts like Black Sabbath, Pink Floyd, Status Quo and Metallica, but also Blur and Wolf Alice and Papa Roach and Frank Zappa.

It is enjoyable, unpretentious stuff, and the mix is varied but reliable enough to leave the station on in the background occasionally hearing old favourites, while at other times something prick up your ears enough to warrant looking up what’s playing. (I’d initially been doing this using the usually-reliable Google search widget, but the station’s website seems to be consistently displaying the Now Playing track).

From my brief reading of it, Hastings Rock seems to have a long pedigree going back thirty years or so. I’m not sure if they’ve held an RSL every year in recent times or if this year’s is a return to the airwaves after a period away. I’m not even sure yet if the internet-only stream runs outside of the month of May.

Either way, the hosts sound delighted to be playing the music they love, and the jingles and ads are charmingly local, quaint, yet well-produced: “Witcombe Building Surveyors – we’ll tell you if the building you want to buy is as solid as a rawwwwk!!“. And those ads for a local seaside ice cream and snack food shop – they sell Hastings Rock t-shirts, as well as sticks of Hastings rock, of course! – are getting through to me already. I must pay them a visit this weekend.

The opportunity to bathe in the output of a genre-based station is something I love to do from time to time. And the joy of hyper-local radio is a rare thrill in these days of more centralised ‘local’ stations and synchronised output. It’s great to hear local voices talking about local events. And the music has been almost universally my cup of tea.

I’ll be listening as often as I can for the rest of this month.

Over the Atlantic Radar

Spotify’s Release Radar does a surprisingly good job of alerting me to new releases from rather obscure artists that I do actually have an interest in.

Today’s surprises include Dion Lunadon of early 2000s NZ garage rockers The D4, and fellow kiwi Nik Brinkman, who put out a deep-seated favourite album of mine under the moniker Over The Atlantic in 2006.

Both kiwi artists, and both solo releases from people once associated with another wider act.

There’s even a new track from Silverchair’s Daniel Johns – a similar category to the above (solo release from Australasian man previously in band), but he already has a much wider appeal so is a slightly separate case to the others.

I’m not sure if the weighting for these recommendations is done by something as nuanced as ‘low-level artists from Aotearoa’, or the algorithm knowing that The D4 = Dion Lunadon.

Probably most likely it is just fed by users’ listening habits: listener A listens to bands 1 and 2 and 3; listener B listens to bands 1 and 3, so recommending band 2 seems sensible.

It’s still cool though, and I get a lot of value from it.

Great to be reminded of Nik Brinkman. Looks like I’ve missed out on some recent stuff from him – the track recommended to me this week was an acoustic re-take of a song of his from the last year or two. Looking forward to going back and discovering that.

Nik’s stuff is on Bandcamp, too – so although I can thank Spotify for giving me the heads-up, I also have the option to give him my direct support.

Radio Diary for March 2022

This month I’ve delved further into the local amateur radio community, seeing what repeaters I can reliably pick up and when they tend to be active, as well as more spontaneous conversations and simplex conversations whether scheduled or not.

(Simplex is when two – or more – people are conversing on the same frequency. Kind of like a walkie-talkie. They both need to be in range of one another. A repeater is an automatic device that takes an input on one frequency and spits it out on a slightly different one. You set your radio accordingly, and you can speak to people outside your normal range, as long as the repeater is in the middle of the Venn diagram of both your ranges.)

My little Baofeng does an admirable job at allowing me to listen in to a few local repeaters, and it’s an annoyingly nice device to use given how cheap it is. It even just feels nice in the hand.

Sure, it’s clunky in adjusting the settings and programming channels (I do not have a USB programming cable), but once a set of channels has been programmed in, it’s easy to just switch it on and set it scanning through those channels for any signals, or going to a particular memory channel when you think there’s going to be activity. (It can monitor two channels at once, which is nice.)

The scan function can be set to either stop when it finds a signal and stay on that channel until the signal cuts, or to do so briefly but move on after a few seconds. The latter is preferable as the Baofeng is occasionally susceptible to interference which makes a channel sound active and thus the radio stops on it, playing a burst of static and noise. In time mode, this only lasts a few seconds before continuing the scan in silence; in signal mode the radio will simply stay locked to that burst of static and noise until the user presses a button.

I now routinely just switch the radio on at random times, or around times I know local groups have scheduled meetings/conversations. And although it’s a bit weird just listening in to strangers talking, it is oddly not too weird as a) they know it is a public medium, albeit a very niche one, and b) the conversation matter is usually at least partly to do with radio and related technologies, and usually relating to local clubs, repeaters, atmospheric conditions etc. So there is usually something for me to find interesting or learn from. And the conversations have certain protocols which make them simple enough to follow: the speakers must identify themselves by callsign every now and then, and it’s relatively simple to ‘feel’ the flow of the conversation based on these and other standard greetings.

It’s also oddly calming as – certainly with repeaters – only one can speak at a time. The ‘overs’ (each person’s part of the conversation) can last anything from a brief word to a couple of minutes, and in a flowing conversation, they become a little list of responses to what was said by the previous speaker. In this way it’s a little like letter-writing, or web forum posts, and it makes it easier to follow.

It does, I suppose, get a little harder to follow when the voices all sound similar, the names are generic (and often identical!), and the call signs are said a bit too briefly to catch. But I’ve spoken briefly about amateur radio’s issues with diversity, and that’s a bigger issue for another day.

I have also found that the Baofeng can be set to frequencies set aside for PMR or personal mobile radio. My understanding is that this is a set of frequencies made available to use by unlicensed users, and there is a range of radios available to buy that can only be used on these specific channels and users can talk simplex to one another, like walkie talkies, or CB radio. They seem to be mainly for business use, but I have found people using them for casual conversation (which I think is permitted), and so I’ve added the channels to my scanning frequencies.

If this makes you think of the cliched police scanners which were around years ago, those days are mostly over. Most emergency services use encrypted digital radios now, which can’t be easily monitored. But I have found that the marine world uses analogue channels which are in the range of my Baofeng, and I’ve added some to the memory for scanning when I’m near the coast. I’ve heard a mixture of the Dover coast guard instructing a fishing vessel, as well as two fishing vessels agreeing who should go on which side of who while passing – spoken variously in English, French and Dutch(?).

Anyway. My point is there seems to be a lot of activity in my local area, and I’m finding a lot to learn and enjoy about it all.

Before we moved, I had been studying for the RSGB’s foundation amateur radio licence, and I was pleased that it covered not just the manners and protocols used by amateur radio users, but the technology and science behind it. I held off on taking the exam to get my licence as I wanted to see if I would be able to make use of it once I’d moved – to see if there is an active amateur radio community in this neck of the woods. It seems that there is – so watch this space.

I’ve had an SDR (software defined radio) USB dongle for years now, and it lets me do lots of things.

It’s primarily designed to let the user watch digital terrestrial TV (DVB-T), but it has a wider frequency range than that, and it can be used to scan the radio bands, from broadcast to amateur radio and beyond. It’s a great little toy with many uses.

As with all these things, there are basic ones for about a tenner and amazing ones for a few hundred quid. Mine is the former – and it still does all these things admirably.

One use for these dongles is to decode a very specific frequency which is transmitted by aircraft to relay their altitude, speed, bearing, etc. It’s called ADS-B, and it seems to be broadcast by most aircraft over a certain size.

If you’ve ever used Flight Radar 24 or a similar website to see the details of a flight going overhead, those websites basically use a global array of receivers which grab the ADS-B data local to them, plot it on the map, compare it with others nearby, and then FR24 and others collate it all to make a global map of air traffic.

I’ve always found it very cool, and I was pleased to find that amongst things I already own, I can make a small, automated unit that grabs ADS-B data and submits it in real-time to FR24 (and others). I can also view the local data for just my device, giving me a sort of air traffic controller’s RADAR view of nearby aircraft. And by submitting the data to FR24, I get a free premium subscription, which is nice – I have actually paid for FR24 in the past as I find the service to interesting.

The bits I scraped together were: my SDR dongle, the antenna it came with, a Raspberry Pi Zero (kindly given to me by my buddy Troels years ago – tak, brör!), a few Pi accessories like a USB hub (mainly as the Zero is so tiny and doesn’t have on board wifi), and a few cables.

The antenna that comes with the SDR dongle is small and basic. But it’s the right gear for receiving digital TV, so it does the job. The dongle has a small connector for antennae, which makes it usable with other types, too. ADS-B operates on a wavelength not too far off DVB-T, and the fundamental thing about antennae is that their length should ideally match the wavelength you’re tuning to – or some fraction of it, too.

What this means in reality is that the DVB-T antenna can basically be snipped off to a certain length to optimise it for ADS-B reception. It’s brutal – but it works.

An aside. We moved house recently, and we’re still in the process of finding things in boxes. One of those things was my dongle’s antenna. I started playing with ADS-B a few months ago, and I was using a homemade antenna which I had made for reception of amateur radio signals from the repeater on the International Space Station – more about that another day. But I found when I set up my FlightRadar24 unit that my stupid little antenna, with silly bits of wire hanging off a choccy block terminal strip… Well, it worked. I was getting signals from aircraft 20 or even 30+ miles away!

But I always knew I could do better, and thankfully I found the dongle’s original antenna (along with my RSGB foundation amateur radio licence study book and my revision notebook – convenient). So I re-fitted that to the dongle, trimmed it down to the correct length, and put it back in place. And the results were great! I’m now routinely getting signals from aircraft more than 60 miles away (it’s actually nautical miles for some sort of aviation-related reason), and I find that amazing.

Pro users can get signals of over 200NM, almost at the bounds of line-of-sight reception owing to the curvature of the earth – but even in my range of 60-70NM, being able to get such good data from a cheap device hacked together and just stuck in the window of an upstairs room is incredibly cool to me. It’s slightly mad to think that although I can only see up to the nearest ridge on the hillside, there’s a little radio next to me that can see an aircraft in the air over north west London and beyond. I love it.

I can tell I’m going to want to improve this antenna further. That’s the thirst of radio play: better, more, further. Gear acquisition sydrome, like with photography. So I’ll try and keep that in check and make do with what I’ve got. In many ways, of course purpose-built hardware will do a better job. Part of the joy here is using absolutely basic equipment and getting somewhat decent results out of it.

And finally, a brief nod to leaky feeders.

I first came across these a few years ago reading about their application in US colleges and summer camps to broadcast radio in a small area. The basic principle is using a wire which runs the length of a building or location as an antenna. Normally with wires and antennae you have the antenna at one end spraying the signal out like a sprinkler, and the wire leading to the device is carefully shielded to keep the precious radio waves in.

Imagine a tap with water pumping out, and a hose carrying it to the sprinkler. Just like you wouldn’t normally get any water randomly coming out along the length of the hose itself, you also wouldn’t get any radio signals along the wire either. But what if you wanted to? Leaky feeder! Cut some small, regularly spaced holes along that length of wire (or hose, for my analogy), and you end up with small, controlled bits of radio (or water) leaking out along its whole length.

Now imagine running that cable around the length of a college campus, or strung up around the various bunkhouses dotted around a summer camp ground. Now all the people in any of those spaces can tune a radio and get the signal – and you’re not just broadcasting it out to the wider world.

A more UK- (okay, London-) centric application for the leaky feeder is the tunnels of the London Underground.

Using radios for communication in underground tunnels is notoriously difficult. Radio signals want to radiate out in all directions, but tunnel walls just block them. But what if you run a leaky feeder down the length of the tunnel? Now that signal can be picked up down its whole length. And if it’s wired up correctly, you can have connections going up through the earth to the ticket office and down to platform level, and it all just works.

Fast forward to a year or two ago and Vodafone installed a 4G leaky feeder into the middle part of the Jubilee Line tunnels, giving passengers full 4G when not just in the stations but while travelling through the tubes as well. Amazing.

(Less amazing was that this meant Vodafone pulled out of the coop wifi in use across most? all? tube stations, and now I can no longer use my phone on the Tube unless I’m on the Jubilee Line, which is rare nowadays.)

The Vodafone 4G installation was done, I believe, in conjunction with a new emergency services radio system which – quite understandably – aims to improve their radio use in Tube tunnels.

(There’s a decent Wired article here which gives a fair bit more detail – while oddly referring to all the measurements in inches throughout…)

It all reminds me that one thing that blew my mind when visiting Paris probably 20 years ago was that I had mobile phone signal underground! Looking back, I don’t actually know if this was simply due to the Paris Metro being more of a cut-and-cover shallow network in comparison to the Tube’s deep level tunnels. But perhaps they had installed leaky feeders for mobile phone access way back then? I should check.

But it got me thinking – of course it did – that it would’ve been fairly straightforward to install leaky feeders on the Tube for FM radio reception. Wouldn’t it? If I understand the technology correctly, this would’ve enabled passengers to listen to the radio while travelling underground.

Let’s argue that this would’ve been done in the 1990s when people were less likely to carry a mobile phone and more likely(?) to carry a pocket FM radio. I don’t know. Probably the answer is either a) no one wanted this, and so it never happened, or b) enough people would’ve wanted it, but it’s simply not technologically feasible. I’m sure there’s an obvious answer. I just don’t know what it is, so here I am rambling about my silly concepts.

Anyway, that in a nutshell is another month in radio. If you made it this far, I can only apologise. And I’ll see you again in four weeks or so.