When you hear algorithm, it sounds intimidating and makes the person using the term really smart.
But what is an algorithm?
In simple terms, it just means an “Instruction”, “Steps” or “Recipe” for computers and machines, nothing more. In fact, if you look up the word “algorithm” from English language dictionary, it is defined as:
“a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.” — Definitions from Oxford Languages
So, basically, it is recipe for computer to do things, specifically doing calculations, that is what they are good for.
git checkout -- .
Git can be your friend, when you don’t act wisely, it will unleash its super power against you.
Well… This is a story, that happened to me long time ago, and truth, I started writing this story in 5 years ago and never published it, until now.
I have been working on a massive code base all day, with a full day worth of work in my local repository and wanted to commit all the changes. I admit, I was keep working without making any commits intermittently, as I was zoned out. …
When we manage servers and linux generally, we need to rely on bash script a lot. But mastering bash takes time and effort. At the end of the journey, it will reward you with the magic of bash.
Here is how to handle arrays in bash.
basket=(pen pencil eraser bluepen)
The elements inside an array is indexed, and its position is assigned during the assignment, so
pen will be at the position zero and the
bluepen will be the third item. If we print them:
Bash arrays are zero indexed just like any other…