hello.js

var please = require('share');
console.log('thank you');

Monday, 7 October, 2019 UTC

Measuring the quality of the User Experience with the User Timing API

Measuring the quality of the User Experience with the User Timing API

The User Experience might be a bit subjective and hard to measure, but there are some parts of it that we can assess. In this article, we explore the User Timing API. With it, we can care for the performance of our applications even more. With a clear ... more


Monday, 30 September, 2019 UTC

Improving our code with pure functions

Improving our code with pure functions

Our code can get quite complicated. The events handlers are triggered, the HTTP calls are made. We make a lot of stuff happen that we don’t know the outcome of. The more dependencies, the more difficult it is to predict how the function might behave. ... more


Monday, 23 September, 2019 UTC

Regex course – part four. Avoiding catastrophic backtracking using lookahead

Regex course – part four. Avoiding catastrophic backtracking using lookahead

Regular expressions can help us solve many different problems. They can also be the source of our headaches. A recent Cloudfare outage happened due to a regular expression that caused CPU to spike to 100% on (…) machines worldwide . In this article, ... more


Monday, 16 September, 2019 UTC

Bug-proofing our application with Error Boundaries and the Strict Mode

Bug-proofing our application with Error Boundaries and the Strict Mode

We all surely aim for our applications to be bug-proof. A part of it is covering your application with tests. Also, Airbnb claims that 38% of their bugs could have been prevented by TypeScript. We are not going to avoid all issues, unfortunately. A part ... more


Monday, 9 September, 2019 UTC

Installing a Progressive Web App. Writing a Web App Manifest

Installing a Progressive Web App. Writing a Web App Manifest

The JavaScript is present in mobile apps development for quite some time now. Tools like React Native and Cordova have been around for years. Another valuable tool that we can use are Progressive Web Apps, and in this article, we go through the process ... more


Monday, 2 September, 2019 UTC

Internationalization API built into your browser

Internationalization API built into your browser

There is a good chance that the application that you work on supports multiple languages. One of the things this includes is language-sensitive date handling. The most popular library that helps in achieving that is Moment.js. One of the things it handles ... more


Monday, 26 August, 2019 UTC

Introduction to Data-Driven Documents. The basics of D3.js

Introduction to Data-Driven Documents. The basics of D3.js

When it comes to visualizing data, there are quite a few libraries out there. The level of abstraction they introduce varies. Libraries like C3 and Recharts depend on the Data-Driven Documents library – D3 . Learning D3 might mean dealing with more code. ... more


Monday, 19 August, 2019 UTC

Making the job of garbage collector easier by replacing the Map with the WeakMap

Making the job of garbage collector easier by replacing the Map with the WeakMap

ECMAScript 6 introduces a lot of cool features that we are now quite familiar with. In this article, we talk about some of the data structures that it implements. To understand more sophisticated ones like the WeakMap, we also go through the regular ... more


Monday, 12 August, 2019 UTC

The process of rendering a page. Increasing the performance by reducing browser reflow

The process of rendering a page. Increasing the performance by reducing browser reflow

Rendering a page is a complex process. When you change the DOM structure or modify the CSS, the browser needs to respond to that accordingly. By knowing how this operation takes place, you can alter your approach to increase performance. In this article, ... more


Monday, 5 August, 2019 UTC

Improving our performance, accessibility, and SEO with Lighthouse audits

Improving our performance, accessibility, and SEO with Lighthouse audits

The internet connections get faster, and the devices that we use for browsing the web get more powerful. On the other hand, our websites get more and more complex, and the connection might fail at some point. Forgetting about performance can seriously ... more


Monday, 29 July, 2019 UTC

Creating a Material Design slider with Web Components. The Shadow DOM concept

Creating a Material Design slider with Web Components. The Shadow DOM concept

As a developer dealing with the Front End technologies, you probably are familiar with attempts to reuse the code in the form of components, for example with libraries like React, Angular and Vue. Web Components implement a similar idea. It consists ... more


Monday, 22 July, 2019 UTC

TypeScript Express tutorial #11. Node.js Two-Factor Authentication

TypeScript Express tutorial #11. Node.js Two-Factor Authentication

Identity theft is a serious issue nowadays. With so many accidents happening on the web, it is a great time to learn about providing an additional layer of security for our users. In this article, we go through the principles and implementation of Node.js ... more


Monday, 15 July, 2019 UTC

Node.js TypeScript #15. Benefits of the HTTP/2 protocol

Node.js TypeScript #15. Benefits of the HTTP/2 protocol

The HTTP protocol, having been introduced in 1991, is almost 30 years old. It went through quite a journey since the first documented version, later called 0.9 . In this article, we briefly go through the history of the development of the HTTP protocol ... more


Monday, 8 July, 2019 UTC

Algorithm React uses to update the view. Increasing the performance of a component

Algorithm React uses to update the view. Increasing the performance of a component

In this article, we look into how React checks if the view should be updated. We also use the tools like the shouldComponentUpdate lifecycle function, the PureComponent, and the memoization. We start by acquiring a basic understanding of how React works ... more


Monday, 3 June, 2019 UTC

React SSR with Next.js #2. Prefetching the data with getInitialProps

React SSR with Next.js #2. Prefetching the data with getInitialProps

Today we expand our knowledge to build pages that are more complex and utilize more features from the Next.js framework. In this article, we learn how to fetch initial data for our components on the server side. This way, we can take even more work off ... more


Monday, 27 May, 2019 UTC

React SSR with Next.js #1. Concept of Server Side Rendering & basics of routing

