Archive for April, 2007

PixelPost

PixelPost is a photo blogging platform based on PHP and MySQL. It is much better than WordPress if your intention is to host photos only. In this page you will find my work on PixelPost.

PixelPost Themes

Simple Reloaded 1.1 (XHTML compliant) - This is an enhanced version of the simple theme included in the default PixelPost installation. Comments are inline and navigation appears at the bottom of the image. The theme is designed to host photos which are 640 pixels wide (my requirement). Check out my photo blog to see this theme in action!

My new photo blog and pixelpost

Some of you would have already noticed the new photo blog link on this site. This photo blog is powered by PixelPost, a CMS exclusively for photo bloggers. It is pretty easy to setup and like WordPress, you can customize it using themes. For my blog, I have taken the “simple” theme and modified it a bit to have comments on the same page. I have named the changed theme as “simple reloaded for PixelPost” and it is released under the license  Creative Commons Attribution 2.5.

Photos are a very powerful medium. Every photo tells a story and for the photographer it is a very intimate story! These photographs will give a glimpse of my life.

My first lesson in PHP/Wordpress plugin development

Recently I had released a WordPress plugin - Google Blog Search Preview. I had tested it over two webhosting providers and everything seemed perfect. But within a week of release, I was getting reports of this plugin failing on certain installations. Well, it turns out that I had coded my plugins in PHP5.

The error was,

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/brodopr/public_html/brodo/wp-content/plugins/jj_gblogsearch.php on line 15

Unfortunately many sites still run WordPress on PHP4. The biggest problem is that object oriented features in PHP is very different between version 4 and 5. For example, the static keyword is not available in PHP 4 which I was using in my plugins!

So the first lesson in WordPress plugin development - Test your plugins in both PHP 4 and PHP 5 installations! WAMP server even has a plugin which allows you to switch between PHP4 and PHP5. So that was easy!

I have released version 1.1 of Google Blog Search Preview  which works on PHP4 and PHP5. You can download it here. Many thanks to Carlo and Len for reporting this problem.

State of technology in my home town (Kerala)

I stay in Kerala, southern state of India. Kerala is unique in many respects. I won’t go into details but in short, day to day life here is a challenge!

Today I came back from work early since I was not feeling well. Summer is at its peak and there was no electricity when I came home. My father told me that power was down from morning. I called electricity office to check on the status. Here is the conversation,

Me: Hello
Electricity office guy: Hello, electricity office

Me: We don’t have power in area “xyz”
Electricity office guy: We have switched off electricity in the entire “abc” area

Me: Why? What happened?
Electricity office guy: We are painting the transformer

Me: eh? painting? oh! When will it be over?
Electricity office guy: No idea, probably by evening

As you can guess, power came back after 12 hours of painting! You can imagine how challenging it is to run a business around here :-)

Timeline of linux

Checkout this interesting timeline of linux evolution. You can see that debian based distributions are getting pretty strong!

Evolution of linux

Book Review :The Digital Photography Book by Scott Kelby

The Digital Photography Book: The Step-By-Step Secrets for How to Make Your Photos Look Like the Pros’! By Scott Kelby (240 pages, $12).

Scott Kelby’s book is an interesting read for a digital photography enthusiast. He takes the reader through digital photography techniques in different shooting scenarios with a humor touch.

If you are looking for a good weekend read and want to learn something more about digital photography as well, this is the book for you. I found it very informative and engaging. But don’t expect too much jargon and technical details of digital photography!

Digital Photography book covers different photo shoot situations with a chapter. For example, some of the chapters are - “Shooting flowers like a pro”, “Shooting people like a pro”. I found the chapters pretty focused and informative. After covering “Shooting flowers like a pro”, I tried a few photos and was surprised how good they turned out to be!

Another good thing about the book is that Scott also gives recommendation on the accessories you might want to add to your photography kit. I am a bit short on the money right now, but I am planning to get a lense kit soon. Here is an excerpt from the book on this topic,

Still a fake headline. Don’t let it throw you. Now, although we want pro-quality photos, we don’t all have budgets like the pros, so when possible, I break my suggestions down into three categories:

