A present for Mr. Google
I recently came across Google's Site-Flavored Google Search lab experiment. But looking at Mr. Google's cut-and-paste HTML made me reach for my happy pills.
Spending five minutes exploring Google Labs today, I came across Mr. Google's Site-Flavored Google Search, not by any means a new Lab experiment (6/17/04) but one which was tantalisingly labelled Improved!. To quote Mr. Google,
With a few easy steps, you can customize search results based on the content of your website. Simply fill out a profile based on your site's content, generate the search box HTML, and then paste this HTML into your pages. Users who search from this search box will have the option to flavor their results based on the profile you've created.
Sounds cool, so I gave it a whirl and Mr. Google proudly presented me with,
A present for Mr. Google
Why (oh why, oh why) can't Mr. Google give us some nice tidy code. Why must he give us a sort of Auntie Brenda code? The sort sooo inappropriate that we force a smile, say
Oh... it's just what I wanted. and then consign it to a box in the attic. If only he could give us something tasteful like,
<form method="get" action="#"> <Hidden fields /> <label for="q"><span>Search Google</span> <a href="#"><img src="#" alt="Google" /></a> <input type="text" name="q" id="q" /></label> <input type="submit" name="sa" value="Custom Search" /> </form>
Not another Google code rant
Honest guvnor, I love Google, but it does make me wonder... HTML, XHTML, whatever, there can be no reason why tidy code can't be delivered by giants such as Google in situations like this. I'm not asking them for a complete standards-based redesign of their site, just tidy code for the masses.
Of course, Mr. Google is not the only one who needs the back of his hands slapping. Looking into affiliate programs for a client, I found few whose cut-and-paste code resembled standards compliance in any manner whatsoever. I suspect further investigation would have made me more depressed. (Ed says: Crikey Malarkey! Take your pills right now!)
Nice code for the masses
The issue here is simple. If large scale providers of code would present us with tidy, valid, standards-based code, there would be millions of web pages that would move a little closer to our dream. That in itself would be no bad thing.
#1 On April 4, 2005 12:38 AM Casey Gollan said:
Most big companies will never learn (or couldn't care less about standards because its not their bandwidth), but try sending an email to Google?
#2 On April 4, 2005 12:46 AM Rob McMichael said:
Its so strange, google's home page is horrid yet soooo simple. The page weight could be almost nothing. Oh well its their loss.
With a lot of the big online companies that we analyze like this, they most likely know of these issues but the "benefit cost ratio" (or BCR for those who are cooler than me) just isn't high enough for them to do something about it. For Google, they might have run the numbers and discovered that financially speaking, it's just not worth taking the time or risk to alter their homepage markup or pretty up their cut-and-paste stuff.
Or the people like us who care about stuff like this just don't get the chance to influence what goes onto the homepage, etc.
Or ... they're just frickin' lazy.
I think it's probably one of those three.
#4 On April 4, 2005 06:07 AM Luke Redpath said:
I'm interested in why a company like Google, who are in my opinion usually quite forward thinking and innovative (see Google maps) haven't started rolling out standards-based design to their core offerings.
Now, don't get me wrong, I understand that it is easier said then done. But lets take their main search. I'm talking about the main page, and the search results page, nothing else. You have to assume that almost everything is being generated by the server and then loaded into some form of template. Is it really that hard to tweak the template, or have Google locked themselves into a particular layout with an inflexible back-end system? For a company like google, this seems really unlikely to me, but perhaps I'm being na�ve.
#5 On April 4, 2005 10:43 AM Matthew Pennell said:
You've got to consider the size of Google's customer base. While we can dismiss those annoying Netscape 4 users as being "less than 1% of our user base", for Google that could represent millions of people for whom the service would instantly become unusable (yes, I know it wouldn't be "unusable", but your average web user would consider unstyled pages to be broken).
It's probably also something to do with the amount of testing time that is needed to move to standards-based code - at least with tables they _know_ that it's going to look the same in any browser that comes there.
Rob (No.2): I remember reading an article somewhere that tried to argue that Google's front page was actually lighter in code the way it is than if it had been written with web standards. Of course, this argument falls apart when a page has more substance than Google's, and there are plenty of other reasons why standards should be used. But in the specific case of Google, the page weight isn't strong enough. Just thought I should mention it. Damn, wish I could find the URL.
#7 On April 4, 2005 03:58 PM Jason Beaird said:
We just have to keep praising the large sites that actually do "get it" and continue pushing those that don't to redesign. Forget Mr. Google though. What about Sr. Slashdot? Back in November of 03, there was an ALA article about Retooling Slashdot with Web Standards that claimed the site could reduce it's yearly bandwidth charges by $3650 (based on statistics from June 2000). Ouch!
I was going to use Google to search my site, but the results page looks crappy. You can add a splash of colour perhaps a logo, but you cant mess with the results. So I hacked up the Yahoo API, combined it some some sever side XSLT and it works a treat.
Oh and there's a quote from Google along the lines of "angled brackets don't make it a technology", they just don't care!
That is the same code they have been giving us university folks to cut and paste for the free University (now called Public Service) Search for years. My guess is that they did a cut and paste job themselves. In other words, they are lazy.
Luckily, anyone that works for a public service is highly skilled in spinning crap into gold, so it's rare that we just cut and paste what they give us. This 'site-flavored search' form has the potential to propagate itself more widely, though. Yes, time for the happy pills.
#10 On April 5, 2005 04:11 PM Ryan Nichols said:
In putting 2 and 2 together, I think it has to with their platform. I read in one place about their software code-base, and in another heard someone speak about their internal practices. They make everyone share the same codebase as much as possible, so every single google...anything...works off the same code company wide. That massive codebase is what probably creates invalid markup. Their environment could be really proprietary and creating a 'simple page' with valid markup could be completely outside the realm of possibility unless they do a major code overhaul.
I'm not saying they couldn't, just saying that the decision might be much much more involved than just changing one page.
#11 On April 6, 2005 06:18 AM Luke Redpath said:
I guess my point was that about 95% of google's codebase would be server-side. The remaining 5% (ie the HTML templates) should be completely separate.
#12 On April 8, 2005 01:07 AM patrick h. lauke said:
along similar lines as your gift, i've made my own little present to fix something that has been bugging me for quite a while: firefox's default home page, the branded version of google, recoded as xhtml/css - frugal google
#13 On April 11, 2005 08:34 PM brothercake said:
Er... isn't your replacement code also invalid ...? Form elements are not allowed to be a direct child of .. and having the link to Google directly inside the label is semantically dubious.
@ Brothercake: Mr. Picky! ;)
I agree with you and repent. That's why you're a code God and I'm just a humble pixel pushing designer ;)
This article was originally published by Andy Clarke on his personal web site And All That Malarkey and is reproduced here for archive purposes. This article is published under a Creative Commons By Attribution License 2.0.