Me and Whatsapp

Background

I hate the hype and peer pressure. Back in the days when whatsapp was new, every one was on it. The day I decided to buy a smart phone, I decided I will not install whatsapp in it. And I didn’t for a year. But then I started to miss out important announcement about college and all and my room mates started to complain that there is no way for us to reach you. So you should have it. and then I scummed to that peer pressure from “the boys”. I am talking about the days when it didn’t had voice calling feature. It was a huge meme because it’s logo has dialer in it and there is no calling feature in the app.

Once I started using it then I started to appreciate it’s engineering marvel. they have native app for all platforms. And during that time I was also making an App and I decided to go cross-platform route to save time and cost but I could see why they have chosen to go for native apps for each platform. But I think that decision is still making them slower in terms of pushing new features. because if you think of a new feature then you need to check all platform and make sure that feature/API exists in it which makes them slow to push updates.

Then after few years I decided to go into backend because mobile app was becoming similar to front-end where you don’t have any control, you just do CRUD operation and make necessary API calls. because most device APIs like location and all were getting restricted by mobile platforms (Android, iOS). So, they were slowly killing the creative freedom aspect of app development. There are lots of things which we as a developer should be able to do on platform like Android and iOS but they won’t allow it. So, we get theses entire separate IoT like industry of wearables like friend.com’s device and humane ai pin and rabbit r1 and all. If the platform would have allowed it in first place then they won’t need to develop separate hardware for that. More hardware means more e-waste and more time waste as well. Because founder had a vision to do X but due to current restrictions now we also need to build our own hardware which will require more R&D which will take time.🤷‍♂️ You see !!

So, Once I was into backend I started to look into how these messaging companies handling these many amount of TCP requests. and stated to appreciate what whatsapp team has done in the backend. I wanted to look into telegram as well but not much information is available online about it.

Automation

I am all into automating your life as much as possible so that you can focus on more important things like sleep🙄 or spending time with your wife and kids. didn’t had kids and wife and I at that time (now ex-wife) were taking a break from the relation ship. and I was looking into find an excuse to do automation on top of things. I used to do web automation using iMacros and was loving it. So, I thought I could do something with whatsapp web and putting it into electron and creating a bridge between main process and window. electron was also new back then. IPC in electron was not fully developed year but still somehow I made a few functions and created a frankenstein’s monster which would trigger send click and typing into whatsapp chat. because of IPC not being available I had to go though lot of workarounds and ended up making three electron processes in total.

Then I during that time puppeteer got launched. So, I dropped the whole electron business for puppeteer because it seem easy to integrate.

Then While googling and looking around I got to know about Mr. Mukul Hase’s whatsapp python automation repo. It was using selenium which I hated due to it’s API and documentation. So, I thought let’s make the same thing in NodeJS using puppeteer.

And that’s when Wbot was born. Previous night before my birthday. Because there is this social norm that everyone wish you “happy birthday” and you have to respond with “thank you”. Ugh…

The thing is I like to respond to people on my time which could be 3-4 days after the said birthday. and people got sad because they were expecting response from me on the birthday itself. Muggles!!

Came back from work started writing some scripts around 10 PMish. By the time I was done it was almost midnight. So I ran the script, few messages came, It replied properly so I kept it running and went to sleep.

In the morning it exploded. I forgot to add a rule for the group. It considered group message as a personal message and started replying every message as personal chat. but hey it worked. 🤷‍♂️

Among these groups there was one from work as well. Although they being a developers like me some figured out, it’s a bot because they know Arpit don’t reply that fast. 😂 Although I was the head of the Mobile app development team but everyone know that I hated smart phones so much that I was always looking for excuses not to use them. Yes. Strange I know !!!

I thought of a few settings I needed after this trial run bot wbot. Implemented it and made it open-source and cross-platform. Wrote a few articles about the the wbot and how I solved a particular problem. and it got some recognition and got around 100 something stars on github. I was through the roof with that. I have done it accomplished something. The dev community have accepted me as their own even though I have been half-assing it most of the time.

Due to this visibility people have reached out to me regarding whatsapp related things. One of the people was the a founder who had access to whatsapp’s official API (which has to be hosted on-prem at that time) and no one didn’t know how to host it and use it. I tried went through the documentation and got it up and running within few days. Then his freelance developers were facing another issue which I solved it. Then he offered me part time freelance job in his company.

And after 6 something years, Now I am the CTO of that company. Didn’t thought a side project which was done as just a hobby can make such difference in one’s life. Turns out it can.