Internet of Things – Good, Bad, and Ugly!

First things first – Please stop calling it IoT. It’s Internet of Things.

By 2020, 4.9 billion ‘Things’ will be connected and will be in use. That’s4,900,000,000 Things! [1]

It’s a well-established fact that Internet of Things is the most hyped term right now[2]. But little do people know it has been here for a while. It was called M2M [3] orMachine to Machine communication. Still used in industries all over the world.

Now, with exponential growth of devices connected to the Internet, Internet of Things brings hope, concerns, fear, and skepticism. And it boils down to this – Is it all really worth? What about privacy? Or maybe, What about trust?

If you ask me, My answer is YES! It is worth it. But with trade-offs (in the short term future). In long term, we will all adapt to it like we have always. And it will be a normal part of life.

The Good

The best thing I like about Internet of Things is that it enables connectivity. It allows more ways and more things to be connected. Which is good. Imagine a world of connected machines. All of them sharing information and making intelligent decision on their own. Sounds like machines from Matrix or Terminator? I beg to differ.

An example could be, a city with cameras installed on major highways. And these cameras feeding videos/images to a centralized processing unit. This unit, processing all the data, understanding bottlenecks, accidents, etc. And rerouting traffic by sending routing information to traffic lights ( machines again ). I don’t see any evil in this.

The Bad

Now, a lot of people are concerned about Internet of Things. And one of the major question people ask is: “What about my Privacy?”

Well, If you are reading this article, it means you are online. Which means that you have already kissed your privacy goodbye! Little harsh? yes, but its true. If you are online, everyone knows about you. Specialists know about your bank accounts, passwords, social security numbers, etc. Heck, Target already knows that your daughter is pregnant [4].

Your privacy is already blown. Mine too. In my case, I care less. So, its all cool with me. You should also calm down. Like I said, we (Homo Sapiens) will adapt. We always have.

The Ugly

Honestly, I can’t find anything to classify it as ugly for Internet of Things. Few say that Skynet will become a reality. Well, I don’t know.

The Future

All the hype around Internet of Things is good. It’s making us explore more and create new ideas. But the actual benefit will not come from Internet of Things alone, It will come from technologies and platforms that will result from Internet of Things.


This article is a repost from:


Force a page to load inside Facebook Canvas

As a Facebook apps developers, quite a few times you may have encountered a situation where you had to make sure that a page loads inside Facebook’s App Canvas.

There are couple of ways of doing this, but I found this one most easy to use:

How it works:

1. This code on page load will check whether the referrer was Facebook or not. This is done because, when a app loads in Facebook canvas, Facebook makes a POST request to the default page.

2. If the request was from Facebook, nothing happens. If it was not, then it redirects the browser to the app url.

Thats it. Its that simple.

My two cents on future of social media – Breakup story of Facebook and Eat24

I have a habit. I read a lot. And my primary medium for reading is Internet. So whenever I come across something nice, I share it with colleagues, friends.

The other day, I came across an article from Eat24. A breakup letter to Facebook. Amusing indeed, I must say. So I sent it to my colleagues. And I received an email back with an opinion.

This is good stuff. Makes me think that Facebook is not the future. I could be wrong though. But the fact that it’s changing so much, people not getting updates from the pages they like, and brands having to spend so much money to get some likes, it’s getting overbaord. Brands might just give up and decide to switch away. Which brings us to the fact that an external property, which is self sufficient, is essential. Plus Facebook needn’t necessarily be the most important social network around but more importance must be given to Twitter since it is more ‘real’ and all content goes out to everyone. Plus other social networks like Insta, Google+ maybe? But the burning question remains, what is the next Facebook, if there is any?

Little unformatted, I know. But good points I must say. I already have been thinking about it a lot lately, And this was just the opportunity I needed to tell people my perspective.

So here are my two cents:

Facebook IS NOT the future.

I could be wrong though.” – no you are not wrong.

But the fact that it’s changing so much, people not getting updates from the pages they like, and brands having to spend so much money to get some likes, it’s getting overbaord” – Facebook is now a public company. And like any public company, they need to make more money. And with such a big user base, Its a very attractive place for marketeers. Plus, see how hard Facebook is trying to break into mobile sector. And like any pubic company with a lot of money, you buy other companies to make more money.

