Tuesday, May 17, 2016

Smartphones, Nostalgia and a guide to buying a smartphone


I bought my first muzik(that's how they spelt it) phone in 2006 for INR 18000 :). Yeah that was a lot of money at that time,  probably from my first few salaries. It was a music phone craze at that time. I remember the joy of listening to "Chand sifarish jo karta hamari" on my first music phone.

This thing came with first of its kind in-ear earphones and a unique twisting camera. I used to clean it with the cleaning cloth of my spectacles :). I also remember keeping its plastic wrapper (the one that came with the packing) on for a long time. After all, it was precious, my precious.

As time passed, the caring got sidelined but I still enjoyed listening to music on that phone and flaunting it as a precious possession. But eventually as some more time passed, all sort of interest in that phone was gone and in a matter of couple of years, the phone was literally treated like a stone, thrown here and there when not used for calling. Yeah, headphones were gone and listing to music on this phone? huh.. no way. I needed an iPod.

So, after this phone was gone, spending another INR 18000 or so on a new phone, just in a couple of years was not an option. Budget was reduced and I went for a phone from another brand for a price of around INR 8000. Man! it felt cheap to go down on the INR stuff. That's the thing with style, standard and expenses :). Going down the ladder is a tough call.

I did not enjoy anything with that phone. Eventually, I bought the latest and greatest smartphone putting myself back in the front row of technology and smartphones. (Technically not, because I did not own the coveted phone from a great company named after a healthy fruit).

This new phone is great and has been with me for almost 5 years now. I must admire its make and the durability. But the truth remains. It never gave me the joy I felt when I bought my first phone. This phone is now the most outdated phone in the universe and is dying and I must buy a new smartphone. I wish to find a way so that my new smartphone buying experience will be as exciting and thrilling as it was back in 2006.

With a myriad of smartphones now available in the market, I was baffled. I had no idea which one to choose. I did what we do for almost everything now a days.Yes you are right, I searched on Google something like this: "smartphone buying guide". I got a bunch of results. Yes a bunch of results but no answer to my question. I was not looking for the smartest phone available in the market. I was rather looking for a phone that would make me feel as proud as I felt when I bought my first phone.

Disclaimer: Even if you buy the latest smartphone on the market, gold plated and bordered with diamonds, it will feel outdated and worthless in less time than you think. Hence, it should never be the source of your true happyness. I know there is an i in Happiness. :D

I also came across a few interesting quotes about smartphones:
"I fear the day that technology will surpass  our human interaction. The world will have a generation of idiots." - Albert Einstein
"Be smarter than your smartphone."
Not that they reflect my opinion about smartphones, but they were intriguing. Both these quotes got me thinking. Don't let your smartphone become smarter than yourself. So I thought should I buy an average phone? But how would that be any exciting? Sure I will save on some green stuff and that would feel good for some time. But eventually I will be stuck with a dumb phone for another five years or so. That should really be fine if I am not really into all this smartphone gig. I or anybody need not buy a smartphone to prove that they are smart or just because a bunch of companies are building them. It should always be my choice. So what if I challenged myself to be smarter than the smartphone I want to buy because that's how I feel. That sounds exciting. But is it feasible? Can I ever be smarter than a smartphone? Lets see.

I went on analyzing a few smartphones and I figured that all of them do the following things seamlessly one being better at something than another.
  1. Contacts organization. 
  2. Taking pictures and videos.
  3. Helping you navigate around the world.
  4. Durability, sturdiness and lightweight
  5. Social Media, games and entertainment.
  6. Screen resolution or the quality of what we see on the phone.
So, if I could become great at doing these things or if I could improve my human traits that resemble these smartphone features, I would be a compatible owner for that smartphone. And yeah, that will feel great. Most importantly, even though I will definitely keep growing smarter even after five years, while my smartphone eventually becomes dumb as compared to me, that would still feel great.

Therefore I decided, if I could achieve the following characteristics, I will call myself eligible for the smartphone of my dreams and I would buy it.

Contact organization.


The smartphones today are capable of keeping contact information seamlessly organized and available at the touch of a finger. The human brain that developed these so called smartphones is definitely smarter than them. But what about me? If I could remember 25 most important contacts in my contact list in and out, and am able to recall them effortlessly, I will call myself smart enough.

Taking pictures and videos.


When it comes to taking pictures and videos, trust me we are already smarter than the smartest phone on the market. When our brain and eyes work together to capture the beauty around, what emerges and gets stored in the back our our heads is simply amazing and no still image or video can match that. But capturing that image and showing it to someone else who can also appreciate what you saw is an art not everybody can claim. 

So what if you chose photography or sketching or painting? That's something you can improve. 

