Archive for the ‘Google’ Category

Cr-48 : The First Twenty Four

December 18, 2010 7 comments
I was shocked to see the Cr-48 sitting out on the front porch last night.  I tend to pre-order things and forget–so I figured that’d it’d happened again.  Instead, Silicon Valley Santa came early. Apparently the first group of testers weren’t notified as they wanted to see how wacky we went on the web. I’m a good little lemming–hence the blog post. 🙂 

After a full day of use, I wanted to join the thousands blogging about the Cr-48 and jot down some of my impressions–how it worked, what DID work, and what didn’t work. I’ve made an effort to do most everything on the Cr-48 today–including this blog post. Man, I miss Live Writer. 😛

Unboxing and Initial Setup

Out of the box, the machine just ‘starts’.  Fantastic. That’s how unboxing a new device should be. Unfortunately, I hit a brick wall immediately after. My network is locked down pretty tight and one of those security measures only allows authorized MAC addresses to attempt to authenticate.

“How the heck do I get the MAC address on this thing?”

It wasn’t on the screen, so I looked all over the unit. Nothing. Yanked the battery… nothing. Seriously?

DIDN’T WORK: There needs to be a way to spit out the network ifconfig information on startup. If the device is appealing to geeks, then give the geeks some love.

After hacking my own network, resetting the security schema, logging in, and resetting it, I was golden. The out-of-box-experience (OOBE) for the Cr-48 is actually a lot better than most the netbooks I’ve worked with if nothing else for it’s single ‘environment/task’ configuration. I guess that’s both a pro and con of having low expectations for the device (e.g. I don’t expect it to be it more than a glorified web browser).

WORKS: Instant update to the new version of ChromeOS, restart, sync everything, and ready-to-go perfection.

DIDN’T WORK: When the Cr-48 asks to take your picture, do it–even if you just hold up something or take a photo of empty air. Why?  Because ChromeOS doesn’t have a mechanism built in to MODIFY the photo afterwards if the initial picture wasn’t taken. You have to totally format and restart if you want to have a snazzy photo.

Rooting to Developer Mode

Now that I’m logged in and see my data, I want power. *insert evil laugh here*

Thankfully, swapping to developer mode is a FEATURE of the system.  You can’t do it ala software, it’s a physical switch near the battery. The only thing I don’t like is the sad computer screen when you start.  Seriously Google? My computer doesn’t need to be sad, it needs to have a magic wand or a hoverboard when it’s in root mode.

As the instructions explain, you should do this immediately as it wipes user partition (takes a few minutes). After that, you’re good to go.

At this point, you can swap to console windows just like a regular Linux device. Hit up VT2 by hitting Ctrl-Alt- -> (the forward button at the top, like where F2 would be). Log in and hack away or, as the prompt says, “have fun and send patches!”

NOTE: Hit Ctrl-Alt- Speaker Mute Button (LOL). It takes you to the console where the kernel messages are being spewed out. Interesting if you’re a bit geeky.

WORKS: Empowering users who WANT to root the unit is fantastic. I didn’t have to stand on one hand to control my device.

Using the Device

It’s hard to not like the package.  It’s a bit plain, but that’s expected for a prototype device created on a budget (they sent out ~60k of these for free… I’m sure Silicon Valley Santa’s elves made it ‘good enough’).

Screen: The 12.1” screen is crazy bright on full brightness. A couple of notches down from max is fine in a bright room. It’s clear and clean as well. Nice.

Keyboard: I actually love the keyboard. The search button in place of CAPS lock is brillant. When does anyone actually USE CAPS lock these days (except for the trolls on forum posts)? The search button doubles as a ‘new window’ when you think about it which really speeds up navigation once you get used to it.

Touchpad: No, this is a touchbad. I hope the real units either fix this or do away with it. Want to right click in Google Docs and fix your typos? Not a chance. Right-click is a mythical beast that only works when you don’t want it to. Have larger, warm hands (me!)? You’ll be rocketing your cursor all around the screen while you type. Know where to ‘click’? I sure didn’t. There’s no clue that the bottom of the pad is the buttons. I guess MacBooks are the same way–maybe this is a PC user snafu. For now, this is easily solved by a itty bitty Targus mouse I use for traveling.

DIDN’T WORK: The touchbad gets a DIDN’T WORK all of it’s own.

Sound: I have Pandora constantly running (ala Extension) and it’s not too bad. This bad boy isn’t running Bose or Klipsch, but it’s good enough for sitting and surfing. The headphone port has a nice range, no background static (which my Dell laptop is notorious for having).

