Here's my five latest blog posts - or you can browse a complete archive of all my posts since 2008.

Spleeter: Like Unbaking a Cake, but for Music

I occasionally still get actual emails – you know, like letters, but sort of digital – that make me stop what I’m doing and go “oh, wow, that’s a thing now?” And so it was a few days ago, when my old friend and occasional musical sparring partner Megan dropped me an email containing the phrase “yes, Spleeter is the thing, it separates music into drums, bass, vocals, piano and everything else in exactly the way unbaking a cake works” – and accompanied by an absolutely sublime mashup of Tori Amos’ “Cornflake Girl” with Soundgarden’s “Black Hole Sun” created using said eldritch un-cake-baking technology.

So… I absolutely had to poke this thing around to see how it works. And I did. And I made a video. Check it out.

The track is one of my parody covers, “HTML” (a cover of AC/DC’s “Highway to Hell”), recorded entirely in Logic Pro X - software drums, live guitar, bass and vocals. I’ve then bounced the whole thing down to an uncompressed AIFF file, fed that through Spleeter using the 4stem preset to extract vocals, bass, drums and “everything else”; you can hear the results in the video. Spleeter is available under an MIT license and it’s on GitHub at https://github.com/deezer/spleeter - you’ll need to install Python and the Conda package manager, but I got it running on macOS without too much difficulty.

And yes. Living in the future is weird.

"Spleeter: Like Unbaking a Cake, but for Music" was posted by Dylan Beattie on 25 February 2020 • permalink

Look! I Made a Company!

October 31, 2019 was an interesting date for several reasons. First, it was the date when the United Kingdom was supposed to leave the European Union. Well, one of many such dates. It didn’t. Second, it was Hallowe’en, and I had plans to fly to Cluj-Napoca, the regional capital of Transylvania, to speak at a software conference. Yep – flying to Transylvania on Hallowe’en! Pretty cool, right? #goth

Things didn’t quite work out that way. I found out around lunchtime on the 31st that Skills Matter, the company where I’d worked as CTO since 2017, was being placed into administration with immediate effect. Now, I’ve left jobs before. There’s a couple of months of notice and handover, time to plan your next move, figure out where you want to go, what you want to work on. Not this time. On Thursday I was a salaried employee; on Friday I was unemployed. Or “unexpectedly promoted to freelance”, if you prefer.

I took a late flight to Romania on Friday so I could still speak at Devoxx on Saturday – and by the time I got back to London on Sunday evening, I’d decided I wasn’t going to look for another job. Not that the idea of applying for every “rockstar developer” job on LinkedIn didn’t have a certain appeal… but it was definitely time to try something else. Respond to change, instead of following a plan.

I’ve always loved working with computers, but over the past five years I’ve also discovered that I love teaching. I love travelling, I love working with new people and unfamiliar technologies, seeing how different teams have solved the same problems. The sort of work I wanted to do didn’t seem particularly compatible with any kind of conventional job, so, like a lot of folks who work in IT, I decided to set up my own consultancy, specialising in training, software development and technology strategy. I set myself a three-month deadline, to get something up and running in time for NDC London – and here we are.

Everybody say hello to Ursatile Ltd, Company No. 12414586. That’s right, folks – I have a certificate and everything! I have a website, I have a name, I have a logo, and I have over 20 years’ experience working with computers (which are dumb, but occasionally do some very smart things) and with people (who are smart, but occasionally do some very dumb things) – in fact, the only thing I don’t have right now is clients. Now, I’m no business expert, but I’ve taken some very solid financial advice and apparently the whole “start your own company” thing works a lot better if you have some paying customers. So I’m gonna come right out and say it:

Hire me!

I can teach you to code in .NET and JavaScript. I can teach you about software architecture. I can teach you public speaking, how to write amazing presentations, and how to communicate more effectively with your customers and teammates. I can show you how to design a hypermedia API – ideally after helping you figure out whether you need one and what you’re going to use it for. I can help you grow your team, build your next prototype or untangle your legacy codebase.

If we think face-to-face is the best way to do something, I’ll travel. I grew up in Africa, I’m based in London, and I genuinely love airports. I’ve taught and spoken everywhere from Sydney to Siberia, I’ve met amazing people, I’ve connected with wonderful communities all over the world, and I’d love the chance to spend a couple of days with your team, helping you figure things out but also learning about your company, your technology and your culture.

