Articles

I tend to write on a wide array of different subjects that happen to interest me at the time. Recently, I've taken to putting these articles up on different sites, so that there's a dedicated site for each topic I want to explore. But I will collect all the articles here, too, so that they're easy to find.

I also cross-post articles to Wossname Industries on Medium so if you're a fan of Medium, it's easy to follow along there. The advantage of Medium is that you can easily respond to articles, so we can get into a conversation about them. (I might put Disqus comments back on this site, but not for now.)

If you're an Apple iOS user, then you can subscribe to the Wossname Industries channel on Apple News. You'll need to open that link on your iOS device, and it'll take you into Apple News, allowing you subscribe to the channel. Posting there is a (laborious) manual process right now, so it might be a day or two before articles appear.

Latest articles

I only just discovered Domain-based Message Authentication, Reporting & Conformance (DMARC) today, as I was writing up some notes for an article on setting up email for a new domain. While I was writing the section on DKIM, I got to thinking, That's all well and good, but how do I advertise the fact that all my email sources are DKIM-signing messages, and that anything which isn't signed is probably spam? It turns out that DMARC is the answer to that question — and more — and it's widely deployed. In addition to allowing you to state that you sign everything, you can also opt in to getting reports from mail service providers with details on what email is getting dropped. Read more…

My school teachers were fond of warning me that my tendency towards sarcasm would get me into trouble one day. But did I ever tell you how it nearly killed me? Well, let's just say it was one of the contributing factors. I'd just moved down to Plymouth, ostensibly to recover properly after a stay in a mental health unit, as a result of my struggles with depression. My care was transferred to the local community mental health team (CMHT), for assessment and monitoring, while I was staying with my parents to recuperate. Read more…

Exporting your data from HealthKit
Exporting your data from HealthKit

I made a discovery this morning: as a regular user, not a ninja iOS app developer, you can export all your data from HealthKit! I have to confess I hadn't specifically looked into it, but I had assumed that all my data was kinda locked up in my phone (and in encrypted backups on iTunes) and that the only way to get access to it was to give particular apps specific permissions to access the data. In short, I assumed I was going to have to fire up Xcode one day and write a wee app to trawl my data and extract it[^1]. Read more…

On the Connectedness of Apps and Services
On the Connectedness of Apps and Services

I use an awful lot of apps and services in my everyday life. More than most, I suspect, because I'm really into tracking what I do, and leaving an electronic breadcrumb trail behind me as I go. I tend to try and externalise the contents of my brain — mostly because if I kept it all in there, I'd explode! — which invariably winds up with lots of notes being written inside various apps. I've also taken to digitising as much of my life as possible, too. Having spent the past couple of years without a place I could really call home (which I've fixed now — yay!), it's been much easier to live life without having to cart around dead trees and bits of plastic. All my data is safely (well, relatively) contained in the aluminium shell of my laptop, and synchronised seamlessly into The Cloud. Read more…

Journalling with Day One 2.0
Journalling with Day One 2.0

I've been using Day One (Day One 2.0 for Mac and Day One 2.0 for iOS) for a few years now, I think. In fact, I've just had a wee look, and the first entry that doesn't look like it was imported from elsewhere is just over four years old. In the time that I've used it, I've amassed 2,848 entries, though some of them have been imported from previous journalling experiments. I thought, since version 2.0 was released today, I'd try writing my first entry in it by explaining how I use Day One, what other tools I've tried in the past, and maybe even mention a couple of features I'm hoping will come to it some day! Read more…

HomeKit-ting out the House
HomeKit-ting out the House

I've always dreamed of having a "smart" house, where I can control the home environment through technology. I've had this dream for longer than I've owned a mobile phone, so it started out with wanting to control my bedroom lights from my PC. I dimly recall building a breakout box for the parallel port, wiring it up to some relays, and writing some x86 assembly to control them. For some reason, my parents weren't too keen on me switching mains electricity though, so the project never made it to completion. Read more…

The Happiness Manifesto
The Happiness Manifesto

I'm working my way through the Happy Startup School's online course on building the sort of company that you wouldn't want to sell. Today's task is to figure out a manifesto for the business that defines the underlying principles through which it operates. I've already written a little about the company's overall mission: to measurably improve the long term happiness of both individuals and organisations. The intent here is to take the ideas from that mission and flesh out a little more detail. Read more…

