Iron Ranger 8085 - Copper Rough & Tough Boots

0 comments

Disclaimer: I'm not paid to write about this post, this is purely my ownership experience using these boots! This one deserves to be mentioned and hence I'm writing this post!

I don't normally like to write about or make videos about my boots, but I could not resist the temptation to make a video and write about my Red Wing Iron Ranger boots from Red Wing shoe company, Minnesota!

I purchased a pair of Red Wing Iron Ranger boots from the Red Wing retail store in Amsterdam around early 2018 and I absolutely love the way it wears. I like everything about this shoe, be it's quality leather, wearability, the comfort and the safety it gives. These shoes are made out of very high quality hide such that it will last you for an eternity. The more you wear them the more they become your's. They age so beautifully over time.

Here are some videos that I made about my experience using these boots!



Here is an ownership update after almost a year of using my boots!


Now, if you are looking to purchasing a quality boots that will serve you forever, just grab a pair of Red Wing boots! You will never go wrong!

6 Weeks Update of my Knee

0 comments

Ok so it is now just after 6 weeks of my knee injury and I'm getting better with every single day. Two Weeks ago, I had an appointment with yet another Ortho doctor and I found him reasonable. He had a look at my knee and said that the knee is stable (he did the Lachmann Test). He told me that I should now start focussing on stretching my knee and that I should let my Physio know that the goal for the next two weeks should be to do some exercises to straighten the knee!

But one good thing that the doctor did was to prescribe me a custom Don Joy brace. He told me that I should drive straight to a medical supply store and order a Don Joy knee brace. He also told me that once I have the brace, I might not need the crutches anymore. So I went to the store and got the measurements for my thigh and was told that I have to wait a couple of days for the brace to arrive. Once it arrived at the store two days after I ordered it, I was really glad to have it. Like the doctor said, the brace was all that was needed and I could walk even more comfortably without the crutches!

The brace also helps in avoiding sideways movement of the knee. I wish I had this brace on when I went Mountain Biking. Had I had this guy on my knee, I probably wouldn't have injured my knee in the first place!

Here are some pictures of the Don Joy brace that I have now!

CCTV Monitor with Raspberry Pi & OpenCV

0 comments

I wanted to play around with OpenCV and thought it might be a good idea to try OpenCV with a real life use case. DIY'ing a home camera system that can do motion detection and click images when there is some movement in the frame sounded like a cool idea. So I researched on how I could get this set up done.

There were quite a few things that I should decide, like for example., where will I mount such a camera - indoor or outdoors? If outdoor, then what about protecting the Pi from the harsh weather conditions? How will I mount the Pi such that it has a power supply? Until I answer these two questions, all what I do with my Pi is just going to be installed indoor. So I decided that I will mount my Pi in one of my rooms for the time being and just get to learn the software that is needed to get the job done. So it is going to be Python and OpenCV. I'm now spending considerable amount of time to familiarise myself with OpenCV. I have done Analytics before, but never had the chance to play with image recognition and processing. Intention is not to dive deep into how the Haar Cascade classifier in OpenCV works, but rather start with how to use it practically. Later on, I will probably get deeper insights into the algorithm itself!

So for now, the goal is to get the setup up and running! Here is what I have been up to so far!

What it is like to twist your knee?

0 comments

Roughly 3 weeks ago on the 5th of October, I had an MTB bike accident and in the process I ended up injuring my left knee. I was actually attempting to Manual during which I realized that I was about to loose my balance. I wanted to bail out from the Manual, so I tried to pull the bike completely to the front with me jump landing behind the rear wheels, but the bail out got totally out of control and eventually I ended up twisting my left knee soon after the jump.

It was such a pain for the next 5 to 10 minutes. It kind of subsided and I thought I could get back on my bike again (What a stupidity from me). As soon as I got on to my bike and tried to put my left leg down to balance the bike, I had a very sharp excruciating pain and I could not balance anymore with my left leg and fell down on the street. This is when I realized that there is something seriously wrong with my knee. I managed to limp, tow my bike back home. I was scared to think that I would have inflicted some fractures around my knee. Well, at that point in time I did not know anything about ligaments. All I knew was that I could have either fractured some of the bones or twisted my knee bone. How stupid! After about 2 hours, I went to a hospital that treats patients with emergency needs.

