dev notesjuhana jauhiainen

Writing about web development, React, Python, and the tools I use

What are HTTP cookies


A HTTP cookie is a small piece of data that a server sends to a user's web browser. The browser may then store the cookie and send it back to the same server with later requests.
Read more ⟶

How to make TypeScript understand Array.filter


If you've ever used Array.filter to filter a list to certain type of items, you've probably been hit by TypeScript not realizing what type of items your list contains after filtering. To fix this, you can use user-defined type guards.
Read more ⟶

Why Docker is eating your disk space


Have you ever had your server disk space exhausted by Docker? Is it happening right now? What can we do?!
Read more ⟶

How to type an object with exclusive-or properties in TypeScript


How can we define a type for an object, which has some required attributes and some attributes, of which one and only one must be defined?
Read more ⟶

Advanced Django queries


Django Framework comes with a powerful ORM and query capabilities built-in. If you're only familiar with the basics of Djangos Query API, this article will introduce some more advanced queries and methods you can use.
Read more ⟶

How to use a cache busting filename with webpack


If you're using a custom webpack config, you'll want to make sure the filename has a cache busting suffix.
Read more ⟶

Convert an array to a map in JavaScript


Sometimes it's useful to convert a array to a map for convenience or performance reasons. But how can we achieve that so that the resulting code will be easy to understand?
Read more ⟶

Hidden gems of the Chrome DevTools, Part 2: CSS tools


In the second article of the series, we take a look at some of the CSS and layout
Read more ⟶

Hidden gems of the Chrome DevTools, Part 2: CSS tools


Debugging, or finding the reason why your code doesn't work, is one of the most important skills a software developer needs. If you can debug effectively, you'll catch problems faster and even gain a better understanding on how things work under the hood.
Read more ⟶

Creating layouts with CSS grids


Grids are a powerfull feature of CSS but they can be a little overwhelming at first. In this article, we'll go through some basic concepts of CSS grids and learn how we can use grids to build layouts.
Read more ⟶