Note : This is one of those throwback posts that I have been planning to write for a long time. I am not a very smart guy to write these sorts of posts and its never an advice but a mere reflection of the whole journey so far. You can write the same thing with particles for physics, numbers for maths, cloning for biologists, etc. As usual this is never intended as a reply to anyone.

Recently my close friend got recruited by an IT company in his final semester of post graduation in Aeronautical Engineering and he was asked to learn the Python programming language before he joins the company. As I use Python in my day job I thought it will be a good idea to give a basic walkthrough about programming and also setting up things on his laptop with editor and libraries. Don’t worry I started off with Python 3.6 .

I was teaching him about variables and strings. I was walking him through operators part. I mentioned the usage of * operator on strings which just repeats the string n times. So its like you can say "Hi " * 3 and the python program prints "Hi Hi Hi" . Then I showed him to print emoji. python3 -c "print(u'\U0001F602 ' * 5)" to get 😂😂😂😂😂 and sent it back to me in WhatsApp as we both had WhatsApp web open. So that is how you send in those large amount of emojies he wondered and typed something along "😂" * 500 (replace the emoji with the code) and well the output screamed through the whole window while he was copying the whole thing to send me. I typed python3 -c "print(u'\U0001F608 ' * 5000)" | pbcopy which prints 😈 5000 times and copies it to clipboard. Then I pasted the whole thing into WhatsApp web and sent it to him with a real grin smile to crash down his WhatsApp and browser. He was like “what is that!”. I said to him that little | copies the output into the clipboard instead of simply spraying output all over the window and he said well that is really useful. I selected the div with emoji and deleted it from the browser console. Then I was showing him the WhatsApp web over what is a DOM and how each thing is just a text that can be edited and even showed him by replacing the text with something else to make a fake conversation as if happened. He furiously turned to his laptop and started editing the DOM on few conversations to take screenshots. Well don’t ask me about it!

End of the day he was very much excited about the amount of things that he can tinker with computers for fun and all those little nefarious things you can do with computers that really get you going without any fatigue in the first day. It reminded me of my own start with programming. Thus a reflection over the four years of love and pain!

Hello world!

It was the end of my third year in the college and it was time for semester exams and then you get to placements. I was really in a depressed mode with my whole life because I don’t really know what to do with it. There was a constant amount of pressure that I had to get a job so that I could somehow makeup the 4 years of education as useful but I don’t really know anything at the time even about programming. I was also surrounded by other problems that I don’t really wish to talk about and basically it was a phase of depression in every little sense. But with placements it added up extra stress that I had to do something to get a placement. So I needed to crash and burn over something to make someone give me a job and that is how I started off programming. It never started off as a hobby or anything. I just needed something to let me pay my bills.

The offer came from my home to buy a bike or a laptop. I thought a laptop will be pretty cool and that is the one I am using to write this post even today. I bought the laptop. Its a decent HP machine with AMD and 4 gigs of RAM. I had an android phone and then I thought of making an android app well because it was the cool thing at the time and downloaded of eclipse and followed the instructions blindly to set it up and running. It had the first “Hello, World!” program that I took a week to get up and running but I finally had the moment. But a “Hello, World!” isn’t really useful at all. I quickly went through the SMS API and sent an SMS from the phone to my number. Hmm that is interesting lets just add a loop and send it a couple of times. Cool, lets get the input of the user about the mobile number and the number of times he wants to actually send the message. Done, now we have something that does nothing useful except stalking a person but nevertheless gives you a sense of completion of something.

The ability to come up with an idea and be able to experiment with it is one of the most envious things about programming. Try out a language? You can download the compiler and run it in a couple of minutes or even use popular online compilers. Say something? You can publish your thoughts in seconds. Have an idea for a site? Its pretty easy to spin up a server and buy a domain to get it up and running in matter of minutes. So its one of the most interesting things about programming. I am not trying to downplay other fields it just feels that there is very low barrier to try out things.

Wordzilla

So I was looking for ideas to build something and got off to build a game that I still use in my interviews to get the tale going. I used to play a simple childhood game that tells back a word with my word’s last letter as its first letter. i.e. say “train” it ends with “n” so it gives back “night” and the game continues till you ran out of words. Then I wanted a place to store all these stuff and then I came across the concept of a database. So we had the logic and I sat down to code the whole stuff feature by feature and added up some really crappy UI and somehow had it working. Well now we get to the spamming part where we ask our friends to download and try it. I sent them an apk file to start the spamming since I din’t have a credit card to add it to play store that enables more fluid experience. Some of them downloaded it and I had some google analytics script running in it. The first graphs you get to see with someone using the app from different parts of the country and even the world are highly joyful. Some of them gave me honest comments about the crappy UI.

Then I got into my placements and the app really gave me a lot of boost over how things can be made useful with programming. Then I learnt more and more about the UI and suddenly I thought well why not make a simple dictionary out of the whole thing and looked around for dictionaries except that I couldn’t find a good dataset at that time. I thought to use the words from Wikitionary and there is no way that I can download words and meanings and words from 500,000 HTML pages. So I turned over to look into what people really use for this stuff and that is when I came across one my most favourite and powerful tools, Perl.

I learnt Perl and thought to try out Linux for sometime since all those hackers in the movies really seemed to use the terminal like a Pro. So I downloaded Ubuntu and Perl to start with and it was a very pleasing experience after writing tons of Java. Perl ripped through a lot of text with powerful one-liners. Just when I thought to scrape the entire Wikitionary for the project I came across one of their CSV dumps and then wrote a little perl script to parse the whole thing into a series of database insert queries so that I can run them. I didn’t know that Perl can write to database at the time. I ran it and turned way to pick some snacks and then came back after around 10 seconds and it was done. I thought there was some error in the script that it stopped with no error message and looked into the directory and it was full with the relevant files. Well, the camel really is a workhorse. I quickly made a revamp of the whole UI and then published it to Google Play this time with my friend’s credit card. Thanks!