As I already have some interest in sketching...I am still a beginner, I chose it as a trait to focus on and improve. So if I can draw a few sketches and if I feel reasonably good about it, I am done.

Helping you navigate around the world.


This one is interesting. Navigation is at the heart of humanity. We have been navigating since I don't even know when. And the techniques that helped us navigate have evolved from the pole start to the current GPS technologies. But with these great advances in technology, somehow we have lost our own navigational capabilities that sometimes we find it difficult to even indicate the basic four directions.

So I thought why not work on some navigational skills. I decided to read and follow the paper map to navigate through a city instead of using the one available on my smartphone. I along with my friend did it while we were in New York and trust me it was a lot of fun. The sense of achievement we get is far greater than the Maps on our smartphones guiding us precisely through each step.

When I am comfortable reading a map of a new city reasonably quickly, I will call myself compatible to the smartphone world out there as far as navigation is concerned.

Durability, sturdiness and lightweight


A good smartphone is one which is durable and sturdy. But what good is it to have a sturdy smartphone in your hand when you can't even lift your grocery bag. :).

That was a little far fetched. But the idea is to achieve some challenging physical fitness goal. Once I have achieved my goal, I can check mark this trait.

Social Media, games and entertainment.


With the latest smartphones in everybody's hand, the world is now a community truly connected. With all the social media sites and various apps, we can instantly connect to anyone and even find our lost and forgotten contacts to reconnect and reunite. 

But sadly its all virtual.....

Even though we are constantly connected to each other on social media, we have lost our true human nature of social gathering. With the smartphones and all the smart devices, we hardly talk to strangers any more. Even couples have to plan to take out time for each other let alone strangers.

This does not seem to be good. Your breakfast should not be done looking at what your friend in Prague is eating in his dinner. Nor should your dinner be done looking at the pictures of your virtual friend whom you have not seen in the past 10 years enjoying his/her honeymoon.

Here my goal is a bit simple. I want to refrain from the social media apps and websites as much as I can, so that I can connect with my friends and family much like it should be. Personally. Period.

I guess in this case, the best idea is to fall back to the primal capabilities of a phone. Yeah, a simple phone call to a friend is far more enriching to the relationship than the thousand likes to the posts and shares on facebook.

Screen resolution or the quality of what we see on the phone

The smartphones today bring photos and videos to life like never before. Video calls on today's phones are so crisp and clear that we feel like we are together. But still its a virtual feeling and goes away just by a touch of a finger. 

What if our lives became as lively as the the screens of our phones. :) . I guess if we try to improve our own smart features rather than dreaming of buying the smartest phone on the market, our lives will definitely brighten up.

My smartphone should always be an aid to my own skills and capabilities not the crutches I use to navigate my life..... don't beat me for that :P

Now I feel like buying a smartphone. But I gotta do a lot of homework for that, So, I will whatsapp you or send you a facebook message, or instagram my selfie from my latest smartphone once I have one. :)

So if you like this article, grab your smartphone and hit like and share with friends. See, I know, you already have one.

As usual, comments/appreciation/criticism(a constructive one of course) everything is most welcome and appreciated.

Until then,
Happy Learning!
Banyan Bat

Wednesday, May 11, 2016

Mission organize blog



It has been one month and ten days since my first post and I have written seven posts already. Even though its not much at this point. I never thought I would be able to go even this far. I feel great. I enjoyed writing every word in there and I hope you enjoyed reading them too.

Most of these posts were a part of my life called being a Software engineer. And I have learnt a lot in those 7 posts. If it were not for the blog, I might not have gone into details of so many things relating to the topics I touched in these posts.(Intentionally avoiding the names of topics to keep this post interesting even for those not interested in the software stuff). I will write a lot more about that part of my life.

Believe me, I am a procrastinator at heart :). If you ask me to do something, the questions that cross my mind are (In that order): So, is it necessary to do it right now? Is it really necessary? Can it be avoided? :). Yeah, you are right, I am lazy. But I have observed that since I have started this blog thing, it has given me something to be held accountable for and yeah, that feels great. It gives me a purpose to try new things.

Which means I will try different things and will bore you with the writings of those things. Simply writing posts one after the other on different topics will drive you crazy. Also, as more readers come across this blog they need to be able to find a place to start and read posts which interest them the most. (I am being optimistic here). After all,

"It doesn't hurt to be optimistic. You can always cry later." - Lucimar Santos De Lima.

So I created a navigation bar at the top of this blog. The first tab/label I added is the About label which tells you about Banyan Bat and his purpose behind this blog. The about section may be updated occasionally as the purpose and the meaning of this blog evolves over time.