React SSR with Next.js #1. Concept of Server Side Rendering & basics of routing

In recent years, the popularity of client-side Single Page Applications skyrocketed, for various reasons. Following its principles, we build pages with the amount of interactivity that we didn’t have before. When using React to render the page the “regular” ... more


Monday, 20 May, 2019 UTC

Node.js TypeScript #14. Measuring processes & worker threads with Performance Hooks

Node.js TypeScript #14. Measuring processes & worker threads with Performance Hooks

When writing Node.js code, we can approach tasks in many ways. While all of them might work fine, some perform better than others, and as developers, we should strive to make both easily readable and fast applications. In this article, we learn how to ... more


Monday, 13 May, 2019 UTC

Node.js TypeScript #13. Sending data between Worker Threads

Node.js TypeScript #13. Sending data between Worker Threads

The Worker Threads give us quite exciting features when compared to, for example, child processes. In this article, we create our instances of the MessageChannel to communicate with the Worker Threads. Aside from that, we also share the data between ... more


Monday, 6 May, 2019 UTC

Node.js TypeScript #12. Introduction to Worker Threads with TypeScript

Node.js TypeScript #12. Introduction to Worker Threads with TypeScript

The Node.js and JavaScript are often perceived as a single-threaded but in this series, we prove that it is not entirely true. Node.js creates threads when performing Input/Output operations. Not only that, but we can also create additional processes. ... more


Monday, 29 April, 2019 UTC

Node.js TypeScript #11. Harnessing the power of many processes using a cluster

Node.js TypeScript #11. Harnessing the power of many processes using a cluster

After finding out that Node.js is in its nature single-threaded, we might think that all the cores of your processor are meant to go to waste, but this is not necessarily the case. In the previous part of this series, we prove that Node.js creates additional ... more


Monday, 22 April, 2019 UTC

Node.js TypeScript #10. Is Node.js single-threaded? Creating child processes

Node.js TypeScript #10. Is Node.js single-threaded? Creating child processes

The Node.js environment and JavaScript is often identified with running just one task at a time, but this is not precisely the case. In this article, we go through the concept of multiple processes and spawn them using the child process module. Along ... more


Tuesday, 16 April, 2019 UTC

Creating malicious packages and dealing with them using npm audit

Creating malicious packages and dealing with them using npm audit

The world is a tough place – a lot of people out there to get you! While I might not teach you some martial arts and self-defense here, I hope to raise your level of awareness where it comes to malicious code. NPM happens to serve it every now and then! ... more


Monday, 8 April, 2019 UTC

Node.js TypeScript #9. The Event Loop in Node.js

Node.js TypeScript #9. The Event Loop in Node.js

JavaScript and the Node.js environment uses the Event Loop. In this article, we explore the idea of it and go through different phases that the event loop has. Although this series aims to present the usage of Node.js with TypeScript, this time we don’t ... more


Tuesday, 2 April, 2019 UTC

Node.js TypeScript #8. Implementing HTTPS with our own OpenSSL certificate

Node.js TypeScript #8. Implementing HTTPS with our own OpenSSL certificate

HTTPS seems to be everywhere now – it is a great time to go through its principals. Int his article we generate our certificate and use the HTTPS module from Node.js. With it, we can implement HTTPS in our local development environment. What problems ... more


Tuesday, 26 March, 2019 UTC

Node.js TypeScript #7. Creating a server and receiving requests

Node.js TypeScript #7. Creating a server and receiving requests

In this article, we continue the Node.js series. This time we listen for requests and send responses . To do that, we again use the HTPP module from Node.js. Node.js TypeScript: Creating a server, receiving requests In the TypeScript Express tutorial, ... more


Monday, 18 March, 2019 UTC

Node.js TypeScript #6. Sending HTTP requests, understanding multipart/form-data

Node.js TypeScript #6. Sending HTTP requests, understanding multipart/form-data

The HTTP is a protocol allowing you to fetch resources such as JSON data and HTML documents. Two sides of the connection, the client and the server, communicate by exchanging messages. The message sent by the client is a request . The message sent by ... more


Monday, 11 March, 2019 UTC

Node.js TypeScript #5. Writable streams, pipes, and the process streams

Node.js TypeScript #5. Writable streams, pipes, and the process streams

In this article, we continue covering streams , since they have a significant role in Node.js development. This time we focus on writable streams and pipes. To illustrate how a writable stream works we implement our simple version of a stream writing ... more


Tuesday, 5 March, 2019 UTC

Node.js TypeScript #4. Paused and flowing modes of a readable stream

Node.js TypeScript #4. Paused and flowing modes of a readable stream

Streams are present in programming for a long time now and it looks like they are going to stay. In Node.js they also play a big role and with them, we can deal with reading/writing data in an efficient way. You can encounter streams, for example, when ... more


Tuesday, 26 February, 2019 UTC

Node.js TypeScript #3. Explaining the Buffer

Node.js TypeScript #3. Explaining the Buffer

Today we dive into another essential concept connected to Node.js: buffers . To understand them, we also explain what binary data is and why do we need character encodings . All this information is crucial when diving into other parts of Node.js , such ... more


Tuesday, 19 February, 2019 UTC

Node.js TypeScript #2. The synchronous nature of the EventEmitter

Node.js TypeScript #2. The synchronous nature of the EventEmitter

In this article, we continue going through the main concepts connected to Node.js . This time we dive into the idea of the Node.js EventEmitter . We explain its synchronous nature and how it works, which helps with understanding other Node.js features ... more