Archive for the 'Opinion' Category

On why I need more idiots to read this blog!

First of all, I am sorry if the title was insulting. But I couldn’t find a better title than it for what I am going to say!

Some of you would have already noticed the presence of Google Adsense on this blog. The primary aim of this blog is not to make money, but at the same time I hoped that it would atleast cover my hosting expenses ($100 a year).

Now here is the interesting part. This blog is completing 2 months this week. So far I had around 1800 page views as you can see from the following Google Analytics report. I know, it is pretty low compared to A-list blogs, but still I was expecting some earnings from these impressions.

 jaysonjc.com page views

Next let us look at my Google Adsense earnings from this site. There is no surprise there! - It is a total of $0.00!

Now frankly this is very discouraging. But I know adsense does work. As you can see, guys like John Chow (a nasty guy who would probably bring down the whole internet!) and Amit Agarwal does make sacks of dollar notes every month. So what is the reason why I am not getting any adsense revenue?

I did a bit of research and I think there are mainly two reasons for this,

1. I don’t have enough ad units on the page. Some think that having less ads gives more money. In my blog, I don’t think it works!

2. The most important reason I think is that most of my blog readers are intelligent. Even those who come to this site via Google search are pretty intelligent. I guessed it from what my readers are searching to reach this blog.

So in order to get more advertising money, I need to gather an audience which is less intelligent. If I could get an army of idiots coming to this site, I am sure my adsense income will skyrocket!

I think the easiest way to do that would be to write about Paris Hilton, Britney Spears and American Idol. Don’t worry I have no such plans, yet. :)

Top 10 traits of a good programmer

As I have written in one of my earlier posts, this is the 9th year of professional programming for me. In this post I will summarize my thoughts on what makes a good programmer (master programmer or chief programmer as called by some). I wouldn’t call myself a master programmer yet, but I am pretty sure I know the traits that define a good programmer.

Now before I go into the details, let me first clarify what the term “programmer” means to me. A programmer is not someone who blindly implements whatever design is given to them. Many software service companies in India are under this impression. This myth is purposefully floated around mainly because 90% of the programmers in these companies have less than a year of programming experience. So  coding/programming has to be projected as a mechanical activity!

So who is a programmer? A programmer is someone who has fairly good understanding of computer systems, can write good code, is intelligent and can visualize a software solution for a particular software requirement. He looks at the software requirement and starts thinking - How do I build this thing? How I can design the interface so that it is most user friendly? What happens when there is huge data volume? How do I ensure that no one hacks into my program (especially for Web applications)? How do I reduce coding effort? How do I ensure future additions have minimum overhead?

So as you can see it is much more than just mechanical coding.

Ok no more preaching! Here is my top 10 traits for a good programmer.

1. Think! -  This is the most important trait of a good programmer. He never jumps into anything. Given a problem, he first thinks over it. The more he thinks, the more ideas, questions and alternate solutions come to his mind. I see the lack of thinking as the primary source of all problems a novice programmer face. When he comes across a problem, he doesn’t think. Instead he bangs his head on it or asks for help from another guy. Sometimes you need to ask for help, but think on the problem or bug before you run across to your technical lead!

I will give an example of the importance of this “Think” factor. Sometime back we had a requirement to build around 40 interfaces. This basically required scripts to be written to transform data from a set of tables in one database to another. The estimates were done like this,

1 interface = 5 days and hence 40 interfaces = 40×5 = 200 days of build effort.

When I started on the project, everything was in place. The team, the effort of 200 days and the schedule. Then I thought over it. I saw that if a generic framework is written for the transformation, I could externalize the transformation rules into an XML file. The generic framework took me about 10 days to build. Then for all the 40 interfaces, the time taken was 5 days (since only tranformation rules were to be written). So my team got a lot of free time! :)

2. Learn! - Learn Baby, learn! A good programmer has a burning desire to learn new things every day. It is almost 15 years since I started programming. And even today, I spent a lot of time learning new things. When it comes to programming, every program you write teaches you something. I have fairly good knowledge of Java, C, C++, C# and Qbasic (yes qbasic is my first love!). Just recently I have started learning PHP.

Nowadays learning trait is something which I see less and less in my professional life. The learning itself is so formalized and force fed that people are bored with it.

