Few weeks ago I noticed a blog post “Oxidizing Source Maps with Rust and WebAssembly” making rounds on Twitter - talking about performance benefits of replacing plain JavaScript in the core of source-map library with a Rust compiled to WebAssembly.

This post piqued my interest, not because I am a huge on either Rust or WASM, but rather because I am always curious about language features and optimizations missing in pure JavaScript to achieve similar performance characteristics.

So I checked out the library from GitHub and departed on a small performance investigation, which I am documenting here almost verbatim.

How does Wikipedia sort though 5+ million articles to find the most relevant one for your research?

How does Facebook find the friend who you're looking for (and whose name you've misspelled), across a userbase of 2+ billion people?

How does Google search the entire internet for webpages relevant to your vague, typo-filled search query?

In this tutorial, we'll walk through setting up our own full-text search application (of an admittedly lesser complexity than the systems in the questions above). Our example app will provide a UI and API to search the complete texts of 100 literary classics such as

Trying To Find Studies About Users’ Perception

I wanted to find some scientific research that could support that these techniques to load images were (or not) beneficial. This proved to be a challenge. I couldn’t find any study proving that showing something like a blurry thumbnail before the image loads improves a user’s perception. Then I thought of progressive JPEGs.

Back To Basis: Progressive JPEGs

In a certain way, we have had a similar “progressive image loading technique” backed into images for a long time. Progressive JPEG is a good example.

Progressive JPEGs have been proposed as a good practice for images, especially for sites used in slow networks.

Security researchers have recently uncovered security issues known as Meltdown and Spectre. These issues apply to all modern processors and allow attackers to gain read access to parts of memory that were meant to be secret. To initiate a Spectre- or Meltdown-based attack, the attacker must be able to run code on the victim’s processor. WebKit is affected because in order to render modern web sites, any web JavaScript engine must allow untrusted JavaScript code to run on the user’s processor. Spectre impacts WebKit directly. Meltdown impacts WebKit because WebKit’s security properties must first be bypassed (via Spectre) before WebKit can be used to mount a Meltdown attack.

This ends up re-rendering a <BreadcrumbList>, two<ListingTitles>, and a <SummaryIconRow> when it updates. However, none of these have any differences, so we can make this operation significantly cheaper by using React.PureComponent on these three components. This was about as straightforward as changing this:

So, how do the rules from the start of this post help solve these problems? First let’s take a look at the elements that we applied a z-index to and work out if they fall into the ‘local’ or ‘global’ category.

The full-screen modal is global

The drop down menu is global

The header could go either way, but I’ll say global

The product list item is local

When it comes to global stacking, we care about how two elements stack relative to each other when they’re both on the screen at the same time. Since the relationship is important, the only sensible thing to do is to record the z-indexes for each of these elements in the same place.

With the rise of Service Workers and performance improvements like cache-control: immutable becoming critical for modern applications. Tooling is increasingly essential for deploying and updating production code in safe and consistent ways.

As tooling becomes better and more advanced there is a growing divide between what we write as developers and what ships to the users. Source Maps are a neat method of getting access to the original source code when debugging compiled applications.

Design patterns often get incorporated into popular frameworks. The Model-View-Controller (MVC) design pattern, for example, is one that is ubiquitous. In JavaScript, it is hard to decouple the framework from the design pattern. Oftentimes, a particular framework will come with its own interpretation of this design pattern. Frameworks come with opinions and each one forces you to think in a certain way.

More from this author

Modern frameworks dictate what the concrete implementation of the MVC pattern looks like. This is confusing when all interpretations are different, which adds noise and chaos. When any code base adopts more than one framework it creates a frustrating mess. The question in my mind is, is there a better way?

Electron is a framework for building cross platform desktop applications using Node.js and Chromium. Electron uses web pages as its GUI, so you could also see it as a minimal Chromium browser, controlled by JavaScript.

Installing Electron

Before installing electron, make sure that you have installed nodejs on your computer. If you have not installed already, get the installer from here. Note that this installs npm as well for you. Once the installation is complete, you can confirm that node and npm are installed by running the following commands in your terminal.

Install electron globally by running the following command in the terminal.

NPM is host to all kinds of packages. You can bundle up pretty much anything as long as it has a JavaScript entry point, but modules (code that can be imported and used in other JavaScript projects) are by far the most common type of package.

In this two-part series, you will learn how to build, test, and publish a JavaScript module to NPM, as well as how to update it using continuous integration that will automatically test and publish new versions. This post will focus on testing, building, and publishing a module, while Part II will focus on setting up continuous integration for updating the module.

2. It is notoriously difficult to style HTML5 file inputs. One workaround involves putting an input in the DOM and hiding it with CSS. In order for the browser to open the native file picker, this inputmust be clicked. How it gets clicked, and how the client handles what the user uploads, though, is a different matter.

Debugging - the process of finding and fixing defects in software - can be a challenging task to do in all languages. Node.js is no exception.

Luckily, the tooling for finding these issues improved a lot in the past period. Let's take a look at what options you have to find and fix bugs in your Node.js applications!

We will dive into two different aspects of debugging Node.js applications - the first one will be logging, so you can keep an eye on production systems, and have events from there. After logging, we will take a look at how you can debug your applications in development environments.

Smooth scrolling (the animated change of position within the viewport from the originating link to the destination anchor) can be a nice interaction detail added to a site, giving a polished feel to the experience. If you don't believe me, look at how many people have responded to the Smooth Scrolling snippet here on CSS-Tricks.

Smooth scrolling vs abrupt jumps

Regardless of how you implement the feature, there are a few accessibility issues that should be addressed: focus management and animation.

Focus Management

It is important to ensure that all content can be accessed with the keyboard alone because some users

Preface

Functional programming (or, more accurately, functional-oriented programming) is a-booming in the software industry nowadays. Much like object-oriented programming back in its heyday somewhere in late 1990’s, it became little more than a buzzword to a commonplace programmer or a sophomore IT student.

FP (as it will be referred in this article henceforth) enabled developers to process data more intuitively, using transformations on collection of objects or primitives to process them as a whole instead of in piecewise fashion. However, unluckily for the beginners who wishs to elaborate on the topic, most explanations of FP are fraught with mathematic elucidations hardly relevant for common programmers. I won’t delve here into mostly academic applications of functional programming as it is meant by computer scientist, so no talk of monads here – for those more interested in the topic from the theoretic side, I would definitely recommend a free book, which comes with explaination of the aforementioned topics and much more and free

In every community there’s a coming-of-age process, a rite of passage that every newcomer must experience before he or she can really be considered an insider. For the CSS community, it goes something like this:

Hey, this page is almost perfect. Can you just center that icon vertically? I told the boss we can roll it live in five minutes.

For CSS junkies like me, lines like this provoke an involuntary nervous giggle, the kind of giggle you’ll hear if I tell you about the first time I got dumped or crashed my car. In the old days, before CSS Grid, before Flexbox, before “Computer Science” got renamed to “Googling Stack Overflow,

What is benchmarking? It refers to the process of testing the performance of an implementation with respect to an already established one. For example, in the airspace industry we can assume that an F-16 is the benchmark for the fastest plane. Any new design should then compare (benchmark) itself against the performance of an F-16.

In this way, when we have more than one design, we can choose the best implementation based on its benchmark with the F-16.

However, sometimes its easier just to compare the performance between implementations. This is true especially in software development. If we have two or more implementations of a solution we can run a benchmark and choose the implementation which is the fastest or alternatively the one which consumes the least resources. Whatever suits the requirements. Note here that we don’t have a benchmark, instead we are

I originally created this as a short to-do list of study topics for becoming a software engineer, but it grew to the large list you see today. After going through this study plan, I got hired as a Software Development Engineer at Amazon! You probably won't have to study as much as I did. Anyway, everything you need is here.

The items listed here will prepare you well for in an interview at just about any software company, including the giants: Amazon, Facebook, Google or Microsoft.

Best of luck to you!

Translations:

What is it?

This is my multi-month study plan for going from web developer (self-taught, no CS degree) to software engineer for a large company.

Build tools come in allsize and color. But do you really need them? Wouldn’t it be easier to just follow the original CLI documentation of Rollup, Stylus or whatever and call it a day? Not to mention they add up a lot of dependencies.

I’m going to show you the “native” way with NPM scripts and chokidar.

Let’s start by creating a node.js project. Open your terminal and write: