Carl Anderson

How to Keep Your Flexbox Square

UPDATE: There is now an aspect-ratio CSS property which can be used to set the ratio between width and height. The best way to make a square is now aspect-ratio: 1 / 1 If you remember the days of floats and table layouts, display: flex is absolutely magical... until you want

Creating Timed Sequences in Javascript

When you start working in Javascript and building apps and webpages, you get used to running code based on inputs - someone pressed a button, and then your code gets to run. This is fine for most webpages, but what if you want to to make changes on the page

How to Structure your JavaScript for Readability

When we learn to write code, we spend a lot of our time doing exactly that - writing code. As we transition into careers and larger projects however, we find out that we actually spend most of our time reading code - and we quickly learn that developers can't write

Writing useful unit tests

Let's face it, writing unit tests is hard. Many new coders take a long time to get into unit testing. They're scary, a lot of effort, and it's difficult to understand how they work. When we do eek out a few unit tests, they don't seem to be proving anything.

6 Tips for making a responsive website from scratch

When you're starting out with CSS and the web, it's easy to get into frameworks like Bootstrap, or Bulma. They're an excellent tool for fast prototyping, and getting to grips with how to build a website. However, these frameworks are opinionated, and as we grow we hit a point where

Carl Anderson © 2026