βͺ Rewind – 2019

This is at Hard Rock Hotel 🎸
This is at the Hard Rock Hotel 🎸

2019 has been a long year for me. I wanted to get out of my comfort zone and play in the real world. I took risks, learned lessons, gained more perspectives, and became a much better person than last year. πŸ˜‡

I started 2019 with a mindset to do things that I had never done in my past. It is okay if I fail, but I wanted to fail fast and leverage over those mistakes.

“Fail early, fail often, but always fail forward.” ― John C. Maxwell

I got rejected from 6 German universities and received 1 late admission letter. I realized that I enjoy developing things than just studying theoretical ideas.

IΒ left my first job where I worked for around 3 years and joined a start-up to work with a technology stack, which I had a lot of interest but no hands-on experience. I learned to adapt to new things and grasp them quickly.

Last year, the US Consulate rejected my visa for no reason. Sometimes things will be unfair, we need to accept it. This year I got a Schengen visa with multiple entries. I flew out of India for the first time. πŸ˜€

The scariest thing in my life was when I was flying alone to the Netherlands. 13h+ long journey, with no known people around me. Anything could have happened! I managed to survive in a countryπŸ‡«πŸ‡· where I had great difficulties in communicating with them because of their language.

But this trip made me gain more perspectives and understand how to live. I also fell in love with travelling. β™₯️

Some of my favourite tech people who are doing amazing things in this world are Indians. This has inspired me to focus more on things that I do every day and become best at it. The goal is to work towards it continually. πŸ’ͺ🏼

I didn’t know how to drive a car. I bought my first car, and I learned to drive pretty well now. πŸ˜‡

Currently, I’m working for a company for whom I was ready to work for free 3 years back. But now, my skills have got me there.

Being far from dear ones made me realize how important they are in my life. I learned to value them when they are with me. πŸ€—

I’m happy that now I can financially afford to feed my people whatever they ask for. πŸ˜‡

I traveled a lot in the last 2 years. The airport is the place which has brought a lot of emotions. The joy of seeing your dear ones after a long time, the excitement before flying, the fear of getting deported, the satisfaction of coming back to the motherland. The airport is magical. πŸ’«

Most of the things which I did in this year were for the first time. I was able to do all this well because of the situations I had been through in my past.

“You can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something – your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.” – Jobs

Put your heart and soul in whatever you are doing, and do whatever you love to do. Things will start going in your way one fine day.

Best wishes for the new year ahead – 2020. πŸ’

Euro Trip πŸ‡ͺπŸ‡Ί

β€œTraveling – it leaves you speechless, then turns you into a storyteller.”

I can’t say how much I loved being in the Netherlands. 😍 I went to the Netherlands without any expectations, but it turned out to be a great place to stay. People out there are very friendly, public transportation is very convenient, stunning architecture, picturesque canals, tasty and healthy food. Amsterdam has tons of things to see and do. From canal cruise to the panoramic view of the city from Europe’s highest swing. Everything is amazing. πŸ‘ŒπŸ»

Uilenstede
Uilenstede

I stayed in a place named Uilenstede (pronounced as `hal-in-stede`), Amstelveen which is about 30 minutes away from Amsterdam city via tram. Uilenstede is more like a residential place where you find more dutch locals. Though their native language is Dutch, most of the people speak English also. 😊
People are very kind, newsboy, shopkeepers, a helper at a restaurant, everybody greets you with a smile when you pass by. πŸ₯°

Traveling in Europe is super easy. It just takes a couple of hours to travel from one country to another country via bus/train which is cost-effective. Sometimes traveling via flight is cheaper compared to train fare. Initially, I didn’t have any plans to visit other countries, I was stunned by seeing the Netherlands, I wanted to explore other countries as well. I took a bus to Belgium and France. 🚌 That was one of the best decisions I made because you get to see many things if you travel by bus. 😁

I’ll highlight a few experiences from these 3 countries. πŸ˜‡

NETHERLANDS πŸ‡³πŸ‡±

Amsterdam Central Station
Amsterdam Central Station πŸ‡³πŸ‡±
    • Repeating this, the locals are very friendly. πŸ₯°
    • Public transport is great. All signboards both in English and Dutch. You can travel by Bus or Tram or Metro. Fares are less compared to France’s public transport. 🚎
    • You can hire an electric Tesla at Schiphol airport if you are an eco-friendly lover and want to experience a ride in Tesla.Β  🚘
    • The country is very clean and no pollution. Only bad thing I noticed in Amsterdam was, people smoke in public places. 🚬
    • Most people speak English and try to help if you are in need. πŸ—£
    • Less population. I went to a bank (ABN AMRO), it was quite a big building, but there were only 2 people to serve and also a handful of customers. πŸ‘«
    • People take care of their health and fitness well. Most of them commute by cycle, eat healthy food and exercise regularly (There was a gym next to my place.) πŸ‹πŸ»β€β™‚οΈ
    • Days are long, it used to be bright even at 9:00 PM. β˜€οΈ

