One problem I have when 3D printing is that it’s hard to gauge whether there’s enough filament left on a roll
to complete a print. Sometimes it’s obvious when the print is small or the roll is full, but often it’s not.
If I’m unsure about it, I end up obsessing over the printer instead of just leaving it to do its thing.
The typical approach to this problem is to use a run-out sensor, which stops the printer when it detects that
the filament is no longer running through it. I’d rather know in advance though: it’s no good stopping the
print if I’m making something that has to look nice and now half of it is one colour and the remainder will be
something else.
While browsing around for ideas, I came across a project that used a load cell to measure the weight of the
filament roll. I didn’t really know what a load cell was, but decided to do some research and see if I could
build my own. I didn’t actually read the article I found, intending to figure things out on my own if I could.
Adventures in 3D printing
Published on Sep 17, 2023
I’d been idly considering getting a 3D printer for a while, but have only recently taken the plunge. I picked
up a Sovol SV06 from
Amazon for £199.99, which is a model commonly recommended for beginners. About three weeks later, I think I’ve
finally finished fixing all the problems the printer has, and thought I’d document them.
Setup and out of the box performance
The setup of the printer itself was straight forward. Most parts are assembled, you just have to bolt the
frame together, bolt the various parts to the frame, and connect some wires. The hex bits in the
iFixit Mako Bit Set
were a godsend for this, as the included hex keys were a bit flimsy.
Upgrading the RAM in a Dell G15 laptop
Published on Jul 29, 2023
I currently use a Dell G15 laptop for work. It has served me well for a little over a year, but recently it
has been struggling a little with my day-to-day workload. It came with 32GB of RAM — the highest possible
specification at the time — but that is apparently no longer enough for me.
For a recent project, I was working on a Rust library used in an Android app. That meant running the usual
glut of Android tools (Android Studio, an emulator and at least one Gradle daemon) alongside a normal IDE
(IntelliJ IDEA). Throw in a web browser and a couple of electron apps, and I often managed to use all 32GB.
When you start swapping memory out to an encrypted disk — even an SSD — it doesn’t make for great performance.
At first, I tried to work around this by enabling the Linux out-of-memory (OOM) killer, but it turns out that
it’s not too good with Electron apps: it will kill the large browser process, but then the small Electron
wrapper will just respawn it.
Generating infinite avatars
Published on Dec 30, 2022
I recently added a new ‘about’ section to the top of my website. Like most about pages, it has a picture.
Instead of a normal photograph, however, you’ll see an AI-generated avatar. This is admittedly fairly trendy
at the minute – apps like Lensa offer to make you profile pictures if you give them a set of photos and some
cash – but I’ve done something a bit different.
You see, there is not just one image that has been carefully curated, edited, and uploaded. No, the image you
see quite possibly has never been seen before and will never be seen again. It’s unique. Just for you.
Background: Stable Diffusion, DreamBooth, et al
You’ve probably heard of Stable Diffusion, the open
text-to-image model developed by LMU Munich. Given a text prompt it starts with a random array of static and
repeatedly transforms it, each step moving away from pure entropy and towards a real image that befits the
prompt. It stands in contrast to competitors like DALL-E and Midjourney in both the code and the model being
freely and publicly available.
Docker reverse proxying, redux
Published on Dec 6, 2022
Six years ago, I described my system for
configuring a reverse proxy for docker containers. It involved six containers including a key-value store and
a webserver. Nothing in that system has persisted to this day. Don’t get me wrong – it worked – but there were
a lot of rough edges and areas for improvement.
Microservices and their limitations
My goal was to follow the UNIX philosophy of “do one thing and do it well”. Unfortunately, that doesn’t really
work when applied to network services that have to interact with one and other. UNIX tools are built upon a
common file system and simple data passed over STDIN. Microservices don’t have that shared foundation. You
could make one: companies that use microservices in anger often have a team that deals with the “developer
experience” of creating and using microservices. But as a solo developer that’s not something I wanted to
spend my time doing.