hello.js

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

NEW !!!

Tuesday, 12 May, 2020 UTC

API with NestJS #1. Controllers, routing and the module structure

NestJS is a framework for building Node.js applications. It is somewhat opinionated and forces us to follow its vision of how an application should look like to some extent. That might be viewed as a good thing that helps us to keep consistency across ... more


Monday, 4 May, 2020 UTC

Getting geeky with Git #3. The branch is a reference

Branches are the bread and butter of a software developer using a Version Control System ( VCS ) of any kind. Today we explore how they work in Git. In the previous part of this series, we’ve learned that a commit is a full snapshot of the project state. ... more


Monday, 27 April, 2020 UTC

TypeScript Express tutorial #15. Using PUT vs PATCH in MongoDB with Mongoose

When we develop a REST API, we have a set of HTTP methods that we can choose. An important thing to understand is that HTTP methods are, to a large extent, indicators of actions. Therefore, it is our job to make them work properly. In theory, not much ... more


Monday, 20 April, 2020 UTC

TypeScript Express tutorial #14. Code optimization with Mongoose Lean Queries

Mongoose does quite a bit of heavy-lifting for us. It is immensely useful, but not necessary in every case. In this article, we explore the Mongoose documents more and learn what we can achieve by giving up their benefits. Mongoose Document In the second ... more


Monday, 13 April, 2020 UTC

Getting geeky with Git #2. Building blocks of a commit

As a developer, there is a high chance that you use Git every day. It means saving changes through commits . In this article, we look into what are their building blocks. This includes looking into the filesystem of Git and learning about different states ... more


Monday, 6 April, 2020 UTC

Getting geeky with Git #1. Remotes and upstream branches

Version control systems (VCS) are one of the essential tools of every programmer. The most popular one is Git, and therefore it is worth looking into it a bit more. In this article, we look into what is a remote and what the origin keyword means. We ... more


Monday, 30 March, 2020 UTC

Building forms using Formik with the React Hooks API and TypeScript

The Formik library keeps on growing and attempts to keep up with the React community. Formik, since version 2.0, has a built-in set of hooks. In this article, we go through all of them. We also look into how to use Formik with TypeScript. The basics ... more


Monday, 23 March, 2020 UTC

What’s the deal with immutability in JavaScript?

The immutability is quite a buzzword lately. Today we attempt to find out why. In this article, we explain what the immutability is and how we can benefit from it. When defining immutability, we look into various aspects of it. We investigate primitive ... more


Monday, 16 March, 2020 UTC

TypeScript type inference with const assertions and the infer keyword

TypeScript works in a way that automates a lot of the work for us. We don’t have to write types every time, because the compiler works hard to derive them from the context. In this article, we look into more complex cases that involve the infer keyword ... more


Monday, 9 March, 2020 UTC

Functional React components with generic props in TypeScript

One of the qualities of our code that we should aim for is reusability. Also, following the D on’t R epeat Y ourself principle makes our code more elegant. In this article, we explore writing functional React components with TypeScript using generic ... more


Tuesday, 24 December, 2019 UTC

JavaScript design patterns #4. Decorators and their implementation in TypeScript

When we are cold, we put on a shirt. If that’s not enough, we put a coat on top. Decorators work similarly. In this article, we discuss the principles of the decorator design pattern and talk about their implementation in TypeScript. We also briefly ... more


Monday, 16 December, 2019 UTC

JavaScript testing #5. Testing hooks with react-hooks-testing-library and Redux

The hooks are an exciting addition to React and undoubtedly one that helps us to separate the logic from the template. Doing so makes the above logic more testable. Unfortunately, testing hooks does not prove to be that straightforward. In this article, ... more


Monday, 9 December, 2019 UTC

JavaScript design patterns #3. The Facade pattern and applying it to React Hooks

The essential thing when approaching design patterns is to utilize them in a way that improves our codebase. The above means that we sometimes can bend them to fit our needs. The Facade design pattern is commonly associated with object-oriented programming. ... more


Monday, 2 December, 2019 UTC

JavaScript design patterns #2. Factories and their implementation in TypeScript

As discussed in the previous part of this series, there are many design patterns out there. Some of them fit well into the JavaScript language, and they are often used. In this article, we discuss the factory method pattern and show some of its use-cases. ... more


Monday, 25 November, 2019 UTC

Exploring the caching in the browser. Clarifying the cache-control header

The performance of our websites is an essential factor to consider. One of the ways to improve it is to cache our resources, and there are many ways to implement it. In this article, we define what caching is and go through the most common approaches. ... more


Monday, 18 November, 2019 UTC

Understanding the useEffect hook in React. Designing custom hooks

Hooks are quite a new feature in React. They seem to simplify how we add logic to our components. When I was starting to use them, most of them seemed straightforward. That didn’t apply to the useEffect hook. It might not be that uncomplicated, and therefore, ... more


Monday, 11 November, 2019 UTC

JavaScript design patterns #1. Singleton and the Module

While having a vibe of a mad genius might be tempting, reinventing the wheel is usually not the best way to approach designing your software. The chances are that somebody already had the same problem as you and solved it in a smart way. Such best practices, ... more


Monday, 4 November, 2019 UTC

Current state of the Concurrent Mode in React

React is constantly expanding, and with that process, there are a few cool features coming. One of them is Concurrent Mode. In this article, we go through its principles and discuss its current state. We also look at what the future might bring. The ... more


Tuesday, 29 October, 2019 UTC

Writing React forms with Formik. Validating data using Yup

Writing a React form without any additional dependencies isn’t much of a challenge itself. The same goes for applying client-side data validation. What might be troublesome is keeping all your forms consistent across a bigger project. If every developer ... more


Monday, 21 October, 2019 UTC

Understanding JavaScript Proxy. Preserving backward compatibility in a library

While learning about various JavaScript features, it is usually not crucial to know them by heart. Sometimes it is very beneficial just to know what’s out there and what can we use it for. One of those features is a JavaScript Proxy . In this article, ... more


Monday, 14 October, 2019 UTC

TypeScript Express tutorial #12. Creating a CI/CD pipeline with Travis and Heroku

Once our application is up and running, we want to deploy it. In this article, we explain what Continous Integration (CI) and Continuous Delivery (CD) is. We use Travis and Heroku as an example, but the knowledge can be used with other tools also. Both ... more


Monday, 7 October, 2019 UTC

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

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

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

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

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

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

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

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

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