Today, I want to tell you about my latest project; the Dev Concepts book, which you can already pre-order now (there’s a limited early-bird offer for the first 100 customers).

Image for post
Image for post
Picture courtesy of Anastasiia Chepinska

As some of you might know, I’m the author of a book about the TypeScript programming language. It was my first experience with the publishing world and it taught me a lot. The writing experience in itself was interesting, but seeing people reading and learning from my own book felt great.

I want to continue to contribute to the IT community, and writing is my main medium for now. …


TL;DR: It can be really hard to know if we’re just resilient or falling for the sunk cost fallacy.

I’ve been working for ~20 months on my current project, spent 2K hours on it, and “lost” 200K € by not doing something else. That project is not ready yet. Here’s the story behind it.

Image for post
Image for post
Picture courtesy of Natalie Rhea

Before it all

Early in 2018, after having worked for 10+ years as an employee, office politics got to me and I was tired of wasting time in meetings. I really wanted to quit, be my own boss, and have more impact on the world around me.

I was a tech lead/team manager/project manager, had a really good salary, lots of freedom, a cool team working together with me, and not that much to complain about, really. I could organize my days/weeks however I wanted, worked on interesting/challenging projects, and my team was really cool (alright, I already said that :p). …


Today, while preparing to publish the table of contents for my book, I realized that I didn’t know how to add it to my landing page

Image for post
Image for post
Picture courtesy of Lalaine Macababbad

In this article, I’ll explain how to generate a table of contents with automatic numbering using pure HTML and CSS.

CSS counters to the rescue

In the past, I imagine that quite a lot of JavaScript code has been written for this purpose. Luckily, nowadays, the Web platform is more powerful than ever. We can do wonderful things with HTML and CSS alone. For one, counting things!

With CSS counters, we can use and increment variables maintained transparently for us by CSS; allowing us to customize the appearance of our content easily.

The value of a CSS counter can be displayed using counter() or counters() in a content property. …


Office plugins (desktop & OWA) can be developed using standard Web technologies, but the templates of Microsoft are “dated”.

Image for post
Image for post
Picture courtesy of Pedro Santos

Using the Web platform to develop Microsoft office add-ins is pretty cool. Unfortunately, at least at this point in time, the template offered by Microsoft to generate Angular-based projects is quite “old-school” and not in phase with modern Angular/Web/TypeScript development.

In this article, I’ll show you that we can do better and use a standard Angular project and integrate what’s needed to make it work as an Office add-in.

Let’s get started!

TLDR;

  • Forget about the official Yeoman generator for now (yo…


Angular 11 has just been released. Time to discover what’s new!

Image for post
Image for post

In this article, I’ll go over (almost) everything noteworthy in this brand new release. I’ll also highlight what’s changed around Angular, just like I did with my Angular 10 in depth article.

If you want a helicopter view of what’s new, then check out the official Angular blog. Here, I’ll try to dig much deeper into the release notes.

As a reminder, the Angular team tries to release two major versions per year; so Angular 12 should arrive early next year.

If you’re missed the previous article about Angular 10, then go check it out too. …


Mocking overloaded TS methods with Jest is not hard per se, but you have to know how to do it.

Image for post
Image for post
Picture courtesy of Ammar Sabaa

In this article, I’ll explain the “issue” and how to work around it.

The “issue”

Method overloading is a very familiar concept for any developer used to Object-Oriented Programming (one of many that I’ll explain in my upcoming book by the way).

With method overloading, you can define multiple methods/functions with the same name but with different signatures. Overloading can be nice to use as a specific implementation is called depending on the parameters that you pass.

Of course, method overloading is a useful concept and not an issue on its own at all. While testing though, it can prove a bit difficult to mock overloaded methods with TypeScript. …


Because nested code is bad for mental health

Image for post
Image for post
Picture courtesy of Thais Cordeiro

Often, when I look at code written by juniors, I see a lot of nested code. In this article, I’ll try to articulate why it is problematic and what to do instead.

A trivial illustration of the issue

Let’s look at a trivial example together:

This function is simple enough; it either receives an input, or it does not. As it stands, almost all of the code of this function is “protected” by an if statement. That is, almost none of the code will execute if the condition is not met. If it isn’t, then there’s a single log statement to execute.

For such a simple function, this isn’t a big issue, but it is an issue nevertheless. …


Moment.js is on the way out, but if your project is using it and you’re missing a validator or two, you can still extend it.

Image for post
Image for post
Picture courtesy of NeONBRAND

Class-validator is a pretty popular JS/TS validation library based on decorators. It provides many built-in validators, but can also be extended quite easily.

As stated in the introduction, I know that Moment.js is now deprecated (and actually has been for quite some time), given its long-standing issues (bloat, lack of support for tree shaking, mutability, etc). My goal in this article is not to discuss whether it’s a good idea to use Moment.js in your project; I think that by now, the answer is pretty clear: it isn’t. …


Zoey est de retour

Zoey regardait au loin, perdue dans ses pensées…

Image for post
Image for post
Image de Daniel Jensen @ Unsplash

Celà faisait une éternité qu’elle n’était pas revenue ici. Depuis la mort de ses parents, elle n’avait plus jamais remis les pieds à Arkham. Il faut dire qu’au vu des circonstances, les services sociaux n’avaient pas eu d’autre choix que de l’éloigner. Ses parents ainsi que sa soeur, sa seule famille, avaient perdu la vie dans l’incendie.

L’école d’Arkham se trouvait juste de l’autre côté de l’avenue. Il aurait été bien trop douloureux pour Zoey de rester et de grandir si près du lieu du drame. Il ne restait pour ainsi dire rien de la maison de maître qu’elle avait habitée jusqu’à ce jour fatidique, peu après son sixième anniversaire. Des larmes se mîrent à couler le long de ses joues mordues par le froid, tandis qu’elle contemplaît les ruines de son ancienne habitation. Elle venait de passer vingt ans si loin d’ici. …


Teams are way more fragile than you can imagine. Here are ten more things that can demolish one.

Image for post
Image for post
Picture courtesy of Tom Pumford

Forming a team is no easy task; you have to find the right profiles at the right time, with the right set of skills, with a ton of motivation and a little bit of alchemy. Making one great is even harder. Great teams form and stay strong thanks to a number of factors. Small changes can have devastating effects.

In my previous post, I’ve explored some of the things that can quickly destroy a team. In this follow-up post, I’ll explore more anti-patterns.

Don’t take breaks

It’s easy to burn a team out. If you ask everyone to give 120% all the time, it cannot last for long. …

About

Sébastien Dubois.

Author, CTO. Subscribe to my newsletter: https://mailchi.mp/fb661753d54a/developassion-newsletter. Follow me on Twitter https://twitter.com/dsebastien

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store