Posts

Uncomfortable, but great decision

2 minute read Published:

You are reading a success story of avoiding premature optimization. I had to design an API for a service that receives some geographical data and returns the same data with additional information for each point of interest.

Creating JavaScript objects in 2018

7 minute read Published:

If you want to learn how some popular design patterns look in JavaScript I recommend you to read The Comprehensive Guide to JavaScript Design Patterns by Marko Mišura. It argues why learning design patterns is important and shows some examples. However, the post was written in 2015. Since then JavaScript has evolved and obsoleted some common patterns that we were used to in the past. Making a “class” in JavaScript was a Wild West before ES6.

How to easily speed up your prime number generator with factorization wheels

2 minute read Published:

Prime numbers. Somehow boring and yet fascinating topic in mathematics. A number is a prime number if it’s divisible by one and by itself. In contrast composite numbers are divisible by one, itself and one or more other numbers. Primes: 2, 3, 5, 7, 11, 13... Composites: 4 = 2 * 2, 6 = 2 * 3, 8 = 2 * 2 * 2, 10 = 2 * 5... It’s all so simple and obvious when numbers are small.