The Happiness Mission
The Happiness Mission

I'm currently working my way through the Happy Startup School's course on building the sort of company you wouldn't want to sell. I've been toying with the idea for several months now that there's something interesting around the intersection of technology and mental health. I reckon that there are ways in which we can make a positive difference to many people's lives by exploring that intersection. I'm also hoping that I can make a sustainable income out of it, too! Read more…

Last night I learned how to convince vim that ! and ? are part of a keyword. This is awesome, because both those characters are valid characters for method names in Ruby. In particular, it now means that when I hit ctrl-] with my cursor in a method name containing a !, it will take me to the correct method definition. Let's see how. Read more…

I've got a new goal in life, and a new series of projects to achieve that goal. I'm planning to focus my free time to produce articles, screen casts and, hopefully, eventually, a book. They're all around answering my favourite interview question: "When I pull up my Internet Browser, type 'bbc.co.uk' into the address bar, and press return, what happens?"

In this article, I explore why I like it as an interview question, and some of the topics I'll be talking about in the coming months. Read more…

I'm dusting off an old post this evening, since I've spent the entire day coding in Rails on a new side project. As it happens, I had the opportunity to test-drive this article to see if it still works, and it does! For bonus points, it nearly works with Rails 5-rc1, too, which is what I ended up playing with for most of the day. I've run out of time now, but sometime in the next few days, I'll update this article for Rails 5, switching from unicorn to puma — since that's what Heroku now recommend — and trying out Bootstrap v4! But meanwhile, if you've got the opportunity to bootstrap a new greenfield Rails project, give this a shot. Read more…

The Retrospective Prime Directive states: "Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand." I muse a little on what this means. Read more…

The Internet is full of Bad People Who Want To Steal Your Stuff. Well, no, not really. The Internet is full of good people (so long as you don’t read the comments), but it does give the bad people access to an unprecedented amount of computing power, and a large audience with which to play. When you’ve got enough computing power, and enough bandwidth, it’s no big deal to guess somebody’s password by just trying out every possible combination (called a "brute force" attack). Read more…

I've been reading Roddy Doyle's Brilliant over the past couple of evenings, with a view to reading it to our kids, M and Em. We've been looking for ways to explain the Black Dog of Depression to the kids, especially after the events of the past year. The book is as good as its title boldly states. It explains the effects of depression from the perspective of the kids whose parents, or family, are suffering from it. I won't lie: it made me cry, because it struck a real chord. Read more…

I recently read [Counselling For Toads][], an introduction to [Transactional Analysis][] set in the world of [Wind in the Willows][]. Toad (of Toad Hall) is depressed, and his friends are worried about him. They encourage him to seek help in the form of some counselling, to better understand his feelings, and to learn to cope with them. The story is of Toad's adventures in counselling, learning about himself, and figuring out his relationships with his friends. Read more…

Today we're going to explore how to bundle up a sample Ruby on Rails application into Docker images, run containers locally in our development environment, and link the containers together so they can talk to each other. On the way, we'll automate the build with Rake, and discover a little more about how container linking actually works. Read more…

Today we figure out a novel approach to the materialised path pattern for representing hierarchical data in SQL. It takes advantage of PostgreSQL's native support for array types. But it also poses a question: can we make use of ActiveRecord's preloading machinery for eager loading these trees? Read more…

Back in part 1, we had a look at some of the new features of RSpec, and we used those features to create a query-style controller action. In particular, it listed out all the widgets in our inventory management system. This time around, we're going to look at a command-style action: creating a new widget. Read more…

RSpec has come a long way since I last used it in anger. Today, I'm starting through a worked example on test-driving a Ruby on Rails controller with RSpec, Capybara feature specs, and plenty of mocking. Along the way, we'll see some neat new features of RSpec in action. Read more…

I could easily be labelled as a "[Ruby on] Rails Developer" and I'm quite content with the asset pipeline for managing various front-end web development assets (Javascript, CSS, client side templates, images, fonts, etc). But since I'm playing around with Go for back end development on my current project, I thought I'd investigate current practices for managing assets on the front end. This is a rambling log of what I learned while I was playing around. Read more…

I could have sworn that tmux used to launch new shells in the current working directory of my active shell when it spawned new windows/panes. In this post, I discover that it wasn't my imagination, that it no longer happens by default, and how I can get the behaviour back again. Read more…

