Archive for January, 2006

Gong Xi Fatt Cai

Tommorrow is the First Day of Chinese New Year. At here, I wish you all have a prosperous chinese new year, Gong Xi Gong Xi.

I will be back to home town today at Johor and will be ‘offline’ for a few days… no internet connection there…

See you.

Happy Birthday Mozart

Saw this google logo today:

Mozart

Who is Mozart?
Answers

Google Advanced Reports

Just notice something new in the google adsense’s report. The Google content reports and Google search reports are intergrated into a new report called Google Advanced Reports.

Simple programming trick

How do we swap values of two integer variables?

Normally we will introduce a third variable as the temporay storage. For example in C/C++:

int a = 123456;
int b = 567890;
int temp;

temp = a;
a = b;
b = temp;

Ok the question now is: How do we swap values of two integer variables without third variable?

Here is the trick:

int a = 123456;
int b = 567890;

a ^= b;
b ^= a;
a ^= b;

Don’t believe? You can try it out yourself.
Note:

  • only for integer values (eg. 8, 16, 32, 64 bits integers)
  • ^ means eXclusive OR (XOR)

Explaination:
When a value is XOR with another value, the result is actually “storing” value of two values. When one of the original value is XOR again with the result value, you will get the another value. For example:

int a = 123;
int b = 456;
int resultOfXOR;

resultOfXOR = a ^ b; // "storing" 2 values

resultOfXOR ^ a; // return value of b
resultOfXOR ^ b; // return value of a

From the above code

int a = 123456;
int b = 567890;

a ^= b; // storing a^b into a. a becomes result of XOR
b ^= a; // get value of original a by resultOfXOR^b and store into b. Now b = 123456.
a ^= b; // get value of original b by resultOfXOR^b and store into a. Now a = 567890.

// Finally b = 123456 and a = 567890

That’s the beauty of XOR.

3 simple ways to increase your website’s traffic

Found this interesting article from problogger.net and find that might help you in increase your blog’s traffic:


Three simple actions that doubled my website traffic in 30 days

  1. First, I made the most of Technorati tags. I tagged every key word in each of my posts. Initially I did this manually but them I discovered a WordPress plugin called SimpleTags that made the job a whole lot easier.

    I found that by tagging my post effectively they were getting a lot more attention then their untagged counterparts, and as an added advantage I was getting focused, quality traffic to the site!

  2. I leveraged my existing website. I’ve been running my business website for a few years and that was getting modest levels of traffic that was relevant to my blog - so why not try to drive some of that to my new blog! I placed a few FeedBurner headline animator blocks on some of my most popular pages and after a day or so I noticed a significant increase in traffic for 5 minutes worth of work on my part.
  3. Finally, I made effective use of trackback links to popular sites. If I commented on a post on another site I would make sure that I set up the appropriate trackback for it. The results from this are varied depending on the site and post that you are linking to but since I liked to comment and interact with the wider blogosphere anyway, it was free traffic!

What I think…

  1. I don’t like tags on my post. I feel that it will drecrease my site’s traffic. When visitors see the tags, they migh click on it. I did get traffic from Technorati but I don’t have any tag on my site. Instead I use the ping service. I make ping to Technorati ’s ping service (http://rpc.technorati.com/rpc/ping) whenever I write a post. You can make this automatically by putting the URL under Wordpress Admin’s Options - Writing - Update Services
  2. FeedBurner - yes this might help a bit. Many blogger did this. You can subscribe to FeedBurner and put the feed animator as your signature on your other site and forums
  3. Agreed with him. You can have backlinks and traffic for free. But you do not spam other people website. Most people hate that.

For me, the content is the king! When you have good quality of content, search engine and traffic will come to your site automatically and slowly. Keywords are one of the key element, try target more niche keywords instead of general keywords. Please do not over mention the keywords, search engine might think you are spamming with keywords. Put those targeting keyword in page title, keywords (meta tag), title of article and first paragraph of the article. Although some search engines (e.g. Google) do not recognize keywords in meta tags but the is no reason we don’t want to put it in for other search engines.

Hope this will help :)

Google Pack

Google has done it again. Google has begun to offer Google branded favorites software in a single package called Google Pack.

Google Pack is free collection of essential software that is useful for your computer. The good thing is you can choose the software you want to install and remove those you don’t want before you download the Google Pack.

Google Branded Softwares:

Additional Softwares:

[Find out more here: Google Pack]

Adwords on Google home page

Google is showing Adwords at Google search engine home page (in other language).

www.google.by

Recent Wordpress Posts in Sidebar

I had tried out the code Recent Wordpress Post in Sidebar suggested by EngLee. Although the code did shows the recent posts correctly but some functions (eg: is_page() and is_home() are not working properly when it is after the portion of the code. My guess is the wordpress loop in the code modified value of some global variables.

I have a workaround for it. Before using the is_home() or is_page() function, I save the returned in a temporay variable, call the recent posts loop, and use the temporary variable later when neccessary.

Today when I search for wp_get_archives() in Wordpress WIki, I found that I can generate recent wordpress posts in the more easier way. Here is the code:


<li>
	<h2>Recent Posts</h2>
	<ul>
		<?php wp_get_archives('type=postbypost&limit=10'); ?>
	</ul>
</li>

Simple and tidy :)

Yahoo! 2006

This is how its logo looks like:

Yahoo! 2006

Google 2006

This is how its logo looks like:

Google 2006

Bye Bye 2005, Welcome 2006

Just came back from the celebration of year 2006 at The Curve. It’s another year. Went there on year of 2005 and came back at year of 2006.

Dicember 31, 2005
Woke up at 12pm. Took my lunch and then online for a while to check my mail and made announcement of my new wordpress theme. At 3.30pm, took my car to a car workshop near my house for service. After about an hour, my car was now refreshed and went home online again. I saw my coursemate on MSN. I asked her where to go tonight for 2006’s countdown. She asked me to join them (all were my coursemates) to ‘The Curve’ at Damasara Utama. I joined them since I didn’t have any plan yet. I called up one my coursemate to fetch me to there. Total 8 of us will go there for the 2006’s celebration and count down.

At 7.00pm ++ - my coursemate reached my house and started heading to ‘The Curve’. After jammed for an hour, we finally reached inside the complex. Then we looked for dinner. After half an hour, 9pm ++, we finally found a restaurant that has available spaces to fit 8 of us. I forgot what is the restaurant’s name.. it is *something* Thai *something”. I ordered a Green Curry Rice and Watermelon & Lime *something*. After 15 minutes, the food had came. Then I noticed that they had not serve me drinks yet. I asked the waiter and the waiter came back with answer “Sorry we don’t have watermelon anymore”. Then I ordered another drinks, a Green Tea Milkshake. The curry rice taste not bad and I like the Green Tea Milkshake most. The dinner costed me RM23 including tax. Opps … now I realised I ordered a green food and a green tea.

At 11.00pm - we went out the complex to the road between IKEANO and The Curve (if I’m not mistaken that’s the place). The place was crowded with people. There was a stage at the middle of the road. I saw ‘Nian Sao’ (2 Malaysia’s chinese singers) on the stage singing a song. After hanging around there for half an hour, on of my coursemate suggested to buy some spays (the kind of spray that create fake snow). Each of us bought a can of spray. RM2.50 each. Before the countdown, we already started to spray each other… until our hair and shirt were full of “snow”.

At 11.59:50pm - the count down started.

January 1, 2006
At 12.00am - when the count down reached 0. The fireworks began and many people use the spray on their hands to spray to the sky. Wow, that scene was really nice, the sky was full of “snow”. The fireworks last for more than 15 minutes. I heard someone said/newspaper mentioned that it was the largest fireworks in Malaysia ever (well, not sure it means since when).

Bye Bye 2005, Welcome 2006!

At 12.30am - we decided to move out from “The Curve”. We stucked in the car park for 1 hour. Yes, jammed again.

At 2.00am ++ - finally I reached home. Took bath. Updated my blog.

That’s called 1 year…. and Happy New Year 2006!