This slideshow requires JavaScript.


FRANCE
πŸ‡«πŸ‡·

Eiffel Tower
Eiffel Tower πŸ‡«πŸ‡·
    • Numerous great cafes. Fewer options for vegetarians. Tasty food. πŸ•
    • Eiffel tower in Paris is amazing. It is so huge. You get the best view at night when it sparkles. One of the most attractive tourist spots. πŸ—Ό
    • Souvenir sellers at Eiffel tower are a bit annoying. They force you to buy things if you say no, they will follow you until you buy from them. 😣
    • Public transport is sometimes crowded and metro stations are a bit dirty. Not all signboards are in English. 🀯
    • Only a few speak English. Hard to find them. I felt they don’t like English speakers, they were asking me to speak French. πŸ€”
    • I was lost when I reached there. Nobody understands English, I didn’t have a mobile network, no google maps, I struggled to reach my hotel. πŸ˜“

This slideshow requires JavaScript.


BELGIUM
πŸ‡§πŸ‡ͺ

Antwerp, Belgium πŸ‡§πŸ‡ͺ
Antwerp, Belgium πŸ‡§πŸ‡ͺ
    • I wanted to try their fries, burgers and waffles. They didn’t disappoint me at all. πŸ”
    • Fast-moving people. You get packed foods in supermarkets. You can just grab them for breakfast/lunch and eat on the go. πŸ₯ͺ
    • Belgium chocolates are very popular. They have a huge museum to showcase their work – Chocolate Nation at Antwerp. 🍫
    • Language won’t be a big problem. You can find people who speak English. πŸ˜‡
    • Building with beautiful architecture in Antwerp. β›ͺ️

This slideshow requires JavaScript.

All in all, I had a great experience exploring various cultures, food, people. This travel helped me gain more perspectives in life. These amazing memories will cherish forever and motivate me to travel more. ✈️

I always believed that we need to plan everything well before going anywhere, but that’s not always true.

β€œDon’t listen to what they say. Go see.”

What are the reasons for you to like a place ? Is it History πŸ“– ? Food 🍱 ? Art 🎨 ? Or the local people πŸ‘« ?

Define PropTypes To Your React Component

Not using PropTypes in your React application ? Start using them to improve the developer experience and make your colleague’s life simpler. πŸ™‚

PropTypes is a package that does runtime checking of props and also you can use them to document the typeof and required props to your react component.

Sometimes, people may do a mistake in passing the right props to your component.

  • They may either miss out passing the required props.
  • Or they may pass a prop of a different type.

These issues can be handled well by using PropTypes.

For example, check out below code snippet :

React Component Without PropTypes
React Component Without PropTypes

Here, we are passing prop firstName with the boolean value true and not passing lastName prop.
But WelcomeUser component is expecting firstName and lastName prop of type String.

This kind of error will not be thrown to the developer.

Code Sandbox Not Showing Error
Code Sandbox Not Showing Error

If the component is expecting many props, it will be hard for the developer to figure out what kind of props these are.

To solve this problem, we can define PropTypes to our WelcomeUser component.

React Component Without PropTypes
React Component Without PropTypes

Any developer can just go through the PropTypes of WelcomeUser component and easily understand what all are required props, optional props and the data type of props.

If there is something wrong with the props, it will throw the error in the console during runtime.

Code Sandbox Showing Error
Code Sandbox Showing Error

You can define PropTypes similar way to class based components as well.

React Class Component With PropTypes
React Class Component With PropTypes

PropTypes provides various validators which come really handy!
If you want to play around, give a try here – https://codesandbox.io/s/react-proptypes-dxgtq

Code Sandbox
Code Sandbox

 

Thank you BETSOL!

“We must find time to stop and thank the people who make a difference in our lives.”

Thank you for hiring me πŸ˜‡

6th October 2015 was one of the biggest turning points in my life. I was going through a rough patch in life, but that’s when BETSOL hired me. I got my first job. This also boosted my confidence tremendously which later helped me take up and achieve big things. Thanks to the recruitment team (Santhosh, Divya, Deepika, Shrita, Pavan & Prarthana) who believed that I had the potential to contribute to the organisation.

Thank you for letting me do what I love ❀️

It’s been 3 amazing years at BETSOL. I never felt I worked even for a single day because I love what I do each day. Everyday has been a new day with new excitement. I still remember the first task I worked on. SwiftCode program was great as I like sharing knowledge with people. πŸ™‚

Above & Beyond Award
Above & Beyond Award

Thank you for keeping me surrounded with wonderful people πŸ‘«πŸ‘¬πŸ‘­

