A memoizer like React's useMemo in 20 lines

This is another post in my series of ”20 lines of code” posts. For the previous ones see: A JavaScript router in 20 lines A JavaScript test runner in 20 lines What’s memoization and what’s special about React’s useMemo? Memoization, in short, is used to cache function resu...

Two of the most important rules when programming

The following rules are two of the most important rules to follow when writing code in my opinion. They apply both if you’re in a team or in a one-person project. Rule 1 - Write for the next developer The next developer reading your code can either be yourself or someone els...

Choosing a web app tech stack - part 1: the programming language

As I said in my previous post I’m about to build a new web app, and the first thing I will do is to decide what programming language to use. Previously you didn’t have much choice as to what language to pick, regarding the frontend anyway, but with the wide support for WebAs...

Building an app I need

I really like new things, like new years, new food and new projects. And here we are, at the beginning of a new year and I’ve been thinking of an app idea I’ve had for a while which I now think it’s the time to realize. Choosing what to build I have many ideas for potential ...

A JavaScript test runner in 20 lines

A few weeks ago I saw this tweet about the world's smallest test library by @snuggsi, which is a great little snippet! Though I see it more as the world's smallest assertion library, so I've decided to do a follow up on my previous post about A JavaScript router ...

Slush - replacing Yeoman with Gulp

When I first came across Grunt I thought it was a great tool, and it certainly was! Until I started to develop and maintain some grunt plugins of my own. Then I felt that the API was not intuitive enough for a smooth development cycle. It got even worse when I began maintain...

A JavaScript router in 20 lines

Last week I found this post about writing a template engine in 20 lines, which in turn is inspired by John Resig's post on the same topic. I find them really simple, interesting and inspiring so I came up with the idea of making a simple client side router in just 20 lin...

It's here, my Ghost blog

For quite awhile now I've been thinking about creating a blog where I could share my thoughts about anything, and particularly coding & development... As I'm really into javascript nowadays I was very glad to see the public launch of Ghost which is the blog platf...