Archive for the ‘My thoughts’ Category

Increase blog hit count

February 23, 2009 4 comments

Recently a fellow blogger asked me my help on increasing blog hit count, so here are some tips from my blogging experience…

  1. Always post contents that genuinely/honestly interests you so that others will also feel interested.
  2. Be honest with what you write, don’t write to grab attention. You may succeed otherwise for a short period but on the long run you’ll lose ‘popularity’ among users. I personally don’t visit such sites so can confirm such a behavior from a user’s point of view.
  3. Use tags. I didn’t use tags for the first 7 months of my blogging and for that seven months my blog hit count combined was 7400. Now after adding tags I get hits greater than 7400 every month.
  4. Properly use images. Fill out image description and title fields. Also fill in ‘alt’ field of images. I sometime forget to do this.
  5. Visit other blogs, post comments, be friendly with other blogs.
  6. Do not frequently edit your blog entries, I’ve experienced reduction in hit count but I cannot confirm this behavior.
  7. Do not try to force increase hit count, on the long run this will turn out to be a waste of time. Just be natural and patient. Just relax and enjoy blogging.
  8. Properly categorize blog entries. Even provide sub-categories.
  9. Use a theme that is comfortable to the eyes, I run from websites that does not follow this rule.
  10. Keep blog posts to the point.
  11. Be honest, don’t plagiarize. Write what you know and leave an acknowledgment to concerned persons. I am thinking about an acknowledgment section for my blog entries.
  12. Don’t flood your blog with ads.

Above tips are from my very short blogging experience and I am still learning.

NDTV – ATS chief Karkare succumbs to injuries

November 27, 2008 2 comments

NDTV should know that money is not everything. They should probably hire an extra editor or someone to screen/filter out garbage that they write in their website.

Hemant Karkare - ATS Chief

I was reading a news page on officer Karkare from NDTV site. What a brave man to have taken three bullets on his chest and not on his back. And look at what NDTV has to say, I am very angry and upset about this news channel.

An excerpt from the news item…

“Another IPS officer Ashok Marutirao Kamte, a 1989 batch IPS officer, was killed while fighting terrorists at Metro Cinema in the city along with encounter specialist Vijay Salaskar who also gunned down as one of the worst terror strikes brought Mumbai to the knees“.

Ashok Kamte - Additional Commissioner of Police

Ashok Kamte - Additional Commissioner of Police

At least for NDTV’s information Mumbai is not on her knees, what I feel is that NDTV is on it’s knees begging for money. Reading this made me sick. NDTV just wasted the reason why these officers gave up their precious lives. I personally salute these brave officers. NDTV just made the terrorists(aka cowards) heroes. Mumbai rocks and it will keep doing so, don’t let these bunch of cowards take hold of your life. No one can bring India to it’s knees. Thanks to the “Men” who gave their lives for our country. I was pondering over the meaning of the word ‘terrorist’. One meaning that struck me was that these are the people who spread terror. And what’s interesting is that they are spreading terror by manipulating television news channels, their websites and of course newspapers. News channels accross the world has been spreading the news like it’s the end of the world. Sickening pictures of people lying in a pool of blood. Imagining you picking up a newspaper and see the picture of a man who has been shot. I see those in my country all the time. Why can’t these people talk about something good on their frontpage at least. There are lot’s of positive things going around, why can’t they report those things. Well that’s the problem, this doesn’t bring money, so hence they just keep splashing blood all over the frontpage of a newspaper.

Vijay Salaskar - Encounter Specialist
Vijay Salaskar – Encounter Specialist

Come on give me a break. Spread some good news. Spread news about survival instead of bloodshed. Don’t play into the hands of these cowards. Think about these heroes and stop this non sense.

Writing robust programs

June 10, 2008 1 comment

Some points to keep in mind while programming…

  1. Write code in a reusable manner. Think that the code I am writing is meant to be reused. Make the method as independent as possible. Independence doesn’t mean you have to make every method independent, it’s just impossible, but instead there are some methods which can be made independent for e.g. if you have a method called “Sum” which adds two numbers, don’t make these two numbers member variables, pass these numbers as parameters to this function. This means “Sum” can be reused by everyone.
  2. Think that you are writing code that’s meant to be maintained by someone else probably some newbie, so make it as simple as possible. I’ve been a newbie so I know what I am saying, it’s hard to maintain and understand a 4000 line file without even a single green line. 😦
  3. Split up methods as much as possible, ideal length of a method will be 30/40 beyond this there is something wrong.
  4. Split up methods logically, I mean not just functions, but by using linebreaks to split logical blocks in a function, looks neat. Makes reading easier on our eyes too. Also when taking printouts we can write additional comments/notes in these spaces.
  5. Provide ample comments. Follow this religiously. If you have complex statements, mention what that statement does by using comments because everybody doesn’t have time to understand what crap that part of code is doing. Newbies are hapless with such crap code. Hopeless creatures are people who code like this!!
  6. Don’t bring unnecessary levels of inheritance to force OO programming. OO should follow naturally. I’ve seen people making code complex just because they think they have to throw their weight around by telling everybody they are OO guys!! 😛
  7. Initialize variables where they are declared. Don’t be lazy in doing this. Go nuts about following this principle.
  8. If a variable is not meant to be changed declare it as a constant. It makes debugging programs very easy. Personally when reading through code if I see a variable declared as constant I can just pop that variable from my “mind stack” knowing that it won’t change unless const_cast (or c style, which is rare) is used.
  9. Don’t rewrite TCP/IP to do network programming. It’s already done for you, use it, throw your ego out, hang it upside down, set it to NULL, do whatever just get rid of it. I myself had this problem as a newbie, I believed everybody outside where dumb heads and I am the only one with something up in my tower. This is called as “ego”, get rid of it! It’s dangerous, you will lose plenty!
  10. Be active in technical forums, or stay in touch with people who have established themselves in this field. Read good books on programming concepts. For e.g. books like “Code complete”. It’s not hard to start programming, but the toughest part is to do it the right way.
  11. Don’t leave optimization to the compiler! Don’t forget that compiler is just a program which has it’s limitations. It’s just weird that people write crap code and then ask compiler to optimize it for them. 😐 Also keep in mind that everything that we write is not the optimal way of doing things.  Do some research on the stuff that you program to find out what’s the best practice. Do not sacrifice readability for optimization. Some optimal methods that I do follow are as follows…
    • Pass heavy objects by reference
    • Don’t return heavy objects by value, instead make the heavy object come in as a reference parameter. (I don’t leave this to the compiler, I’ll do it myself 😛 )
    • Lazy declaration etc
%d bloggers like this: