Writing CSS that scales: Encapsulation

Posted on February 3, 2019 full post comments

Usually we don’t take code organisation and architectural discipline seriously when writing stylesheets, because it’s “just CSS”. But over time, when your product grows, things get ugly. Changes in one component break the other, implementing a facelift on a shared component makes the whole product fall apart.

CSS is code, and just like any other code, it needs to have a design, be refactored time to time and adhere to set of common principles in order to scale. As any other language, it needs to be learned and it is hard. Don’t be like this guy.

Failure culture: Beyond blaming

Posted on September 30, 2018 full post comments

It’s inevitable that people make mistakes. Often, the impact of these mistakes are high - sometimes it breaks other team’s code, introduces regressions which can lurk around for a long time. On large projects, especially where a good chunk of legacy is in play, mistakes happen more often and are way more harder to find.

You can also make a mistake by having the wrong idea; you stick to it, pour more and more of your (and others’) energy into it, and it turns out not being a solution to your problem.

At the end of the day, you will fail as everyone else, and you have to be able to make that failure useful, so it can contribute to your next success.

First-class Functions in JavaScript

Posted on February 19, 2018 full post comments

The notion of first-class functions can be somewhat puzzling for those who are just starting with JavaScript, especially if they come from a Java background (as Java has only introduced them in version 8).

Understanding first-class functions is crucial in the JavaScript world as they are unavoidable when dealing with event handlers, non-blocking (asynchronous) I/O and they are the fundamental to functional programming.