Long Form Posts

    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.

    But they’re a decent pair of headphones, and I wasn’t keen on throwing them out or shopping for another pair. So I set about looking for a set of new ear cups.

    This is actually the second pair of replacement cups I’ve bought for these headphones. The first had a strip of adhesive that stuck the cup straight on to the speaker (it was this adhesive that was starting to fail). I didn’t make a note of where I bought them and a quick search didn’t turn up anything that looked like them. So in December, I settled for this pair from this eBay seller. Yesterday, they arrived.

    New set of ear-cups for a JBL E-series bluetooth headphones
    The new set of ear cups.
    A black bluetooth headphone on a table, with the left cup fallen off exposing the speaker, and the right cup slightly removed from it's original position
    They couldn't have come sooner.

    First impressions were that they were maybe too big. I also didn’t see an adhesive strip to stick them on. Looking at the listing again, I realised that they’re actually for a different line of JBL headphones. But I was a little desperate, so I set about trying to get them on.

    The headphones in question on an old piece of paper with the left cup replaces with the new ear-cups and the right speaker exposed and bits of old adhestive laying on the paper
    Removing the old adhesive, with my fingers (yeah, I probably should buy some tools).

    It turns out that they’re actually still a good fit for my pair. The aperture is a little smaller than the headphone speaker, but there’s a little rim around each one and I found that by slotting one side of the padding over the rim, and then lightly stretching and rolling the aperture around the speaker, it was possible to get them on. It’s a tight fit, but that just means they’re likely to stay on. And without any adhesive, which is good.

    The headphones with the right cup in profile demonstrating the roll of the padding onto the rim
    It's a bit hard to see, but if you look at the top of the right cup, you can see how the padding was rolled onto the speaker from the bottom.

    After a quick road test (a walk around the block and washing the dishes), I found the replacement to be a success. So here’s to a few more years of this daily driver.

    The headphones in profile with the new replacement cups
    Headphones with the new cups. They look and feel pretty good.
    The old replacement cups on a table, with the left cup loosing it's vinyl skin revealing the actual foam.
    The old cups, ready for retirement.

    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.

    First stop was Stack Overflow, and this answer on how to test if a point is inside a convex polygon:

    You can check that easily with the dot product (as it is proportional to the cosine of the angle formed between the segment and the point, if we calculate it with the normal of the edge, those with positive sign would lay on the right side and those with negative sign on the left side).

    I suppose I could’ve taken this answer as it is, but I know if I did, I’d have something that’ll be little more than magic. It’ll do the job but I’d have no idea way. Now like many, if I can get away with having something that works without me knowing how, I’ll more likely to take it. But when it comes to code, doing this will usually comes back to bite me in the bum. So I’m trying to look for opportunities to dig a little deeper than I would in learning how and why it works.

    It took me a while, and a few false starts, but I think I got there in the end. And I’d figured it would be helpful for others to know how I came to understand how this worked at all. And yeah, I’m sure this is provable with various theorems and relationships, but that’s just a little too abstract for me. No, what got me to the solution in the end was visualising it, along with attempting to explain it below.

    First, let’s ignore polygons completely and consider a single line. Here’s one, represented as a vector:

    A vector drawn on graph paper pointing to the top-right

    Oh, I should point out that I’m assuming that you’re aware of things like vectors and trigonometric functions, and have heard of things like dot-product before. Hopefully it won’t be too involved.

    Anyway, we have this line. Let’s say we want to know if a specific point is to the “right” of the line. Now, if the line was vertical, this would be trivial to do. But here we’ve got a line that’s is on an angle. And although a phrase like “to the right of” is still applicable, it’ll only be a matter of time before we have a line where “right” and “left” has no meaning to us.

    So let’s generalise it and say we’re interested in seeing whether a point is on the same side as the line’s normal.

    Now, there are actually two normals available to us, one going out on either side of the line. But let’s pick one and say we want the normal that points to the right if the line segment is pointing directly up. We can add that to our diagram as a grey vector:

    That same vector pointing to the top-right, with a normal originating from the same origin pointing to the bottom-right

    Now let’s consider this point. We can represented as a vector that the shares the same origin as the line segment1. With this we can do all sorts of things, such as work out the angle between the two (if you’re viewing this in a browser, you can tap on the canvas to reposition the green ray):

    That same vector and normal, now with an additional line coming from the origin drawn rotated 48Ā° clockwise from the original vector

    This might give us a useful solution to our problem here; namely, if the angle between the two vectors falls between 0Ā° and 180Ā°, we can assume the point is to the “right” of the line. But we may be getting ahead of ourselves. We haven’t even discussed how we can go about “figuring out the angle” between these vectors.

    This is where the dot product comes in. The dot product is an equation that takes two vectors and produces a scalar value, based on the formula below:

    a ā€¢ b = a x b x + a y b y

    One useful relationship of the dot product is that it’s proportional to the cosign of the angle between the two vectors:

    a ā€¢ b = | a | | b | cos Īø

    Rewriting this will give us a formula that will return the angle between two vectors:

    Īø = cos -1 ( a ā€¢ b | a | | b | )

    So a solution here would be to calculate the angle between the line and the point vector, and as long as it falls between 0 and 180Ā°, we can determine that the point is on the “right” side of the line.

    Now I actually tried this approach in a quick and dirty mockup using JavaScript, but I ran into a bit of an issue. For you see, the available inverse cosign function did not provide a value beyond 180Ā°. When you think about it, this kinda makes sense, as the cosign function starts moving from -1 back to 1 as the angle is greater than 180Ā° (or less than 0Ā°).

    But we have another vector at our disposal, the normal. What if we were to calculate the angle between those two?

    That same vector and normal, and the additional line coming from the origin drawn 136Ā° anti-clockwise from the normal, with text indicating that the dot product is -47500

    Ah, now we have a relationship that’s usable. Consider when the point moves to the “left” of the line. You’d notice that the angle is either greater than 90Ā° or less than ā€“90Ā°. These just happen to be angles in which the cosign function will yield a negative result. So a possible solution before is is to work out the angle between the point vector and normal, take the cosign, and if it’s positive, the point will be on the “right” side of the line (and it’ll be on the “left” side if the cosign is negative).

    But we can do better than that. Looking back at the relationship between the dot product and the angle, we can see that the only way this equation could be negative is if the cosign function is negative, since the vector magnitudes will always return a positive value. So we don’t even need to work out angles at all. We can just rely on the dot product between the point and the normal.

    And it’s here that the solution clicked. A point is to the “right” of a line if the dot product of the point vector and the “right”-sided normal is positive. Look back at the original Stack Overflow answer above, and you’ll see that’s pretty much what was said there as well.

    Now that we’ve got this working for a single line, it’s trivial to extend this to convex2 polygons. After including all the line segments, with the normals pointing inwards, calculate the dot product between each of the normals with the point, and check the sign. If they’re all positive, the point is within the polygon. If not, it’s outside.

    A hexagon drawn in the centre of graph paper with normals and lines originating at each vertex and converting at a single point located in the centre of the hexagon. The lines indicating a positive dot product for each one and that the point is within the hexagon

    So here’s an approach that’ll work for me, and is relatively easy and cheap to work out. And yeah, it’s not a groundbreaking approach, and basically involved relearning a bunch of linear algebra I’ve forgotten since high school. But hey, better late than never.


    1. Well, technically these vectors should be offset from the global origin, but they’re translated in these plots for demonstration purposes. ↩︎

    2. I’m not sure if this is applicable to concave polygons, where the angle between segments can go beyond 180Ā°. ↩︎

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

    Yes.

    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.

    Highlights aside, there’s not much more to say here. Still feel like my career is in a bit of a rut. And although I generally still like my job, it’s difficult seeing a way forward that doesn’t involve moving away from being an “individual contributor” to a more managerial role. Not sure I like that prospect ā€” leading a squad of 6 devs is probably the maximum number of people I can manage.

    And honestly, I probably need to make thinking of this more of a priority for the new year. I’ve been riding in the backseat on this aspect of my life long enough. Might be time to spend a bit more of effort on driving aspects of my career, rather than letting things just happen to me.

    Ok, that’s out of the way. Now for the more exciting topics.

    Projects

    Dynamo-browse is ticking along, which is good. I’ve added a few features here and there, but there’s nothing huge that needs doing to it right now. It’s received some traction from others, especially people from work. But I gotta be honest, I was hoping that it would be better received than it did. Oh yes, the project website gets visitors, but I just get the sense it hasn’t seen as many takers as I had hoped (I don’t collect app metrics so don’t know for certain). I’d like to say this it doesn’t matter: so long as I find it useful (and I do), that’s all that counts. And yeah, that’s true. But I’d be lying if I said that I wished others would find it useful as well. Ah well.

    One new “major” project released this past year was F5 To Run. Now this, I’m not expecting anyone else to be interested in other than myself. This project to preserve the silly little games I made when I was a kid was quite a success. And now that they’re ensconced in the software equivalent of amber (i.e. web technologies) I hope they can live on for as long as I’m paying for the domain. Much credit goes to those that ported DosBox to a JavaScript library. They were reasonably easy to port over (it was just making the images), and it’s a testament to their work seeing stuff built on primitive 90’s IBM PC technologies actually being the easiest things to run this way. I just need to find a way to do this to my Windows projects next.

    Another “major” project that I’m happy to have released was Mainboard Mayhem, a Chips Challenge clone. This was one of those projects that I’ve been building for myself over the last ten years, and debating with myself whether it was worth releasing or not. I’ve always sided on not releasing it for a number of reasons. But this past year, I figured it was time to either finish and release it, or stop work on it all together. I’m happy with the choice I made. And funnily enough, now that it’s finished, I haven’t had a need to tinker with it since (well, apart from that one time).

    There’ve been a few other things I worked on this past year, many which didn’t really go anywhere. The largest abandoned project was probably those reclaimed devices built for schools I was planning to flash to be scoring devices. The biggest hurdle is connecting to the device. The loader PCB that was shipped to me didn’t quite work as the pins weren’t making good contact (plus, I broke one of them, which didn’t improve things). The custom board I built to do the same thing didn’t work either, the pins were too short and uneven. So I never got to do anything with them. They’re currently sitting in my cupboard in their box, gathering dust. I guess I could unscrew the back and hook wires up to the appropriate solder points, but that’s a time investment I’m not interested in taking at the moment.

    This project may rise again with hardware that’s a little easier for me to work with. I have my eye on the BeepBerry, which looks to be easier to work with, at least with my skills. I added my name to the wait-list, but hearing from others, it might be some time before I can get my hands on one (maybe if the person running the project spent less time fighting with Apple, he can start going through the wait-list).

    So yeah, got a few things finished this year. On the whole, I would like to get better at getting projects out there. Seeing people like Robb Knight who seem to just be continuously releasing things has been inspiring. And it probably doesn’t need to be all code either. Maybe other things, like music, video, and written prose. Throw a bit of colour into the mix.

    Speaking of written proseā€¦

    Writing And Online Presence

    The domain reduction goal continues. I’m honestly not sure if it’s better or worse than last year. I didn’t record the number of registered domains I had at the start of 2023, but as of 27 December 2023, the domain count is at 25, of which 16 have auto-renew turned on.

    Domains Count
    Registered 25
    With auto-renew turned on 16
    Currently used for something 13
    Not currently for something but worth keeping 3
    Want to remove but stuck with it because it’s been shared by others 1

    Ultimately I’d like to continue cutting down the number of new domains I register. It’s getting to be an expensive hobby. I’ve started to switch to sub-domains for new things, so I shouldn’t be short of possible URLs for projects.

    I’m still trying to write here once a day, mainly to keep me from falling out of the habit. But I think I’m at the point where I can start thinking less about the need for a daily post, and focus more towards “better” posts as a whole. What does “better” mean? šŸ¤· Ultimately it’s in the eye of the beholder, but publishing less posts that I find “cringeworthy” is a start. And maybe having less posts that are just me complaining about something that happened that day. Maybe more things about what I’m working on, or interesting things I encounter. Of course this is all just a matter of balance: I do enjoy reading (and writing) the occasional rant, and writing about things that frustrate me is cathartic. Maybe just less of that in the new year.

    I did shut down the other blog I was using for tech and project posts. It’s now a digital garden and knowledge base, and so far working quite well. I’m so glad I did this in retrospect. I was paying unnecessary cognitive overhead deciding which blog a post should go. They all just go here now.

    Travel

    Oof, it was a big year of travel this past year. The amount of time I’ve spent away from home comes to 10 weeks in total, a full 20% of the year. This might actually be a record.

    The highlight of the past year was my five-week trip to Europe. Despite it being my third visit to Europe (forth if you include the UK), I consider this to be what could only be described as my “Europe trip”. I had a lot of great memories there, and stacks of photos and journal entries that I’ve yet to go through. I’m please that it seemed to have bought my friends and I closer. These sorts of trips can make or break friendships, and I think we left Europe with tighter bonds than we arrived.

    One other notable trip was a week in Singapore. This was for work, and much like my previous work trips, mainly consisted of being in offices. But we did get a chance to do some site-seeing and it was a pleasure to be able to work with those in Singapore.

    And of course, there was another trip to Canberra to look after my sisters cockatiels, which was always a pleasure.

    Not sure what this new year will bring in terms of travel. I’m predicting a relatively quiet one, but who knows.

    Books And Media

    This is the first year I setup a reading goal. I wanted to get out of the habit of starting books and not finishing them (nothing wrong with not finishing books; I was just getting distracted). This past year’s goal was quite modest ā€” only 5 books ā€” but it’s pleasing to see that I managed to surpass that and actually finish 7 books1.

    Keep Going: 10 Ways to Stay Creative in Good Times and Bad What to Do When It's Your Turn Anything You Want Do The Work! Turning Pro The Song of Significance Evil Plans: Having Fun on the Road to World Domination Hell Yeah or No

    As for visual media, well, there’s nothing really worth commenting about here. I did have a go at watching Bojack Horseman earlier in the year, and while the first few series were good, I bounced after starting the forth. I’ve also gave Mad Men a try, after hearing how well it was received by others, but I couldn’t get through the first series. I found the whole look-at-how-people-lived-in-the-’60s trope a bit too much after a first few episodes.

    In general, I’ve found my viewing habits drift away from scripted shows over this past year. I’m more than happy to just watch things on YouTube; or more accurately, rewatch things, as I tend to stick with video’s I’ve seen before. And although I’ve got no plans to write a whole post about my subscriptions just yet (the sand just feels too nice around my face), I did get around to cancelling my Netflix subscription, seeing how little I used it this past year.

    As for podcasts, not much change here. With a few exceptions, the shows I was listening to at the end of the year are pretty close to what I was listening to at the start. But I did find myself enjoying these new shows:

    These are now in my regular rotation.

    The 2023 Word

    My 2023 word for the year was generous, trying to be better at sharing things. And I like to think I’ve made some improvements here. It may not have come across in a summary post like this, but I’ve tried to keep it front of mind in most things I work on. I probably can do a little better here in my personal life. But hey, like most themes, it’s always a constant cycle of improvement.

    I must say, this last year has been pretty good. Not all aspects of it ā€” there will always be peeks and valleys ā€” but thinking back on it now, I’ve felt that it’s been one of the better ones recently. And as for this review, I’ll just close by saying, here’s to a good 2024.

    Happy New Year. šŸ„‚


    1. It’s a good thing I was tracking them as I though I’d only get to 6 this year. ↩︎

    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

    Iā€™ll miss the writing experience from Day One though, especially things like recording the current location and weather for each entry. Iā€™m still wondering what the best substitute for it will be.

    Iā€™m toying around with a web-app I whipped up yesterday. A web-app will be fine for those times Iā€™m online, but how would it work if Iā€™m in an aeroplane? Iā€™m also a little worried about trying it for a while, then abandoning it and leaving it to rot. I guess one thing going for it is that at-least it wonā€™t lock me out of any entries, since theyā€™ll just be Markdown files in Git.

    Iā€™m also considering iA Writer. I havenā€™t tried it yet but from my understanding, itā€™ll just write Markdown files to a directory, which is the goal. But Iā€™m not sure how I can get the posts and media from there to a Git repo.

    Anyway, thatā€™s the current thinking. Will keep you posted on what happens.


    1. Of course, the challenge there will be to overcome the friction involved in doing this work to actually get the book made. ↩︎

    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.

    Thereā€™s still much more Iā€™ve got to learn, like how Eleventy handles resource bundling (I like how Hugo handles this directly in the template) and configuration (how Eleventy does this is very Node-esk, which is not my preferred approach). But itā€™s definitely something Iā€™ll keep in my toolkit.

    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 šŸ‘

    Album cover of the Australian Composers Series, 'Out of the Blue', by Nigel Westlake, performed by the Tasmanian Symphony Orchestra. Copyright the Australian Broadcasting Corporation

    Specifically, the version played by the Tasmanian Symphony Orchestra and released by the ABC. This has been quite a special song for me this year and was pretty certain to be the winner for most of the year. Well, since first hearing it in May, there hasn’t been another one to top it. So bravo!

    But that’s not to say there weren’t other tracks discovered this year. The honourable mentions:

    • The Last Place on Earth, from Antarctica ā€” Suit for guitar and orchestra by Nigel Westlake. A good song, but a little too complex for me.
    • “Extremes”, from Music From the Private Life of Plants by Richard Grassby Lewis. Really wish I had a recent link to this (the only one I know of that works is one to a defunct music store, picked up by the Wayback Machine, that previously sold this album).
    • The Knight, from the Tunic OST by Lifeformed & Janice Kwan. Not a completely new album to me, but until now, I tended to skip this track.
    • Epic Grandpa, by Izioq.

    1. It’s the only gig on my calendar actually. ↩︎

    2. And to have at least one other nominee with what was ultimately going to be the winning song this whole year. ↩︎

    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.

    I should also say that the preview, to the right of the editor, is interactive, meaning that you can use it to jump to cards backed by the options. While I was playing around, I was wondering why there wasn’t a quick way to do this. It wasn’t until I started writing this post that I actually tried the option in the preview, and it worked.

    As for the app itself, if I could make one improvement, it would be something like an image picker which would allow me to reuse images already attached to other cards. I’m not sure how best to use images in these types of stories, but the way I was going for was more to accent the story instead of simply illustrating what’s going on in the prose. So I wanted to reuse images over a series of related cards, and in order to do that I had to upload duplicates.

    But really, this is quite a minor quibble. On the whole I was quite impress by how well the experience was. It’s not easy trying to express something as complex as an interactive story, and I think Evergreen.ink did a pretty decent job.

    So yeah, give it a try. It was quite fun putting this interactive story together. I haven’t got any other ideas lined up, but it would be good to make another one down the line.

    Edit: One other thing to be aware of is that the link given to you when you try to share a story requires a login. So if you want to avoid that, you’ll need to choose the Zip option, which basically bundles the story as a static website. You can deploy it to Netlify quite easily (just check the permissions of the files first, I had to chmod 666 them). Thank-you Robb for letting me know.

    Also, thank-you to omg.lol for the Switchboard feature. It saved my tale dealing with the new redirect.

    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.

    It was hard coming up with categories for this one, particularly when considering ā€œbestā€ and ā€œfavouriteā€. You need to have had enough experience to know what makes a good “thing”, in order to judge it against all the others and come up with a “best” one. It also helps to have enough experience to avoid picking your favourite as the best as well. I tried picking categories in which my favourite is different than what I consider the ā€œbestā€. And it might be that I lack variety in my life, but the list of categories that I managed to come up with was relatively short.

    Nonetheless, here they are:

    Category: Mike Oldfield music

    • Best: Tubular Bells 3. Oldfield was in his element here. A balanced helping of both accoustic and electronic, slow and moving, and very consistent in it’s theming.
    • First: Tubular Bells 2. It may seem that Tubular Bells should be the album to goto for a taste of Mike Oldfield, and it certainty has the Oldfield signature sound. But I’d suggest considering going with this album first, as it’s a bit more refined while having the same basic structure. It’s also the album that grabbed me.
    • Favourite: Crises; The Songs of Distant Earth. I’d probably put TB3 here as well, but in lieu of choosing something that I also consider the best, these two are probably my next favourite. Or it could just be the positive associations I have of them: Songs of Distant Earth reminding me of faraway places, Crises reminding me of home.

    Category: Episodes of Seinfield

    • Best: The Parking Garage. A refinement of The Chinese Resturant, which was groundbreaking in itā€™s own right. Honourable mention: The Parking Space.
    • First: The Conversion. I think anything in Season 5 or Season 6 would work here. I’ve chosen this one as I wanted an episode which showcases all the character’s traits without having too many supporting character (that also features George’s parents). Honourable mention: The Bris.
    • Favourite: The Busboy. This is a series 2 episode, while they were still finding their feet. But itā€™s one of the first where the writers manage to have multiple plot threads all wrapped up together in a cohesive whole by the end, an attribute of the writing that I absolutely love. Honourable mention: The Dinner Party.

    Category: Programming text editors (for MacOS)

    • Best: VS Code. I’m not a user of this myself but I can’t deny the amount of effort (and that sweet, sweet Microsoft cash) that’s going to this project. Certainly it’s the most capable out there for pretty much any language you need to work in.
    • First: Nova, depending on which language you’re working in. Obviously if you’re doing anything Apple related, it’s probably best to go with XCode or something. But I think for anything else, Nova is a pretty decent text editor, and definitely one worth trying for anyone starting out.
    • Favourite: Anything from JetBrains. When you feel like moving into something a little more integrated, especially for languages considered “complicated”, I can definitely recommend the IDEs from JetBrains. I use Goland in my day-to-day, with the occaional WebStorm for anything frontend that is considered large. Others include IntelliJ and Android Studios.

    Category: Apple-related Tech Podcasts for anyone that has never heard a podcast before

    • Best: Upgrade. I’m not much of a listener of this one anymore, but it’s still a very well-produced show, and Jason really knows his stuff.
    • First: The Talk Show. I think having something a little more off-the-cuff is the way to get into the medium. You have to warm yourself into it, like you’re having a conversation with friends, and starting with something a little ā€œproducedā€ can leave you feeling as if you’re just another listener (which, I guess, you are but you shouldn’t want that feeling). I think the Talk Show fits the mould here. It did for me.
    • Favourite: Accidental Tech Podcast. Hands down. Informative and enjoyable to listen to. This is one that I do my best to catch every episode they release.

    Category: Walks in and around greater Melbourne

    • Best: Sherbrooke Falls, Mt. Dandenong. This is not the longest, nor the most challenging, but itā€™s by far the prettiest. Walking amongst the great Mountain Ash is quite a moving experience. Be sure to have the soundtrack of the Atterborough documentary series The Private Life of Plants playing while you do.
    • First: The Domino Trail, Trentham This is about an 1.5 hours out of Melbourne but a nice easy rail-trail going through the lovely forest around the Domino Creek.
    • Favourite: Bushrangers Bay to Cape Shank Lighthouse: A two hour return walk that is moderately challenging with lovely scenes of Bass Strait. Donā€™t be surprised to run into a kangaroo or two (plus the occasional snake; look out for those).

    Category: Pubs in and around greater Melbourne that make a decent parma

    • Best: The Panton Hill Pub, Panton Hill. This is a good 30 km out of Melboune area, in the green-wedge in a little town called Panton Hill. There’s not much there: a few houses, maybe a shop or two, and this pub. But they do a pretty solid parma there. Good fillet, decent balance of cheese and ham, and a good portion of chips and salid. Itā€™s been a while since I’ve been there, so things may have change.
    • First: The Turf Bar, Queens St. If you’re visiting Melbourne for the first time, and you’d like to try a pretty decent parma, then I’d probably suggest trying out the Turf. It’s probably not the best pub in town: it’s more of a sports bar and can be pretty load when city-workers go there for Friday lunch or drinks. But I’ve been pretty impressed by the quality of their parmas. Be prepared to wait a little while for them.
    • Favourite: The Old England Hotel, Heidelberg. This is not the best parma out there, but theyā€™re pretty consistent. One thing going for this place is that it’s easy to get to.

    Idea For Mainboard Mayhem: A Remote Pickup

    Sort of in-between projects at the moment so I’m doing a bit of light stuff on Mainboard Mayhem. I had an idea for a new element: a remote control which, when picked up, will allow the player to toggle walls and tanks using the keyboard, much like the green and blue buttons.

    I used ChatGGT to come up with some artwork, and it produced something that was pretty decent.

    Image generated from DALL-E with the prompt: pixel art of a remote control with a single red button styled like the tiles found in Chips Challange, rotated 45 degrees to the right.
    Prompt: pixel art of a remote control with a single red button styled like the tiles found in Chips Challange, rotated 45 degrees to the right.

    Only issue was that the image was huge ā€” 1024 x 1024 ā€” and the tiles in Mainboard Mayhem were only 32 x 32.

    I tried shrinking it down in Acorn, using various scaling algorithms. The closest that worked was bringing it down slowly to about 128 x 128 using Nearest Neighbour, than trying to go all the way down to 32 x 32 using Lanczos. That worked, but it required true 32 bit colour to be recognisable, and I wanted to preserve the 16 colour palette used by the original Chips Challenge.

    So using the original image as a reference, I bit the bullet and drew my own in Acorn. You can see it here in this test level:

    Example Mainboard Mayhem level showing the green and blue remote controls. The controls have 4 small buttons and one large bulbous button that is either blue or green, with a bit of phong and shadow applied
    They're the elements that look like remote controls.

    It turn out okay. At least it’s recognisable. Anyway, I coded it up and gave it a bit of a try:

    Yeah, it works well. When the player has the appropriate colour remote, they can hit either Z or X to toggle the green walls or blue tanks respectively. I really should add some indicators in the status bar to show which button to press.

    Not sure what I’ll do after this. The fun part was coming up with the element. But I guess I’ll have to come up with a few puzzles that use it.

    A Few Thoughts On Using iA Presenter

    Well the ā€œbig presentationā€ was today, the one I thought would be a good canditate for trying out iA Presenter. And after spending the last couple of weeks preparing for it, Iā€™d thought it would be good time to give my thoughts on how it worked for me.

    First, I must say that I can appreciate using an app that is opinionated. This is not a drop-in replacement for Keynote1: the app really does try and steer you towards a particular presenting style. Theyā€™re quite upfront with this: the example shown on first launch outlines how to prepare the slides and why writing out the entire presentation in full, while leaving slides as the role of accenting your points, makes for better presentation.

    I knew this going in, so it wasnā€™t a big shock to me. Plus itā€™s easy to like an opinionated piece of software when you share that opinion yourself.

    This flows naturally into the second thing that I like about iA Presentation, which is the Markdown support. Using Markdown to prepare the slides is wonderful, especially when you compare it to the point-and-click content-by-bullet-point interaction style youā€™d find in Keynote. That WYSIWYG styles is not for me, particularly when it comes to correcting style and alignment issues that only affects one slide that sticks out like a sore thumb when giving the presentation. Markdown only means iA Presenter is left to handle the layout, and that’s fine with me.

    Now, it would be nice to have even more control over the slide layout and styling. iA Presentation has very limited support for this, and while I was preparing the slides, I kept finding myself wishing that I could do more of the finer things, like adjust the font size of a code block to avoid line-wraps.

    There are some things you can do, such as choose whether elements should appear below or beside each other. This is done through the use of new-lines ā€” or lack there-of ā€” which is a style that didn’t really gel with me. It seemed like a concept that was a little undercooked. It also didnā€™t help that there wa no way to actually force a new line, to do something like space out content vertically.

    I donā€™t know how this could be improved. Maybe having a way to specify a layout or styling that is separate from the implicit styling from the Markdown, sort of like slide-specific front-matter, maybe? If done in such a way as to avoid complicating things too much, itā€™ll probably be welcomed.

    One other thing that would be good is to have more control over separating the layout of the slides from that of the exported speaker notes. Youā€™re essentially writing long-form content, complete with headers thatā€™ll appear on the slide. But putting a H2 header over a H1 header to start a section would look strange in a PDF export. Itā€™ll look fine on the slide, but thatā€™s becasue youā€™re stuck using header levels (h1, h2) to control text size. Because the content on the slide is interleaved with the speech itself, the order of elements that make sense on the presentation may note for the exported PDFs.

    Although I guess the solution there would be just to open the presentation in a regular Markdown editor and export to PDF. But having a one-stop solution to that would be nice. So, I donā€™t know: having a way to separate the symantics of the header from the size they appear on the slide would work? (Maybe all I want is just HTML, šŸ¤·)

    So, whatā€™s the verdect? Would I use iA Presenter again? Hmm, maybe. If Iā€™m working on a presentation with a small number of slides containing simple visual elements designed to emphasise something, such things youā€™d find at TED talks or an Apple keynote, then yeah, Iā€™d probably use it again. Itā€™s a style of presentation that the app is clearly optimised for, and it does a good job for that. If I needed slides that were a little more informative in their own right, I’d probably consider something else. Probably not Keynote, but Iā€™d consider one of the JS+HTML options.

    But itā€™s a really nice app2 and a pleasure to use, so it’s probably worth checking out for your next presentation.


    1. Not to single out Keynote here. You can easily use Powerpoint or Google Slides as a drop-in replacement for this post. ↩︎

    2. I didnā€™t talk about the UI as I wanted to focus on the preparation aspects, but the UI is delightful. They put a lot of care into it, and despite being ā€œjust a text editorā€, seeing the little things like having the highlight or carrat colour match the slide background colour is a really nice touch. Dare I say, almost whimsical. ↩︎

    Resurrecting Untraveller And Finishing The RA-V Mission Posts

    Itā€™s been 10 years to the day when I had the opportunity to tour the Pacific as part of my job at the Bureau of Meteorology, the so call ā€œRA-V Missionsā€. This last month or so, Iā€™ve been writing about them in my journal, trying to get it all down before I forget. I had grand plans of publishing them on a travel blog, which I shelved a couple of months ago.

    But while I was updating my journal, I was wondering if anyone else would find it interesting. Probably not, really: I donā€™t know if people enjoy reading about other peoples work trips (I can go either way, myself).

    But in the off-chance that someone out there will find this story intriguing, I decided to resurrect my travel blog and publish these (moderately edited) journal entries.

    If this ends up being your cup of tea, I hope you enjoy it. I may add some other trips to the site down the line (including the ones that were on the old one). Iā€™ll let you know here if I do.

    Defaults

    I see that Gabz, Robb, and Manique ā€” along with many others ā€” have posted their defaults after listening to Hemispheric Views 097 - Duel of the Defaults!, which was a really fun episode. I thought Iā€™d do the same.

    • Mail Client: Fastmail. Web-app on the desktop and app on mobile
    • Mail Server: Fastmail
    • Notes: Obsidian for work. It was Obsidian for personal use but Iā€™m trying out Notion at the moment.
    • To-Do: Obsidian/Notion (todos go in as notes)
    • Photo Shooting: Android camera app
    • Photo Management: Google Photos
    • Calendar: Google Calendar
    • Cloud file storage: Google Drive
    • RSS: Feedbin. I mainly read it with NetNewsWire but I also use the web-app.
    • Contacts: Android contacts app.
    • Browser: Safari, Vivaldi
    • Chat: Mainly still use Android Messanger for SMS but started using WhatsApp more
    • Bookmarks: Linkding running on Pikapods.
    • Read It Later: None, but if I were to start, Iā€™d probably try out Feedbinā€™s RIL service.
    • Word Processing: n/a
    • Spreadsheets: Google Sheets, Numbers (I donā€™t do a lot of spreadsheeting)
    • Presentations: Keynote, but giving iA Presenter a try at the moment.
    • Shopping Lists: Google Keep
    • Meal Planning: n/a
    • Budgeting & Personal Finance: n/a
    • News: ABC1 News, in a web-browser
    • Music: Alto (my own music app), Spotify
    • Podcasts: Pocketcasts
    • Password Management: 1Password
    • Photo Editing: Google Photo
    • Weather: Bureau of Meterology website.
    • Social Clients: Tusky (Mastodon)
    • Code Editor: GoLand (Jetbrains in general), Android Studios, or XCode
    • Text Editor: Nova
    • Hard Quiz Expert Subject: Probably the music of Mike Oldfield.

    Scored myself based on the rules of the game and came up with 44 points. It was a little tricky as Iā€™ve got both feet in separate ecosystems.


    1. Australian Broadcasting Cooperation ↩︎

    Why I Like Go

    This question was posed to me in the Hemispheric Views Discord the other day. It’s a bit notable that I didn’t have an answer written down for this already, seeing that I do have pretty concrete reasons for why I really like Go. So I figured it was time to write them out.

    I should preface this by saying that by liking Go it doesn’t mean I don’t use or like any other languages. I don’t fully understand those that need to dislike other languages like they’re football teams. “Right tool for the job” and all that. But I do have a soft-spot for Go and it tends to be my go-to language for any new projects or scripting tasks.

    So here it is: the reasons why I like Go.

    First, it’s simplicity. Go is not a large language, and a large majority of it you can keep in your working memory. This makes Go easy to write and, more importantly, easy to read.

    It might seam that a small feature set makes the language quite limiting. Well, it does, to a degree, but I’d argue that’s not a bad thing. If there are only a couple of ways to do something, it makes it way easier to predict what code you’re expecting to see. It’s sort of like knowing what the next sentence will be in a novel: you know a piece of logic will require some dependant behaviour, and you start thinking to yourself “how would I do that?” If the answer space is small, you’re more likely to see what you expect in the actual code.

    But just because Go is a deliberately small language doesn’t mean that it’s a stagnant language. There have been some pretty significant features added to it recently, and there are more plans for smoothing out the remaining rough edges. It’s just that the dev team are very deliberate in how they approach these additions. They consider forward compatibility as much as they do about backwards compatibility, being careful not to paint themselves into a corner with every new feature.

    Type parameters are a great example of this. There were calls for type parameters since Go 1.0, but the dev team pushed back until they came up with a design that worked well for the language. It wasn’t the first design either. I remember one featuring some new constraint-based constructs that did about 80% what interfaces were doing already. If that were shipped it would’ve meant a lot of extra complexity just for type parameters. What was shipped isn’t perfect, and it doesn’t cover every use case type parameters could theoretically support. But it made sense: type parameters built on interfaces, a construct that already existed and was understood.

    This, I think, is where C++ fails to a huge degree. The language is massive. It was massive 30 years ago, and they’ve been adding features to the language every few year since, making it larger still. I see Apple doing something similar with Swift, and I’m not sure that’s good for the language. It’s already quite a bit larger than Go, and I think Apple really should curb their desire for adding features to the language unless there’s a good reason for doing so.

    The drive for simplicity also extends to deployments. Go is compiled to a static binary, one that is extremely portable and could be easily deployed or package as you so desire. No need to fluff about with dependencies. This is where I found Go having a leg-up over scripting languages, like Python and Ruby. Not because Go is compiled (although that helps) but that you have less need to think about packaging dependencies during a deploy. I wrote a lot of Ruby before looking at Go, and dealing with gems and Bundle was a pain. I’m not a huge Python expert to comment on the various ways that language deals with dependencies, but hearing about the various ways to setup virtual environments doesn’t fill me with confidence that it’s simple.

    And I will admit that Go’s approach to this isn’t perfect either. For a long while Go didn’t even have a way to manage versioned dependencies: they were all lumped into a single repository. The approach with modules is better, but not without some annoyances themselves. Any dependency that goes beyond version 1 requires you to change the import statement to include a vX, an unnecessary measure if the version change is backwards compatible. That’s not even considering packages that avoid this, and are forever on version 1 (or 0).

    But since moving to modules my encounters with package dependencies issues remains quite rare, and once you’ve got the build sorted out, that’s it. No need to deal with packaging after that.

    And I’d argue that Go rides that sweet-spot between a scripting language like Python and Ruby, and a compiled language like C (maybe Rust, but I know very little of that language to comment on it). It’s type safe, but type inferences make it easy to write concise code without excessive annotations everywhere. It’s compiled to an executable, yet memory is managed for you. I won’t talk about how Go does concurrency, but after dealing with Java threads for several years, using them are a joy.

    I should probably balance the scale a bit and talk about areas where I think Go could be made better. The big one is error handling. While I do like the principals ā€” that errors are values and can be handled as such ā€” it does mean a lot of boilerplate like this:

    foo, err := doThis()
    if err != nil {
      return err
    }
    
    bar, err := doThat(foo)
    if err != nil {
      return err
    }
    
    baz, err := doAnotherThing(bar)
    if err != nil {
      return err
    }
    

    To the Go teams credit, the are looking at improving this. And I think there’s enough prior art out there for a solution that’ll look pretty nice without having to resort to exceptions. Maybe something like Swift’s guard statement, that can be used in an expression.

    And yeah, other areas of Go, like it’s support for mobile or GUI-style programming and lacking a bit. That could probably be plugged with third-party modules to a degree, although I think because Go is not an object-orientated language, the seals won’t be perfect (take a look at Go’s implementation of QT to see how imperfect Go maps to a toolkit that assumes objects). And some gaps need to be plugged by Google themselves, like with mobile support (they do have something here, but I’m not sure to what degree they’re being maintained).

    But I’m sure most of these issues are surmountable. And no language is perfect. If Go doesn’t work for a situation, I’ll use Java or Swift or something else. “Right tool for the job” and all that.

    So these are the reasons why I like Go. And I think it all boils down to trying to keep the language simple while still being useful. And as far as my experience with Go is concerned, those maintaining it are doing a pretty stellar job.

    Work Email Spam

    Opened my work email this morning and received a greeting from the following spam messages:

    • Webinar to “overcome the fear of public speaking” from some HR Training mob
    • A training course on “accelerating innovation in data science an ML” (there’re a few emails about AI here)
    • Webinars from Stripe, Slack, and Cloudflare about how other companies are using them
    • Weekly updates about what’s happening on our Confluence wiki (this probably could be usefulā€¦ maybe? But our wiki is so large that most updates are about things other teams are working on)
    • A training course on some legal mandates about hiring (honestly, my email must’ve appeared on some mailing list for HR professionals)
    • Another webinar from the first training mob about dealing with “employees from hell”

    Marked all as read, closed email, and opened Slack.

    Pixel Phones Are Not Dog-food, and That's a Problem

    John Gruber on the Pixel 8 launch event:

    Itā€™s also impossible not to comment on just how much less interest there is in Googleā€™s Pixel ecosystem. [ā€¦] On the one hand Iā€™m tempted to say the difference is just commensurate with how much better at hardware Apple is than Google. But I think thereā€™s more to it than that. Thereā€™s something ineffable about it. There are aspects of marketshare tractionā€‰ā€”ā€‰in any marketā€‰ā€”ā€‰that canā€™t be explained by side-by-side product comparisons alone.

    Can’t speak for the market but as a Pixel 6 Pro owner I can give you my opinion. You don’t need to watch the keynote to get that sense of disinterest. You can get it just by using the phone.

    For the last few months1 I’ve been experiencing a bug with the calendar widget. If you have nothing on your calendar for the next two weeks, it completely blanks out:

    An Android phone screen with the calendar widget on the right that is completely white except for a blue plus button

    I doubt that this is intentional as the plus button doesn’t work either. Tapping it does nothing at all.

    For comparison, here’s how it’s meant to look:

    An Android phone screen with the same calendar widget functioning normally: it has the current date, a message saying 'Nothing scheduled', and two entries in blue for dates in the future

    Now, bugs in software happen ā€” they certainly happen in mine ā€” and there’s no reason why Google would be immune to this, so I can forgive them for this bug showing up in a shipped version of Android. My problem is that it’s been like this for months now. This is a widget built by Google, included in Google’s Calendar app running on Google’s OS and Google’s hardware, and it’s been broken for this long. I would’ve expected this to be fixed in a few weeks, but for it to take this long?

    I can’t see how anyone with an Android phone using this widget would not notice this. And the only reason I can come up with is that no-one in Google has noticed this. They simply don’t use Android, the OS that they build, in their day-to-day. Maybe some of them do, but obviously not enough of them to drive change. If there was, they would’ve found this problem and fix it by now. To quote Linus, “given enough eyeballs, all bugs are shallow,” and those eyeballs are obviously looking elsewhere.

    Now this theory may be far fetched, but after reading Gruber’s piece, it seems like I’m not alone in thinking this. As he says later in the same article:

    Iā€™d wager that more Google employees carry an iPhone than carry a Pixel.

    It shows.


    1. I can’t remember when I first saw this, but I think it was in July. ↩︎

    Your Dev Environment is Not Your Production Environment

    There will be certain things you’re going to need to do in your development environments that you should never do in production. That’s pretty much a given: playing around with user’s data or potentially doing something that will cause an incident is generally not a good idea.

    But there are things you shouldn’t do in prod that you may need to do in dev. And make no mistake, there may be a legitimate need to do these things. Using Auth0 and only have a limited number of emails available for your test environment? You may need a way to quickly reset a user. Support billing in multiple countries and need to do a test in one of them? You’ll need a way to change the user’s countries.

    And I think that’s fine. Not every environment needs to be a reflection of production. As long you’ve got a staging or pre-prod environment where you can do things like rehearse deployments. But everything else should be skewed towards ease of development, which will mean making these drastic options available and easy to use.

    Electrification of Melbourne Suburban Railways Plaque

    Found this plaque while passing through Southern Cross station this morning.

    Plaque about the Electrification of Melbourne Suburban Railways

    I didn’t have time to read it, and the subject matter looks really interesting to me (Trains? Power Lines? What’s not to love? šŸ˜€). I also don’t know how long it’ll be up for, and I’ve been burned in the past of not capturing something when I had the chance.

    So I’m posting photos of it here for posterity reasons. Enjoy.

    Alternative Day Four Photo

    I had an alternative idea for today’s photo challenge, which is “orange”. I was hoping to post a photo of something related to Melbourne’s busses.

    You see, PTV has designated different colour for different modes of transport. Blue for metro trains, purple for regional trains, green for trams, and orange for busses. And from my experience using the service, they’re pretty consistent with adhering to this design language:

    A bus in orange livery at a bus-stop with an orange sign and trim

    Anyway, they’re doing train works along my rail line over the past few weeks and this morning I noticed this sign (forgive the lighting, it was before dawn):

    A large orange sign that reads 'Buses replace trains' and then below an exclamation icon reads 'Plan ahead at ptv.vic.gov.au'

    It’s not the first time I saw this sign, but I had orange on my mind and the fact that it mentioned busses got me thinking, “how cleaver, they’re maintaining the design language through and through, using an orange sign to reference the bus service that would be replacing the trains.” Or so I thought, until I saw this sign:

    A large orange sign that reads 'Car space closures', along with details of when the car park will be closed and how many spaces would no longer be available

    Ah, that blew that theory out of the water. And also the opportunity to use it as today’s photo. I mean, I could’ve still used it ā€” it’s still orange after all ā€” but it doesn’t have the neat adherence to the design language that I was hoping it did.

    Mainboard Mayhem

    Project update on Mainboard Mayhem, my Chip’s Challenge fan game. I didn’t get it finished in time for the release deadline, which was last weekend. I blame work for that. We’re going through a bit of a crunch at the moment, and there was a need to work on the weekend.

    The good news is that there wasn’t much left to do, and after a few more evenings, I’m please to say that it’s done. The game is finish, and ready for release.

    So here it is: Mainboard Mayhem: A Chip’s Challenge fan game (and yes, that’s its full title).

    Screenshot of Mainboard Mayhem

    At the moment it’s only available for MacOS. It should work on both Intel and Apple Silicon Macs, although I’ve only tested on my M2 Mac Mini running Ventura.

    It’s good to finally see this project done. It’s been in development for about last ten years, and I spent half of that time wondering whether it was worth getting it finished it at all. Not committing to anything meant any work I did do on it was pretty aimless, and I always felt like I was wasting my time. Giving myself three weeks to either kill it, or release it helped a lot. I’ll start making deadlines for all the other unfinished projects I’m working on.

    As to what that next project will be, I not sure at this stage. Part of me wants to wait until this crunch time ends, but I suspect I’ll get antsy before then and start work on something else. I’ll keep you posted one way or the other.

    But for now, if you happen to give it a try, thank you and I hope you enjoy it.

    The app icon of Mainboard Mayhem
ā† Newer Posts Older Posts ā†’