Brands might just give up and decide to switch away” – This will not happen till the time people won’t stop using Facebook. Which is not going to happen, at-least, in near future. but its imminent. They will have to come up with more features, or innovation to keep their user base active.

Plus Facebook needn’t necessarily be the most important social network around but more importance must be given to Twitter since it is more ‘real’ and all content goes out to everyone. Plus other social networks like Insta, Google+ maybe?” – I think answer to this question lies in the another question, where is your TG? If majority of your TG is on Facebook, then it makes perfect sense to spend more on targeting people on Facebook. For some, Twitter will make more sense. For a photographer, Instagram may be more important.

But the burning question remains, what is the next Facebook, if there is any?” – I think instead of asking this question, one should ask, What’s next for Facebook? And I think there is going to be no next Facebook in terms of an idea similar to Facebook. In terms of money, of-course there is going to be next Facebook sometime again, maybe in next ten years? And at the rate the tech changes and new tech evolves, its really hard to predict what is going to be the next big thing.

If you ask me, the future lies in mobile technologies, not cellphones necessarily but in high end, extremely immersible user experiences, Voice controlled systems backed by AI. If I have to coin a term, I would say smart electronics.

Come may agree, some may not. If you ask me, this is the future.

We are still living in 90s

As soon as I began reading this article, It immediately reminded me of a person I had to deal regarding a security audit.

I was working on a web application written in PHP/MySQL. We had to deploy it in a scalable infrastructure and with the kind of money being poured into marketing it, It was supposed to generate a lot of traffic. Which it did.

We were obviously concerned about the security too. We hired a company to do that for us. It was all good till the time the guy asked us to give them FTP details of the server. Asking for FTP details was still alright. Only our servers did not have FTP. Why? because we hosted it on Heroku. A scalable infrastructure, you know! Heroku, Cloudflare, S3 etc.

And if you know how Heroku works, It does not give you a static IP address. Instead you use a cname record. I had such a hard time explaining this to him and his the audit team.

I spent four days fighting with them and trying to explain them why it’s not possible and what infrastructure we are using. Once, I even bluntly dared them to break into the system if they can. Futile attempts.

Anyways, This is one of the responses I received from this guy:

We were trying to identify the IP address associated with this url required for performing the server pentest. We tried the nslookup command for identifying the IP associated mapped to this URL. However, we get a different IP address every time we use nslookup to find the IP.

Isn’t it how Heroku is supposed to work? I also shared few links from Heroku’s user guide, in an attempt to appease his confusion. He still did not listen or even agreed. All he wanted was the FTP access. No matter what.

I had to take a decision. Either fight with these guys, or move the servers. I decided to change the servers to AWS. I did that because we could not afford to delay the launch of the app.

But one thing is for sure, There are a lot of people still around living in their own la-la land of 90s. They don’t understand how technology moves and evolves. On top of that, these people are never ready to even learn or listen to you.

I agree, I succumbed to the circumstances. but I did learn a thing or two.

Tasks – A beautiful todo list manager app for Android

Lately, I have been exploring requirejs, backbonejs. I like the way requirejs lets you define frontend dependencies with just few lines of code. Its just beautiful. Backbone on the other hand have matured enough now. So I decided to build something using these two. Yea, its one of those programmer’s bug which make you cranky if you don’t build something.

As a result, I built Tasks.  Is a small app that helps you managing your todo list. Its simple, because it just presents a single list of todos. Nothing fancy, no categories, no distracting colors.

Why? Because, I think you should be the one managing your todo list. Not the other way around. There are a lot of todo apps in the market. But all of them are either complicated or not give you better control.

I also used gestures for it using Hammer.js. Its based on gestures. There is no button for any action. All the actions are handled using gestures.

For building it, I used Apache Cordova. Which is another beautiful piece of software that lets you build cross platform mobile apps. Most of the people use Phonegap. I don’t particularly like the concept of Phonegap. Not because its bad, but because, I like to do things on my own. Phonegap is a great service and can save you a lot of building time.

Download Link

You can check it out at:

Give it a shot. You will love it.


First run screen of Tasks app.

Scraping html content rendered by Javascript Plugins

Be hold warrior, we are going past the gates of unknown.

All of you at times, I am sure, must have scraped a web page using your favourite programming language. It’s pretty straight forward. Just load the page and run a regex. Some sage individuals would prefer parsing the DOM instead.

