So, I needed to update a value of every document in a collection.

Photo by Markus Winkler on Unsplash
{"_id": **, "status": "SOLD"}
{"_id": **, "status": "SOLD"}

I need those to be

{"_id": **, "status": "INACTIVE"}
{"_id": **, "status": "INACTIVE"}

How? The answer should be updateMany

try {
db.COLLECTION.updateMany(
{status: "SOLD"},
{$set: {current_value: "INACTIVE"}}
);
} catch (e) {
print(e);
}

Here, first field {status: “SOLD”} is the condition as “where” clause. Then I had to use “$set” to the desired one. I hope you understand.


Photo by Aaron Burden on Unsplash

Now it is around 07:20 PM of 5th October, 2020. I was thinking about trying this Python Framework named “Tornado Web Server”.


Generating real traffic on your application is hard. Successful load testing lends the assurance of a high-quality application that can serve a large number of users of the organization.

First of all, Why do we need load testing?

When testing our website, app or API endpoint under a load, we are actually simulating how it will perform when hundreds, thousands or millions of users visit it, in real life. Our system might perform completely differently for one user (functional testing) compared to many (load testing), due to the system’s resources. …


I have been using Redis for more than one year. But initially It was only with caching plugins. I did not see beyond that. As caching, it was just like an unimportant image of Redis caught in my head.
You might think why I am saying it as unimportant. Whenever we say caching, we assume it as a volatile thing. But recently I have learned that it is much more efficient than that as it has many more use cases.

I will present you this article with some question-answer. The questions you will get answered is listed below:

  1. What is…


I have been building spring application which has dependency of frontend packages which needs to be built too via npm. But not all commits were frontend changes. The jenkins job was created with conjugation of maven and npm. And it take more time when npm runs.

Photo by Lukas Blazek on Unsplash

So, I use this shell script to identify the frontend changes which will only trigger npm build. It saves time a lot on backend test.


Every once in a while, We do need to calculate our codes execution time. I am gonna talk about Python scenario here.

Photo by Ales Krivec on Unsplash

This is a function to calculate the execution time of another function and log it.

I am sharing it for future reference.


I have been managing an web application built in spring. That application has two main sections. One is for administrative tasks start with “/admin” and others are for client related operations.

Photo by Taylor Vick on Unsplash

So, I deployed the application in two different servers with same db connections. They are individually working fine. I could do load-balance like round robin or something like that. But We had different pressure on different end and time. And for seamless client operation, I decided to route the traffic of admin in specific server and clients in another.

  1. server1 app config: host: 192.168.0.101 port: 5031
  2. server2 app config…


It was back in early 2018, a day with weird demand of multiple copy of production environment for a critical case handling for a series of major deployments. I made a face like

“shallow focus photo of blackd og” by Ryan Walton on Unsplash

the dog above but which is obviously invisible to my product owner. 😜

Even the servers were almost cluttered with full time Jenkins builds, Sonarqube and some other testing scripts. Docker was there. But We always missed something. Several time thought to slice them with KVM though we have FreeBSD servers with jails in those. We did miss the things in Debian based servers.

Then comes LXD.


I was just wandering around to get something good to encrypt uploaded files. There is a upload section in my web application and that needs another function to encrypt it after upload.

Photo by Chris Ried on Unsplash

“Marco Bellaccini” has a python package, pyAesCrypt, which is just fabulous. I created a virtual environment in a directory and started playing with it by encrypting and decryption several files. It was fun.

$ mkdir Projects/Personal/encryption
$ cd Projects/Personal/encryption
$ virtualenv .virtualenvironment --python=python3
$ source .virtualenvironment/bin/activate
$ pip install pyAesCrypt

So, I prefer Python3 and do create virtual environment that way. After installing, I created a file named…


Every now and then I feel I should prepare myself for the future with a rock solid plan. Back in early 2017 I had some resolution. Those seems silly and somewhat regretting too.

It feels regretting because I had that list with some really good plan and progress visualization in place to feel me good. The good thing is, all are not in waste. I have achieved some good things from the list and from the unconscious mind I actually tried to improve my “resolutions status”.

So, I think having written or visualized a plan do really help to have some progress in the long run.

“A person making a checklist in a notebook” by Glenn Carstens-Peters on Unsplash

The important thing to keep in mind that you have to rock solid on “What I want from this list” and get visualized about it.

Fahad Ahammed

A DevOps Enthusiasts who always try to gather and share knowledge about programming and DevOps tools.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store