RSSAmplifier

Blog

Kevin Mahoney

Personal blog of Kevin Mahoney

kevinmahoney.co.ukRSS feed ↗15 posts

Latest posts

Coding with Clay

Coding with Clay

Focustro: Development Notes for a Replicating React Application

Focustro: Development Notes for a Replicating React Application

Files That Change Together Should Stick Together

Files That Change Together Should Stick Together

Effective Checklists

Effective Checklists

Alerts, Checklists, and Lazy Thinking

Alerts, Checklists, and Lazy Thinking

Accidental Waterfall

Accidental Waterfall

The State-Diff Pattern

The State-Diff Pattern My Googling couldn’t discover an existing name for this pattern, so I have taken the liberty of naming it myself. I’ll update if I find one already in use. The state-diff pattern transforms an imperative interface into a declarative one, allowing the client to write pure, easily testable functions to describe the desired state of a system. This desired state is then compared…

Applying “Make Invalid States Unrepresentable”

Applying “Make Invalid States Unrepresentable” Here are some real life cases of applying one of my favourite principles . I’ll try to update this as I come across good examples. Case 1: Contiguous Time Periods A straightforward way to represent a period of time is by its start and end dates ( (Date, Date) ): If we need to represent a timeline split in to contiguous periods, it may be tempting to…

My Principles for Building Software

My Principles for Building Software

The High Cost of Splitting Related Data

The High Cost of Splitting Related Data

Your Database as an API

Your Database as an API

Sense and Availability

Sense and Availability

A Few Django ORM Mistakes

A Few Django ORM Mistakes See if you can figure out what's wrong with the code snippets below! Ask yourself what the problem is, what effect will it have, and how can you fix it? These examples are for Django, but probably apply to many other ORMs. Bug 1 def create (): with transaction . atomic (): thing = Thing . objects . create ( foo = 1 , bar = 1 ) set_foo ( thing . id ) thing . bar = 2 thing…

Consistency is Consistently Undervalued

Consistency is Consistently Undervalued

Database Design: Heterogeneous Collections

Heterogeneous Collections