Battery: Since my last ‘plug-in’, which was about 5 hours ago, the meter says I have 1:23 hours left on the clock. That includes having a USB mouse plugged in, 6 polling tabs open, Pandora constantly playing, and writing this post in Google Docs.  So if things go to plan, the life will be about 6.5 hours. For netbooks, that’s not unheard of; however, l’m sure having the monitor a bit brighter, streaming music, and having HootSuite, Mail, StackOverflow, Groups, Reader, Docs, and four search tabs all running for that time is a bit more than a normal netbook operates with. It’s far more than my normal laptop would survive–and it has two high capacity batteries.

Performance: Honestly? Considering it’s the backbone of the entire system, It’s kinda slow.  Considering it’s running a 1.66GHz Atom, has 2GB of memory, and an SSD hard drive, it FEELS slow–which is really all that matters.  Opening a tab shouldn’t take a few seconds. Page rendering on shouldn’t load one little image at a time.

I’m wondering if that’s because the AR928X card is stuck in 802.11g mode instead of 802.11n mode (Google search is filled with posts about the cards not kicking up to N-mode on Linux). Hopefully this will be addressed in time with patches.

WORKS: For normal operation, once you get used to the flow of the device, isn’t not bad though. Learning the keyboard commands is REQUIRED–if you’re a mouser, even with an external mouse, you’re going to weep at how slow it can be to get around.

UX: Using the Cr-48

The user experience of the device is … different. There’s no other way to put it. That’s not a bad thing either. I spend a majority of my computer time either coding, gaming, or “all other tasks”. I still have my desktop for coding (VS2010 brings my powerhouse computer to it’s knees–I have no expectations a mobile device could run it) and gaming; however, this little computer fits the “all other tasks” category well.

To do that, however, requires a bit of change. Here are a few of the things I’ve discovered to help me use the Cr-48.

Do not try to use tabs for everything. Using tabs is great–we love tab-based browsing, but think outside that. Remember that you can open new windows (Ctrl-N). Think of these new windows as multiple ‘desktops’. For example, I’m running Google Docs in one, my standard ‘browsing’ in another, and my ‘communication’ apps (HootSuite, Mail, Groups, Reader) in another. It allows me to easily Alt-Tab between work environments while still keeping each separate.

Become a keyboard junkie. Press Ctrl-Alt-/ on the keyboard to pop up a SWEET interactive keyboard map (every app should have this).  These are the keys for the ChromeOS. On top of that, learn the keyboard shortcuts of Mail, Groups, Reader, your twitter application, whatever other site you use (e.g. has some pretty slick keyboard shortcuts to move around their site totally mouseless). This really speeds things up.

Some good ChromeOS keys to get started:

  • Alt-Up/Alt-Down : Page Up/Page Down
  • Alt-Tab : Switch between windows
  • Ctrl-Tab : Switch between tabs
  • Alt-D : Focus on Location bar (and select so you can start typing)
  • Alt-Backspace : Delete

Remember the built-in hard keys. Since the Cr-48 is missing function (F-key) keys, it has a row of hard keys built-in. Back, forward, refresh, full screen, swap window, brightness, and sound controls right at your fingertips (literally if you’re hands are on home row). Full screen and back/forward are pretty snazzy once you get used to them there.

Find the app or extension that fits your requirements. I’ll talk more about extensions and apps here in a moment; however, use the Chrome Web Store and explore. There are a few cases where your application may offer BOTH an extension and app. Try both. One may work better than the other for your use.


Since the launch of the Chrome Web Store, there’s been a lot of discussion about what an extension is… and what an app is… and why we shouldn’t all just use bookmarks like we have been.

Since ChromeOS syncs to your Chrome profile, anything you already sync shows up automatically. I had my Shortener, Web Developer, Mail, Evernote, glee, and Pandora extensions right OOBE.

DIDN’T WORK: The only extension that’s been a bit wonky has been glee.  It doesn’t seem to properly detect input areas–so pressing the gleeKey (‘g’) at any time pops up the box. Bummer ‘cause glee would be rockin’ on a netbook considering how keyboard-oriented it is.

WORKS: This is more of a recommendation than a works, but still. If you use Pandora, use the extension, not the app. Why? Because the Pandora app just loads up On a normal computer, that’s fine, but this is a Linux-based platform. What happens when Flash starts up on a Linux-based platform? Kittens are killed. The app also requires a full tab to operate while the extension sits happily in the extension bar, blaring your tunes.


