Long Form Posts The RSS feed for Long Form Posts.

  • Don't Leave User Experience For Later

    DDH wrote a post yesterday that resonates with me. This is how he opens:

    Programmers are often skeptical of aesthetics because they frequently associate it with veneering

    I doubt DHH reads this blog, but he could’ve address this post directly at me. I’m skeptical about aesthetics. Well… maybe not skeptical, but if we’re talking about personal projects, I do consider it less important than the functional side of things. Or at least I did.

    Continue reading →

  • Writing Good Data Migration Scripts

    I’m waiting for a data migration to finish, so I’ve naturally got migration scripts on my mind.

    There’s an art to writing a good migration script. It may seem that simply throwing together a small Python script would be enough; and for the simpler cases, it very well might be. But it’s been my experience that running the script in prod is likely to be very different than doing test runs in dev.

    Continue reading →

  • On Sharing Too Much About Too Little

    Manuel Moreale wrote an interesting post today about sharing stuff online:

    Life can be joyful and wonderful and marvellous. But it can also be a fucking nightmare. And yes, it’s important to celebrate the victories and to immortalise the glorious moment. But it’s also important to document the failures, the shitty moments, the dark places our minds find themselves stuck in. It’s all part of what makes us unique after all.

    Continue reading →

  • As Someone Who Works In Software

    As someone who works in software…

    1. I cringe every time I see society bend to the limitations of the software they use. It shouldn’t be this way; the software should serve the user, not the other way around.
    2. I appreciate a well designed API. Much of my job is using APIs built by others, and the good ones always feel natural to use, like water flowing through a creek. Conversely, a badly designed API makes me want to throw may laptop to the ground.
    3. I think a well designed standard is just as important as a well designed API. Thus, if you’re extending the standard in a way that adds a bunch of exceptions to something that’s already there, you may want to reflect on your priorities and try an approach that doesn’t do that.
    4. I also try to appreciate, to varying levels of success, that there are multiple ways to do something and once all the hard and fast requirements are settled, it usually just comes down to taste. I know what appeals to my taste, but I also (try to) recognise that others have their own taste as well, and what appeals to them may not gel with me. And I just have to deal with it. I may not like it, but sometimes we have to deal with things we don’t like.
    5. I believe a user’s home directory is their space, not yours. And you better have a bloody good reason for adding stuff there that the user can see and didn’t ask for.
    Continue reading →

  • The Perfect Album

    The guys on Hemispheric Views have got me blogging once again. The latest episode bought up the topic of the perfect album: an album that you can “just start from beginning, let it run all the way through without skipping songs, without moving around, just front to back, and just sit there and do nothing else and just listen to that whole album”.

    Well, having crashed Hemispheric Views once, I’d thought it’s time once again to give my unsolicited opinion on the matter. But first, some comments on some of the suggestions made on the show.

    Continue reading →

  • Favourite Comp. Sci. Textbooks

    John Siracusa talked about his two favourite textbooks on Rec Diffs #233: Modern Operation Systems, and Computer Networks, both by Andrew S. Tanenbaum. I had those textbooks at uni as well. I still do, actually. They’re fantastic. If I were to recommend something on either subject, it would be those two.

    Auto-generated description: Two textbooks titled Modern Operating Systems and Computer Networks by Andrew S. Tanenbaum are placed side by side on a surface.
    The two Tanenbaums.

    I will add that my favourite textbook I had during my degree was Compilers: Principal, Techniques and Tools by Alfred V. Aho, et al. also known as the “dragon book.” If you’re interested in compiler design in any way, I can definitely recommend this book. It’s a little old, but really, the principals are more or less the same.

    Continue reading →

  • Thou Doth Promote Too Much

    Manual Moreale wrote an interesting post about self promotion, where he reflects on whether closing out all his People and Blogs post with a line pointing to his Ko-Fi page is too much:

    And so I added that single line. But adding that single line was a struggle. Because in my head, it’s obvious that if you do enjoy something and are willing to support it, you’d probably go look for a way to do it. That’s how my brain works. But unfortunately, that’s not how the internet works. Apparently, the correct approach seems to be the opposite one. You have to constantly remind people to like and subscribe, to support, to contribute, and to share.

    Continue reading →

  • Crashing Hemispheric Views #109: HAZCHEM

    Okay, maybe not “crashing”, a.la Hey Dingus. But some thoughts did come to me while listening to Hemispheric Views #109: HAZCHEM that I’d though I share with others.

    Haircuts

    I’m sorry but I cannot disagree more. I don’t really want to talk while I’m getting a haircut. I mean I will if they’re striking up a conversation with me, but I’m generally not there to make new friends; just to get my hair cut quickly and go about my day. I feel this way about taxis too.

    Continue reading →

  • On Micro.blog, Scribbles, And Multi-homing

    I’ve been ask why I’m using Scribbles given that I’m here on Micro.blog. Honestly I wish I could say I’ve got a great answer. I like both services very much, and I have no plans of abandoning Micro.blog for Scribbles, or visa-versa. But I am planning to use both for writing stuff online, at least for now, and I suppose the best answer I can give is a combination of various emotions and hang-ups I have about what I want to write about, and where it should go.

    Continue reading →

  • Moan-routine: Stripe Prices

    I love coding and anything computers. I’ve spent, and continue to spend, a significant amount of my life writing code. And on the whole, it’s been a magical experience.

    But not always.

    Sometimes I encounter something that makes me wonder why? Why was that designed that way? Why doesn’t it work? Why couldn’t this be easier? You encounter something that blocks you or puzzles you, maybe even questions how anything in computers can work at all. You’ve got things to do, and you try your best to work around the problem. Sometimes you succeed. Most times you get blocked and need to find some other way to fix it. And so the frustration builds, with no easy way to dissipate it.

    Continue reading →

  • Small Calculator Commands

    This page documents the extra commands from Small Calculator. These were taken from source code, pretty much as is, but styled to suite the web, and any spelling mistakes fixed. These were retrievable from the application itself by typing “help” follow by the command.

    Available Commands

    The list of available commands are as follows

    BLOCK <statements>    Executes a block of statements
    HELP [topic]          Display help on topic
    DEFFNC <function>     Defines a new function
    ECHO <text>           Displays text on the line
    ECHOEXPR <cmd>        Executes a command and displays the result
    EXEC <file>           Executes a file of commands
    FUNCTIONS             Displays all predefined functions
    IF <pred>             Does a command on condition
    RETURN <val>          Sets the return value
    RETURNEXPR <cmd>      Sets the return value to the result of <cmd>
    
    Type "HELP <command>" to see infomation on a command
    

    BLOCK

    BLOCK {<cmd1>} {<cmd2>} ...
    

    Executes a block of commands.  The commands can be any statement including other block statements.

    Continue reading →

  • Small Calculator

    Date: Unknown, but probably around 2005

    Status: Retired

    Give me Delphi 7, a terminal control, and an expression parser, and of course I’m going to build a silly little REPL program.

    I can’t really remember why I though this was worth spending time on, but I was always interested in little languages (still am), and I guess I though having a desk calculator that used one was worth having. I was using a parser library I found on Torry’s Delphi Pages (the best site at the time to get free controls for Delphi) for something else, and after getting a control which simulated a terminal, I wrote a very simple REPL loop which used the two.

    Continue reading →

  • Self-Driving Bicycle for The Mind

    While listening to the Stratchery interview with Hugo Berra, a thought occurred to me. Berra mentioned that Xaomi was building an EV. Not a self-driving one, mind you: this one has a steering wheel and peddles. He made the comment that were Apple to actually go through with releasing a car, it would look a lot like what Xaomi has built. I haven’t seen either car project myself so I’ll take his word for it.

    Continue reading →

  • On Post Headers

    My answer to @mandaris question:

    How many of you are using headers in your blogging? Are you using anything that denotes different sections?

    I generally don’t use headers, unless the post is so long it needs them to break it up a little. When I do, I tend to start with H2, then step down to H3, H4, etc.

    I’d love to start with H1, but most themes I encounter, including those from software like Confluence, style H1 to be almost the same size as the page title. This kills me as the page title should be separate from any H1s in the body, and styled differently enough that there’s no mistaking what level the header’s on.

    Continue reading →

  • Sorting And Go Slices

    Word of caution for anyone passing Go slices to a function which will sort them. Doing so as is will modify the original slice. If you were to write this, for example:

    package main
    
    import (
    	"fmt"
    	"sort"
    )
    
    func printSorted(ys []int) {
    	sort.Slice(ys, func(i, j int) bool { return ys[i] < ys[j] })
    	fmt.Println(ys)
    }
    
    func main() {
    	xs := []int{3, 1, 2}
    	printSorted(xs)
    	fmt.Println(xs)
    }
    

    You will find, when you run it, that both xs and ys will be sorted:

    Continue reading →

  • Adding A Sidebar To A Tiny Theme Micro.blog

    This is now a standalone Micro.blog Plugin called Sidebar For Tiny Theme which adds support for this out of the box. The method documented below no longer works, but I'm keeping it here for posterity reason.

    I’d though I’d write a little about how I added a sidebar with recommendations to my Tiny Theme’ed Micro.blog, for anyone else interested in doing likewise. For an example on how this looks, please see this post, or just go to the home page of this site.

    Continue reading →

  • Photo Bucket Update: Exporting To Zip

    Worked a little more on Photo Bucket this week. Added the ability to export the contents of an instance to a Zip file. This consist of both images and metadata.

    Screenshot of a finder window showing the contents of the exported Zip file

    I’ve went with lines of JSON file for the image metadata. I considered a CSV file briefly, but for optional fields like captions and custom properties, I didn’t like the idea of a lot of empty columns. Better to go with a format that’s a little more flexible, even if it does mean more text per line.

    Continue reading →

  • Photo Bucket Update: More On Galleries

    Spent a bit more time working on Photo Bucket this last week1, particularly around galleries. They’re progressing quite well. I’m made some strides in getting two big parts of the UI working now: adding and removing images to galleries, and re-ordering gallery items via drag and drop.

    I’ll talk about re-ordering first. This was when I had to bite the bullet and start coding up some JavaScript. Usually I’d turn to Stimulus for this but I wanted to give HTML web components a try. And so far, they’ve been working quite well.

    Continue reading →

  • Complexity Stays At the Office

    It’s interesting to hear what others like to look at during their spare time, like setting up Temporal clusters or looking at frontend frameworks built atop five other frameworks built on React. I guess the thinking is that since we use it for our jobs, it’s helpful to keep abreast of these technologies.

    Not me. Not any more. Back in the day I may have though similar. I may even have had a passing fancy at stuff like this, revelling in its complexity with the misguided assumption that it’ll equal power (well, to be fair, it would equal leverage). But I’ve been burned by this complexity one to many times. Why just now, I’ve spent the last 30 minutes running into problem after problem trying to find a single root cause of something. It’s a single user interaction but because it involves 10 different systems, it means looking at 10 different places, each one having their own issues blocking me from forward progress.

    Continue reading →

  • Message Simulator Client

    Years: 2017 — 2020

    Status: Gone

    I once worked at a company that was responsible for sending SMS messages via an API. Think one time passwords when you log into websites, before time-based OTP apps were a thing. And yeah, this did involve some “marketing” messages, although we were pretty strict about outright spam or phishing messages.

    Anyway, since sending messages costed us money, we had a simulator setup in our non-prod environments which we used for testing. The features were pretty minimal: basically get the list of messages sent through the API, send a status message back, and simulating a reply from the receiver. The messages were kept in memory and there was no UI: everything was done via a web frontend generated from a Swagger spec.

    Continue reading →

  • Implicit Imports To Load Go Database Drivers Considered Annoying (By Me)

    I wish Go’s approach to loading database drivers didn’t involve implicitly importing them as packages. At least that way, package authors would be more likely to get the driver from the caller, rather than load a driver themselves.

    I’ve been bitten by this recently, twice. I’m using a GitHub Linux driver to build an ARM version of something that needs to use SQLite. As far as I can tell, it’s not possible to build an ARM binary with CGO enabled with these runners (at-least, not without installing a bunch of dependencies — I’m not that desperate yet).

    Continue reading →

  • Rubber-ducking: On Context

    I’m torn between extracting auth credentials in the handler from a Go Context and passing them as arguments to service methods, or just passing the context and having the service methods get it from the Context themselves.

    Previously, when the auth credentials just had a user ID, we were doing the former. But we’re now using more information about what the user has access to and if we were to continue doing this, we’ll need to pass more parameters through to the service layer. Not only does this make things a little less neater, it’ll mean the next time we do this, we’ll have to do the whole thing again.

    Continue reading →

  • Rubberducking: On Context

    I’m torn between extracting auth credentials in the handler from a Go Context and passing them as arguments to service methods, or just passing the context and having the service methods get it from the Context themselves.

    Previously, when the auth credentials just had a user ID, we were doing the former. But we’re now using more information about what the user has access to and if we were to continue doing this, we’ll need to pass more parameters through to the service layer. Not only does this make things a little less neater, it’ll mean the next time we do this, we’ll have to do the whole thing again.

    Continue reading →

  • Goland Debugger Not Working? Try Upgrading All The Things

    I’ve been having occasional trouble with the debugger in Goland. Every attempt to debug a test would just fail with the following error:

    /usr/local/go/bin/go tool test2json -t /Applications/GoLand.app/…
    API server listening at: 127.0.0.1:60732
    could not launch process: EOF
    
    Debugger finished with the exit code 1
    

    My previous attempts at fixing this — upgrading Go and Goland — did get it working for a while, but recently it’s been happening to me again. And being at the most recent version of Go and Goland, that avenue was not available to me.

    Continue reading →

  • People Are More Interested In What You're Working On Than You Think

    If anyone else is weary about posting about what projects they’re working on, fearing that others would think they’re showing off or something, here’s two bits of evidence that I hope would allay these fears:

    Exhibit 1: I’m a bit of a fan of the GMTK YouTube channel. Lots of good videos there about game development that, despite not being a game developer myself, I find facinating. But the playlist I enjoy the most is the one where Mark Brown, the series creator, actually goes through the process of building a game himself. Now, you’re not going to learn how to use Unity from that series (although he does have a video about that), but it’s fun seeing him making design decisions, showing off prototypes, overcoming challenges — both external and self imposed, and seeing it all come together. I’m aways excited when he drops one of these videos, and when I learnt today that he’s been posting dev logs on his Discord, so interested am I in this topic that I immediately signed up as a Patreon supporter.

    Continue reading →

  • Github Actions, Default Token Permissions, And Publishing Binaries

    Looks like Github’s locked down the access rights of the GITHUB_TOKEN recently. This is the token that’s available to all Github actions by default.

    After taking a GoReleaser config file from an old project and using it in a new one, I encountered this error when GoReleaser tried to publish the binaries as part of a Github Release:

    failed to publish artifacts:
    could not release:
    PATCH https://api.github.com/repos/lmika/<project>/releases/139475588:
    403 Resource not accessible by integration []
    

    After a quick search, I found this Github issue which seemed to cover the same problem. It looks like the way to resolve this is to explicitly add the content: write permission to the Github Actions YAML file:

    Continue reading →

  • Thoughts on The Failure of Microsoft Bob

    Watching a YouTube video about Microsoft Bob left me wondering if one of the reasons why Bob failed was that it assumed that users, who may have been intimidated by a GUI when they first encountered one, would be intimidated for ever. That their level of skill will always remain one in which the GUI was scary and unusable, and their only success in using a computer is through applications like Bob.

    Continue reading →

  • Build Indicators

    AKA: Das Blinkenlights

    Date: 2017 — now

    Status: Steady Green

    I sometimes envy those that work in hardware. To be able to build something that one can hold and touch. It’s something you really cannot do with software. And yeah, I dabbled a little with Arduino, setting up sketches that would run on prebuilt shields, but I never went beyond the point of building something that, however trivial or crappy, I could call my own.

    Continue reading →

  • Why I Use a Mac

    Why do I use a Mac?

    Because I can’t get anything I need to get done on an iPad.

    Because I can’t type to save myself on a phone screen.

    Because music software doesn’t exist on Linux.

    Because the Bash shell doesn’t exist on Windows (well, it didn’t when I stopped using it).

    That’s why I use a Mac.

    Continue reading →

  • Broadtail

    Date: 2021 – 2022

    Status: Paused

    First project I’ll talk about is Broadtail. I think I talked about this one before, or at least I posted screenshot of it. I started work on this in 2021. The pandemic was still raging, and much of my downtime was watching YouTube videos. We were coming up to a federal election, and I was getting frustrated with seeing YouTube ads from political parties that offend me. This was before YouTube Premium so there was no real way to avoid these ads. Or was there?

    Continue reading →

  • The AWS Generative AI Workshop

    Had an AI workshop today, where we went through some of the generative AI services AWS offers and how they could be used. It was reasonably high level yet I still got something out of it.

    What was striking was just how much of integrating these foundational models (something like an LLM that was pre-trained on the web) involved natural language. Like if you building a chat bot to have a certain personality, you’d start each context with something like:

    Continue reading →

  • Replacing Ear Cups On JBL E45BT Headphones

    As far as wearables go, my daily drivers are a pair of JBL E45BT Bluetooth headphones. They’re several years old now and are showing their age: many of the buttons no longer work and it usually takes two attempts for the Bluetooth to connect. But the biggest issue is that the ear cups were no longer staying on. They’re fine when I wear them, but as soon as I take them off, the left cup would fall to the ground.

    Continue reading →

  • Detecting A Point In a Convex Polygon

    Note: there are some interactive elements and MathML in this post. So for those reading this in RSS, if it looks like some formulas or images are missing, please click through to the post.

    For reasons that may or may not be made clear lately, I’ve been working on something involving bestagons. I tended to shy away from things like this before, mainly because of the maths involved in tasks like determining whether a point is within a hexagon. But instead of running away once again from things more complex than a grid, I figured it was time to learn this once and for all. So off I went.

    Continue reading →

  • Can a Single Line Or Even a Single Word Be Considered a Legitimate Blog Post?

    Yes.

    Continue reading →

  • 2023 Year In Review

    Well, once more around the sun and it’s time again to look back on the year that was.

    Career

    Reflecting on the work we did this past year, there were a few highlights. We managed to get a few major things released, like the new billing and resource usage tracking system (not super exciting, but it was still fun to work on). And although the crunch period we had was a little hard — not to mention the 3 AM launch time — it was good to see it delivered on time. We’re halfway through another large change that I hope to get out before the end of summer, so it’ll probably be full steam ahead when I go back to work this week.

    Continue reading →

  • Day One Waffling

    Thinking about my journalling in Day One recently and I’m wondering if it’s time to move it off to something else, maybe Markdown files in a Git repository. Still mulling it over but every time I weigh the two options in my mind, the simpler Markdown approach always wins out.

    Plain old Markdown files are just way more versatile and portable than what Day One offers. I can put them in a private Hugo (or Eleventy) site and browse them in a web browser, with the backing of a full HTML renderer that offers, amongst other things, figures with captions (yes, I want them that badly). Making them into a book will be more involved than what Day One offers, but I’ve been a little unhappy with how books from Day One are laid out anyway. Doing it from Markdown files will be pricier and more involved, but at least I’ll have a bit more control over how it looks.1

    Continue reading →

  • First Impressions of Eleventy

    I tend to use Hugo whenever I need a static site. But my magpie tendencies have driven me to take a look at Eleventy, and I can definitely see the appeal.

    Going through the Eleventy quick-start guide, I’m quite impressed with how easy it was to setup a bespoke layout for a single site. I’ve done similar things in a few Hugo sites and while I wouldn’t describe it as “hard”, it’s certainly more involved. Hugo’s decent, but it feels quite… engineered. That’s not necessarily a bad thing: putting together something using one of the pre-built themes is quite straightforward. But going beyond a few theme customisations involves a fair bit of work compare to Eleventy.

    Continue reading →

  • 2023 Song of The Year

    Well, believe it or not, my standing Christmas Eve Mass organ gig has come around once more1, so it’s time to decide on this year’s Song of The Year. This is the second post in this series, so please see last year’s post on what this nonsense is all about.

    This year’s nominees are (not too many this year):

    • Wooden Ship, from Antarctica — Suit for guitar and orchestra by Nigel Westlake.
    • Penguin Ballet, from Antarctica — Suit for guitar and orchestra by Nigel Westlake. Not really a new track for me, but I’m including it here anyway as it’s been many years since I last heard it2.

    And the winner is: Wooden Ship by Nigel Westlake 👏

    Continue reading →

  • Test Creek: A Test Story With Evergreen.ink

    Had a play with Evergreen.ink this afternoon. It was pretty fun. Made myself a test story called Test Creek which you can try out (the story was written by me but all the images were done using DALL-E).

    The experience was quite intuitive. I’ve yet to try out the advanced features, like the Sapling scripting engine, but the basics are really approachable for anyone not interested with any of that.

    A screenshot of the Evergreen.ink editor, showing the contents of a card with two options and a preview on the right

    I would recommend not writing too much on a single card. Keep it to maybe two or three paragraphs. Otherwise the text will start to flow over the image, like it does on one of the cards in this story. Evergreen.ink does keep the text legible with a translucent background. But still, it’s just too much text.

    Continue reading →

  • Best, First, Favourite

    On Reconcilable Difference #221, Merlin and John introduced the concept of “Best, First, Favourite”. For a particular category, which would you consider the best (i.e. closest to a perfect representation of that category, in however you define it), which would you recommend someone who’s interested in starting should experience first, and which one is your favourite.

    I thought it was a fun idea, so I’ve put together a few of my own.

    Continue reading →