RSSAmplifier

Blog

Alisdair McDiarmid

Alisdair McDiarmid

alisdair.mcdiarmid.orgRSS feed ↗20 posts

Latest posts

Typecasting form fields in Ember

How to make sure you don't accidentally convert everything to strings when building forms in Ember.js. Spoilers: use a two-way computed property macro.

Simple item aligment with flexbox

Flexbox is powerful and sophisticated, but my favourite use of it is really simple. Align things easily with this pattern.

Ember closure actions have return values

One of my favourite new features in Ember 1.13 is closure actions. Actions are now normal JavaScript functions, so they can return a value. This is useful!

Building Team Time Zone, part 5: Deployment, Release, Retrospective

How I deploy using Linode and nginx, production data and performance problems, and thinking about lessons learned.

Building Team Time Zone, part 4: Authenticating with Slack

How to use ember-simple-auth and torii with a custom authenticator to securely establish a Slack API token.

Building Team Time Zone, part 3: Creating the User Interface

UI design is impossible to get right first time. So I built a rough implementation, and refined it until it worked well.

Building Team Time Zone, part 2: Ember Data and the Slack API

Using Mirage to build an Ember test-first, creating a custom Ember Data adapter and serializer for Slack's API, and a rant about TDD.

Building Team Time Zone, part 1: Inception, Prototype, and Planning

How I started building an Ember app to display a time zone board for my Slack friends. Research, prototyping, and next steps.

Simple Node.js tests with assert and mocha

How to test your Node modules with the built-in assert module, for easier to read tests and fun times.

Ember component integration tests

How to fully integration test your Ember components in isolation from the rest of your app. Way better than unit testing.

Making distributed teams work

Working remotely can be difficult. I've learned lessons about the importance of network connectivity, using simple tools, and over-communication.

ARM immediate value encoding

ARM instructions use 12 bits to encode a 32-bit immediate value, using a 4-bit rotate and 8-bit constant. This is a great idea.

Kill sticky headers

A bookmarklet which removes fixed-position elements from a page.

It is our responsibility to teach

Should software engineers use advanced techniques or algorithms, or stick to the basics? It is our duty to share what we've learned through our code.

Tree traversal in CoffeeScript

Processing tree-structured data using functional programming in CoffeeScript. A detailed explanation and translation of Tom Moertel's original Haskell.

Fixing Rails auto loading for serialised objects

Serialised columns in Ruby on Rails sometimes fail to load, and remain as YAML strings. This article explains how, why, and what you can do about it.

Auto-vivifying hash

How to define the Ruby hash default value. Allows you to write cleaner, more confident Ruby code. Ideal when working with unstructured data.

Invisible proxies with Ruby

ActiveRecord collections seem to be arrays, but they're not! This article explains the invisible proxy pattern which makes this possible.

jsmn example: parsing JSON with C

Parsing JSON in C using the simple jsmn library, ideal for small embedded systems. Includes free sample code and explains how it works.

RCB128RFA1 UART, or Why I Hate Data Sheets

Tutorial with free sample code explaining how to use the built-in UART of the Dresden Elektronik RCB128RFA1 microcontroller board for serial communications.