The Blog

You can never cross the ocean until you have the courage to lose sight of the shore. 

Free theme for Ghost: OST

 

ost-demo

 

This is a free theme created for Ghost Blogging platform.

 

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.

<?php
	$payload = array(
		'action' => 'plugin_information',
		'request' => serialize(
			(object)array(
				'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.

Updates

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',
	array(
		'slug' => 'i-recommend-this'
	)
);

/** Display the results */
if ( is_wp_error( $call_api ) )
	echo '<pre>' . print_r( $call_api->get_error_message(), true ) . '</pre>';
else
	//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

Am I at peace?

Due to my lifestyle choice, my relatives and friends and sometimes also my family think I might be sad. I have spent the last 7 years of my life isolating myself from many. I am single and now I hardly go out of the house. The only people other than my family that I communicate with are either my clients or colleagues.

I have no plans of getting married any soon or for that matter ever. My social life is no existent and now it has been months or even years since I have seen my best friends. This is what people notice and this is why mostly everyone assumes that I might be sad. But its totally opposite.

The last few years even though they have being difficult, have been the happiest years of my life. I do love being social and I do love going out, but being with myself is what gives me complete peace. I have spent every single day of these last 6 years working. My average week consists of 80+ hours of work, 20+ hours of reading and the remaining watching movies when am not sleeping. They have been highs and lows but I have enjoyed every single minute of it. In these 6 years, I had the most control on my life and I have been able to do exactly what I want to do.

I am slow in terms of my own progress, and sometimes it does make me crazy, but then most other time I do not mind it. I am not in for a race. I love what I do, and I like the way I do it. I do wish I was a little faster but then again since we just have one life, I prefer to feel every moment and remember it.

My life is about to change for good and I might have to let go of my good old days of working in isolation. But change is good and I hope I finally am able to change gears of my life.

 

Wallflower – Priscilla Ahn

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.

Continue Reading my article on DesignModo.com