software-development

How to Implement Authentication in Next.JS to Protect your Routes

Before understanding the auth flow, we need to make clear the how NextJS works Understanding the 3 types of rendering First of all you need to understand how next js renders things. There are three main ways: Statically render the structure of the page when you compile your project in all the pages that don’t …

How to Implement Authentication in Next.JS to Protect your Routes Read More »

A Refactoring Excercise: What if you couldn’t program with loops?

Have you ever tried restricting yourself from using certain tools when doing something creative? For example, when I was studying musical composition my teacher once tasked me to compose a song with only 4 consecutive notes (this was a considerable upgrade from her first lesson where I was only allowed 1 note). After some tries, …

A Refactoring Excercise: What if you couldn’t program with loops? Read More »

How to Refactor Long If or Switch blocks with Double Dispatch In Javascript

I’m starting this blog so I thought about picking a small and easy topic to write about in the first blog post! Something to break the ice 🙂 Let’s see… Have you ever had code with huge logic embedded in if’s and switches? code like this? This is a simplified example so you might consider …

How to Refactor Long If or Switch blocks with Double Dispatch In Javascript Read More »