Smartly auto-correct commands in Git
January 25, 2021 — How many times did it happen to you that you mistyped a Git command and curse yourself every time you do it? I did. Many times. It’s annoying!
A blog on PHP, JavaScript, and more
January 25, 2021 — How many times did it happen to you that you mistyped a Git command and curse yourself every time you do it? I did. Many times. It’s annoying!
January 24, 2021 — There are certain operations that can have a high probability of failure. For instance, sending a request to a third-party API. You’re not sure whether it will work every time flawlessly because it’s not in your control. If the API endpoint you’re hitting is not responding, you might end up with an exception straight away.
January 21, 2021 — With the latest release minor of Laravel, i.e. v8.23.0, a really interesting method has been introduced in Laravel’s query builder for situation where you want to get the only record for the matching criteria. But if there are more records for this criteria, there should be some sort of exception.
January 19, 2021 — While working on your codebase, be it developing features for your application or fixing bugs, we all tend to get a little bit demotivated sometimes in the middle of those sessions. Because after all, we are all humans and we all need some kind of inspiration every now and then.
January 18, 2021 — When you are using Laravel queues, you might bump into the situation where you want to prevent overlapping of jobs that handles sensitive information. This could be to provide data integrity of important information such as the user’s wallet balance.
January 16, 2021 — Currently, there are two ways if you want to create ES6 class components in React.
January 13, 2021 — There are a lot of reasons where you would want to “deep copy” objects in your application. For instance, when working with React.js, you might have used the shouldComponentUpdate
life-cycle method. In this method, you would determine if the component has the same props and state as it had previously by shallow or deep copying objects.
January 12, 2021 — Although the official PHP website’s documentation has a dedicated section on “Overloading”, it’s not truly called overloading by any means.
January 11, 2021 — Here’s a little tip about the artisan command that generates the controller. So, if you’ve used the make:controller
command with the --resource
option, it will generate controllers with create, read, update, and delete (“CRUD”) actions in them.
January 4, 2021 — Oftentimes, I stumble across a situation where I would need to center something and over the years I have tried different permutations and combinations. But all those somehow felt “hacky” and not something that is reliable.