Nursing Code

An approach to local date time formatting with Phoenix LiveView

Handling timezone(s) when building applications is almost always a frustration. Often developers resort (sensibly) to storing all Date / Time information in UTC. Storing everything in UTC solves a whole bunch of problems, but creates a few more when it c…

Continue Reading →

Testing in Ember.js when using ember-concurrency tasks

Ember concurrency is an amazing library that helps us to peform asynchronous work in a way that adds some very useful behaviour. I won't go into detail about the benefits of ember-concurrency because their docs already do a great job, but two significant …

Continue Reading →

Flexible Components in Ember.js

I've spent quite a few years working with Ember.js and a pattern I often see repeated is the 'yielded component' pattern. I'm going to share what that is and why (in many cases), it's an anti-pattern. Let's get some things out of the way first. This post…

Continue Reading →

Using SASS with Phoenix 1.6 (alongside esbuild)

In this post I'm going to describe the way I've managed the recent changes in the Phoenix framework that moves from a Webpack build pipeline, to a much simpler esbuild based process. Phoenix switches to esbuild Recently the Phoenix team announced a switch…

Continue Reading →

Using SWC with Phoenix

I've recently been making some small contributions to swc, a super fast javascript / typescript compiler written in Rust. It's orders of magnitude faster than Babel and requires significantly less memory and CPU cycles to get the transpilation process don…

Continue Reading →

Wake on LAN in Rust

I recently invested in a Mac Mini M1 as a secondary machine and have been enjoying using it with VS-Code Remote. As a developer, the Apple Silicon experience isn't quite ready for full time use while minor incompatibilities are still getting ironed out. U…

Continue Reading →

Creating Addons for Ember-CLI with TypeScript

It's been possible to write your Ember applications using TypeScript for some time now using Ember CLI TypeScript and the library also helps if you wish to build an addon using TypeScript. There's a catch, however, if you want to build an addon to be cons…

Continue Reading →

Ember Concurrency and Typescript

Ember + TypeScript is an excellent combination that has really helped improve our team's output whilst maintaining very low levels of runtime bugs. We're very heavy users of another library called ember-concurrency which provides some fantastic opportunit…

Continue Reading →

Using WebAssembly in Ember.js (Rust + wasm-pack)

Brief introduction to WebAssembly WebAssembly (wasm) is a technology which aims to allow the use of 'high' level languages (like Rust, C and C++) to create programs that are to be run in a 'web' environment, whether that be in a client or on a server. For…

Continue Reading →

Using Rust in Ruby

Introduction I'm not going to make the case for using Rust, there are hundreds of articles and videos out there which will do a much better job of explaining the case for why Rust is an amazing language. This guide is about how to put Rust to practical us…

Continue Reading →