
Nursing Code
Building a ClickHouse Adapter for Ecto with an LLM & Beads
I've been dealing with the limits of Postgres for aggregate data at scale and came across Clickhouse. Clickhouse is a columnar storage database that's way more efficient for times series data.
Having seen how it could improve the performance of some of our most taxing queries, I wanted to use ClickHouse in Elixir with the same basic ergonomics I expect from an Ecto-backed application: familiar query syntax, migrations, and a great test workflow.
There are already Elixir options for ClickHouse, particularly over HTTP, but none matched the combination I wanted:
Testing LiveView with Playwright
We've recently been working heavily with Phoenix LiveView at work and having a great time. It's fantastic working in a way that keeps all the code in one place, primarily using one language (Elixir).
Getting started with Glint and Template Imports
The team I work with are big fans of TypeScript and we've invested a lot of time updating our Ember codebase to be mostly TypeScript now. This has been excellent for maintainability and allowing us to safely add features.
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 comes to presenting the information to users.
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.
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.
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.
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 done.
I did some work to integrate it into the build process for an app using the Phoenix web framework.
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.
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.
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 opportunities to handle asynchronous work whilst providing clear user feedback that something is in progress.
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.
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 use in Ruby projects where you find a place where you would want the speed of a C extension without the crippling fear of what havoc that extension could wreak if you make a mistake.
Getting started with Glimmer Components in Ember.js
There's a lot of buzz in the Ember community about the upcoming release of Ember Octane Edition.
It represents an enormous amount of work by the Ember core team and community.
The release will roll out a hugely simplified javascript model and the use of Glimmer components radically alters the way we need to write code.
Debugging Broccoli and Ember-CLI
Recently I've been working on an extension to one of our products and we decided that we should explore using an Ember Engine to properly separate concerns and make the extension mountable in multiple places.
Phoenix in Production with systemd
In this post, I'm going to explore how we can leverage systemd to ensure our apps are kept running even following a power outage or whole system crash.
Recursion and Pattern Matching in Elixir
In this post I will try and explain how pattern matching and recursion work in Elixir with some (hopefully) simple examples.
I’m not going go into the ‘why’, for that, there are many people better qualified than me to explain.
What I hope to achieve is a mental model for reasoning about what’s actually happening.
Profiling Phoenix on a Raspberry Pi 2
I've been talking a lot recently with colleagues (and anyone foolish enough to ask) about the benefits of Elixir, based on the performance of the underlying Erlang Virtual Machine (BEAM).
Shitty UX in the name of 'Security'
Today I saw someone in a Slack discussing a website that blocked pasting. This led to me wanting to share some thoughts on the topic of user experience (UX) and security.
Remote Profiling Elixir Over SSH
Erlang comes with an awesome tool called observer, which is readily available to the Elixir user.
If you want to use it, simple run :observer.start from an IEx session.
Lightning Deploys with Phoenix and Ember
I have been really interested in the discussions in the Rails and Ember communities on the topic of Lightning Deploys. Here are some things I've tried, failed, learned and succeeded with!
Custom Mix Tasks for Database Seeding
Why a custom Mix task?
I love the built in support for seeds with Phoenix, but sometimes I don't want to programatically generate a bunch of stuff, sometimes I just want to initialize the database in a known state. This is particularly useful for things that rarely change, like category names or lists of countries.
Ember Data for the Curious
So a topic that often comes up for folks new to Ember is Ember Data. There's a whole bunch of fear around the topic and Ember Data (ED) is frequently maligned.
On Mentorship
What even is mentorship?
Let me start by clarifying some things.
Am I My Code?
I read this quote on Twitter from Avdi Grimm today and it really resonated with me
Chew gum and I'll cancel your surgery
Fasting, compassion and evidence
As clinicians we are often expected to follow practices that are 'known' to be beneficial. It is widely expected by the public that what we say is based on evidence and is indeed 'best'.
Driving Change with Artificial Scarcity
Have you ever wondered how to get people to adopt a new practice? I'm guessing that if you've worked in health for any length, the answer would be yes.
Measuring Quality - The Art and the Science
In a previous post I clarified the meaning of quality as being more than clinically competent care, but being much broader
The Modern Quality Movement
In this post we will explore some aspects of the modern quality movement in healthcare.
As consumers have grown in knowledge, trust in the medical profession has decreased. No longer do doctors and nurses 'know best', consumers are well informed and expect the highest quality of care.