Category

Design Patterns

9 articles in this category.

Meaningful Tests: Human Hubris vs. AI

What makes a test meaningful? How can tests shape better architecture? And what roles do humans and AI play? A few years ago I made a comment in a code review about a test description. That simple remark evolved into a few days’ debate that included architecture, code smells and other cool terms. How is […]

Memory on a Diet

In my last article, I talked about the flyweight design pattern. I mostly talked about how it can save you (and your end user) bandwidth. I failed to mention the save on memory. If we continue the example from the aforementioned blog post, let’s measure the memory consumption. A short reminder – the client code […]

Object Pool use case

After the Object Pool article went online, I was asked this on Facebook: What I take from here is 2 fold: The one paragraph spent explaining about use cases might not be enough – we need an example that is somewhat like real life. From the article, it might seem that Object Pool is the […]

Improve Performance with Object Pool

In a former article I’ve shown the consequences of memory allocation and garbage collection. Object pool is a simple design pattern that can be used in order to solve both problems.

Runtime Optimization Patterns

My talk from CodeTalks 2019 is live. You can watch it here: In this talk I go over 3 design patterns I’ve used in production in order to enhance performance in Javascript: Dirty flag, data locality and Object pool. Some extra material about the subjects: 1. Dirty flag in cesium 2. Object pool example 3. […]

Type to search articles