By learning, I am not talking about taking professional certification. Sorry to say this, but I have nothing but contempt for many of the professional certifications (for example the Sun certifications). In India, it is very easy to manipulate the system and there is a lot of fraud happening on the certification front.

3. Help others! - This to me is the golden rule of programming. “Help other as you would want others to help you”. In my case, I think much of the programming wisdom I possess has come from helping others solve their problems! I used to sit till late hours and help others solve their programming problems or bugs. The advantage was,
 a) Immense experience in solving programming problems.
 b) Various ways people see a particular problem. Also you come across interesting/weird/strange ideas!
 c) Empathy towards programmers. The difficulty they face in their day to day job.

Unfortunately as I grew older and came in touch with extremely process centric enviornments, I realized that “Help others” is not something officially appreciated.

4. Lead by example! - Another important trait if you are a senior programmer or architect. Many times I have come across senior technical architects who say - “It is simple, you just do this and do that”. I am 100% sure that many of them can’t code what they so confidently say as “simple”!

If you are a technical lead or a lead programmer, lead by example. Write code in front of your team members. You will get more trust, respect and support from your team!

5. Know everything! - Ok, that doesn’t sound right. I will rewrite it - Know a bit about everything. For example, If you are a core Java programmer, you should also know about SQL programming. It also helps if you know a bit of regular expressions or a scripting language. For example, I have recently gone through XML specification twice even though I have no professional need right now. But someday I will need it.

6. Know basics of computer science! - There are many programmers out there who doesn’t have the basic knowledge of computers or their inner workings. This is very essential. Many of the programming difficulties that people face is due to the lack of knowledge of how computers work! If needed take a computer science course.

7. Perfect it as much as you can! - Nobody is perfect. You can’t write perfect code in the first iteration. Refactoring is the mantra. Analyse your code, find code fragments that can be reused and refactored.

8. Use tools! - Many programming tasks can simplied if you use appropriate tools. For example, in all my projects I use Ant to automate build and deployment process. You will be surprized at the time you save!

9. Explore code! - If you want to improve your coding skills quickly, one thing I recommend is exploring code written by others. If I would have said this 10 years back, you would ask me- “Where can I find good code?”  But now the scene is completely different. Open source movement has revolutionized everything.  There is so much good open source code out there that I feel overwhelmed by it!

10. Be Humble! - Humility is the last of the top 10 traits a good programmer should have. But it is not the least! As you get more and more experience, it is very natural to feel arrogant. The moment you become arrogant, you loose the trust and respect of your fellow programmers.

I have come across many who are intelligent and technically quite good. But again I have no respect for them simply because they are arrogant. Being arrogant also shows how ignorant you are!

Remember, no one is perfect. You can also make mistakes. If someone points it out, thank him and accept his valid comments.

Closing thoughts

Now you might be thinking - Why is this guy not talking about “design patterns”? Why is he not talking about “Ruby on Rails”? What about extreme programming? What about open source contribution? Linux? and so on.

My dear friends, In my opinion talking about design patterns or practising pair programming(as in XP) etc. are not one of the top 10 traits. Being aware of design patterns definitely helps, but I think you will anyway come across it yourself if you are a regular programmer or if you explore code written by others!

Again I want to stress my first point. A good programmer is someone who can build a “good” software system given a software requirement. The “good” here means - correct, optimized, reusable, extensible and elegant. Everything else (tools, language, methodology) are just tools to achieve it.

Programming is not for everyone. If you don’t have the passion for it, quit and find another job. If your company doesn’t recognize your talent, quit the company.

Further Reading

Here are a couple of good books for exploring further on this subject. If you know a good one do let me know by commenting below.

The Mythical Man-Month: Essays on Software Engineering, 20th Anniversary Edition - The good old classic by Frederick P. Brooks.

Code Complete, Second Edition by Steve Mcconnell - A must read.

The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt and David Thomas - I endorse the apprentice method

Expert One-on-One J2EE Design and Development (Programmer to Programmer) by Rod Johnson - A must read if you are a J2EE guy.

Your thoughts are welcome!

Programmer for 8 years - and still enjoying it

Just last week I realized that it is over 8 years since I started my programming career (In India guys are ashamed to call themselves programmers, they would rather say “software engineer” or “senior software engineer” or “consultant” etc.). Last time I counted my experience as 5 years and obviously that was 3 years ago!

