What’s wrong with this advertisement?

Advertisement like these come and go without ever getting etched into our memory. There are very few advertisements remembered for their uniqueness and some just for the controversy they generate.

What is this advertisement about?

A kid remembers t0o late about his next day’s school project and so his parent’s work on his project which results in him getting an “A” grade.

Why I feel so strongly about this advertisement to write about it?

State of India

In a country like India with many religions and caste system, the backward classes never had any chance until India achieved independence in 1947. To tackle these issues, quota (reservations) were set up wherein seats were reserved for backward castes in colleges and government jobs. But like everything else, this too is often misused and holds no sense in today’s India.

Everything should be based purely on merit. I don’t believe in setting up any reservation but I do believe that even today these reservations do help some deserving students. And this oftens gets me into arguments with my friends and colleagues who hate reservations and feel it’s not fair.

A perfect system would be a system where reservation is based on a person’s merit and exceptions should be made only after considering a person’s talent and their financial situation. But there is no perfect system. And when I see people complaining about the reservations in colleges, this particular advertisement comes to my mind.

Is there actually a level playing field?

We don’t live in a fair world. While growing up, I have seen educated parents helping their kids with their school projects. Most parents now a days send their kids for coaching classes for every single school subject from as early as they are 4 years old. And I find it really irritating when a person who had the most resources complains about reservation system and merit.

I like learning new things but I have never been someone who worked hard to get good grades. I just learned enough to get a passing grade. I am writing this because even though I did not struggle, I have seen the struggle of people like my brother and few friends who worked hard and succeeded on their own despite facing so many challenges.

So when I find someone complaining about reservation system in India and about level playing field, my question to them would be — “who deserves an “A” grade? the student who worked hard and managed to make something on their own or the one whose parents did it for him?

Get Plugin Download Count from WordPress.org API

Since last 3 days, I have been looking out for a way to get the total download count of my plugin.

But there is almost no information about API for WordPress.org except on http://codex.wordpress.org/WordPress.org_API which is just links and some more information on http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/ which provides details on WordPress Plugin Information API. So after some tweaking and testing here is the final code to get the download count.

	$payload = array(
		'action' => 'plugin_information',
		'request' => serialize(
				'slug' => 'i-recommend-this',
				'fields' => array(
					'downloaded' => true,
					'description' => false

	$body = wp_remote_post( 'http://api.wordpress.org/plugins/info/1.0/', array( 'body' => $payload) );

	$body = unserialize($body['body']);
	echo '<p>Downloaded: ' . print_r( $body->downloaded, true ) . '</p>';


Now to avoid requesting information from WordPress.org on every page load, the required information can be saved in a transient and refreshed once a day.  This is in no way a final code. I have not placed any additional logic to display arrays, etc. So just use this as a starting point.

I will write a plugin to do this but until then if you know a better way, please share your ideas in comments.


Well it seems there is plugin_api using which most of the things I did above was unnecessary. If we use plugins_api we can get the total download count using few lines of code below:

/** If plugins_api isn't available, load the file that holds the function */
if ( ! function_exists( 'plugins_api' ) )
	require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );

/** Prepare our query */
$call_api = plugins_api( 'plugin_information',
		'slug' => 'i-recommend-this'

/** Display the results */
if ( is_wp_error( $call_api ) )
	echo '<pre>' . print_r( $call_api->get_error_message(), true ) . '</pre>';
	//echo '<pre>' . print_r( $call_api, true ) . '</pre>';
	echo '<p>' . print_r( $call_api->downloaded, true ) . '</p>';

Sublime Text 2 Shortcuts

After using Dreamweaver for years I have finally started using and loving Sublime Text for its simplicity and speed. In this post I plan to post every shortcut for my own reference and anyone else who needs it. If I miss any shortcuts, do share those in the comments.

(NOTE: I am only sharing Windows Shortcuts)

  • Move Lines Up or Down

    Shortcut for moving line up:  Ctrl + Shit + ↑
    Shortcut for moving line down: Ctrl + Shift + ↓

    The above are used to quickly move any line up or down without having to cut & paste.

  • Open Command Prompt

    Ctrl + Shift + P

  • Toogle Sidebar

    Ctrl + KB

  • Quick File Switching

    Ctrl + PPress above and start typing the name of the file. Based on the matches, the file will be opened instantly and if there are multiple options, you can press Up/Down arrow to select a file from the list. The search is done for the project or among the currently opened files.

  • Go to Symbol (Function / Classes)Ctrl + R
    (or Ctrl + P and then enter @)
    Similar to Ctrl + P, this is used to quickly go to a function or class. In HTML document, you can also go to a ID.

Flat Colors in UI & Web Design

As more and more designers tend to use flat ui colors in their web design projects and mobile apps, there seem to be far less resource on this topic. There are few good articles such as  http://designmodo.com/flat-design-colors/ & a great site with a list of the colors mostly used in flat ui.

I am currently trying to put a collection of websites using flat ui colors as a source for inspiration. Anyone interested in this project and want to help do let me know by sending me a tweet at @harishchouhan

Check out Flat UI Design Gallery

Dot Social Icons Font

Dot Social is a simple Icon based font consisting of Social Media Icons. This set contains 15 of the most popular social network site icons.

Icons of:  Twitter, Facebook, Google +, LinkedIn, Behance, Dribbble, Vimeo, YouTube, Pinterest, Deviantart, Email, Link, Forrst, RSS & Flickr

Free Social icons


Want this freebie? Enter your email and get it now!

Simply enter your email address and the download link will be sent right to your inbox.

Introduction to Adobe Fireworks

Photoshop has become the de-facto for graphic design. It has always been that way and it continues to be so. Fireworks though now a product of Adobe was originally created by Macromedia and launched in 1998. Fireworks was created with functionalities similar to Illustrator and Photoshop and was no doubt created for screen design. Fireworks strength has always been its simplicity and its ability to allow us to do rapid prototyping.

[button url=”http://designmodo.com/adobe-fireworks/” style=”white” size=”small”] Continue Reading my article on DesignModo.com[/button]