I’m on a budget. These are denoted with this symbol. It simply means you’re not loose with money (meaning you’re probably married and have kids).
 
I can swing it. If you see this symbol, it means photography is your passion and you don’t mind if your kids have to work a part-time job once they get to college to buy books. So you’re willing to spend to have some better-than-average equipment.

If you see this symbol, it means you don’t really have a budget (you’re a doctor, lawyer, venture capitalist, U.S. Senator, etc.), so I’ll just tell you which one I would buy if I was one of those rich bas*%$#s. (Kidding. Kind of.)  

The chapter I liked most was the last chapter titled - “The recipe for getting this type of shot”. In this chapter, a photo followed by tips to get that kind of photo is given. Following is an excerpt.

How to take this type of photo?Characteristics of this type of shot: the water is very still; you can see through the water because there’s very little reflection; the overall tone is blueish; the lighting and shadows are very soft; you get a full sweeping view.

1. This type of light doesn’t happen at 5:30 p.m.you have to get up early and be in place ready to shoot at 5:30 a.m., right before the sun comes up.

2. To get really still water, you also have to shoot at dawn. If you shoot this same scene at sunset, the winds will have picked up and the water won’t be as smooth……

Following are the main points I learnt from this book,

1. When there isn’t enough light use a tripod else a blurred photograph is guaranteed!
2. Don’t just stand and shoot, explore and find an interesting angle for your shot.
3. Play with aperture priority mode and shutter speed priority mode. Each situation requires a specific mode!
4. When taking photos of people, the most important thing is how you position the subjects in the frame.
5. The relation between focus and aperture. For example, if you just want to focus on the subject with background not in focus, use the lowest aperture!
 
If you have just started digital photography, I highly recommend this book. This book gives a very good introduction to the world of digital photography in plain language and it is fun to read this book.

My rating - 8 out of 10.  Highly recommended.

Google to address paid link menace

I think text-link-ads will have to find a new business model soon. It appears that Google is taking the issue of paid links very seriously and according to this Matt Cutts article, you can now report paid links appearing on a Webpage!

In another post, Matt Cutts talks about the disclosures required if you are going to place a paid link. Basically provide a machine readable disclosure (rel=nofollow) and a human readable disclosure.

As you can guess from my previous articles, I am a strong advocate of rel=nofollow. As a leader of search engines, Google has the responsibility to clean up the paid link menace in its early stage itself. This is the only way to ensure integrity of search index.

The explosion in online advertising and the huge interest generated by blogs have begun to pollute the search results of google and other search engines. In fact “how to make money online” seems to be the most searched term these days. I am not against “making money online”, infact I am trying to atleast cover my hosting expenses via Adsense! But I think search engines should strive for achieving this simple statement - “Content is the King”.

It is a shame that other search engines doesn’t support rel=nofollow. 

New machine, ubuntu and a cool torrent client

AMD64Today I assembled a brand new computer! The idea is to use it exclusively for programming. Since the new one is not intended for gaming or for any high end stuff I kept its configuration minimum. Here are the basic specs,

1. AMD Athlon 64 X2 3800+ processor
2. Asus M2N-MX motherboard
3. 2GB DDR2 533 RAM
4. Seagate 160GB SATA
5. Wireless mouse and keyboard

UbuntuTotal price for the components was below Rs.20,000 ($450) and I have decided to keep it free of Windows. So right now I am downloading the latest stable version of Ubuntu, the hot new linux distribution! The server edition has LAMP builtin and hence I can straight away jump into some PHP coding.

The fastest way to download anything is to use a torrent distribution. Fortunately ubuntu also has files on torrent network. Today I tried out a new bittorrent client - utorrent. This is free of any adware or spyware and the download is just below 200K! It is hard to believe that people still produce optimised code! :-) Give it a try, you may decide to use it instead of your current bittorrent client!

We need rel=negative tag!