How did I ever talk myself into getting involved in NanoWriMo? Well, I'd been thinking about it for a while, to be honest. I've really been enjoying writing lately. It's been theraputic. But then a conversation happened on Twitter, and a handful of friends all said they were going to give it a shot and, well, in some fit of craziness, I said "yeah, count me in!". Read more…

Has Bean, my goto place for beans and guides to brewing coffee, doesn't have a guide for pulling espresso (which is fair enough, I suppose, seeing as they're brew guides!). So here's what I do. I wrote this note in EverNote a few weeks back, and was showing it to Annabel this morning (in the hopes of getting a coffee in bed!). She suggested I publish it here. Read more…

Mac OS X on my desktop computer (a newish 27" iMac, using a Promise Thunderbolt disk array for the root filesystem) seems to be having filesystem troubles. I notice it through symlinks going awry, though I'm sure they're not the only victim. I tidied all the errant symlinks up two weeks ago, hoping it was a temporary glitch, but they're back again today. Here's an example: Read more…

I’ve lost track of why now, but I’ve spent a bit of time this afternoon trying to understand how the Rails logger works in production. For years we’ve been using a Hodel 3000 Compliant Logger, which is dead straightforward. Recently, though, we switched back to using the built in logger with Rails, which is a little more subtle. Read more…

Sometimes, when you're writing applications that use a library to talk over the wire to a remote service, it's difficult to see how the high level API the library exposes translates into the on-the-wire protocol. Funnily enough, I was having that very problem yesterday, so I dug tcpflow out my toolbox to better understand what was happening. Read more…

This is a short tutorial on connecting back to your home Mac via SSH, through the magic of MobileMe, then downloading some software, mounting the disk image and installing it, all without the need of the Mac OS X GUI. I use VirtualBox as an example, but it should work for any standard Mac OS X installer. Read more…

Once upon a time, in a galaxy far, far away ... Ok, I'll stop now. A few years back, I was working on a client project and they needed to integrate with a billing platform. They'd already picked Protx (now SagePay) as their platform of choice, and in particular, the Server variant. Wait, I'll backtrack. SagePay has three variants: Read more…

Ruby has the Comparable module, which, if you implement the spaceship operator <=> (winner of "Best Named Operator" 10 years running!) then it will give you a bunch of comparator operators for free (<, <=, ==, >= and >). Win. Enumerable's #sort method uses the spaceship operator to do sorting too, so implementing the spaceship gives you a whole bunch of interesting behaviour pretty much for free. Read more…

Ubuntu is my Linux of choice. It has been for a long time. I've been a huge fan of Debian since the late '90s -- I was a Debian Developer stuck in the NM queue for a few years -- but the release cycle was way too long for my tastes (which invariably meant I kept most of my systems running testing or unstable). So I switched to Ubuntu pretty early on. Read more…

I was invited to give a short introduction to Ruby on Rails at Tech Meetup in Edinburgh a couple of days ago. I'd been racking my brain for days on what to talk about -- 15 minutes is too short for me to give a meaningful introduction to Rails -- and eventually settled on telling a few stories. Read more…

In a previous post, Using git submodules to track plugins I introduced the idea of using git submodules as part of your workflow in developing Rails applications. At the time, Rails itself wasn't using git, but that has finally happened. You can find the official Ruby on Rails source code repository at http://github.com/rails/rails. So, how to we track Rails with git submodules? Read more…

Since the core Ruby on Rails team is finally actually moving to git, and a whole slew of other projects are following in their wake, now seems like a good time to write up my experiences with using git sub-modules to track external dependencies. Back in the world of Subversion, I had been using Piston to track external dependencies. This allowed me to import third party dependencies from their subversion repository into my own application's repository, keep track of specific versions and even make my own local changes. Read more…

Last night I gave a wee presentation to the Scottish Ruby User Group about Capistrano 2, and some of the ways I've been working with it over the last couple of weeks, since for some reason I seem to have been immersed in it for a couple of different projects. It's nothing particularly groundbreaking, but I figured it was useful to demonstrate some of the things it's capable of, and how much easier it makes my life on a daily basis. You can find a copy of the slides here, complete with my speaker notes: Read more…

I've managed to find a new home for the Thumper. The noise it's making is driving me absolutely batty, and I have to switch it off at night. I'm also worried about it overheating as the weather starts to improve. So I've managed to secure a deal with Below Zero, an ISP based in Edinburgh with an amazing world-class network. We're going to shift it into the new place tomorrow, so I'm preparing by changing IP addresses before it moves. Read more…

In a previous post, Thumper: Putting Blastwave on ZFS, I quickly saw some information and jumped to completely the wrong conclusion. In the comments, Boyd kindly pointed out that I should probably investigate it a little more thoroughly. So I have. Just to recap, effectively I am trying to install software, with pkgadd onto a ZFS filesystem. The full filesystem is 17 terabytes, and still has 17TB available. The steps I followed were: Read more…

Since the root file system is a meagre 11GB, I figured I'd try and use my ZFS pool for installing Blastwave which is a system built on top of Solaris' own packaging mechanism with access to lots of extra software that I can't live without. Like sudo for example, at least until I figure out how the Solaris native RBAC mechanism works! So, I did something along the lines of: Read more…

So my email isn't working this morning. Somehow the MX record for woss.name has, well, disappeared. Maybe DreamHost got offended that I switched to GMail and decided to get their revenge. Maybe I buggered something up (I was doing stuff in the DH control panel yesterday afternoon, but I don't think I touched woss.name). Or maybe the gremlins got to it. Read more…

