Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Implementing an async queue in 23 lines of code

posted in JavaScript on 2018-05-07   tasks taskindex getnexttask numofworkers function result promise task array process error run

Recently we had an interesting task at work. The user makes a selection of items and clicks a button. Then for every selected item we have to make a request to our API. The thing is that the user may click as many items as he/she wants. In order to speed up the process we decided to handle four requests in parallel and once some of them is finished we pull the next one. If you ask why exactly four requests in parallel read this paper.

read more

Feeding the beast at 60fps

posted in JavaScript on 2014-07-23   li data browser function var processed code list time

The browsers nowadays are smart. They optimize everything and help us to produce better applications. They process our code as fast as possible and even on mobile devices deliver a pleasant experience. However, at the same time, it is possible to write buggy code and make the browser freezing. We are not talking about slowing down the rendering. We are talking about no rendering at all. There are cases where we want so much from the browser that it just can’t handle it.

read more

Using Node.js to rename set of images

posted in Nodejs on 2014-01-22   file processed path glob files fs require

Today I had to rename a bunch of image files to the same names, but in lower case. Here is how I did it.

read more

Design Processes, Not Interfaces - Tiffany Conroy

posted in Must-see on 2013-05-19   process

Computers are tools that help people accomplish tasks by making the process easier, faster, cheaper, less error-prone, or just more fun. But what tasks? And by what process? What parts of the process can the computer make better? How can users interact with the computer to make it do its part of the process? Only lastly can we ask: what must be presented to the user and how?

read more