Monthly Archives: February 2006

You are browsing the site archives by month.

Statement by Google CFO causes stock market stumble

It’s amazing what happens when the CFO of a company with an already over-inflated stock price makes a small statement like — “clearly our growth rates are slowing. You can see that each and every quarter”. While he was only stating what should have been plainly obvious by the quarterly financial reports, his statement was taken hard by an already volatile stock market. Google’s stock dropped by nearly 9%this morning and the DOW dropped and the down dropped by an entire percentage point. It’s amazing how much the stock market reacts to small statements like this. Take for instance, Rackable systems. They develop energy efficient, cool-running, equipment that will save companies more money than you can shake a stick at. This stock, by all analyst accounts is a win-win for everyone. Its one flaw today was that it had Google as one of many large customers. Take a look at what happened mid day at the announcement.

rackable

Luckily, the bulls saw this as a buying opportunity and drove the price back up. However, it just goes to show you how much a small statement by a powerful person can affect the economy in a single instant.

SynchronizationAttribute snake-oil

I have now been asked twice why you wouldn’t just use the [Synchronization] attribute when you want to make a class thread-safe. I figured I’d share what little information I have on this topic to you since I happen to have an answer. (as opposed to “the” answer which I never have).


As the saying goes, “There is no such thing as a free lunch.” I never really understood this saying as a kid. I grew up in a poor neighborhood and got “free lunches” all the time. Being financially challenged, I used to laugh and say “well, this is free”. As I’ve gotten older, and much more financially stable, I realize that my tax dollars are paying for the lunches for other kids in other neighborhood — apparently they are eating very well.


The same holds true for this special attribute. If you may think you are getting thread-safty for free, I have some snake-oil to sell you. There are several problems with the SynchronizationAttribute. Take a look at the required signature for use of the synchronization attribute:


[Synchronization]
public class SuperSensativeClass :
System.Runtime.Remoting.Contexts.ContextBoundObject
{
// Implementation here
}


First, the attribute requires that you inherit from ContextBoundObject — wasting your single-inheritance chain. If you wanted it in your object your most primitive object in the inheritance chain would have to derive from this class, and then what if you didn’t want some other child classes to be context bound?


Second, suppose your class has several methods which don’t have thread-sensative data. What happens there? The CLR will still lock those methods since it has no idea what is thread-volatile and what isn’t. This can severely hamper performance.


If you are looking at thread-safety, you are likely trying to optimize the perceived performance of your application using multi-threading. The SynchronizationAttribute can actually have the exact opposite effect. Long story short, learn to use the synchronization primatives of System.Threading.

Lessons in backups

OK, so I’ve re-learned the importance of not only backing up, but verifying backups. The other day, I decided to upgrade my blog software to CommunityServer 2.0. I apparently messed something up and before you know it, I had deleted my CS 2.0 database. While I had backups from a week ago (sufficient to restore back to my last blog post for sure), I had never verified the backups. Let’s just say the time to test your backups is not after a failure in which you need to use them.


Luckily, I had a backup device that most people don’t think of when they consider their options — Google Cache. I was able to easily use google cache to reassemble my blog posts as well as the comments. If some of you have noticed that my blog has been posting a large amount of posts in the past few days, its because I had to repost everything on my blog. Its a big pain in the butt and now I have to do some work to update google with my new articles, but at least I could recover it. Now before any Microsofties yell at me, I did try to use MSN Search cache first, but wasn’t able to find everything — one again proving that Google still has the edge in this market.


Suffice to say that this should be a lesson to all of you, and should serve as a refresher course for myself, that simply doing a backup isn’t sufficient — verification of that backup is essential to a good disaster recovery plan.

Why Google dominates their market

There is often a great deal of speculation into why Google dominates the ad revenue market. Today, I developed my own theories on this. For the longest time, I’ve used Google as a home page. Since I’m heading to the mecca of Windows development, I decided to make the switch to Microsoft’s home search page. So there I was trying to find a home page equivilent to google.com. What I found was a bit revealing. Who is competing with Google, you might ask. Two main competitors are Yahoo and Microsoft.


You can call Microsoft a competitor, but you can’t go to www.microsoft.com and find a simplified search page like www.google.com. In fact, Microsoft’s main business is software for their platform, not software for the web-based masses let alone searching. So I went to MSN.com and found myself presented with a portal site. The main business of MSN is portal first. I see a search bar at the top, but the rest of the page is busy with stock quotes, news, advertising and more. If I’m at work, and this is my home page, I’m going to become distracted. This isn’t at all like the simple search page of google.com. In fact, to find something even close to google.com, I have to type in http://search.msn.com . The URL says it all: Searching is a subset of what MSN does and therefor it’s a subdomain of msn.com.


I did a quick check at yahoo.com and found, well, another portal site. I go to yahoo.com on occasion, but never really put two and two together. Yahoo’s main business is also to be a portal first. The page is busy — very busy. Theres links to their other services yahoo offers as well as different types of search links. Below that is some advertising, some suggested searches, traffic/weather, and more. To get a page that is even close to the same as google.com, I have to type in http://search.yahoo.com . Again, we find the telling URL that just screams — we are portal first and “searching” is a subset of what we do.


These two examples tell me exactly why google succeeded and continues to dominate. They don’t have any real competitors. Google has pseudo competition — people who offer similar services. The important factor is where these companies put their emphasis. Sure, google offers maps, email, IM, IE toolbars, RSS readers and more — but you will not find them on the main page of google.com by default. Google has made searching a priority and the structure of their home page tells you that. I can personalize the google.com home page too but by default it is what people think it should be — a simple search page!