In Indian software industry, any guy who completes 3 to 5 years of programming career automatically becomes a manager. So essentially no programming/design after 3 or 5 years. Instead the guys start to do what is called “project management”. Something which terrifies me. It is a sheer waste of human talent and experience.

After 8 years of programming I realized an interesting fact. My ability to design software systems or code a software component reached its peak only after 6 years of programming. Ok, it may not be same for all, but it seems that you need to have atleast 5 years of solid programming experience to become a master programmer.

Another ability I acquired recently is the ability to troubleshoot a programming problem instantly. Also during code reviews, a glance at the code gives you lot of design/code improvements even when it is written by an experienced coder!

In most of the software organizations, human resources team(HR)  has no idea about the different types of talent employees possess. There cannot be any exceptions. Everyone has to have the same talent and same aptitude. So that means they cannot imagine a guy with 8 years of experience as a programmer. HR thinks, this guy must be either a lunatic or a total looser to remain as a programmer even after 8 years!

Following is a hypothetical conversation. But it could happen anytime :)

Tech support : You have all tools needed on your system - Microsoft Word, Excel and Outlook Express.

Me: I need Java compiler.

Tech support : I don’t believe you. You are too old for that. Get a written approval from the CEO.

Why I hate digg’s RSS feed

Digg!I have subscribed to feeds provided by Digg, Reddit and Stumbleupon. These feeds let me know what is hot on the internet. When it comes to the number of breaking stories, Digg is much bigger than Reddit and Stumbleupon.

But there is one thing that irritates me about Digg’s feed. They don’t provide direct link to the news item being reported. Instead the RSS feed link goes to the Digg story. This means that every time I have to go through Digg to see the news item. It also means that when I share the news, people see the Digg news not the actual news item.

Reddit is smart. The main story links to Reddit, but they also provide a link in the RSS. Hence even though I can only share the Reddit link, I can directly click on the link provided inside the feed and checkout the story without additional clicks.

StumbleUpon is the best. Everything points to the original story reported.

I guess the reason for not linking directly in Digg is that they want maximum Adsense impressions. Also they seems to be looking for more pagerank via shared feed items. So looking from another perspective, they are the most clever among the lot :)

It would have been nice if Google Reader provided a mechanism to directly share a URL, instead of allowing only feeds to be shared.

In praise of Google Reader

What is Google Reader?

Google Reader is an online feed reader tool which allows you to subscribe to feeds (RSS/Atom)  provided by various blogs/websites. These feeds represent the latest content on the blog/site.  Instead of visiting all the Websites/blogs, you can read all the latest content from one place!

In praise of Google Reader

Google calls Google Reader as the inbox for the Web. I think that is an apt description of Google’s feed reader.

I have been using Google Reader for a month or so now. I find it very user friendly and responsive. Earlier I was using Feed Reader, which was a desktop based RSS/Atom feed aggregator.

There are couple reasons why I switched from a desktop based aggregator to online aggregator.

1. I use a couple of computers. I have one at home, another at office and sometimes I carry around a laptop. So synchronizing feeds across all these became a chore.

2. When you have a huge number of feeds subscribed, any desktop based aggregator will affect your bandwidth. I have a 256kbps link at home and it crawls when I start FeedReader.

3. I am always on the net.  I have three broadband connections and there is never a time I am not connected. So the advantage of offline reading with desktop aggregators doesn’t mean much!

4. The best thing with online aggregators is that you can read your feeds from anywhere!

Following screenshot shows how my feeds appear on Google Reader. The left side shows all the feed sources organized neatly in folders and the right side shows the feeds in the selected site.

Jayson’s feeds on Google Reader

Cool features of Google Reader

Here are some cool features of Google Reader.

1. There are two kinds of views for the feed inbox. In the expanded view, merely scrolling down makes feeds as read. This is very neat feature when you have thousands of feeds! You can just scroll down and “star” the ones which you find interesting. Later, you can read those “starred” ones and then remove star!

2. You can share interesting feeds on a single click. The “Hot Links” you see on the right side of this page are actually my shared feeds from Google Reader. This can be customized as well (Currently mine is set to 5 items).

