Sign in

Senior Front End Developer passionate about the web and all the latest tech 🌐

3 reasons to avoid using the px unit

Lowercase and uppercase A
Lowercase and uppercase A
Photo by on .

Why do web developers use the px unit so blindly? It is just a bad habit? Is it because of a lack of knowledge of other units? Maybe because the design teams rely on px and pt for their mocks? It is unclear why the pixel is the current go-to unit for most teams.

Maybe, the main reason is that it looks simple and convenient. Intuitively, we think we understand this unit because it looks as though it is mapping our pixel screen.

The px unit is something that gets you started very easily, but it turns into a problem…

“KISS,” “DRY”, “YAGNI,” and more

Image of man drawing architecture
Image of man drawing architecture
Photo by on

Being a good programmer is a mix of skills and some common sense. It is all about being pragmatic and knowing what is the solution that fits better your problem. When facing a challenge, there are some software principles that will guide you in choosing the most correct approach.

Those are a set of guidelines every developer should know and revisit from time to time. Think about them as your secret sauce when programming.

Consistently applying those principles will make your transition from mid to senior software engineer easier. …

Improve your TypeScript knowledge with these must-know features

Code on a laptop
Code on a laptop
Photo by on .

TypeScript’s influence is growing by the day. It is now the go-to companion tool for any new web/Node project. The benefits of using TypeScript cannot be overstated. However, it is important to know and understand all the tools that this superset of JavaScript has at our disposal.

Are you investing time in improving your Typescript skills? Are you trying to make the most out of it? Sometimes by not using the right TypeScript’s features and not following its best practices, there can be a lot of code duplication and boilerplate.

In this article, we will be looking at the five…

Tips to avoid memory leaks in your web apps

Computer chip
Computer chip
Photo by on .

JavaScript doesn’t provide any memory management primitives. Instead, memory is managed by the JavaScript VM through a memory reclaim process. That process is known as Garbage Collection.

Since we can’t force it to run, how do we know it will work properly? What do we know about it?

  • Script execution is paused during the process.
  • It frees memory for unreachable resources.
  • It is non-deterministic.
  • It will not inspect the whole memory in one go but will run in multiple cycles.
  • It is unpredictable. It will execute when necessary.

Does that mean we don’t have to worry about resources and memory…

An overview of the new ES12 specs

“JS” set to yellow background with launch emoji
“JS” set to yellow background with launch emoji
Image by the author.

The new ES12 specs are finally here. Specs? JavaScript is indeed not an open-source language. It’s a language written following the ECMAScript standard specifications. The TC39 committee is in charge of discussing and approving new features. Who are they?

“ECMA International’s TC39 is a group of JavaScript developers, implementers, academics, and more, collaborating with the community to maintain and evolve the definition of JavaScript.” —

Their release process is composed of five stages. Since 2015, they have been doing yearly releases. They normally happen around springtime. The next proposal date for approval is on June.

There are two ways…

Make your transition from JavaScript to Dart easier

Photo by on .

Back in 2011, Dart was unveiled at the GOTO conference in Aarhus, Denmark. It didn’t have a great start. It was seen as a further fragmentation of web development. Google’s plans were to include it as part of the Chrome VMs. It was uncertain if other vendors would adopt it. It was born with the intention of solving a lot of issues that were later addressed by the new EMACScript releases.

It wasn’t until Flutter’s release in 2018 that Dart started to gain traction again. Flutter is an open-source UI software whose principle is “Write once, run anywhere.” With one…

An awesome incremental upgrade for TypeScript

Glasses on desk in front of computer
Glasses on desk in front of computer
Photo by on .

TypeScript 4.3 was released on May 26 🎉. What are the top features released? Will they boost our productivity? Should we immediately update?

In this article, I will be going through all the most exciting ones. Here is a summary:

  • import statement assistant
  • Separate write types on properties
  • Overriding methods
  • Template string type improvements
  • ECMAScript #private class element
  • Error for missing await in conditionals
  • Static index signatures
  • Improved support for well-known symbols

import Statement Assistant

One of the coolest features in this release is actually something that will now be built into your editor: support for the import statement.

Now, when using the…

Make your Visual Studio Code run faster

Laptop and desktop computers on desk
Laptop and desktop computers on desk
Photo by on .

Visual Studio Code was released on November 18, 2015. Fast-forward five years, and it has become one of the most successful editors around. It is released under the MIT license, which makes it free to use. Its keys to success are:

  • Versatility
  • A large number of plugins
  • Availability on multiple platforms

Currently, VS Code is available natively on the following platforms:

  • OS X Yosemite (10.10+)
  • Windows 7 (with .NET Framework 4.5.2), 8.0, 8.1 and 10 (32-bit and 64-bit)
  • Linux (Debian): Ubuntu Desktop 16.04, Debian 9
  • Linux (Red Hat): Red Hat Enterprise Linux 7, CentOS 8, Fedora 24

It can also…

Boost your JavaScript app’s performance

Photo by on .

It is a common mistake to focus on making things work and forgetting about performance and efficiency. That is a key difference between a junior and a senior developer. When writing JavaScript, we always need to keep an eye on performance. We want our app to run as efficiently as possible on any device that might have access to it. We can’t assume our web app is always executed on powerful devices.

What can we do to improve our JavaScript performance? Today, we will check out some tips that will help you boost your web app’s overall performance. …

Learn to build your own set of TypeScript’s tooling

Photo by on .

Mapped types are by far the best feature in the TypeScript language. They let you create new types base on existing ones and some rules that you define. That does lead to a more readable and declarative code base.

Keeping your code DRY is one of the principles you should follow, and mapped types help you with that. You will find that there is a massive boilerplate reduction. You have to code less as you can reuse more.

Mapped types are a bit of a scary feature to look at first. Especially if there is a knowledge gap. So, before…

Jose Granja

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