There are many who oppose the “rel=nofollow” tag used by major search engines such as Google. But I am in favor of this tag, infact I wish we had something called “rel=negative”. So if I link a site with “rel=negative” then Google should reduce the Pagerank of the site being pointed to.

This will ensure that all the spam based sites such as the MFA (Made for Adsense) will quickly get buried (borrowing the Digg terminology!). This opens up a lot of possibilites. For example, Wikipedia could use this tag and create a spam directory!

There are couple of issues with this approach. A determined campaign against any site could potentially bring it down! Also the domain which gets a lot of “negative rank” will eventually disappear from the internet, so bringing it back will not be easy!

Note that Google already does some kind of negative ranking for those sites which link to spam Websites and for those sites which has duplicate content.

But I think there cannot be any substitute for manual filtering. What Google needs is a  dedicated team of 10 guys who will do a daily scan for top 10 spam sites which gets most traffic. Once a site is identified as spam, these guys will simply remove it from the search index.  I am not sure whether such a team exists in Google!

PS: After writing this post, I was going through my RSS feeds and came across two interesting news items. It appears that Google is actively hunting spam sites on blogger and my friend binny got tagged as spam!.  They are also going after spammers on Gmail (which seems to have backfired since they had also deleted some non spam accounts!)

Google Trends Analysis - finding sex correlation

One of the little known Google tools is the Google Trends.  Surprisingly rich amount of information can be derived using this tool.

Google Trends shows the relative volume of keyword search in Google Search. You can provide a list of keywords separated by comma and then see comparative search volume over a period of time.

I started my post saying that Google Trends can give you amazing level of insight. Combined with regional information, it can give insight into social aspects of human life as well!

In my experiment, I used these keywords - peace,love,life,kindness,sex. Anyone can guess which is going to be the most searched term. There is no surprise there. Here is the Google Trends chart,

Google trends for sex, life, love and kindness

Now I did a comparison of search volume across United States and India. Here are the search volume graphs,

Google Trends - US

Google Trends - India

Noticed the huge difference? What is your conclusion? :-) I have no comments!

Lastly I did a search for sex for all the regions. Here is the top 10 regions.

Google Trends for sex

From this study, I derive the following formula,

Sex Interest = Sex Suppression * Population * Sex Co-efficient where Sex co-efficient is a universal constant. When Google gives out the actual volume figures, we will know this constant!

Is there a perfect online polling system?

Perfect voting system?I wanted to create a poll on this blog and then I realized that there is no such thing as a perfect poll! The main problem is, how do you prevent bogus or duplicate votes?

Many existing polling systems use IP address to identify duplicate votes. But this eliminates a lot of valid votes! For example, 1000+ employees at my office use the same proxy server and hence to the polling system will appear as a single voter!

Also different IP addresses can never guarantee perfect polls. Methods used for internet anonymity such as Tor can be misused for bogus voting.

Other methods used are the cookie method and the email verification method. Both these are not fraud proof. Cookies can be easily deleted and multiple email ids can be easily created.

What we need is an internet identity which probably links to something like a passport number!

During my search for a perfect polling system, I came across this link. It claims to build a fraud proof voting system. But in reality it is probably the worst voting system!

Releasing Google Page Rank plugin 1.0 for Wordpress

Google Page Rank Today I am releasing my second plugin for WordPress - The WP Google Page Rank Display 1.0.  You can use this to show off your Google Page Rank in the WordPress blog. This is superior to other plugins out there due to two major reasons,

1. Page Rank value is cached for 24 hours and hence means minimum load on Google servers and on your blog.

2. There are no external dependencies for this plugin.

Google Page Rank indicates the value of your site assigned by Google search engine. It varies from 0 to 10. For example, http://www.google.com has a Page Rank of 10. Higher page rank means higher traffic from Google search engine.

For more details on the Google Page Rank Plugin and for downloads please visit the plugin page. If you have any comments, suggestions or bug reports please contact me.

WP Google Page Rank Display plugin for WordPress

WP Google Page Rank Display plugin can be used to show off your Page Rank anywhere on your WordPress blog.  Page Rank is displayed as an image which can be replaced by your own version if needed. Page Rank value is cached for 24 hours and hence there is no load on the Google servers or on your blog.

