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: https://play.google.com/store/apps/details?id=name.neerajkumar.mobile.android.tasks

Give it a shot. You will love it.

Screenshot

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.

Voila!!

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.

Route:
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: https://mapsengine.google.com/map/viewer?hl=en&authuser=0&mid=zz09RYFfAO9Q.kY7k9t8zvidQ

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 https://getcomposer.org/installer | 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 :D Check it out at: http://facebook.com/moochember.

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

Codeigniter is not dead! And yes, Laravel is sexy!

Everywhere, everyone is saying CodeIgniter is dead! CodeIgniter is not dead so shut up!

That’s being said. Lately I have been exploring a lot of new things, new for me. I learnt composer. I have ported a library as a composer package which I use in my company. Learnt nodejs. And started exploring ExpressJS.

Then I bumped into Laravel. The sweet little thing that is gaining a lot of traction these days. and which is giving a lot of heat to CodeIgniter is dead argument. Well I beg to differ. CodeIgniter is not dead.

First of all let me tell you from my experience. CodeIgniter is a boon for those developers who want to dive into MVC and PHP Frameworks. CodeIgniter is dead simple to use. Install it and start using it right away. Laravel fans will argue that same goes for Laravel. But you see, for using Laravel properly, you need to know how to use Composer and some other little things.

The beauty of CodeIgniter lies in it’s simplicity. You don’t need to define routes for starters. unzip the code, create a new Controller and there you go.

No doubt Laravel is awesome. I liked Laravel too. I am going to ditch CodeIgniter pretty soon. but not because it is dead. But because, Laravel is built on top of good programming patterns and concepts. Dependency Injection is exactly how you should write your code. Every Class should only know what is happening inside it. Nothing more. You should be able to change dependencies on the fly. Move to other Database with one line change.

But still, there are a lot of apps I have built that are built using CI. And there are a lot of websites that are built on CI out there. There are millions of websites out where built on top of CI. So it’s not going anywhere. CodeIgniter will stay for a little longer.

Yes, CodeIgniter is not dead. But at the same time, Laravel is pretty sexy too!

I am a composer

Just a couple of minutes back, hours to be precise, I wrote my first Composer package.

For those, who don’t know what Composer is, It’s a dependency manager for PHP. Some like to call it a package manager. Thats wrong! It’s a dependency manager.

From past few months, I have been craving for new knowledge. So I started digging up Internet like I used to do earlier. I bumped into Laravel, newest thing happening in PHP world. I tend to stay away from new frameworks, libraries as much as I can. Why? because till the time they are mature enough I cant use them in my code – I write code for enterprises, so can’t fuck up there. I cant afford to.

But Laravel actually reminded me of important, useful actually,  it is to write good, clean and efficient code. Let me stop here. Ill save it for next post.

Anyways, One thing I quickly learnt that Laravel uses Composer heavily. Thanks to the docs, I installed Composer and was up and running in few minutes. You can do it in seconds it you have good Internet connection.

The geek inside me quickly woke up. Forget Laravel, what the heck is Composer and how to use it? – all I could hear inside my brain.

So I Googled. And found this and this tutorial. Oh, and THIS – main resource. I must say, Composer is going to save a lot of hassle if everyone starts using it. I mean, look around you. Everywhere you will find poorly written code. Because of a lot of reasons. One of which is there is no standard in PHP. PHP is a loosely typed language.

Anyways, What I ended up with is this: hello-composer. It’s on Composer’s repository too if you are feeling courteous.

After this, I quickly started working on a real composer package. First thing that popped into my mind was Facbeook SDK. I have been using it for all sorts of applications in my Company. I am working on it. Let’s see where it goes!

Oh yes, I am not sorry if you find this post all over the place. I am half asleep and it’s 3:30 in the morning. Damn, I should sleep.