Archive for the 'Uncategorized' Category

Apple and Gaming

Wednesday, August 23rd, 2023

Lots has been written about Apple and gaming, but there’s a point that I don’t think has been made. Games are units of entertainment, not apps. What do I mean by this? Well, think of a movie, or a song. These are produced, usually by teams of people who work on them for some amount […]

SwiftUI: Solid filled background.

Tuesday, September 17th, 2019

Let’s start with something simple. Looking for a way to fill the screen with a solid colour? The Spacer component expands to fill the available space. Add it at the root of the layout to simply fill the space with a colour. var body: some View { Spacer().background(Color.green) } If you want to layer things […]

SwiftUI

Tuesday, September 17th, 2019

Time to start blogging again. SwiftUI is heating things up.  Is this thing on?

Android + CircleCI + versionCode

Sunday, December 9th, 2018

Automatically incrementing build numbers in CI is always a hassle. Here’s a simple way of using a generated version number in your CI, based on the current time in 10 second intervals. This is based on this post by esplo but with the missing piece of how to read the version in the build.gradle. Add […]

React Native or Electron: Why?

Wednesday, December 5th, 2018

Many developers hate Electron apps, and have a distaste for React Native apps. There are some good technical reasons for this. They’re inelegant. Inefficient. Bloated, slow, pigs. That’s the reputation. But to the users? They’re fine. They’re good enough. I don’t see users dropping Slack in favour of Skype because Skype is native. That’s just […]

Sending RabbitMQ Message from JavaScript with async / await

Thursday, November 22nd, 2018

I’m doing a lot of JavaScript development these days, and most of the example JS code I find on the web uses callbacks. I much prefer async/await, and sometimes the translation isn’t obvious.   Here’s how to send a message using amqplib to RabbitMQ using async await. The interesting bit here is the waitForConfirms method. […]

Building a Slack bot in Node

Friday, November 16th, 2018

I was looking into how to build a simple Slack bot. I ran across various bot kits and frameworks and whatnot, that seemed to really overcomplicate the issue. Went back to the Slack API and discovered that it’s actually quite straightforward. This particular code listens for messages in a private channel called ‘dev’. Private channels […]

Local Siri

Thursday, May 17th, 2018

Here’s my WWDC prediction for 2018: Siri will be significantly replaced with a new, on-device Siri. A few attributes of this new Siri that would make it interesting, and give it a shot of coexisting in a world with Google Assistant, Alexa and Cortana: Requests will run directly on your device. No more waiting for […]

Formatting CVaListPointer

Monday, April 9th, 2018

So you’re using libtiff in Swift, and need to implement the TIFFErrorHandler. Or, for whatever reason, you have a CVaListPointer (the args parameter, below) and a format string, and you want to format. Here’s how: let errorHandler:TIFFErrorHandler = { (moduleNamePtr, formatPtr, args) in guard let formatPtr = formatPtr else { // No format string – […]

The Amazon Web Services Platform

Thursday, October 19th, 2017

I’ve been working with Amazon Web Services as part of a new job, and I was surprised to see how many rich services Amazon is offering under the AWS banner now.     I made a point of looking at every one of them (as of October 2017) and reading enough about it to get […]