State is one of the fundamental concepts in React. The
useState hook is the foundation of state management in functional React components. In fact, most beginners start their React journey by learning about state management and the
However, when writing code, some things unfortunately get used in places where there are better alternatives. These often end up making code more complicated than it needs to be. Here we will look at a common misuse of the
useState hook and a better solution to the problem. …
I have been working as a Software Developer for the past four years. Just like any other job, our job too, can get difficult. Our jobs involve a lot of problem solving and thinking. Deadlines are always right around the corner and requirements are always changing. Furthermore, there are so many meetings that there is little time to do what we actually signed up for i.e write code.
However, Software Developers have bigger problems than these — and a lot of us are not even aware that these problems exist. …
The data generated by a software application is valuable. This is also true for data that can be deleted from the application. Keeping deleted data around can help in tracking data history, trends, and relationships between data. On top of that, some parts of the application might be able to make use of deleted historical data.
As a result, a lot of software applications are designed in such a way that data is never actually deleted. One of the popular approaches for accomplishing this is Soft Deletion. Even though this approach looks simple, it often leads to complications. Here, we…
Write a short program that prints each number from 1 to 100 on a new line.
For each multiple of 3, print "Fizz" instead of the number.
For each multiple of 5, print "Buzz" instead of the number.
For numbers which are multiples of both 3 and 5, print "FizzBuzz" instead of the number.
The above text is what we call the FizzBuzz problem in the world of programming interviews. This ‘simple’ question has been around for a long time.
It seems pretty easy, right? I thought so too! I had seen FizzBuzz around but had never actually given much…
It was early December of 2020 when I began to feel discomfort while sitting down during work. It was then that I noticed that there was a cyst on my left glute. At first, I didn’t make much of it because I thought that it would just go away. Guess what? It didn’t go away.
After a week of dealing with the pain, I finally decided to go to the Doctor to get it checked out. I’ll admit that it felt weird when the doctor asked me to lie down in order to take a look at the cyst. To…
Take a look at the code below. Do you see anything wrong with the
NavBar component? You might even want to play around with the results if you cannot find the problem by simply looking at the code:
If you answered
Developers often write test cases along with their code. On top of that, they even add some exploratory testing to their work pipeline. However, sometimes, there are some errors that escape their well-thought-out testing processes and end up in production.
A lot of these errors are experienced and discovered by the end users — some of them might report the problem, some might try later, or some might outright reject the product because of the error.
Thus it is important to be able to quickly react to errors that occur in production. It’s easy to debug and fix an error…
The above chart shows the price over time of a cryptocurrency that went from a little over $450 down to nothing in no time at all. This cryptocurrency is non other than BitConnect — which is probably the biggest scam ever in the history of cryptocurrencies.
The value of Bitcoin is rising again. This means that it is a good time for people to run scams because there will be a lot of new people in the crypto market. …
Those of us who have worked with functional components in React know that the introduction of Hooks has made our lives a lot easier. However, functional components have their own set of complexities and gotchas. As a result, it can sometimes be difficult to write readable and optimized functional components. Today, we will look at five simple tips to help us do just that.
Let’s take a look at the following React component called
This component takes an array of items, sorts them according to the comparison function provided, and displays them. However, this sorting operation could take…
Working with time zones can be rough! In fact, this article was inspired by the problems that I had with them. I finally decided to bite the bullet and do some extensive research to properly understand them. I found that they get much easier to work with when you understand the basics. This is my attempt, by putting all the basics in one place, to help anyone else who is struggling with time zones. There are also solutions to some common problems at the end.
This is the first thing we need to understand before looking at time zones. UTC…
Technology for Passion, Noodles for Hair and Junk for Food