Friday, February 9, 2007

SEO - Choosing a Keyword

Search Engine Optimization is an area of interest for me, but it isn't what I wanted this BLOG to be about. Regardless, while reading Douglas Kinney's recent post on his BLOG about it I couldn't help adding a comment and thought I might repost it here. Doug's post is a great summary of SEO if you're interested:

I really just felt the need to add the following comment to his post on the topic of choosing a keyword in the first place:


A note on keywords: don’t randomly choose one. Carefully analyze it based one:

1. The amount of traffic you will receive
2. Competition (likelihood you will make the first page)
3. Relevance to your business

Being anal I put together a spreadsheet with weighted averages. But hey, “rapid application development” is now consistently placed 3-5 on Google for Blue Ink ( and it generates 50% of my traffic, so I guess it isn’t all bad. Also if you’re interested in SEO you MUST check out this site to determine how much traffic your potential keyword will receive:


That was my post. If you're interested in SEO, though you really should read the following: - Overall SEO strategies, great resource, lots of reading – Google rankings, track your site’s popularity over time - If you aren’t using Google analytics yet DO IT NOW. It’s free and it’s amazing. Make sure to check out the “Site Overlay” report. Awesome use of AJAX!

Boxing and Unboxing

After putting together the diagrams for the reference types and value types post it seemed appropriate to follow it up with a visualization of the concepts of boxing and unboxing. This might not be the worlds most glamorous post, but it’s important because boxing and unboxing is one of the problems that generics attempts to solve in C# 2.0, and understanding the problem will help you to know when and why to use the solution.

Basically boxing is copying a value type from the stack to the heap. Unboxing is copying a value type from the heap back to the stack. These two operations are expensive, and can add noticeable delays when they happen frequently.

Consider the following code:

1: int i = 5;
2: object o = i; // implicit Boxing
3: i = 10;
4: Console.WriteLine(o);
5: i = (int)o; // explicit unboxing
6: o = 10;
7: Console.WriteLine(i);

Well, first of all can you guess what the WriteLine statements will be? If so then you probably already understand boxing. Regardless, hopefully the diagram below will help.

I’ve tried to clarify a little further from previous diagrams what’s on the stack and what’s on the heap. In the diagram items on the stack have outlines in maroon while items on the heap have dash lines and a gray background (click to enlarge).

Figured out the answer? It’ll output 5 twice, which is perhaps a little counter-intuitive, but key to understanding boxing and unboxing.