I’ll admit, my initial response to the Chrome Web apps was “wut”? Why would I want fancy bookmarks? With the Cr-48, that’s still pretty much the case. There are a few apps which seem to run as actual applications, like TweetDeck’s ChromeDeck. Everything else seems to just be a bookmark to a site. That is a huge bummer. I’m hoping as the Cr-48 and other ChromeOS systems are released that this changes.

An example. As I discussed above, the Pandora application is tragic. It loads which promptly dies due to Flash.  The extension is rockin’, but there’s room for improvement.  ChromeOS supports panels (little pop-ups at the bottom of the screen). That’d be a great place for some Pandora action.

Random Thoughts

Multimedia is sorta meh. Flash sucks on here. I expect that on a Linux device, but I’d assume the owners of YouTube would have worked out SOMETHING magical. No, sir.  That means poor performance for YouTube and Hulu and, well, 90% of the rest of the web. Unfortunately, since this is a Linux box, Silverlight doesn’t natively work either (I haven’t tried installing Moonlight yet… though I don’t have high hopes). That counts out Netflix. It’s a bit of a letdown because the Atom processors are toted for being able to do multimedia on-the-go. I honestly think this machine COULD do it if it wasn’t for the Flash/Silverlight limitation on Linux and that really hurts to say.

WORKS: For some reason, the Flash player (using FlowPlayer) on is BRILLANT and works like a champ. I don’t know enough about how the compression/streaming/playback works on FlowPlayer to say why–though it’s something I’m going to look into for a few sites I have using Flash movies.

The window switching animation is confusing. Okay, I’ll accept that I may be dense, but it just doesn’t feel natural. Rather than looping left-to-right through your windows, when you get to the end, you slingshot back to the first… so if you have three, you see left-left-right-left-left-right. That’s fine once you get used to it, but the right (the one that’s going from last to first) LOOKS like it’s going BACK. Just an odd UX thing.

Mounting storage is… awkward. I’m assuming this is a prototype issue and won’t affect the production devices, but the device is SO LOCKED DOWN that using the SD card slot is a real pain. I’m thinking this is to encourage cloud storage, which is fine, but if that’s the case, why is the SD card slot there? I can download files in Chrome, but moving them onto the removable device requires some magic.

But I want something from {device}… For this article, figuring out how the heck to get photos on here was a REAL pain. I have a phone that can take snazzy widescreen photos, but getting them to the web is a bit of a pain outside of TwitPic. I have a Sony digital camera, but plugging it into the USB port on here was futile. I wasn’t going to swap the front web cam around to snap photos–that was just silly. So how can a blogger use this and attach photos? I’m still working that out–note the lack of photos in this stream of text post.

Give us a right-click keyboard button! If right-clicking is going to be such a pain, give us the ‘properties’ right-click key that we’ve gotten used to on Windows keyboards for so long. I’ve REALLY been missing that (especially while typing this post to fix typos–I guess I should be less lazy and spell the words right the first time).

That’s it for the first twenty-four hours and see, all this cloud computing talk and I haven’t once said “to the cloud!”… oh, damn.

Comparing Google and Bing

June 1, 2009 Comments off

Bing, the latest iteration of Windows Live Search, is now available for use and has been getting quite a few rave reviews.  Miguel Carrasco wrote a lengthy post discussing the benefits of Bing over Google; however, maybe I’m old fashioned, but I see a lot of the hype as overhead.

Not to nitpick, but searching DIRECTLY for product names will return advertisements and sponsored sales information—no matter the search engine.  Miguel’s post (searching for a Nikon D60 camera).  Using my new fanboy item, the Palm Pre, as an example, I can see that the Google page actually has FEWER (real estate) “advertisements” than the Bing search.

Bing has a whopping 6 sponsored links… along with something called Bing cashback that I haven’t really read up on yet.  That along witht he lost space on the left seems like a lot of waste.


Google drops off a bit of space for the 3 sponsored links, but keeps it thin and uses it’s integration with YouTube to show previews and group the video results to the top.

BUT… how much does that matter?  If Google’s page takes a moment more to load, do the background graphics, fancy headers, and AJAX postbacks on the Bing page make up that difference?

“Previews” in Google and Bing

An exciting point with Bing is the content previews.  Hover over a search result and it provides a bit more information.  This, however, has been in Google’s search for quite a while if you turn on the functionality.

I’ll admit, I like the hover effect.  Clean, renders relatively quickly (noticed a bit of delay on some pages, but not too bad), and seems to parse content well.  But is it ground breaking?  Nah, not really.

Google’s had it for a while, though I’ll admit, I rarely use it (I used it more while doing heavy research in school).

