As a Software Developer, it is not always about writing code. We also share a passion to personalize our workstations and development environment. I have personally been a fan of that aspect. Very often, I customize fonts, icons and themes of my VS code.
In this short yet fun article, I’ll explain to you a plugin that I love and customize to make my IDE a fun place to work with.
The extension name is “Power Mode” that you can find in the marketplace of VS Code extension. This is how it looks like:
Creating spinner components in Angular is done in almost all web apps. The 1st rule of thumb is to avoid Spinners as much as we can. There are several smart ways to do that. I’ll keep that to a different article. In this article, we will be creating the same old spinner of Angular but with a little trick up its sleeve.
In my frontend development experience with different MNCs, I have seen spinner implementation in few different ways.
In today’s world where data is the new oil, we are often lured into collecting all forms of data. Once we have those data, the next step comes as the visualization of the data to make some sense out of it. One such data which is associated with time stamps are stored in timeseries database (TMDB).
In TMDB, the time is treated as first class citizen. Recording each and every change to the system as a new, different row is what makes time-series data so powerful. …
In the world of unit testing in Angular, use of
tick() often remains mystery unless we stumble upon its use case. I will try to explain the working of
tick() using an Input element.
To start with, lets create an
As we can see in this example, the
input provided by the user will make a server call. To reduce the repeated call on every input value change (
searchValChanged(event) ) , we have put a
debounceTime below test case can easily check the behavior of code :
In the Angular world of Unit testing, we often overlook some concepts unless we actually need them to serve specific purpose. After answering a lot of questions on stackoverflow , one of such concept is related to accessing HTML elements using
Before we begin, if you are new to unit testing then I would recommend you to start from the intro article. You can more article links below this link, which contain more use cases for unit testing in Angular.
In this article, I’ll discuss 3 ways to access an HTML element and how are they different. …
There are several ways to deploy a Go app on Google Cloud. You can use App Engine, GCE or GKE. In this tutorial, we’ll be focusing on GKE to deploy our
go-swagger project. A basic Go project can easily be deployed using the examples available on GCP documentation . But in case of go-swagger, even a basic project requires lot of dependencies along with below command to run it as server:
go run cmd\e-food-server\main.go --scheme http --port=8080
In this tutorial, I will cover on the steps to deploy my github project on GKE.
To start with, you need to have…
I started my backend career in Java. Coming from Java as an Object Oriented Language, I had a keen interest in knowing the object oriented implementation in Go. The implementation was very relatable using
struct to achieve OOP. That’s when, I saw a subtle way of how Go achieved it in 2 ways.
In this implementation, we will see that the
struct is followed by
* (pointers) in its associated methods. We have created a
Employee struct and have created a private field named
name which is set using a method named
When we run the code…
This article is the continuation of user authentication using JWT . In Part-1 of this article, we successfully generated a valid JWT token using our
/login endpoint. In this section, we’ll work on securing APIs so that it restricts any unauthenticated calls.
To enable authentication for an API, we need to define
Lets create an endpoint, say
/user/cart which fetches all cart items of a registered user. Since , we want to restrict this API for authorized user only, we need to add below definition in
In my previous article, I have explained on how to register a new user for a website. We saved our password securely using
bcrypt into the database which is a sensitive data. Once, we are done with registration, the next step is to provide login for the registered user.
For user authentication we have few options such as
JWT (JSON Web Token) based authentication. …