If you want to apply styles to the page rank image, you can override css style “img_jj_pr“. This ensures that the style is applied only to the page rank image. Following is an example,

.img_jj_pr  {

border:none;

}

This  plugin is released under GPL license.

Important : This is tested only on WordPress 2.1+ versions. Please contact me if you came across any problems with earlier versions.

DOWNLOADING

Download WP Google Page Rank Display Plugin 1.0 | Download Page Rank Image Library (optional)

INSTALLATION

1. Upload to your plugins folder, usually wp-content/plugins/ and unzip the file, it will create folder jj_google_pr and all files required inside it. This includes images subfolder.

2. Activate the plugin on the plugin screen.

3. Now open the WordPress template file where you want to add the Page Rank display. In my case I use sidebar.php. Add the following line to the place of display,

<?php @jj_google_pr(); ?>

4. Customize the image CSS properties by adding CSS style img_jj_pr in your stylesheet.

5. If you want to change the default images provided, you can replace the images inside images subfolder of jj_google_pr.

DEMO PAGE

In this blog, you can find the plugin in action on the right side bottom. Unfortunately as of April 7, 2007 I have a Page Rank of zero!

DONATE

If you like this plugin and would like to donate something, please donate your prayers. Next time when you pray, think about “Jayson Joseph Chacko”.  :-)

Programmer’s challenge 2007 video

If you get excited about anything remotely related to programming (like me), then you will surely love this video. This video is of the Programmer’s challenge quiz competition where 6 of the leading game programmers take part. Most of the questions are game related and you will find a lot of funny answers!

The video is long (45 minutes). If you are on a slow connection like me, start the video and then pause it.  This ensures that the entire video is downloaded before you watch it!

Google and me - The influence Google has on our lives

The Google Empire!When I wake up, I check my Gmail account for emails. Then I scan website feeds on Google Reader to see what is happening on the online world. After that I scan latest news from Google News.

If I have any doubts about anything I straight away go to Google Search. Infact I have set Google Search as my homepage.  Whenever I need an image related to a topic, I do a Google image search.

My friends contact me over Google Talk. Once Yahoo messenger was the IM I used, but not anymore.

My various “todo lists” are now on Google calendar. I maintain various pieces  vital information (passport number, contact numbers etc.) in Google spreadsheet. I rely on Google Adsense to finance this blog.

So if tommorrow Google disappears, I will have a tough time! Let me be clear, I am a big fan of Google. Their products simply kick ass and I am impressed by the way they have adopted Ajax in everything.  But the reliance on Google for everything is frightening…

I came across the story of a small company who had gone out of business simply because their pages disappeared from Google Index (Possible reason? - trying to game google!). For example, 80% of the visitors to this blog come from Google search!

Another problem is the fact that the Made for Adsense (MFA) sites are getting smarter. Instead of just copying content, they are also building links. The net effect is that the original site which actually authored the content will be flagged as spam and may get removed from Google Index! It is a hard job that Google has in their hands!

Movie Review - Saw III - 2 hours of torture

SAW 3First, a disclaimer: My movie reviews are full of spoilers. So read it only if you have already seen the movie! :-)

If you are interested in knowing how brain surgery can be done in your garage, Saw III is the movie for you. Want to test the efficiency of headache pills? Watch this movie!

I am a hardcore fan of horror movies. But I am getting bored by the increased gore and blood in the recent horror movies(Saw, Hostel etc.). Saw III is a perfect example of wasting a good plot line on unnecessary scenes such as the long brain surgery in a workshop.

It was long time since I picked up any movie. So with lot of expectation, I watched Saw III today and I am yet to recover completely from the experience. I give it an average rating. Here is a quick review.

Good : Unexpected plot twists and thank god! Jigsaw is dead :-)

Bad : Too much flash back and the whole thing is getting repetitive.

Ugly : Too much blood, gore and surgery details.

