50 Lines of Code

My ramblings on Software Engineering, Open Source and Software Quality

The latest

Newest articles

The greatest

Top five articles of all time

JavaScript in parallel: Web Workers, Transferrable Objects and SharedArrayBuffers

JavaScript is single-threaded, which means that long-running tasks can make our web application unresponsive. Luckily, we have Web Workers as a remedy for this - but they do require some thought on how to divide a task and how to avoid a hefty memory cost when data is copied.
This article shows how to use Web Workers and transferrable objects and a new parallel primitive: The SharedArrayBuffer. Click here to read more!

CORS - a guided tour

When making network requests in the browser to other pages or APIs, the browser enforces the Same-origin policy to protect users and their data.
But what if we want to request data from another origin? Or if we want to run an API that isn't on the same domain? Let's see what CORS is and how we can use it.
Click here to read more!

Easy scaling with Docker, HAProxy and confd

Forrest is a very small shell script that binds together etcd and docker to allow easy scaling - for example with the combination of etcd + confd + HAProxy + Docker you can quickly and easily spin up a new web server instance and hook it into your load balancer.
Find out more