Remote is good too. I run workshops about how to use Slack, email and online tools like Trello and GitHub effectively; I’m not only happy to work remote, I might even be able to make it more effective for everyone involved.

My calendar for 2020 is pretty open right now, and I’m doing introductory rates for new training courses for the next few months – but get in quick: according to my business plan, by July I’ll be booked solid until the end of 2025 and charging £75K for a five-minute Skype call, so get in touch and let’s book something in before that happens. ;)

So, yeah. My new website is at ursatile.com. That’s not really for you. I mean, take a look by all means, but you’re already here and you’re still reading this, so I figure we’re already cool. The website is so that search engines will find me, and people like your boss will hire me.

I’ll be at NDC London this week – and I’m hosting PubConf London on Friday if you can’t make it to NDC – so if you’re around, come and say hi, and if you’re not, you can always reach me on email at hello@ursatile.com. I’d obviously love to talk to anybody who’s interested in hiring me, but I also want to know what you’re all working on and what you think your challenges are going to be this year.

And finally, a huge thanks to all the people who’ve helped me get this far. It’s been a difficult few months, and there’s still a lot of stuff I need to figure out, but so far everyone I’ve turned to for advice and help has been absolutely lovely – so thank you, all of you!

"Look! I Made a Company!" was posted by Dylan Beattie on 28 January 2020 • permalink

Speaking and Playing at GOTO Oslo 2020

You’ve all heard the phrase ‘real developers ship’ – but have you ever been on a real developers’ ship? I’m really excited to be speaking at GOTO Oslo 2020 – the conference that’s taking place on a ship! We’ll kick off on board the MS Crown Seaways in Copenhagen on Tuesday morning. At 4pm, there’s a break in the schedule while we set sail for Oslo. We arrive in Oslo on Wednesday morning, for another full day of conference sessions and masterclasses - and at 4pm we set sail back to Copenhagen. I’ll be presenting The Art of Code on Wednesday evening, and then joining The Linebreakers on stage for a live set of classic rock tunes with a software twist.

Early bird tickets are on sale until February 1st from https://goto-oslo.com/2020/registrations - it should be a really great event and I’d love to see you there.

"Speaking and Playing at GOTO Oslo 2020" was posted by Dylan Beattie on 17 January 2020 • permalink

Shaving the Jekyll Yak

UPDATE: Thanks to the amazing power of Detective Twitter, I think we figured out what’s going on…

I use Jekyll and Github Pages for pretty much all my standalone websites these days, and I love it – the combination of static HTML, Markdown and YAML provides just enough data-driven behaviour to avoid lots of unnecessary duplication, but without any of the costs or overheads of running databases and server-side processing.

Until today. Today, dear reader, I hit a bump. And it starts, like so many things, at the pub. At PubConf, to be more exact. Todd Gardner is taking a bit of a break from travel in 2020, so I’m going to be running PubConf London at the end of January – which means I get commit access to pubconf.io (yay!) for the next two months. It’s built using Jekyll and hosted on Github Pages, and I’ve had a local version of the PubConf website running on my Macbook for the last 4-5 months without any hassles… except last week, I repaved my Macbook with a clean install of macOS Catalina. And apart from a couple of weird quirks that I’ve managed to isolate, it’s all good – including all my other Jekyll sites.

So I grab a fresh clone of the PubConf source tree, do the bundle install / bundle exec jekyll serve invocation, and… boom.

pubconf.github.io $ bundle exec jekyll serve
Configuration file: /Users/dylanbeattie/Projects/pubconf.github.io/_config.yml
NOTE: Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
Faraday::Error::ClientError.inherited called from /Library/Ruby/Gems/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.
            Source: /Users/dylanbeattie/Projects/pubconf.github.io
       Destination: /Users/dylanbeattie/Projects/pubconf.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
jekyll 3.8.5 | Error:  wrong number of arguments (given 2, expected 1)

That’s not good. And I hadn’t even changed anything yet. So… here begins a protracted bout of yak-shaving.