3. Google Reader interface is fast. It uses on demand loading and hence is fast even when you have a large number of feeds.

So in summary, if you are looking for a good online feed reader check out Google Reader. It is still in “labs” stage and daily I could see improvements on it. For example, the refresh link at the bottom was recently changed to a refresh button on top left.

My Wishlist for Google

I am a big fan of Google products. Well, I thought of writing a detailed wishlist to Google. Then I realized that there isn’t much that Google is not offering!

But even then I have two main applications I wish Google would develop soon.

1. Master Google Dashboard - I use a lot of Google applications such as Google mail, Google Adsense, Google Adwords, Google Reader, Google Analytics etc. What I need is a master Google dashboard which displays summary of everything.

For example, it should contain latest mail summary, today’s adsense earnings, adwords campaign summary and site traffic summary using Analytics. As a power user, I should be able to configure what all services I need on dashboard and what content is to be displayed on the dashboard.

I think this dashboard is something which many of us would find very useful!

2. Master Google Analytics Summary - This is actually a scaled down version of the first item. I hope Google implements atleast this one. Basically what I need is a summary tab on the Google Analytics which shows the site statistics for all the sites I have under my Analytics. This is something very helpful to those who track a couple of Websites using the same Analytics account.

Thoughts on the road - Image of Indian Police

My office is about 25Kilometres away from my home. There is a company bus from a stop about 2 Kilometres from my home. If I am on time, I take this bus or otherwise I drive my Maruti 800 to office. 

Of late I am trying to take the bus more often. The morning 2KM walk is a good exercise for the body and mind! Bus starts at 7:45, so I start around 7:30 from home. It is a pleasant time to walk - cool weather and plenty of fresh air :)

This short walk of 15 minutes is a good time to reflect on the life. Today as I was walking, I noticed a mother scolding her young child. The child is refusing to go to school. Mother tells him - “I will call the police and let them take you”. Suddenly child was very afraid and he became submissive.

This reminded me my first visit to UK. One of the things that surprised me most was the fact that british generally had no fear of their police. They respect them, but fear? - I doubt it. This is just opposite to India or Kerala where Police has a very bad and fearsome reputation. They do command some respect, but most people consider them as some kind of monsters.

Now the people themselves are to blame for this. Indiscipline is so part of our life that only a fearsome police force can control us. It is the fear of police that keeps most of the anti social activities in check. 

Recently there were some attempts to give a humanistic face to Kerala Police. Some videos were made  by public relations department which showed how politely police should handle people. When it was publicly screened, people were laughing it off. It was as if people expect the police to be brutal!

In Malayalam, there is a saying - “yatha praja thatha raja”. This translates to - “as the ruled so the ruler”. I guess it applies to our police force as well.

Buying electronics stuff from Ebay India

Ebay IndiaEbay India offers a lot of good electronics stuff. You can find a lot of stuff that is difficult to find in the neighbourhood electronics shop. It is also easy to pay (Paisapay) if you have an account in a “new generation” bank such as ICICI. But there are some things you need to be aware before buying any stuff on Ebay India. You should not use the number of positive feedback alone before making a decision. Here is why,

Final price may be different from item price
Since the competition is high, sellers tend to underprice the item and then increase delivery or other charges. So always check the total price you need to pay before making a decision.

Check the seller feedback
This is a no brainer. Sometimes you will see that people have given positive feedback even though there are problems with the stuff. Indians generally are ready to swallow minor problems! So read feedback carefully. An example is this positive feedback - “Checked everthing works fine, does warranty needs a card or the bill is enough?”. The real question he is trying to ask is - “Where is my warranty card?“.

Beware of the warranty trap
You will notice that a lot of items are advertised with a warranty. In reality, this is not manufacturer warranty. They don’t give any manufacturer warranty (I suspect some of the items are smuggled or refurbished items). What they mean is that if there is a problem, you need to send it to the seller and get it repaired! As you can imagine it is a big hassle.

Beware of pirated items
If you see something really cheap, chances are that it is a fake or an old item. This applies not only to games and software but even to memory cards (CF or SD cards)! There is no effective way to identify this beforehand. Leave it to your luck! :)

Never deal outside Ebay
If you started a deal in Ebay, close it in Ebay. Some tend to negotiate outside to minimize Ebay fees. But if something goes wrong, you are screwed. Also pay for your item using “PaisayPay”. This gives you some protection from rogue sellers.

Indian copyright act and video lending libraries

I live in Kerala, a south indian state which boasts very high literacy rate. But intellectual property rights is not a big issue here. It is quite common for people to pirate software, movies and music.

Then came Rishiraj Singh. He is a senior inspector general (IG) in Kerala police and is known as a tough officer. So when he was put in charge of the anti-piracy cell it was natural that things would turn ugly.

Rishiraj singh started raiding CD/DVD shops frquently and lot of fake/pirated CDs were destroyed. But he then took it too far. He had sent notices to police offers saying that all video lending libraries are illegal! CD/DVD lending library owners filed a petition in the Kerala high court and high court ruled that lending libraries can operate as per law. But the matter is not yet closed and the whole issue is a hot debate in Kerala.

Copyright law is intended to protect innovation. It ensures that somebody’s hardwork is not stolen and sold. Obviously lending videos is a completely different issue. If we apply the same law to books, all existing book libraries will have to be closed!

I did a quick look at the Indian copyright act (1957). Now here is a paragraph from the act.

51.When copyright infringed:- Copyright in a work shall be deemed to be infringed —
b) when any person —
(i) make for sale or hire, or sells or lets for hire, or by way of trade displays or offers for sale or hire, or

This statement indicates that video lending libraries (and book libraries) are illegal if we strictly apply the law. But again, if we apply Indian law strictly, atleast 90% of the population will be in jails :)

But there is some reference to book library in the law.

The following acts shall not constitute an infringement of copyright, namely…
(o) the making of not more than three copies of a book (including a pamphlet, sheet of music, map, chart or plan) by or under the direction of the person in charge of a public library for the use of the library if such books is not available for sale in India;

I think an amendment is required to clearly provide an exemption to libraries(video and books). It is pretty obvious that if someone likes a movie or an audio album, he will buy it rather than take it on rent frequently! I don’t think libraries will have any impact on the revenue streams available to copyright owners.

The yesfollow project - Not a good campaign!

Recently I came across the yesfollow project. This is a campaign against “rel=nofollow” attribute usage in blog comments. I can identify with their sentiments, but I don’t agree with them completely. Anyone who adds value to a blog entry by adding meaningful comments do deserve the credit, but only if his comment is related to the content he has on his own site! (For example, if I have a blog on chess and if I comment on a blog which deals with politics, should I get the link credit? I don’t think so!) 

If you are not clear about this whole issue, I will explain it for you.

Whenever you search on a keyword in Google, the web pages returned are based on the Google page ranking. The pages with highest rank will appear first and hence will get more traffic.

Now how is this pagerank determined? One of the key parameters is how many Websites link to your blog or Website. If many people refer your Website, you will have a better pagerank. This is a cool idea and in most cases will ensure that most relevant pages are displayed for a search keyword.

As blogs started appearing in internet scene, people realized that by commenting to blogs, they can increase their pagerank. So spammers started using automated tools to bombard blogs with comments. Soon it was apparent that some mechanism is required to fight the spammers. Then came the “rel=nofollow” attribute.

When “rel=nofollow” is added to a link, Google and other search engines ignore the link for pageranking. This means that there is no advantage in comment spam since your link is worthless.  Soon all the blogging platforms (Wordpress, Movable Type) etc. started added “rel=nofollow” to all the links in the comments automatically.

But unfortunately, this didn’t help in reducing the spam. Spammers have kept their comment bombing on. Sometimes they do get traffic via clicks on the comments.

I do agree with yesfollow that “rel=nofollow” is yet to have any impact on blog spamming. As a blog owner you need to be watchful of spam and should delete it immediately.

But there is a reason why Google wants us to use “rel=nofollow”. Note that relevance of a Web page to a keyword is determined by pagerank. So if I provide a lot of “meaningful and useful” comments on a lot of blogs, I do get a lot of inbound links. But that doesn’t guarantee that my site is relevant to the comment text or search keyword!

Hence if yesfollow becomes  widely used, the pageranking algorithm will have to be modified. Google will have to identify the blog comments and then discount them in pagerank calculation.

Yesfollow guys, pageranking is not to reward someone, but to find sites which is most relevant for a keyword!