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.

Dear FinTech companies, be careful with external scripts

2 minute read Published:

Just last week I installed a Chrome extension called Privacy Badger. It is supposed to protect you from third party scripts included on websites that might track you. It does that by checking content loaded from other third-party domains. The side effect of this extension was that you suddenly begin to notice which sites include external scripts. I’d say I am not surprised by them on social media sites and other sites where I mostly consume the content.