# Archives

All of the things labelled as Posts, so that crawlers have a place to find them.

### How blaming the user leads to tragedy

On 9 February human error resulted in 11 deaths and 80 further casualties in tragic wreck near Bad Aibling, Germany. Despite a supposedly robust safety

### API forensics for iOS system time: missing documentation

I started using the mach_absolute_time function on iOS to get proper event timing information. It works well, I think; the problem is that I actually

### The trouble with floor and ceil

floor and ceil have the bad habit of producing unexpected results. They aren’t broken, but in light of floating point nasties can often result in

### Implementing a Swipe gesture

I recently implemented a swipe gesture for Fuse. The gesture recognition itself, though complex, was not hard to implement; I had most of the needed

### The hard part of error handling is not the error itself

Are our discussions about errors focusing on the right part of the problem? We tend to argue about what exceptions mean, or how return values

### Why don’t we have runtime virtual dispatching?

Virtual functions are a great feature, but they have a rather severe limitation. They can only be implemented by extending the definition of all classes

### Everything can and will go wrong: all functions fail

In a dreamy programming utopia, functions behave correctly and nothing unexpected ever happens. In technical reality however even the most mundane of actions can suffer

### The exceptional myth of non-local flow

“Exceptions are bad because they introduce non-local flow into a program.” It’s an argument I’ve seen often and it even came up in the comments

### Messy error handling in Rust with try!

I just read the documentation for std::result in Rust. A friend had pointed it out and said it left a sour taste in his mouth,

### Adding the first type expression to Leaf: type_infer

I’ve added the ability to type a variable based on an expression. The type_infer type operator resolves to the type of the provided expression —

### Defects allowed by imprecise access modifiers

I recently fixed a defect that I felt the compiler could have caught. Some initialization code was not being run as I was calling a

### Robot journalist predicts programmers will be obsoleted

Am I, as a programmer, in danger of being obsoleted by a program of my own creation? A recent BBC article gives programmers an 8%

### The curse of varargs

Unexpectedly I needed to add support for variable argument functions to Leaf long before I intended to. I just wanted to print out a value,

### Reusing existing test suites for new features

Redundancy is one of the biggest sources of problems on any project, especially in tests. Having an unmaintainable test suite is in nobody’s interest. Eliminating

### Calculating square root using Newton’s iterative method

I suddenly had a desire to calculate square roots. It’s been one of those things that just sits at the back of my mind lingering.

### A real cost of low performing applications

The platform as a service model adds new importance to the performance of our software. Despite ever decreasing hardware costs, metered services make every bit

### You can’t trade privacy for security

The idea that one can give up privacy in exchange for security is misguided and dangerous. It’s a cliché peddled by politicians who either just

### Essential facts about floating point calculations

Floating point numbers are everywhere. It’s hard to find software that doesn’t use any. For something so essential to writing software you’d think we take

### Be a good mentor, not a dickhead

I’ve worked with a lot of people of varying skill levels, from superstar programmers to not-sure-how-they-got-the-job types. Integrating and working with new people is always

### Antialiasing with a signed distance field

When drawing basic primitives we want nice smooth edges. This means both pixel correctness and antialiasing. In my previous article about drawing a rectangle I

### Get rid of those boolean function parameters

I need to make a quick variation of a function. The calculation, or behaviour, differs slightly on the needs of the caller. I throw in

### Combining several GL draw calls into one: a rounded rectangle

My previous article explains how I draw a rounded rectangle using a shader instead of tesselation. The biggest remaining issue is using eight calls to

Please join me on Discord to discuss, or ping me on Mastadon.

### Archives

#### Read my Book

A Harmony of People. Code That Runs the World. And the Individual Behind the Keyboard.

#### Mailing List

Signup to my mailing list to get notified of each article I publish.