The difference is that Google’s requires you to turn it on… For those who don’t use it, the dynamic filtering is FANTASTIC (and provides that handy “left side bar” that Bing is raving about).  Remember—Google was originally focused on extremely streamlined results—”more text” and AJAX postbacks would be considered evil. 😉

If you really do need more images, using Google’s “Images on the page” provides a cool look at what graphics are on the page.

Are product searches always what we do?  Nah!

How often do we actually search for a product name—especially in the workplace?  When I’m looking for my Pre, sure, but 90% of the day is spent searching for error messages, code snippets, and forum messages.  Face it, I JFGI it all day long. I encourage coworkers to JFGI. Etc.

So how does Bing and Google stack up when searching for a less commercial, more technical request?  I’ve recently dug into db40 and needed to dig up some ideas for id generation.  I remember reading a blog post recently about it, but couldn’t remember who wrote it.

Bing returned an interesting result set… but didn’t turn up (in the first 10) what I was looking for…

Nearly all of the results were root domains or directories—nothing real specific (blog posts, forum posts, etc) from the titles.  Since the cool Bing “sorting and grouping” doesn’t appear to apply to everything quiet yet (not sure if that’s context-based or a newness/lack of indexing), I was left with “all results”.

On the other hand, Google appears to put more priority on the title of the page.  Notice on the Bing search results, “Id Generation” didn’t appear in ANY of the page titles whereas they’re in all of the titles of the Google results.

The title doesn’t mean these are the BEST results; however, with news stories, blog posts, etc—the takeaway point will usually be in the title. 

The blog post I was wanting showed up second in the Google results.  The Bing results referenced Tuna’s blog a few places; however, didn’t actually reference the post for “Id Generation in db4o”.  The one time it WAS mentioned (the 4th result of Bing), it was a stale link to the front page of Tuna’s blog—not the actual post.


The selling point to Google for many years now has been two fold:

1) Extremely clean, fast user interface
2) Reliable and relevant results

I moved away from AltaVista, Yahoo, and other engines years ago because they wanted to be ‘cute’ and while Bing has potential, it’s already too cute for my tastes without any real benefit.

It’ll be interesting to see how Bing grows—and how it affects Google.  It’s too early, however, to say that Bing is this saving grace—especially if you’ve never dug into all of the features of Google.

Review: MSDN Enhanced Search

For the past week and a half, I’ve been using, and evaluating, the new MSDN Enhanced Search.

The task?  For Microsoft-based queries, use the MSDN search for a week (rather than with and compare expectations, results, and usability.

For the review, I’ll use a single query to provide comparison.

Search:  “Sys.Application.add_init()”


1. I really like the RSS feeds.  I can think of several ways, especially by product or technology, to consume those RSS feeds on our technical portals at the office and on my blog.

2. The autocomplete feature is very useful if you’re unsure of how something is spelt or want to browse through a namespace.  For example, if you knew what you were looking for was in System.Web.Caching, you could type that in to the search box and let autocomplete simply return what falls under there.  I’m not sure if this was the intended use, but it works quite nicely.

Auto complete functionality for namespaces

In addition, for those who know exactly what they’re looking for, the delay is enough that it doesn’t hinder a quick search.


1. I wish I could pre-refine my topics from the initial search page.  Searching and THEN refining requires two steps, two page reloads, and, in it’s current build, about 15–20 seconds in page loads.  If I’m searching for a query and know ahead of time that I just want to look at the MSDN Documentation, let me set that. 🙂

2. Filtering by Language sometimes filters out “correct” results.  After our discussions, this appears to be less of a matter of the search engine and more to how articles and posts are tagged within the libraries.  With this in mind, filtering by a specific version of language is almost useless.

3. Not being able to use the autocomplete functionality with FireFox is a real drag.  I’m honestly not sure if this is an issue with FF3 or the MSDN search site, but from Firebug’s POV, I get a 400 error when I try to query.

Firefox Snafu with AutoComplete

UPDATE: 4–5 refreshes of the page in FireFox and it seems to work. Why?  I’m not really sure.  It seems the 400 error is more of a timeout than an actual error, but the GET request is only 200ms each time it fails.  Odd.

4. Not so much a “dislike” as an “hmm”—I use the browser built-in search bars a lot.  I rarely open up to a “search page” because of it.  Unfortunately, the cool features of MSDN Enhanced Search (autocomplete, refinements, etc) require you to be on the page to use them.  Perhaps a new searcher toolbar that adds these features into IE and FireFox could be made available OR a search bar (similar to Desktop Search) for Windows that I could toss down and always have access to MSDN resources.


1. Work on reducing the number of requests and load times (already discussions about this in the forums, but adding it to the list).  We’re on a dedicated OC-3 line here at the office, but I’m impatient. 🙂

For example, the Google query requires 5 requests and 948 B for the first result page to come up (905 B of that from cache). 

Google Page Loads

The MSDN Enhanced search requires 30 requests, 183 KB, and almost 5 seconds to download. 

MSDN Enhanced Page Loads

Repeating the same query over again narrows it down to only 7 requests (65 KB), but doesn’t seem to speed up the returns.

Repeated MSDN Enhanced Page Loads

2. It’d be great if “Refine By’s” allowed you to toggle them on and off.  In the current build, refining is an all or nothing.  You can’t refine by “Blogs and Forums” by checking each one—you have to refine by Blogs, check the results, go back, refine by Forums, check the results.  Time consuming and painful.  On the forums, they’ve already noted that they’re checking into this—and I’m excited to see the results.

Refinements on MSDN Enhanced Search

3. Work with the MSDN Documetation groups—if I parse out and am searching just for C# results, then have those preslugged as the language settings on the MSDN documentation.  That’d be great!  Per #2 in Dislikes, it’d be nice if I searched for “Func<T>” and filtered by C# 2008, that I’d get the C# 2008 (or .net 3.5) documentation for Func<T>.

4. It’d be great if, in future versions of MSDN, that searching for help in Visual Studio and other Microsoft products worked similar to Enhanced Search.  Currently, the “help” in most Microsoft products leaves much to be desired and, like VS2008, is simply redirecting to anyway.

5. Different versions of documents are hard to disseminate unless you look at the URLs—which gets painfully slow if looking for a quick answer.  In the example below, both documents point to information on System.Net.Mail; however, the first is for VS2008/.net 3.5 and the second is for VS2005/.net 2.0.  You can only tell by the URL.


On a matter of scope—I see MSDN Enhanced Search as a means of searching MSDN documentation and, to a degree, forums.  If I need to know what methods are part of an object or a specific syntax, this will be the place to come.  I really do like the Enhanced Search over all other existing Microsoft searches.

Unfortunately, 9/10 of the information I search for tends to come from sources outside Microsoft (non-MSFT blogs, forums, etc)—non usage/technique queries.  It’s hard to justify using MSDN Enhanced Search to JUST search Microsoft materials and then go “oh, well, didn’t find it, guess I’ll hit Google”—and then have to wade through those same Microsoft materials as well as the rest of the world.  Just food for thought.

I want to thank Chris Slemp for the opportunity to provide feedback and test out the new functionality for the MSDN Enhanced Search.  While I’m a Googler to the core, I look forward to seeing how the MSDN search evolves and improves—and how I can integrate it into my searches.

Lost in translation…

April 18, 2008 Comments off

Michael sent me this line of text in German yesterday…

Auslieferung oder Würfel!

Now, me knowing absolutely ZERO German (except swear words, of course), hit up Google Translate. Google returned:

Extradition or cubes!
Uhhh.. meh?  Come to find out, he originally used Babel to translate “Surrender or die!” from English to German.  Now, extradition is a legal term for surrendering (basically being taken from one jurisdiction to another for trial), but… cubes?
If you’ve seen Google’s headquarters, they are anything but “cube farms,” so maybe this is a bit of their influences… cubes == death.
Also, tossing the phrase back into Babel is just as odd…
Distribution or cube!
For some odd reason, this continues to make me laugh as I sit back in my chair and look around at the 8’ cold, gray prison cube walls.

Gmail – Odd Filtering Request…

March 27, 2008 Comments off

I love Gmail—in my Archives, I still have my “Welcome!” email (because, I wanted to “save it all” since I had unlimited space) dated back to August ‘04 and I haven’t looked back since. 

It’s fast, has a great interface, and has become recognized and supported by dozens of vendors.  It’s also available EVERYWHERE—home, work, on the road, my cell phone, wireless devices, just everywhere.  I don’t have to worry about syncronizing and it connects to GoogleDocs, Calendar, and the other services extremely well.  If I could find a good way (without a client) to sync my cell phone to Google Calendar, I’d happily kick Exchange to the curb (for personal stuff).

I’m on several mailing lists too… various ones for both work and personal such as altdotnet.  As these groups have grown and conversation sometimes staggers, Gmail has been my saving grace by automagically keeping the hierarchy in a single “thread” to make the conversations easy to follow.

Unfortunately, Gmail can’t “autoforward” to folders—because there are no folders.  Labels and filters are great, but if I go a few hours without reading my email (you laugh… but seriously), I find I have 200+ in my box and can’t see the “real” mail from the list servers.

If I was using Outlook, I’d autoforward emails to a folder and be happy.

So, to get around this with Gmail, I tried something and over the next few days, I’ll see how it works.

  1. Setup a new filter that matches a common criterium of all the emails on a particular list, e.g. all altdotnet emails come from
  2. Next, select “Apply the label” and create a new label for the group AND select “Skip the inbox”. 
  3. Save/Update the filter and, optionally, apply it to the discovered conversations (recommended to be sure you don’t have strays).

Gmail Labels

This applies a label, which is clickable from the Labels section on the left AND gets them out of the inbox, leaving it tidy.  You can see below, at a quick glance, that I have 41 unread “threads” in altdotnet and no outstanding jotts (I ❤ Jott).

You also can create hyperlinks DIRECTLY to the individual labels (if you wanted to add them to your favorites, etc) by adding #label/{label name} to the end of your google mail URL. Here’s an example:

Since I use the Google Homepage and Gmail web part, I have a little list of links as well and have added this in there for “quick access” to that label.

Give it a try for a few days and see how it works—hopefully it’ll help tame my information overloaded inbox.

Custom Searches in Internet Explorer 7.0

January 30, 2008 Comments off

I do quite a bit of “Googling” and searching in general throughout my day.  One of the coolest features that not many seem to use is IE 7.0’s ability to create custom searches in the search bar.

Several sites, like WikiPedia, are setup to automatically offer a search engine provider using an OpenSearch provider.

Wikipedia Search Provider

Some sites, however, do not have a provider pre-configured.  This blog, for example, doesn’t (yet).  I can, however, add a custom provider.  Here’s how:

1. Do a search using the search provider you wish to add with the words TEST.

2. Copy/paste the generated “TEST” url.  For this blog, it looks like:

3. In the search bar drop down, click “Find More Providers…”

4. Enter the URL and a friendly name in the “Create Your Own” box.

Create Your Own

5. Click the “Install” button and then “Add Provider”.

Now, when we look at our available providers, we see this blog listed. search engine.

Do a search now, for something like “facebook” and all posts I’ve written with facebook in them will appear.

You can do this with most any on-site search engine or forum software.  Here’s a few I’ve added:

  1. for looking up domain registration information
  2. for looking up FFXI auction information
  3. Wikipedia (built-in) for all purpose anythings
  4. FFXI and EQ2 Wikia (built-in) for quick access to items/quests
  5. for EQ2 items and information
  6. Gmail for quick access to emails


Creating a Google AJAX Search Control in .NET

October 30, 2007 13 comments

As I discussed yesterday, the current non-SOAP Google approach is to use 100% JavaScript and their own custom UIs.  That really annoys me that I can’t take the service, call it, pass along some values, and get search results back.

My next thought was, if nothing else, encapsulate all the odd options and such into a nice little control.  This isn’t necessary for the Yahoo! search, as it’s SDK has it’s own controls, result objects, etc.  For the full list of Google AJAX Search options, check out the class reference.

Download .net 3.5 Complete Project [updated 30 Oct 07/10:55]

Our control has five properties:

  • The Google AJAX Search API Key: this string property is for the key specific to this particular instance and is URL aware, so you’ll need one per application (or directory).
  • Four “Enable” properties: EnableWebSearch, EnableImageSearch, EnableVideoSearch, EnableBlogSearch.  These are booleans are true by default and toggle the searchers applied to the control.  I made these toggleable because in some environments, like at my office, Google’s Image and Video searches are blocked, and others may not want those results. 🙂

The only method to override in our custom control is CreateChildControls; we’ll use it to populate the page with our JavaScripts.

protected override void CreateChildControls()


base.Page.ClientScript.RegisterClientScriptInclude(“apiScript”,; + this.Key);

StringBuilder searchers = new StringBuilder();

       searchers.AppendLine(“google.load(‘search’, ‘1’);”);

       searchers.AppendLine(“function initialize() {“);

searchers.AppendLine(“\tvar searchControl = new;”);

       if (EnableWebSearch)


if (EnableImageSearch)


if (EnableVideoSearch)


if (EnableBlogSearch)


searchers.AppendLine(“\tsearchControl.draw(document.getElementById(‘” +

this.ClientID + “‘));”);






             searchers.ToString(), true);


The apiScript provides the link to the Google JavaScript objects (and passed along the unique key).  The searchers is the guts of the search component and generates a JavaScript block wherever you place your control. 

Notice on the .draw method of the searchControl, it’s drawing back to itself (the control, by default, generates a span tag; we’re simply returning the “drawing” of the control back to that.  It’s possible to add another property, something like TargetControlId, and use that to separate out the search logic and the actual location the search UI is presented.

To place the control on your page, drop and drag it from the toolbar, or code.  Here’s an example with the VideoSearch disabled.





Key=”KEYHERE” />

Unfortunately, this still doesn’t resolve using the Search API for non-web interfaces. 😦

Consuming Services: Yahoo! API vs. Google API

October 29, 2007 1 comment

As both a proof of concept for some internal uses as well as demonstration, I’ve been doing a bit of research into how the Yahoo! and Google APIs work—especially in .NET.  Here’s a bit of a comparison of what I’ve found so far.  I welcome any comments and such as I’m quite sure others out there have been using these technologies far longer than I have—and may have some workarounds for the odd glitches found in each framework.

Yahoo! Developer API

I’ll start out that I’m quite impressed by Yahoo!.  The Developer API was introduced to me in an AJAX session I attended a few months ago and I had totally forgotten about it until recently.  Their .NET Developer Center provides articles, SDK libraries, and most anything you’d need to wrap Yahoo! functionality into your .NET Application. Since Yahoo! returns standard XML (or JSON if you so desire and want to use the FromJson extension method and a custom type), I built a quick console-based searcher app.  The UI is irrelevant, I simply wanted to see how fast I could take data, search for it, and return information.

Most of the code here can be gleamed from the Yahoo! examples…

static void Main(string[] args)


// Capture the Yahoo query from the console.

       Console.WriteLine(“Your query to’s Image Search engine:”);

       string query = Console.ReadLine();

       // If query is blank, end.

       if (query == “”) return;


       foreach (XmlNode node in GetImageSearch(query))


              Console.WriteLine(“{0} @ {1}”,





This bit of code takes the input (from the console at this point) and then searches.  My GetImageSearch method returns an XmlNodeList (encapsulating the whole “get an XML, convert it, get the elements, etc” process) and then allows us to iterate through it, set it to a DataSet, etc.

static XmlNodeList GetImageSearch(string query)


// Create the web request

       Uri address = new



string appId = “YahooDemo”;

HttpWebRequest request =

 WebRequest.Create(address) as HttpWebRequest;

       // Set type to POST  

       request.Method = “POST”;

       request.ContentType = “application/x-www-form-urlencoded”;

       // Create the data we want to send  

       StringBuilder data = new StringBuilder();

       data.Append(“appid=” + HttpUtility.UrlEncode(appId));

       data.Append(“&query=” + HttpUtility.UrlEncode(query));

       // Create a byte array of the data we want to send  

byte[] byteData =


       // Set the content length in the request headers  

       request.ContentLength = byteData.Length;

       // Write data  

       using (Stream postStream = request.GetRequestStream())


              postStream.Write(byteData, 0, byteData.Length);


       // Get response

       using (HttpWebResponse response =

request.GetResponse() as HttpWebResponse)


              // Get the response stream  

             StreamReader reader =

new StreamReader(response.GetResponseStream());

             XmlDocument xmlOutput = new XmlDocument();


             XmlNodeList resultsNodes =


             return resultsNodes;



That’s it!  Note for real world use, you’ll need to replace that AppId with a real Yahoo Application Id.


  • XML Output is standard, JSON optional.  Works like a snap for .NET usage.
  • Amazing support and community for the APIs.
  • A Search SDK exists for C# and VB.NET, though I didn’t use it.  That’d probably replace all of the coding above to a simple call or two.
  • You only need one Yahoo! Application ID per… application! (you’ll see why this is a pro in a minute).
  • Almost any language/framework has a Developer Center.


  • It’s Yahoo.  I’m a Google fan myself (using Web Search, Google Mail, Google Docs, etc.), maybe this will change my mind and make this into a Pro as time goes on.

Google Developer APIs

Google’s been my Search of Choice for years now.  As I mentioned above, I use several of their services and have never had much of a problem.  In the results I get back from their search services, I tend to get what I’m looking for in the top ten or twenty, not the top 100 to 200 as I do with Yahoo and Live Search. With that in mind, their Developer Center is almost horrifying.  While AJAX and JavaScript are grand technologies, I had hoped for a bit of the same control as the Yahoo! solution provided—especially if I wanted to consume the information in non-web applications. 

[update 30 Oct 07: Google previously had a SOAP Search, but as of 5 December 2006, the SOAP Search is no longer available.  Bloody hell, why?! 

“Depending on your application, the AJAX Search API may be a better choice for you instead. It tends to be better suited for search-based web applications and supports additional features like Video, News, Maps, and Blog search results.

Okay, I’ll give you that, but what if you don’t want to use it in a web application?  *grumble*]

To provide an example of the AJAX Web Search, here’s what we have:


<title>Search Example</title>

<script type=”text/javascript”
  src=”; />
<script type=”text/javascript”> 

google.load(“search”, “1”);

function initialize()
 var searchControl = new;


<script type=”text/javascript”>


    <div id=”searchcontrol”></div>


That code works just fine, but it doesn’t give me control of the UI or the results, it generates: Now, I did find the google-gdata project, a Google Data API for .NET—but apparently GData doesn’t include things like searches, only Claendars, Docs, and such.  Bleh. So, what could be done to wrap this up?  I could put the JavaScript into a custom control and intercept the text coming back into the element from the .Draw method, but ehh… beyond that, I’m interested to see how others are wrapping Google technologies into .NET applications—if you have, please post links and feedback!



  • Development outside .NET or outside the OOP side of .NET, it’s pretty slick.
  • Creates a nice interface for the tools.


  • You need a new application key for every service you use, for every site you create.  If your site consumes Search, AJAX Feed, and Maps, you need 3 keys.  Really a hassle.
  • Appears to be little or no language specific support outside of HTML and JavaScript for the API.  That’s fine, but wrappers would be nice too.
  • Google Web Toolkit is Java only. 😦

For now, both of these services still interest me and both are excellent examples of what could be done to mash up technologies into a modern web application—it all depends on what you need. For grins, I’m sure the “Microsoft” answer is to consume Live Services rather than the competition, but I’ve never had much luck using Live—anyone using it now?

Google’s Lost it’s Cookies

August 17, 2007 4 comments

Reading through the blogs and the notes attached to each Google “gadget,” it appears something has been happening in the background at Google and all that’s left are a few fingerprints and cookie crumbs.

As far as I understand, the gadgets use profile-specific “cookies” for authored gadgets (non-Google).  For example, things like the, Enhanced Bookmarks, and other cool plug-ins to the iGoogle homepage.

Well, earlier this week, something has gone astray.  I haven’t had bookmarks all week and today, my Enhanced Bookmarks… just vanished.  *twitch*

I like Google’s because I use gmail, google docs and really like having the translator (my workplace has 6 “official” languages, so I’m constantly translating UI elements and such) and wikipedia show up for quick reference.  I’d be a bit more inclined to MSN if I was a Hotmail user… but no.  But, on the other hand, I can’t deal with this unreliability… especially when it’s not something that I can back up.

So, I’m curious… what does everyone use for a “home page”? 


Categories: Google

Google joins the “let’s sue Microsoft!” party!

At first, when I saw the headline, I couldn’t quite grasp what business a search provider could have with suing a client/operating system maker.  Last I checked, Google kicked LiveSearch’s butt.  Well, it appears it has to do with their Desktop Search application.

Google’s allegations are under review by the Justice Department and state attorneys general who were parties to a consent decree that resolved the US government’s antitrust case against Microsoft in 2002.

Microsoft rejected Google’s allegation that the Vista desktop search violates the settlement.

“We don’t believe that this feature is covered by the consent decree or that it raises any antitrust issues,” Brad Smith, Microsoft’s general counsel, was quoted as saying.

A report on the latest allegations to the Washington federal court overseeing the case is due later this month and the judge, Colleen Kollar-Kotelly, “has shown frustration over Microsoft’s compliance with the settlement,” the Journal noted.

Google files antitrust complaints against Microsoft: report – Yahoo! News.

Now, I have to admit.  In Vista, I have the “instant” search turned off and use the search bar primarly as a run bar (you can type cmd, regedit, iexplore, outlook, whatever and it runs… neat stuff). I don’t (often) misplace my files as they’re on file servers… and I don’t really store anything on my local machine, even my email, which I use Google Mail (gmail) for—I have no need to constantly parse my hard drives for files.

But, if I WANT to, I could simply disable it using the Control Panel and install Google’s.  What’s so “blocking” about that?  Did I miss something or what?  When I install Vista, does it ask me if I want to install, feature-by-feature, every aspect of the operating system from a 3rd party?  Nope… thank God.  But, if I’m smart enough (read: an elementary school kid’s level of computer savvy), I can install those features I’m looking for if I’m not pleased with Microsoft’s version.

What’s next?  Are we going to sue Microsoft because we want to replace the Spell Check tool in Office and there isn’t an easy way to do it?