If you plan to watch Saw III or already seen Saw III, I recommend you to see first two movies (Saw I and Saw II). Saw III actually connects everything together and should ideally be the last movie in the series. But it appears that Saw IV is already in production and we may see it in 2007 itself!

Saw 3 screenshotSaw III starts where Saw II ended. You see detective Eric making the inevitable decision of cutting his foot off. Then there is another game, but this time victim has no chance of escape. That makes Saw III different from other two films. The games are no longer perfect and it appears after all Jigsaw is only human(sigh!)

There is another interesting thing I noticed. The movie reminds me of rooms in Doom 3! They all look  like the ones rendered by John Carmack. There is a scene in which a judge (with his tie on) is tied to the bottom of a container and he shouts “I am a criminal judge, get me out of here”. Only scene where I laughed.

Saw 3 screenshotsI enjoyed the main plot which is an “exploration of our desire for revenge”. There are numerous plot twists that takes you by surprise! In the end I think I was more surprised than Amanda :-)

My rating : 5 out of 10, which means watch it if you got a holiday and there is nothing else to do!

PS:- Next movie in my list is Borat.

Are we capable of everyday heroism?

I came across this interesting article which was cited by Guy Kawasaki. Titled “The Banality of Heroism”, it looks at the “hidden heros” in each one of us.

At Abu Ghraib, one photo shows two soldiers smiling before a pyramid of naked prisoners while a dozen other soldiers stand around watching passively. If you observe such abuses and don’t say, “This is wrong! Stop it!” you give tacit approval to continue. You are part of the silent majority that makes evil deeds more acceptable.

This article also reminded me of the movie, “Das Experiement“. Highly recommended!

Wordpress Plugin - Google Blog Search Preview

I do most of my programming during weekends. This weekend I decided to write a WordPress plugin. I also wanted to improve my recently acquired PHP skills.

WordPress dashboard displays incoming links from Technorati. This is very useful since it lets you know who are discussing about your blog (not all have trackbacks enabled). But sometimes not all links are visible on Technorati. So I supplement it by doing a “link search” on Google Blog Search.

What if I display the Google Blog Search incoming links also on the WordPress dashboard? Hence this plugin! This plugin uses rss library of WordPress. I wanted to do Ajax, but there isn’t any “native” support for Ajax in WordPress :(

Do checkout Google Blog Search Preview Plugin!

WordPress

Welcome to my WordPress code library. In this page,  you will find various WordPress plugins and themes created by me. You will also find various WordPress tutorials and articles written by me.

WordPress Plugins

WP Google Page Rank Display - This plugin can be used to display your Google Page Rank in the blog. The Page Rank is cached on a daily basis and hence is an improved plugin compared to other plugins out there. Page Rank display can be easily customized by using a different image set!

Google Blog Search Preview - This is a very simple plugin which shows you a preview of Google blog search links for your blog! This appears on the Dashboard at the bottom of the activity section.

Google Blog Search Preview Plugin for WordPress

Google Blog Search Preview is a simple plugin for Wordpress which displays incoming links from Google Blog Search. This is similar to Technorati incoming links and hence is displayed on the Activity tab of WordPress Dashboard.

I found that Google Blog Search sometimes shows me inbound links which are not yet detected by Technorati. Hence this plugin! This plugin uses “link:” feature of Google Blog Search to identify incoming links.

This  plugin is released under GPL license.

Important : This is tested only on WordPress 2.1+ versions. Please contact me if you came across any problems with earlier versions.

DOWNLOADING

Download Google Blog Search Preview 1.1 | Download as text file

INSTALLATION

1. Upload to your plugins folder, usually wp-content/plugins/ and unzip the file, it will create jj_gblogsearch.php file.

2. Activate the plugin on the plugin screen.

3. Go to WordPress Dashboard and verify that incoming links from Google Blog Search are displayed at the bottom of activity section.

SAMPLE SCREENSHOT

Google Blog Search Preview Plugin for WordPress

CHANGE LOG

  1. Released 1.0 on 1st April 2007 (PHP 5 only)
  2. Released 1.1 on 17th April 2007 (PHP 4 and PHP 5 support)