Code Notes

JavaScript

Tips and tricks I learned throughout the years.

JavaScript looks familiar to many engineers, but behaves differently in all the places that matter. Here I share practical lessons that help whether you're just getting started or already shipping in production.

JavaScript tips - Page 3

Converting colors or numbers from Hex to Dec

Recently, I needed to create a function that fades from one color to the other. CSS3 makes the job very easy by making use of the transition property. However I needed to use this functionality inside a canvas element, m…

Read article

Using a progress bar to load assets

It's inevitable. Images take a longer time to load then anything else on your page. If you are trying to load an image gallery for example, you have to give the user some feedback to let him know that something is happen…

Read article

Improving your JavaScript Performance

Computers are getting faster. Mobile devices are catching up too. Browsing the web on your phone no longer needs to be an inferior experience. But despite all this advancement in technology JavaScript is still slow. Fast…

Read article

Organizing your JavaScript

Relative to other languages, learning JavaScript is a much easier process. It's easy to use it to add a functionality to your website. For example making a pop up appear after a click is only a few lines of code. You can…

Read article

Always avoid the DOM

The beauty of nodejs is that you don't have to work with the DOM. On the browser, that's where JavaScript power lies. The only problem is it is terribly slows. DOM access are the most expensive transactions. It is my tur…

Read article

Creating a router in JavaScript for Nodejs

Every URL you type on this website are handled through one script. It is a common standard with many framework. The script in question is called a Router. It takes any URL you give it, and returns the proper functions to…

Read article

Previous Page 3 Next