The toJSON method allows you to tell JSON.stringify how to print out your Class. This can be pretty useful… Why Stringify Objects? The answer for that is as usual – there are many reasons. The most obvious one is to send the object to a remote service as payload to a request. Other reasons can […]
How do you maintain and deploy multiple NPM modules? How do you make sure versions do not mismatch or that nothing breaks while upgrading dependencies? And how do you deploy multiple packages at the same time in one CLI command? The problem of maintaining multiple modules and services There are two main ways to manage […]
Trying to use a webpack raw-loader for an HTML file inline resulted in an error: TS2307: Cannot find module. Here’s how to fix it! I’m using web components a lot! I really prefer them over frameworks. They are simple, native, and easy to use. I also like typescript and webpack. Combining them is a joy. […]
How to start blogging? What are the benefits of blogging and continuously sharing your knowledge? How to get your articles to an audience and who’s best to write for? Back in 2015 I told my boss our company needed a blog. We both didn’t know what I was going to write about, but it seemed […]
The Array Nesting interview question might seem complex at first and very simple after you solve it. But sometimes, a deeper dive into it can expose some more performance optimizations that can be interesting. After this article, you’ll be able to amaze your interviewers with some new insights they didn’t think of! What is the […]
The diamond-square algorithm is a procedural terrain generation algorithm. It makes it easy to generate Heightmaps and Terrain for games. In this article we will implement the diamond-square algorithm in JavaScript, plot our terrain on a canvas and see how a player can interact with its various terrain types. Many games are using Procedural Terrain […]
Collision detection is the basics of entities interaction on canvas. Imagine you have a Player Character (PC) that’s walking through a maze and you’d like to know if this PC bumps into a wall or can keep on going. One can argue that there’s a wall crossing potion somewhere, but let’s assume one doesn’t have […]
In this short article you will learn what you need to install in order to prepare a test environment for canvas operations with jest. After finishing the article, you will be ready for some canvas testing action! In the past few months, my kid and I been building HTML5 games. I’d might actually get you […]
Generating a random map on a canvas is fun. In this article you will learn how to generate a random map or maze on an HTML5 canvas. We will use a model called Cellular Automaton. While there are many ways to create a maze (or a map), what I’d like to create is a map […]
Continuous integration and continuous deployment are must-haves for organizations that wish to scale and deliver high quality software at a high velocity. I had the pleasure to speak about this topic in WarsawJS. In this talk, I walk through the process of using github actions to build CI/CD flows – from developer’s push to production. […]