There was a constant sense of achievement all the way through and then I started stalking and spamming back again for comments and posted it to Reddit and XDA. Sorry! . But I got a lot of output from my friends and some of them shared it and some went on to play for an hour or so to get on to the top of the scoreboard and it was really exciting to see those graphs daily and some people even sent me words that were missing in the database. Some asked me if I can use the database and I said its open source!

Open source everything

With Linux I came across this strange little notion of releasing the code for free and it seemed really stupid for me. But I kept using Linux wondering why someone will really give away all the code for free. The interesting thing about open source is that I learnt a lot of things by looking at the source for the function and using a closed source library is like using a black box where you don’t really know how its implemented underneath so it always remains black magic to you and don’t get me to the part of debugging such a program which is even more harder. So I grew along with the notion of open sourcing all the code that I tend to write and then pushed everything GitHub though nothing seemed useful.

The code was really crappy like I still hate myself for writing it. To give you an example of the shit, in order to emulate the score counter to increase one by one after a certain delay I spawned multiple threads in main UI thread that write to a global variable that constantly flushed to the database after every increment. Well for an increase from 100 to 1000 I will do 900 database updates and spin up enough threads for hell! But the code I write today is much more improved than the previous code over the years still crappy. I learnt new abstractions to do the same things done few years back and fast forward after few years I will learn something else that makes this code look ugly and opens up a new world of experience. Its all about improving yourself to write better maintainable code.

The imposter that you don’t know

As you scrolled through or read through the whole load of text well you will be little tired and might see me as someone who does a lot of things except that I have a large amount of imposter syndrome. Many people wonder when I post or code something and appreciate over it for which I tend to reply back with something like “Hey! I am a stupid. Its easy to do those things”. Many people seem to dismiss it off as if I am humble except that I have a strong sense of imposter syndrome when I really say I am a stupid.

On keeping up with a lot of things you are exposed to constant source of achievements like a guy who writes a kernel as a hobby in the weekend with JavaScript or someone who really claims a million dollar bug bounty in Facebook, Its really easy to feel you that you are not doing anything at all. So over a period of time when you start seeing a couple of failures it just feeds your syndrome more and more to bring down the level of confidence to a point where you can’t really believe in your abilities though the whole world has faith in you. Its one of the things I am trying to improve on and its a common characteristic in the software industry.

To add up to this I don’t have a CS degree that feeds the syndrome even more. I am not really in a situation where I can drop the day job to study another degree but I really wish I did. Well we always regret over the things we didn’t try in the end so its a matter of few more years of additional efforts so that I can cope up with CS knowledge that enables me to study more specialised fields of my interest. Its just that some companies require a CS degree as a pre-requisite that adds up the competition as I compete among self-taught programmers and its a little source of worry sometimes.

Programming as a hobby and work

Many people seem to misunderstand that time spent in programming outside work by those who are interested in it like they don’t really have a life. This is one of the common problems in having your hobby as work. When I work on stuff outside work I don’t really do work anymore except that I do it to make life better. For example I wanted to keep track of the bus ticket opening for a holiday and its easy to write a bot that scrapes the website for every n minutes and then send an SMS when the ticket open so that you get to book in time. Maybe its not fun but its useful that I can reuse it for another day and I can share the code to others so that others can customise it for their own purpose like a different route, date, etc. Its all about making things a little more useful with programming. Similarly when my friends started playing IPL for 2017 and wanted to look into the live scores for their fantasy players its easy to pull up a bot so that it adds more fun to the whole thing. That is how I do it. Sometimes its fun to crashing your friend’s WhatsApp on a slightly evil note.

Its a bad thing to do work that you never get paid for except in the case of open source. So its pretty common to get treated little differently like a workaholic when your hobby and work are the same. Its also very easy to do too much of work in the name of fun and get burned out pretty quickly. So its about hitting the right amount of balance.

Burnouts

Well all the tales about burnouts are real. Burnout with respect to programming is a case where you are not at all interested in programming though there is nothing wrong in anything but its just that you get to a point where things don’t interest you anymore or you have other problems and the effectiveness rate drops significantly. The sad fact about burnouts is that when they go on for sustained period of time they can result in serious amount of depression. Its important stretch up a bit and let things flow for sometime so that the interest towards programming is replenished.

Its easy to add up lines of advice but its one of those things that is not what you think it is as you read articles and blog posts on burnout until you get to experience in person. Don’t do it! I am happy that I don’t have major burnouts and in company of good people that snap me out of it at smaller doses as it happens without serious impact. Also its not something that is only present in programming except for the number of posts who open up on it are mostly programmers and I am happy that we help others to learn from our mistakes.

Keeping the fun going

So it has been a fun ride all the way through and there is a lot of room for improvement. It makes my life better and better. Wrote a program that tells the live score for each player of my IPL league, a bot that asks me to order breakfast and lists best deals as I am about to reach office in 20 minutes, etc though I can’t invert binary trees on a white board :) Programming has been a constant source of love and fun with invaluable pains all along the way and I wish a decade more of it so that I can write an another stupid rant on a decade of love and pain in this relationship :)

“If you haven’t found it (love) yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. - Steve Jobs”

P.S. : Thanks a lot everyone for their honest feedbacks and trying things out :)

Longest post so far