Errors will occur no matter what, but I hope that’s not stopping you from writing code because it doesn't matter if you stop - someone else will continue the tradition instead :) So the only proper solution is to be prepared and to handle errors in the right way.
Let's talk for a moment about logging in the FrontEnd application. Yes, we can use standard console.log
or any other console[method]
that is available to us, but what we really want to have is some way to have a log available, when it's allowed and to hide the logging, when we're not interested in it. So let's review this.
"Digital Product Management" Well, I decided to learn more about being a product manager. It's always fun to complain where there is no PM in the workplace, but I wanted to see what was really missing, and why a PM was needed. So I decided to learn this top`ic by myself, I had some free time to spare, so why not?
Lazy loading in React was always possible. It wasn't so clear how to do it properly and how to handle all edge cases, as well as how to find all of them, because, like many things in life, we need first to encounter the problems, and only then can we be ready to handle them properly.
Let's talk about one of the most well-known features of the web - registration. Not particularly the whole process, but in particular one aspect, email. For almost anything on the web, we need an email: ordering goods, registering for a service, receiving notifications, etc. It's logical that if we need emails so much, then we'll need to somehow be sure that the user has provided a correct one.
First, let’s see what is the problem, then we'll discuss possible solutions and, in the end, we'll compare the solutions that already exist in the market. Why in this order and why not go straight to the last point? Well, first you're more than welcome to jump right to the end and second, I just don't think that the solution is so easy to grasp.
This is one of those rare occasions when disambiguation will not lead to a better understanding. We can safely use REST as a word on its own, without even considering the meaning of each letter. It’s just been decided to write it in capital letters, it doesn’t matter why.
I'm going to talk about unit tests here, not any other kind of tests. And unit tests have, in my opinion, the following list of criteria that they have to meet. This list makes it hard to write tests for code that use external libraries.
It's known that moment.js is a widely used library for date and time manipulations. Obviously it is the case because of the limitations of standard JavaScript API, but today we're not going to judge standard language features. Let's accept the insufficiency of built-in tools and investigate whether or not I can replace moment.js with a smaller library.
Let's say you need to display a collection that you received from the server. Usually it will come in the form of an array of objects: list of books, people, goods, etc. It’s a very common task for frontend. Actually this assignment is the main reason why we need frontend - we need to represent documents and collections in the most used way to aggregate them.