The second label on the navigation bar is a category on which I have written some post. As I write posts you will see (optimism again) new categories added to the navigation bar.

So, as a reader, if you are interested in a particular category, you will be able to dive right in. Or if you are a casual reader and wanna scan through the topics, you will be able to do that too. And yeah, if you are good at all the things I write about, and many more things, you will be able to read them all at the Home label on the navigation bar. Please don't forget to guide me on the things you know and of course correct me or enlighten me even on the topics that I have written on.

Until then,
Happy Learning!
Banyan Bat


Tuesday, May 3, 2016

Bubbly goes to Las Vegas - Insertion sort


"I got a letter from the guy who stole my identity. He says he's giving it back, because ever since he took it, he hasn't been able to win one hand at poker"


As you already know by now Bubbly is cute. You also know that she had a thing for chocolates and suffered her share of consequences of over indulgence. She learnt her lessons and she has now learnt to control her urge for chocolates. Now she is always this beautiful smiling small Bubbly:



So no more rescuing Bubbly from her troubles. Well, hold on! Some people have this thing for troubles. They know all the means to get into trouble. Bubbly is one of them. :) But after all, she is our cute little Bubbly. We gotta save her.

Looks like Bubbly has gone too far in celebration of her happy times. Last time Bubbly was seen, she was playing poker at The Venetian, Las Vegas.

As you already know, Bubbly has issues with arranging things in order. So to help Bubbly win, our job is to make sure that she holds her cards in order and of course, hides them well from the fellow players. Considering that I am the worst Poker player, that is all I can do to help her here. 

The approach that we are going to use today to rescue Bubbly out of her newfound trouble is again something that has been around for ages and people from all the walks of life and age groups must have used it sometime in their lives.

Okay, let me come straight to the point. If you have played any cards game, you have used this technique.

Yeah, Don't give me that poker face now, I know you have been playing cards, behind the back of your parents. Don't worry. Chances are, they had done it too when they were young. :P

So, let me first congratulate you as you already know this technique and you don't even need to learn it. OK, don't be too relaxed as well because we still need to do some work. We need to draw upon our memory reserve and turn it into something Javaish, Cish, C++ish.....you get the point.

Lets say, Bubbly has following cards in her left hand:



Our job is to help Bubbly arrange these cards in ascending order for ease of access.

Step 1: 

Bubbly has got  a 3 of heart as the first card, next she has got a 2. Okay, so lets take this 2 out into the right hand.


Step 2: 

3 is bigger than 2, so let me first move 3 one position right.


Step 3: 

Now let me put 2 in the empty space.



Step 4: 

5 seems to be Ok as far as its left side is concerned.



Step 5: 

4 is less than 5. Or looking at the cards on the left, there is one card (5) bigger than 4, so let me grab 4 in the right hand.


Step 6: 

5 is bigger than 4 so let me move 5 one position right.


Step 7: 

3 is less than 4, so let me put 4 in the empty position just to the right of 3.


Step 8: 

Looking at the cards on the left of 1, starting from the immediate left card, we can see that these cards are bigger than 1. So let me take 1 in my right hand.



Step 9: 

5 is bigger than 1, so let me move it one position to the right. 4 is bigger than 1, so are 3 and 2. So all of them have to move one position right. Making the cards in the left hand look something like this:

Step 10: 

There are no more cards on the left, so let me put 1 in the empty spot. 

Here's our sorted hand of cards. Now no one can stop Bubbly from winning this Poker game.



This is nothing but insertion sort, because you are inserting each element in its sorted position.

Lets label a few things for creating our Insertion sort Algorithm:



Starting from the second element, put each element into the already sorted array on the left, in its sorted position.

To do this, we keep each element in a temporary variable, compare it with each element in the already sorted array and until we find an element smaller than the element at hand, we keep moving them one position to the right. When we get our smaller element, we put the element in the temporary variable, just after the smaller element.

Insertion sort is now under your belt.

Your little knapsack of Data Structures and Algorithms now looks something like this:




Can you compare these three sorting algorithms? Can you find out which one is the better? Ask as many questions as you can ask. Here are a few for starters:

  1. What is common among these three algorithms?
  2. Is one faster than other?If yes, which one?
  3. Is one simpler than other?
  4. What happens if the array is too big or too small?
  5. What happens if the array is already sorted?
  6. What happens if the array is reverse sorted?
  7. What is not so common among them?

As a teaser trailer to these questions: The biggest difference between Insertion sort and the other two sorting methods we saw is that, insertion sort does not do a swap.

As usual, comments/appreciation/criticism(a constructive one of course) everything is most welcome and appreciated.


Until then,
Happy Learning!
Banyan Bat