First thought: perhaps macOS Catalina uses a different default version of Ruby, that’s no longer compatible with this particular Jekyll configuration. So I spend an hour or so installing rbenv, the version manager that lets you run different Rubies side-by-side. No luck – 2.4.5, 2.4.9 and the default 2.6.3 all produce the same result.

I Google the error message. Now, what I’m looking for here is something that’s recent – looks like various folks have had this error message over the years, but I’m trying to work out what might have changed with that stack recently that could be causing this error to start happening. I find this, which looks pretty promising, including this comment from 15 October:

I believe this is actually an issue with a change in sprockets 4.0.0:

I’ve never heard of Sprockets, but according to the internet “Sprockets is a Ruby library for compiling and serving web assets.” Now, there are two things here which I think are interesting:

  1. The code for pubconf.io uses a plugin called jekyll-assets – which I don’t use on any of my other Jekyll sites.
  2. jekyll-assets relies on Sprockets.
  3. Sprockets released version 4.0.0 on October 8th.

At this point, I remember another detail that might be interesting: the PubConf site is built using TravisCI, which means there’s a separate build pipeline I can look at that’s nothing to do with my laptop. Now, here’s where it gets really interesting. I ran a fresh build on TravisCI, using the exact same source tree that built cleanly on November 8th -and boom. Failing build. But, interestingly, it failed with a different error message:

Configuration file: /home/travis/build/PubConf/pubconf.github.io/_config.yml
NOTE: Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
Faraday::Error::ClientError.inherited called from /home/travis/build/PubConf/pubconf.github.io/vendor/bundle/ruby/2.4.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.
            Source: /home/travis/build/PubConf/pubconf.github.io
       Destination: /home/travis/build/PubConf/pubconf.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
  Liquid Exception: Liquid syntax error (/home/travis/build/PubConf/pubconf.github.io/_includes/head.html line 111): Unknown tag 'stylesheet' included in /_layouts/default.html
jekyll 3.8.5 | Error:  Liquid syntax error (/home/travis/build/PubConf/pubconf.github.io/_includes/head.html line 111): Unknown tag 'stylesheet' included 
The command "./_tools/build" exited with 1.

OK, so let’s take a closer look at what happens if I lock my local Ruby for this project to 2.4.5, the same version that’s used on TravisCI:

pubconf.github.io $ rbenv local 2.4.5
pubconf.github.io $ ruby --version
pubconf.github.io $ ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin19]
pubconf.github.io $ rm Gemfile.lock
pubconf.github.io $ gem install jekyll
pubconf.github.io $ gem install bundler
pubconf.github.io $ bundle
pubconf.github.io $ bundle exec jekyll serve

Now, it still didn’t work – but check this out: I’m now getting the same error locally as I get on TravisCI:

Liquid Exception: Liquid syntax error (/Users/dylanbeattie/Projects/pubconf.github.io/_includes/head.html line 111): Unknown tag 'stylesheet' included in /_layouts/default.html
jekyll 3.8.5 | Error:  Liquid syntax error (/Users/dylanbeattie/Projects/pubconf.github.io/_includes/head.html line 111): Unknown tag 'stylesheet' included 

This is progress! Because if my local system fails the same way as TravisCI does, then it stands to reason if I can get it working locally, the same fix will work on the Travis setup.

So… what the hell does Unknown tag 'stylesheet' included mean? Well, like before, there’s a bunch of search results for this, but none of them suggest anything that’s changed within the last few months.

But I did find this issue on the jekyll-assets Github repository, which includes this comment from envygeeks:

Our website is an unreliable source of documentation (right now, I’m working on adding that to my pipeline.. it’ll be a few weeks yet.) Yes, every tag but {% asset %} has been removed. As for the GitHub-pages issue, this issue belongs to them, we’ve not changed anything by way of integration with Jekyll, other than how we hook in, we have people who happily use Jekyll-Assets 3.x with Github Pages and have no problems.

The smoking gun here:

Yes, every tag but {% asset %} has been removed.

Now, this comment is from January 2018. Which suggests that the {% stylesheet %} tag that’s used in the PubConf code templates has been deprecated since the release of jekyll-assets v3.0.0, in November 2017.