I had an X-Ray which thankfully confirmed no fractures or whatsoever. Well, by this time I could not neither fully flex my left leg nor bend it completely. The doctor then administered some bandage and asked me to check with an Ortho as he was suspecting some injury to the ligament. Given that it was a Friday, I had to wait until Monday so that I could make some appointments with an Ortho near by. Saturday and Sunday was when I did tons of research and educated myself about knee ligaments. After understanding ligament injuries, I had sort of mixed feelings - one a feeling that said, ligament injury is very common among sports and the other - it takes shit loads of time to recover completely (What an irony here - it just takes a couple of seconds to tear a ligament and it takes about a year to completely heal from it). Come Monday, I quickly managed to make an appointment with a near by Ortho and he sent me for an MRI as he was suspecting ACL tear.

Fast forward 10 days, I had the MRI done and the results from the MRI centre was suggesting that I have a partial ACL tear, minor bone bruises, fluids build up in the joints, small baker cyst. No cartilage damage and no Meniscus damage. I took the MRI results back to my Ortho and he was just pusing me to get it surgically corrected. This was pretty strange as I asked him if I could try a Physio rehab first and then decide on surgery, but he was adamant and just blindly asked me to get a surgery done as soon as possible to fix my ACL. I was not happy about it, so I went and had a second and third opinion where in they told me to wait until the bone bruises go away and then I could still decide if I want the surgery or not!

So roughly after about 3 weeks, I started with Physio sessions. I still do not have the full Range Of Motion (ROM) on my left leg, but everyday I see some very minor improvements - very minor though! Everyday I dream as though I'm walking normally without crutches. An ACL injury is something that definitely both physically and mentally affects you, but you should just take care that the injury does not take over your mind and that you are in control of it!

Going behind Scala's recursion

0 comments

There are times when we might want to call a function which calls itself repeatedly n number of times. In my career programming with Java so far, I have not written any single recursive functions, the main reason being that writing recursion was hard with Java. Java is best suited for an iterative approach. Sometimes a recursive code is a bit hard to read and follow. It is not that self intuitive as with an iteration.

Behind the scenes, during each function call the local variables used within the function are placed on something called a call stack. The stack is unfortunately and fortunately limited in size and resources. If our recursive logic spirals out of control, we could very quickly fill up such a stack, deplete all your resources and bring our entire application down. We certainly want to avoid this from happening, so we write iterative logic which has a certain and a definite exit point, thus preventing us from any stack overflow errors.

A functional language like Scala handles recursion much more elegantly and invites us to favour recursion instead of iteration.

Broadly speaking, there are two kinds of recursion in Scala, the head recursion and the tail recursion. The main difference between the two is in the way Scala handles the function evaluation and the function call. In head recursion, the function makes a recursive call, the body of the function is evaluated using the result of the recursive call. In case of tail recursion, the function body is evaluated first and the result of the evaluation is used to make the recursive call. If there was no concept called tail recursion in Scala, we would have been still left to deal with stack overflows like we experience in Java, but tail recursion does some magic behind the scenes for us. Not so clear? Let's look at some practical examples:

def headRecursive(intList: List[Int]): Int = {
  if (intList.length == 0) 0
  else intList.head + headRecursive(intList.tail)
}

val sumOfInts = headRecursive(List(1,2,3,4,5,6,7,8,9)) // prints 45
Other than me defining the method name in the code snippet above to be called headRecursive, we can say that it is a head recursive function. If you take a deeper look into the method again, in the else block, to evaluate the line "intList.head + headRecursive(intList.tail)", a call to the headRecursive(intList.tail) has to return. What happens effectively is that the recursive call is first made, then the head of the List is added to the result of the recursive call and the value is finally returned.

So the runtime needs to know what was the value of the head element in the List, the result of the recursive call and it has to somehow store them into something called a call stack. So effectively, there is one call stack per recursive call. There is now an obvious reason to worry about stack overflows in case of a relatively huge List. Let's now understand how tail recursion helps us solve this problem with the same example tweaked a little bit:
@@scala.annotation.tailrec
def tailRecursive(intList: List[Int], accumulator: Int): Int = {
  if (intList.length == 0) accumulator
  else tailRecursive(intList.tail, accumulator + intList.head)
}

val sumOfInts = tailRecursive(List(1,2,3,4,5,6,7,8,9), 0) // prints 45
The difference now is pretty straight forward, no not just in the method name, but the last call in the method is actually calling itself without any additional calculation which expects the method to first return the value and then perform the calculation. In the tail recursive case above, the sum is first evaluated (in the accumulator + intList.head) and then the recursive call is made.

This way, there is no need for the runtime to store the local variables during each recursive call in a call stack. The runtime can re-enter the same call stack again and again thereby eliminating completely a potential stack overflow error. Was that clear enough?

K8s Cluster SetUp on a Set of Raspberry Pi

0 comments

Some time ago I managed to set up a 4 node K8s cluster on a set of Raspberry Pi's that were lying idle at my home. In case it interests you, please head on here to look at how you can set it up!