I've been using account_location for a couple of applications recently. It's a really nice way to give individual 'clients' of an application their own domain and when we come to scaling up, it's a really easy way of splitting customers across several hosts. So, yeah, very nice. And it's dead easy to deploy in the first instance -- a couple of DNS records along the lines of: Read more…

This is the first part in hopefully what will become a series on the trials and tribulations I have with a Sun Fire T2000 over the coming weeks while I have it on trial. This is going to be an interesting experience; I have used Sun kit extensively in the past -- I was one of the sysadmins for the Tardis project while at University, and since then I've run a variety of Internet services on Sun hardware, ranging from a SparcStation 5 (homer.mathie.cx, who used to be in the Usenet top 1000 peers, something I consider impressive for that calibre machine sitting behind a 512kb/s leased line) to a Sparc Ultra 30 (initially my desktop machine, eventually drusilla.wossname.org.uk, a replacement for homer). So I'm reasonably familiar, if a little rusty, with Sun hardware and Solaris. OK, OK, homer ran Linux, but at least all the Tardis kit was a mixture of Solaris 7 & 8 (with one machine, brigadier still running SunOS 4.1.4!). Read more…

launchd is Mac OS X 10.4's replacement for init, cron, (x)inetd and all the various startup bits like /etc/init.d or /Library/StartupItems (as was the preferred way in Mac OS X up to 10.3.x). It's all replaced with one supervisor daemon which controls the startup (and restart upon failure) of daemons, schedules regular running of tasks and other hoopy things. I've been reading a little about it at Introduction to Tiger Terminal part 5 and Getting started with launchd trying to figure out how to make it work for me. And I came up with settings, that will launch the Darwin Ports copies of both MySQL and PostgreSQL on demand, which you can download here: mysql4.plist and postgresql.plist. Place those files in /Library/LaunchDaemons and, to get launchd to notice them, run the following: Read more…

It would appear that, somehow, I am the killer of Apple Powerbook G4 CD/DVD drives. It's not that they stop working, it's just that they refuse to relinquish their media. I had always thought it was a problem peculiar to my previous Powerbook, a 12" G4. It would often take days of attempt to get it to cough up the CD I'd inserted. So that I basically stopped using the drive wherever possible, particularly since having a CD inserted -- even unused -- whilst on batteries does unnecessarily drain power. Read more…

I should prefix this with a warning: I know next to nothing about file locking and the implications of what I've just done. However, it now appears to work, and I'm not too worried about simultaneous access to my subversion repository since I'm the only one that uses it. (Even the web interface is currently running from a read-only mirror of the repository.) Read more…

I've been meaning to 'fix' this for ages. I use public-key authentication for my ssh connections wherever possible. I also use screen all the time. (If you use ssh regularly and haven't discovered it already, go look now! There's a bit of a learning curve, but it's well worth it!) But the SSHAUTHSOCK isn't always set correctly inside a screen session, so you can't then use the ssh key on the client computer to authenticate against other hosts. (Oh, I also have a reasonably strict policy of only ever create SSH keys for hosts that I am actually, physically, at the console of, not for hosts I merely ssh into now and then. There are, of course, exceptions to this rule!) Read more…