Michael Z

Michael Z @michi

About: Software writer

Location:
Tokyo
Joined:
Oct 7, 2018

Michael Z
articles - 78 total

Using Binary To Solve the Poisoned Barrel Puzzle

A king has 100 barrels of wine, but one of them is poisoned. The poison only shows symptoms after 1...

Learn More 11 5Nov 11 '24

JSON Extensions for writing config files and parsing data

JSON is a rather simple format, this makes it easy to use, understand, and parse. But sometimes you...

Learn More 2 0Nov 6 '24

Rule Changing Poker Game "Balatro" recreated in JavaScript - Behind the Code

"Balatro" is a rogue-like poker game that comes with all sorts of modifiers to change the rules mid...

Learn More 0 0May 26 '24

Adonis.js V6 - It's even better!

It's been 3.5 years since I created the series TDD course with Adonis.js using Adonis.js version...

Learn More 3 2May 6 '24

Rethinking best developer practices

SRP (Single Responsibility Principle) The single responsibility principle (SRP) is a...

Learn More 4 0Feb 19 '24

Stoic Driven Development

If Marcus Aurelius and his philosophical peers were modern-day software engineers, what wisdom might...

Learn More 14 1Jan 25 '24

Twitter API suspended? Here's how to fix it

A bunch of Twitter API clients which upgraded from v1 API to the free v2 API were suddenly suspended....

Learn More 2 0Jun 25 '23

Puzzle Classic "Baba is You" recreated in JavaScript - Behind the Code

"Baba is You" is a unique and innovative puzzle game that offers players the ability to dynamically...

Learn More 1 0Mar 1 '23

Namespaces are just fine - No need to destructure every object in JavaScript

An increasingly common practice in JavaScript is destructuring. This is great to get rid of otherwise...

Learn More 11 0Jun 13 '22

Code reviews - Are you checking for this?

What do you look for when you review your peer's code? Is it that the new code is consistent with the...

Learn More 4 0Feb 3 '22

Reverse-engineering frontend (Cuphead's film-grain effect)! Can you?

For quite a while I've been thinking how cool it would be to have a website in the style of the...

Learn More 20 1Jan 23 '22

Comparing strings - What can go wrong #unicode

Experiment For this experiment, please have a mac ready and open this sandbox:...

Learn More 5 0Oct 19 '21

Cross-Site Scripting (XSS) and is your SPA really safe from it?

Last but not least, let's talk about Cross-Site Scripting (XSS)! XSS attacks are all about writing m...

Learn More 107 2Mar 28 '21

Secure Cookies in 5 steps

Even with the right CORS setup and CSRF protection cookies present a few more attack vectors. Let's d...

Learn More 14 0Feb 11 '21

CSRF tokens for SPAs - Possible?

In the previous post, we discussed CORS, CSRF tokens, SameSite, clickjacking and JSON hijacking. With...

Learn More 22 4Feb 1 '21

Demystifying CORS, CSRF tokens, SameSite & Clickjacking - Web Security

One of the best features of the web is its backwards compatibility. But ironically, this also makes the web somewhat insecure by default. Let's have a look

Learn More 175 1Jan 25 '21

How to test time-dependent code - time travelling in JavaScript

Say you have a piece of code that depends on the current time. function isAM() { return new Date(...

Learn More 7 0Oct 30 '20

Git aliases for increased productivity

It's been almost a year since I posted my first article on git aliases. Since then I've applied a...

Learn More 18 3Oct 12 '20

Isomorphic handling of promises in libraries like react.js, vue.js, angular, svelte etc.

If you are working on a SPA that connects to an API somewhere, you are going to need to write a lot o...

Learn More 6 0Sep 15 '20

Build Adonis/Vue apps without an API

In a previous post I created a prototype of seamless integration between frontend and backend. To sa...

Learn More 9 0Sep 13 '20

CI/CD Workflows for open source NPM packages

My Workflow I've created two workflows to manage an open source NPM package of mine....

Learn More 19 0Aug 16 '20

Publish to NPM automatically with GitHub Actions

Now that we are all done with CI, let's tackle CD. There are a couple of ways we can set up publishi...

Learn More 16 3Aug 14 '20

GitHub Actions: Setting up Test Coverage for a JS/TS/Node project

This is a follow-up article to set up CI using GitHub Actions. Make sure you check out the previous a...

Learn More 18 0Aug 13 '20

GitHub Actions: Setting up CI for a JS/TS/Node project

Having used and modified CI/CD systems in Jenkins and GitLab CI in the past, I have never set it up m...

Learn More 38 1Aug 12 '20

Clean URL slugs: The Good, the Bad, and the Ugly

A slug is the last part of the URL and identifies a specific page on a site. For example, on my blog...

Learn More 12 0Aug 3 '20

Your flexbox is actually not centered

Isn't Flexbox amazing? All these years where we had to fight with floats, try vertical-align: middle...

Learn More 9 0Jul 19 '20

1 year with React Hooks - Biggest lesson learned

I've been working with React Hooks for over one year now. Working on a variety of things, there has b...

Learn More 57 3Jul 15 '20

Vue 3 just got me from interested to excited

Vue 3 has been on my radar for a while, but a recent RFC got me from "interested" to "excited". I am...

Learn More 79 28Jul 5 '20

Good bye API layer. Uniting frontend and backend

Originally posted at michaelzanggl.com. In my first job, besides web development, there was also...

Learn More 37 5May 30 '20

Tailwind CSS for skeptics - Interactive Tailwind CSS tutorial

Tailwind CSS is an amazing framework, but when people first see this: <div class="md:flex bg-whi...

Learn More 61 3May 17 '20