Posts by James Adam
A Good Enough Engineer
All blog posts
Good Enough is a fully-remote team, and I think it's safe to say that we'll never have a physical office. I've been working remotely for more than ten years, and overall I really like it. I love the flexibility it affords, being more present with our families, and that my employment opportunities are not constrained by the limit of where I can reasonably relocate my physical body every day.
Remote working also particularly suits the kind of work we do. There are many times where we need to discuss things or collaborate deeply on some piece of work, but there are also plenty of occasions where it's perfectly OK, or even desirable, to take time away to do some deeper thinking or exploration.
But being remote from your colleagues does have some downsides, and I think it's important to be conscious of them. Let's talk about one that I like to call the identity anchor.
But if the information you want to stream back from your server to the client has anything specific to the current user — like using the name "You" instead of "James" — you might hit an issue. So far I haven't found this written up on the web anywhere, so hopefully this will help someone else with the same problem.
For the printer project I'm working on, most of the software behind it runs "in the cloud", but there's some software that needs to run beside each printer, to check for new things to print and manage the process of downloading and sending those things to the printer component itself.
In the current incarnation of the project, this "on the desk" software runs on a small Raspberry Pi computer, which acts as a simple bridge between your Wi-Fi and the printer, funnelling data from our servers to thing that will actually print it out.
This is actually the resurrection of a project I began in 2012 with the help of some colleagues, and while I've been updating it, it's been fun to explore some of the original posts and tweets about the project. Quite a few people made their own printer to connect to the open-source architecture, and it was great to read about their experiences.
... except now, 11 years later, pretty much all of those links are dead. Personal blogs are either gone, or redirect en masse to some new domain. Company blogs share a similar fate: with a few notable exceptions, blogs don't survive company website redesigns, let alone when the company is bought or ceases trading. Even links on esteemed and ongoing tech blogs like Wired haven't survived, despite the content still being available if you search hard enough.
And you know what? That's not cool. Cool URLs don't change. And Cool URLs shouldn't die either. URLs that die are not good enough.
We've been using Turbo Streams in some of our recent prototypes, which makes it really easy and fun to get responsive and fun interactions set up. However, we kept having issues with images sent in a turbo stream response.
If the response was delivered by a normal controller render, e.g.
class ThingController < ApplicationController
@thing = Thing.find(params[:id])
respond_to do |format|
format.turbo_stream # renders `update.turbo_stream.erb`
... then any images included in that template would render as you'd expect.
However, any rendering that was triggered by one of the
broadcast_...methods from turbo-rails — which is how you get content to update in "real time" across many clients — would break. So changing the controller above to something more like this:
More to come.
Subscribe to A Good Enough Newsletter to stay tuned.
Back to top