Posts

You need to walk!

Image
The all-age exercise Walking is that simple of an activity where we just need to keep putting one leg in front of another as slowly as we can. It is something that we learned on our own as a baby and since then it has been with us. People of all ages can walk without too much of an effort or training. But over the years we have got lazy and now we avoid walking as much as possible. Even if the distance we have to walk is about a few 100 metres we resort to vehicles. Imagine how fit the previous generations(or younger version of ourselves) were who used to walk kilometres to go to school or market. We just need to rediscover that lifestyle. (PC: Google) Health benefits Before I tell on how to rediscover the lost walking lifestyle, let me start with some benefits on walking (most of them are associated with any exercise): Strong legs - carrying our own weight over and over, our leg becomes real strong. Strong core - the core muscles that stabilise our posture will get ...

Being the baby in us

Image
Introduction I haven't been much of a baby person. I have never really spent much time with babies all this time. But the last 2 years have been really special for me. It was made special first by my niece and then my daughter. Both of them have taught me a lot and brought a whole lot of new perspectives into my life. Yes! baby :) Carefree I envy the way babies are so care free. Watching them play is so heart-warming. They don't care about the outcome, society, judgements or just about anything. Very straightforward and they do whatever they like. Of course as grown-ups we need to provide them their needs and a safe environment. But for sure we can take a leaf from their book for a break from our restrictive and stressful lives. Finding happiness As grown-ups we often struggle to find happiness in life. It is surprising the way babies find happiness in the things we least expect from. They are so successful in their search for happiness that will put us to sha...

Sunday Morning Bliss

Image
Prelude Well, it all started with the Marathon training last year. I had training runs every Sunday for a marathon I had registered. The runs used to start at around 5 in the morning. It means waking up in the wee hours of a holiday, driving for about 20 km(up and down) and then running for around 2.5 hours. So, what bliss in the world are we talking about? During the 4 hour time frame from around 5-9, I indulge myself in various experiences that forms the essence of the bliss. Running, relaxing at the beach, breakfast after the run and driving.  Stage 1 - Running Without a doubt, I can say that running is a passion of mine. Running takes my mind to a different level all together. It gives me so much of peace, clarity of mind, contentment and of course the physical fitness. Put on some music while running and heaven will be in sight. Earlier I used to run a lot, but these days I have reduced the mileage to prevent injuries and to squeeze in more strength training. Stil...

Digital signature in Node.js

What is a digital signature? In short it is a piece of data sent by the sender to the receiver to establish the identity of the sender. Upon receiving the data, receiver can identify if the sender is the one it says it is. It is made possible by making use of Asymmetric Cryptography . Sender encrypts some data with the private key, to generate the signature. The signature and public key will be sent to the receiver. Receiver decrypts the signature using the public key and compares the decrypted value, to the expected data (data encrypted by the sender). Both the sender and receiver has to agree beforehand, on what will be the data they would be using. Wiki Link:  Digital Signature Node.js Implementation - Sender const crypto = require('crypto'); const privateKey = `-----BEGIN RSA PRIVATE KEY-----MIICXQIBAAKBgQDCtTEic76GBqUetJ1XXrrWZcxd8vJr2raWRqBjbGpSzLqa3YLvVxVeK49iSlI+5uLX/2WFJdhKAWoqO+03oH4TDSupolzZrwMFSylxGwR5jPmoNHDMS3nnzUkBtdr3NCfq1C34fQV0iUGdlPtJai...

How do I choose between swimming and running?

Image
                      VS  Both swimming and running are excellent forms of exercise. It is very difficult to pick one of the two. People usually do a mix of both or pick one based on their preference or goals. Comparison: Effect - Swimming is a full body exercise. In addition to leg kicking, upper body(arms and shoulders) also needs to work hard to drive forward. Running is more of a lower body exercise. Core needs to be strong to have a good running form. But while running, upper body is less used compared to lower body. Injury - Running is more injury prone. Gravity takes its toll while running. Every step during running, creates a reaction force from the ground which travels up the body and can lead to injuries. Depending on the running speed, the force can be up-to 4G (4 times the body weight). And for the same reason, lots of strength training should go with running. But while swimming, because of the b...

Fun with Docker

Background It has been long since the Docker buzzword has been around. On how it is different from Virtual Machines. On creating/downloading images and running them as containers. But I haven't got any opportunity to get my hands dirty with Docker. I gave it a try once, but had to stop it midway because of other priorities. Recently while travelling in train, I heard a group of guys discussing about Docker. I realized that people use it commonly and I felt bad I don't know it yet. High time to learn it. Learning Docker Docker Image is like the blueprint of a context. The context can be an OS, build environment, development environment, runtime environment or a combination of the above. We can also bundle our code or data, together with the above contexts. Prebuilt images are available in the docker hub. Additionally we can create our own images and push it to the docker hub, which can be used by others. Once we have the image, we need to run the image. A runn...

ASP.Net Core saves me $4 a month!

Image
Background It has been more than 2 years since my website www.codingsoldier.com was conceived. It was created in ASP.Net MVC. Since then the site has evolved a lot technology wise. The website is used as a repository of my studies, as a means to publish my technical thoughts and also a place where I can try out the technologies/areas that I don’t usually get to do as part of my regular office work like full time DevOps or migrating sites to newer technologies without having to convince the management. Technology Migration History Initially created in ASP.Net MVC with SQL server as the database. Site was hosted in IIS in a windows server. It was migrated to Node.Js + Express and later to Node.js + React. Database was MongoDb and site hosted in Node in a windows server. Of late, the site has been migrated to ASP.Net core with SQLite as the Database. Site runs on a Linux instance, with Kestrel as the web server and Nginx as the Reverse Proxy. Migrating to ASP.Net Core...