I acquired some great skills while working with people here whom I won’t forget forever. Learned front-end development and problem solving skills from Prarthana, never give up attitude from Sandeep, solving critical things being calm from Akshay, handling any kind of team/critical situation without panicking and how to be a leader from Abhijith, solving complex problems with simple native approaches from Akyuna, understanding other people’s feelings/conditions (empathy) from Jeremiah. Surrounded by superheroes (Chaitanya, Harshith, Megha, Prakhar, Raj, Shrinidhi, Suthanth, Vishnu and lot others) felt like I’m working with “The Avengers”. *We save the world* πŸ˜›

This slideshow requires JavaScript.

Thank you for the amazing experience πŸ’Ž

I got an opportunity to work with various kinds of people. I experienced both ups and downs. Good times kept me happy, but it’s the tough times which made me learn things the hard way!

A water droplet on a lotus petal shines like a diamond, but the same water droplet elsewhere may not have the same value. BETSOL was definitely a right place for me to understand my strengths and shine.

Thank you for the goodies 🎁

Who doesn’t love goodies ? Part of my wardrobe is stuffed with BETSOL’s merchandise. I have treasured things which I received from BETSOL from day 1.

This slideshow requires JavaScript.

Thank you for my baby duck 😍

When a savage lion was lonely in the jungle, it was this baby duck which made the lion kinder, and motivated lion to aim high and work hard. πŸ˜‡

Mind endorsing my skills on LinkedIn ?

I’ll endorse you back in return. πŸ˜‰

Wanna know what next ?

Follow this blog, interesting stuff coming up. πŸ˜›

Debugging Node.js application using Chrome DevTools

During the development of any software application, sometimes a developer may need to debug the code to understand the flow of execution or even to fix a bug. I have seen JavaScript developers prints the output/value on the console using console.log() to debug the node application.

This is definitely not an efficient way to debug the code. You have to log the values in various places, hence you need to repeat console.log() multiple times. Also, you need to take them off before committing your code. This wouldΒ  slow down the development time and mess up the code.

Debugging your node application using Chrome DevTools is one of the simple and efficient ways.

Here are steps to debug your node application.

1. Run the application using --inspect flag.

Running-Node-Application

Once your server up and running…

2. Open this URL in your Chrome browser :Β about:inspect

about-inspect

3. Click on Open dedicated DevTools for Node

You will get a dialog box where you need to provide your application end-point and click on Add connection

DevTools-Dialog

You can click on theΒ Sources tab and navigate to your application folder. You will be able to debug your code here.

In the below screenshot I have kept a breakpoint on line 8 where I’m finding out the parameter sent to the /number route which is 30.

sources-devtool.png

You can debug your server-side JavaScript code just like how you debug your client-side JavaScript code.

Getting Repository Insights From Git

Getting Repository Insights From Git

GitHub has some cool features. One of the page on GitHub I usually go through when I come across any popular repository is itsΒ contributors page.

Checkout:Β https://github.com/duckduckgo/zeroclickinfo-goodies/graphs/contributors

 

From the above example, we can get to know many statistics like how the repository is growing, number of people contributing, number of commits they have made and lot more.

Apparently, my team uses a private repository on BitbucketΒ and Bitbucket don’t have anything like contributors page just like how we see above. Maybe because Bitbucket is mostly used by enterprises to host private repositories and they won’t have any external contributors. It makes sense GitHub having contributors page because it hosts 1000s of open source projects and has numerous contributors.

Since Bitbucket doesn’t have this feature, I thought of exploring some git commands to extract these statistics from my git repository. [Got one more opportunity to learn more about Git πŸ™‚ ]

To start with, I figured out how to find number of commits made by each developer.

$ git shortlog -s -n

This would give me a list of all the contributors with number of commits they have done.

To be continued…

Summing Up – 2016

How was 2016 to me ?

I always say to my friends that life should be like DSCE (My College) campus. It is full of up’s and down’s since it is constructed on shavige malleshwara hills.

Many things went really well, also few things didn’t go well. But learned more from things which went wrong. It is the hard work and determination which will always help you to succeed.

Inspirational talks by Abdul Kalam, Steve Jobs, Bill Gates and many others made me not to loose my hopes at anytime.

β€œLearning gives creativity.

Β  Creativity leads to thinking.

Β  Thinking provides knowledge.

Β  Knowledge makes you great!”

Abdul Kalam

Some of the highlights :

At the beginning of the year, we fought for #Netneutrality #SaveTheInternet. Part of the protest which was conducted on Jan 2nd. Took part in #FreedomHack hackathon.

Hosted DuckDuckGo’s global Quak and Hack.

Started contributing to WikiToLearn, KDE project. Learned more about MediaWiki software.
Workshops at my GLUG.
My biggest dream got fulfilled by participating in Google Summer of Code (2016).
Worked with SwiftCode team to share the knowledge. Teaching students some new technologies.

Currently, mentoring in Google Code-In under KDE organization.

All good. πŸ™‚
Looking for another great year ahead. πŸ™‚
Wish you also a great and prosperous new year. πŸ˜€