But what about the plugins that are dynamically rendered by Javascript?

Don’t fret! Here’s how you can do it:

1. Goto the plugin’s page.
2. Select the plugin you want to scrape content from.
3. It will give you a Javascript code.

Take that code and implement it on a page. Now open the webpage you just created. It will render the plugin as expected. But here’s the trick. All of these (most, if not all) plugins shoot an XHR request to pull content from their servers. This is where you need to dive into the Inspect Element/Firebug etc.

Open your developer tools’s window. And goto the network tab. Reload the page and look for the XHR requests being made. If you look close enough, you can zero down on to the XHR made by that plugin. Copy that URL and paste that in another window.


You now have the data that was rendered by the plugin. Though the data format returned will depend on the implementation of the plugin’s website. but you will have data in some format which you can process.

Delhi to Munsiyari – Road Trip, December 2013

One of those days when you can see me jumping all over like a kid, Another Road Trip! This time its Munsiyari, Uttaranchal!

Been a long time, I haven’t been on a road trip. You know it’s been a long time when you start craving for something. Right now, I am craving for a road trip – The dirt, the snow, the chill, the black ice, the anticipation, the excitement… I can go on and on with this.

It’s winters here, in India. And you may know how its gets here in Himalayas. One word description? BAD! And I like this word when it’s associated with a road trip!

It’s going to be five days of complete bliss! No office, no work, no worries. Just me and my machine, conquering himalayan giants.

Also, this time, I will be recording my trip. Live!

I have created a small web application – The Bike Packer. All the way along, I will be tweeting live from my cell phone. And my tweets along with the photos will get pinned onto a Google Map. When I say live, it means that updates are going to be real time. I hope you would like this application.

You are welcome to experience what I would be living.

If all goes well, then this would be my itinerary for this road trip.

25th December:
Start from New Delhi at around 3 AM. Reach Kausani by Evening. Stay there overnight.

26th December:
Start early from Kausani, reach Munsiyari same day.

27th December:
Trek to Khuliya Top. Come back same day. Rest.

28th December:
Start early from Munsiyari. Goto Gangohat. Explore caves at Patal Bhuvneshwar. Head towards Nainital. Rest.

29th December: 
Start from Nainital. Reach Delhi.

Route map on Google Maps:

If interested, you can keep a track of me @ The Bike Packer. I will make this app live on 24th December.

Coach – PHP App Deployment Tool

I love writing code and I love creating new software. If you have been following my blog lately, then you may have noticed that I have been exploring a lot of stuff that has happened in PHP world lately. Laravel, Phonegap, Composer etc.

Then I bumped into Capistrano, Scalr and Chef! – awesome tools for deployment. I loved these so much that I wanted to roll out something on my own. So here I present you Coach. My latest experiment :)

Coach – A PHP App Deployment Tool. Its written in PHP, for PHP. With Coach, I want to build a simple deployment tool that can deploy PHP apps to different servers together. Right now, there is not much to explore. You can’t use it for production. If you want to see what I am up to, you can check Coach here.

Oh and if you want to contribute, you are most welcome!

Happy Programming!

Using Composer with Codeigniter

So you want to use composer in your next Codeigniter Project?

Well here’s how to do it:

1. Download and install Codeigniter

2. CD to project directory and install Composer
curl -sS | php

3. Create a composer.json file in your project root and define dependencies
"require": {
"monolog/monolog": "1.2.*"

4. Install Dependecies
php composer.phar install

This will create a vendor directory in your root folder of your project.

5. Add autoload.php to your Codeigniter’s index.php before require_once BASEPATH.’core/CodeIgniter.php’;

include_once './vendor/autoload.php';

Thats’s it. Now you can use your newly installed libraries in CI. Have fun!

Brace yourselves. Here comes the Movember

Look around you, everyone is growing moustaches. This is that time of the year which brings me bliss. Happy No Shave November people! Hell yeah! No Shaving for a month. And you can look like a cave man – bliss I say!

To honour this tradition – Movember, I am growing my facial hair. So are my colleagues 😀 Check it out at:

This is what I look like right now! God knows what will I turn into at the end! I will try to update you people every now and then.

Movember progress - November 4th
Movember progress – November 4th