Now this is seriously weird. Sure, it explains what’s broken, and the fix is easy – add gem "jekyll-assets", "~> 2.3.2" to the group: jekyll_plugins do section in the project’s Gemfile – but doesn’t give us any clues at all as to why this didn’t break until now. Because as far as I can tell, on 8th November 2019 – just over a month ago – TravisCI was quite happily running that build and ending with jekyll-assets version 2.something and everything just worked. Despite the fact it, apparently, should have stopped working on November 2017, two years earlier, when the first 3.x version of jekyll-assets was shipped.

So, the sprockets thing was a rabbit hole, it’s nothing to do with macOS Catalina, and chatting with Todd, turns out he’s got another site with an identical configuration, on a freshly-paved laptop, that’s pulling down jekyll-assets 2.4.0 without having to specify a version.

If anybody has any bright ideas as to what’s going on, I’d be really curious to hear them. But, as happens so often in the wonderful world of modern web development, I got better things to do than try to figure out what caused the weird impossible bug that’s not only now fixed, but according to all the available evidence should never even have happened in the first place…

UPDATE: THE SOLUTION

One of the best reasons I’ve found for writing blog posts like this is that you get a lot more eyeballs on the problem than just your own – and thanks to some sterling work by @shiftkey, we figured it out. Or at least came up with a pretty plausible explanation.

Travis CI has a 28-day bundler cache, which means if you run a build within 28 days of the previous build, it’ll reuse the same set of dependencies. And it’s been a busy few years for PubConf, with events taking place frequently enough that it’s entirely possible this is the first time since 2017 that 28 days has passed without somebody or something kicking off a Travis CI build. So when I kicked off that build yesterday, that was the first time in literally years that Travis has built the whole project from scratch – and so picked up v3.x of the jekyll-assets plugin.

But really, what’s at the root of all this grief is our old friend, the leaky abstraction. Jekyll and Github Pages offer a really simple, elegant solution for creating static websites – and most of the time, you can just run the handful of commands in the documentation, write your Markdown, git push it and everything works. You don’t have to know about Ruby versions and bundler and Gemfile.lock – all that stuff is supposed to be abstracted away so you can focus on writing content. And it all works great, right up until it doesn’t. We could probably have avoided this problem by locking the plugin to a specific version, or by committing Gemfile.lock to revision control – but there’s drawbacks to both of those approaches, and neither of them warrants any mention in the documentation for Jekyll or for the jekyll-assets plugin.

The other problem with abstractions is that the more complexity they’re hiding, the harder it is to figure out what’s going on when something stops working. Remember, this thing started out as:

jekyll 3.8.5 | Error:  wrong number of arguments (given 2, expected 1)

when the actual thing that went wrong was something closer to:

jekyll 3.8.5 | Error: you haven't run a fresh build in over two years and we've just picked up a major release of the jekyll-assets plugin that hasn't been used in this project before, and which is no longer compatible with the syntax that's used in your website templates. You'll either need to update your templates so you're using the new asset tags required by jekyll-assets 3.x, or modify your _config.yml to specify that you need version 2.x of the jekyll-assets plugin.
"Shaving the Jekyll Yak" was posted by Dylan Beattie on 12 December 2019 • permalink

NDC Meetups in Portugal in January

I’m going to be heading out to Portugal in January to speak at some free meetups – if you’re in Lisbon or Porto and want to kick off 2020 with some cool tech events, come along! I’m gonna be in Porto on January 7th and Lisbon on January 8th talking about the secrets to happy code. It’s a talk that covers a whole range of ideas, from psychology and neurochemistry to user experience design, logging and monitoring, and how we developers can use those ideas to ship better software and create happier teams. Plus pizza, drinks, awesome people and plenty of time to chat.

Thanks to NDC Conferences for putting the whole thing together, and to Farfetch for hosting. And if you like the sound of this, you should check out NDC Porto – two days of workshops and two days of conferences with a fantastic lineup of international speakers, all set in one of the most beautiful cities I’ve ever visited.

The January meetups are free, but you’ll need to register if you’re coming along:

And if anyone wants to join me for francesinhas after the Porto meetup, I’m definitely up for that. :)

"NDC Meetups in Portugal in January" was posted by Dylan Beattie on 11 December 2019 • permalink