Git is one of the most important tools for Software Developers. It provides a clear and traceable history of how code has changed and evolved over time. Git is also essential for code reviews since it provides a clear view of code changes. Keeping git commits minimal, clear, and concise helps to better track changes and makes code reviews easier.
However, us developers often mess up our commits and it is very tempting to go back and change them. Here, we will look at a bunch of such scenarios and discuss how to deal with them.
A lot of the…
Most of us have witnessed applications where some new features are initially made available to only a portion of the user base and then gradually rolled out to the rest of the users.
Some applications release new features to all users in a given location, some might release it to the most active users, and some might release it for a random selection of their users. Some applications even ask users if they are willing to try the new feature. However, only some users might actually be presented with the opportunity to opt-in.
The process of releasing features gradually in…
An attacker gaining access to your AWS account and ultimately, your cloud infrastructure is a spell for disaster. Thus, it is of utmost importance to secure your account properly. Here, we will break down and take a look at ways to secure your AWS account and reduce points of access for attackers.
It is not a good idea to use the root account that you created during signup for day-to-day tasks. This account just has too much power.
A better idea is to instead create a new group called “Administrator”. This group can be given the AdministratorAccess policy. This policy…
I took an HTML skill test recently where some of the questions were about HTML elements and attributes that I had never seen before. Even though I passed the test, I realized that I had gotten pretty rusty in HTML and decided to go back to the roots.
Obviously, during research, I ran into some HTML elements I had never seen before; these were not even on the test. The behavior of these elements was completely different to any other element I had seen before. …
The discussion around the importance of code readability compared to performance has been floating around on the internet for a long time. However, it is difficult to come up with an objective answer.
So let’s try to analyze readability and performance in different contexts instead of trying to find an objective answer.
Let’s start with a question: Is this readable code?
- .... .. ... / .. ... / .-. . .- -.. .- -... .-.. .
This is actually Morse code that translates to “this is readable!” You might say that this is readable if you know Morse Code…
Real time search is a functionality where the user can type in their search query and get results without having to press any buttons to actually initiate the search. This is a pretty popular functionality in modern web browsers.
One example of this is the search suggestion functionality in google.com. The list of suggestions changes in real time as you type in your query. Here we will look at the common problems that occur with this type of search. We will also try to solve these problems using hooks instead of the regular methods typically used to solve this problem.
Here’s some pretty standard React code:
React, then just create our component and return some JSX markup.
One thing I found weird when I started learning React was the fact that we have
import React but do not use it anywhere. …
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. …