<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Joy of Hack &#187; Google</title>
	<atom:link href="http://www.aijazansari.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aijazansari.com</link>
	<description>For people who like to make things</description>
	<lastBuildDate>Tue, 20 Jul 2010 13:20:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Google Now Considers Website Speed In Its Ranking</title>
		<link>http://www.aijazansari.com/2010/04/10/google-now-considers-website-speed-in-its-ranking/</link>
		<comments>http://www.aijazansari.com/2010/04/10/google-now-considers-website-speed-in-its-ranking/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 19:55:15 +0000</pubDate>
		<dc:creator>Aijaz Ansari</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[TaskForest]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.aijazansari.com/?p=617</guid>
		<description><![CDATA[Google reported yesterday that their search engine will now include a website&#8217;s speed in the list of factors it uses to decide how high to rank the site in its search results.  In this post I consider what this means for web developers and what steps you can take to make your site faster. Google [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-634" href="http://www.aijazansari.com/2010/04/10/google-now-considers-website-speed-in-its-ranking/googlewebmaster/"></a></p>
<p><img class="alignleft size-medium wp-image-634" title="GoogleWebmaster" src="http://www.aijazansari.com/wp-content/uploads/2010/04/GoogleWebmaster-285x156.png" alt="" width="285" height="156" /><a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html">Google reported yesterday</a> that their search engine will now include a website&#8217;s speed in the list of factors it uses to decide how high to rank the site in its search results.  In this post I consider what this means for web developers and what steps you can take to make your site faster.<span id="more-617"></span></p>
<p>Google has made it clear that speed is not the primary factor when determining page rank:</p>
<blockquote><p>While site speed is a new signal, it doesn&#8217;t carry as much weight as the  <a href="http://www.youtube.com/watch?v=muSIzHurn4U">relevance of a  page</a>. Currently, fewer than 1% of search queries are affected by the  site speed signal in our implementation and the signal for site speed  only applies for visitors searching in English on Google.com at this  point.</p></blockquote>
<p>It is, however, a turning point for web site developers.  What Google is really doing is putting a tangible value on the User Experience.  A fast site makes for a more satisfactory experience, and linking to fast sites also makes users happier with Google.  I know how frustrating it is to see what appears to be a promising search result on Google, only to find the site very sluggish once I click through Google&#8217;s recommendation.  So, like it or not, you and I will now have to make sure we at least consider our sites&#8217; rendering speeds.</p>
<p>As I had mentioned in a <a title="The Performace Cost of Using WordPress" href="http://www.aijazansari.com/2010/03/31/performance-cost-of-using-wordpress/">earlier post</a>, I recently changed the taskforest.com website to static HTML from a template-based system.   After reading Google&#8217;s blog entry, I installed <a title="Firebug" href="http://getfirebug.com/">Firebug</a> on Firefox, as well as two different page performance measuring tools: <a title="Page Speed for Firebug" href="http://code.google.com/speed/page-speed/index.html">PageSpeed</a> and <a href="http://developer.yahoo.com/yslow/">YSlow from Yahoo</a> and started testing out the TaskForest web site.  To my dismay, the site scored a paltry 76/100 on PageSpeed and a &#8216;D&#8217; (67/100) on YSlow.  I&#8217;m glad to say that in less than an hour I was able to make the changes that most significantly improved my site&#8217;s speed.</p>
<p>There were four major areas in which the two tools recommended changes:</p>
<dl>
<dt>Exploiting Browsers&#8217; Caches</dt>
<dd>The site was not using the Expires response headers. As <a title="Optimizing Page Performance Via Caching" href="http://code.google.com/speed/page-speed/docs/caching.html">this document from Google</a> shows, proper usage of this HTTP header can greatly reduce load on the server as well as clients.The Expires header tells the client how long the server expects the resource to stay unchanged.  For images like logos and screenshots that don&#8217;t change very often, this period could (and should) be as high as few months, possibly even the maximum allowed value &#8211; one year.  For HTML pages that change often, you could set it to 2-7 days. </dd>
<dd>The taskforest site which was using Apache 1.41, was not sending the Expires HTTP response header. The reason is that the module that sets this, <em>mod_expires</em>, is not enabled by default. </dd>
<dt>Combining External CSS</dt>
<dd>The website was using three CSS style sheets.  One was my own &#8216;styles.css,&#8217; but the other two were Yahoos YUI style sheets.  For every request for a web page, there were 3 additional requests for style sheets. </dd>
<dt>Combining External Javascript</dt>
<dd>Just like style sheets, There were 6 Javascript files that were being served with every page. </dd>
<dt>Using Compression</dt>
<dd>The website was not compressing the data it sent to the client.  As <a title="Using Compression" href="http://code.google.com/speed/articles/use-compression.html">this article</a> and the video below from Google shows, data compression can have a major impact on the size of the payload the server delivers to the client, thus making the site faster.</dd>
<dd><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Mjab_aZsdxw&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/Mjab_aZsdxw&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></dd>
</dl>
<h3>Optimizing the site</h3>
<p>So the first order of business was to enable <em>mod-expires</em> and install and activate <em>mod_gzip</em>.  These are the Apache modules that enable the Expires header and Response compression.  I reconfigured Apache with the &#8211;enable-module=expires and &#8211;activate-module=src/modules/gzip/mod_gzip.c options.  Previously, the relevant lines in my httpd.conf file looked like this:</p>
<pre class="brush: plain;">
&lt;VirtualHost 216.139.227.47&gt;
 ServerName www.taskforest.com
 DocumentRoot &quot;.../taskforest/htdocs/website&quot;
&lt;/VirtualHost&gt;
</pre>
<p>After installing the two new modules, my httpd.conf file looked like this:</p>
<pre class="brush: plain;">
&lt;VirtualHost 216.139.228.44&gt;
 ServerName www.taskforest.com
 DocumentRoot &quot;.../taskforest/htdocs/website&quot;

 FileEtag None

 # enable expirations
 ExpiresActive On

 # unless overridden elsewhere resources expires
 # after 60 days in the client's cache
 #
 ExpiresDefault &quot;access plus 60 days&quot;

 # The site's feed expires after 1 day in the cache
 ExpiresByType application/xml A86400

 # HTML files expire after 1 day in the cache
 ExpiresByType text/html A86400

 # Turn compressing on
 mod_gzip_on Yes

 # Don't bother compressing tiny files
 mod_gzip_minimum_file_size  1002

 mod_gzip_maximum_file_size  0
 mod_gzip_maximum_inmem_size 60000

 # Compress XML files, text files (including HTML)
 # and directory listings
 mod_gzip_item_include mime &quot;application/xml&quot;
 mod_gzip_item_include mime text/*
 mod_gzip_item_include mime &quot;httpd/unix-directory&quot;

 # Compress files based on their names as well
 mod_gzip_item_include file &quot;\.txt$&quot;
 mod_gzip_item_include file &quot;\.html$&quot;
 mod_gzip_item_include file &quot;\.css$&quot;
 mod_gzip_item_include file &quot;\.js$&quot;

 mod_gzip_dechunk Yes
 mod_gzip_temp_dir &quot;/tmp&quot;
 mod_gzip_keep_workfiles No

&lt;/VirtualHost&gt;
&lt;VirtualHost 216.139.228.44&gt;
 ServerName taskforest.com
 RedirectMatch (.*) http://www.taskforest.com$1
&lt;/VirtualHost&gt;
</pre>
<p>For the multiple CSS files, I just copied both of the YUI  style sheets into my styles.css file, preserving the copyright comments.  As for the YUI javascript files, it turns out that none of them were being used!  They were just copied and pasted from the taskforestd webserver web site, which does use the javascript files.  I was able to delete them altogether.  It was rather embarrassing to realize that the site was serving unused files.  But I was glad to have the tools that helped me realize this.</p>
<h3>Results of Optimization</h3>
<p>The results of the optimization were startling.  The PageTest scores originally looked like this:</p>
<div id="attachment_639" class="wp-caption alignnone" style="width: 385px"><a rel="attachment wp-att-639" href="http://www.aijazansari.com/2010/04/10/google-now-considers-website-speed-in-its-ranking/pagespeedorig/"><img class="size-full wp-image-639 " title="PageSpeed Results Before Optimization" src="http://www.aijazansari.com/wp-content/uploads/2010/04/PageSpeedOrig.png" alt="PageSpeed Results Before Optimization" width="375" height="436" /></a><p class="wp-caption-text">PageSpeed Results Before Optimization</p></div>
<p>Now, after the optimization, the report was much more respectable:</p>
<div id="attachment_640" class="wp-caption alignnone" style="width: 457px"><a rel="attachment wp-att-640" href="http://www.aijazansari.com/2010/04/10/google-now-considers-website-speed-in-its-ranking/pagespeed/"><img class="size-full wp-image-640" title="PageSpeed Results After Optimization" src="http://www.aijazansari.com/wp-content/uploads/2010/04/PageSpeed.png" alt="PageSpeed Results After Optimization" width="447" height="473" /></a><p class="wp-caption-text">PageSpeed Results After Optimization</p></div>
<p>This exercise gave me new insight into what is needed to make a website faster.  It&#8217;s not just the fastest machine and the most optimized database that matters.  One also has to consider the fundamental characteristics of the Web, and HTTP in particular, where a little effort can bring significant improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aijazansari.com/2010/04/10/google-now-considers-website-speed-in-its-ranking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Follow up: Google Admits Buzz Was Only Tested Internally</title>
		<link>http://www.aijazansari.com/2010/02/16/follow-up-google-admits-buzz-was-only-tested-internally/</link>
		<comments>http://www.aijazansari.com/2010/02/16/follow-up-google-admits-buzz-was-only-tested-internally/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 04:29:50 +0000</pubDate>
		<dc:creator>Aijaz Ansari</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Buzz]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.aijazansari.com/?p=345</guid>
		<description><![CDATA[In yesterday&#8217;s article about Google Buzz, I guessed that &#8220;the problem was that the population for whom the system was designed wasn’t necessarily the only population actually using the system.&#8221;  I gave Google the benefit of the doubt: I am certain Google tested their application thoroughly.  They’ve been known to do extensive usability tests for [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-408" href="http://www.aijazansari.com/2010/02/16/follow-up-google-admits-buzz-was-only-tested-internally/3043988249_165091e8e7_b/"><img class="alignleft size-medium wp-image-408" title="Kite Flying on a Summer's Day" src="http://www.aijazansari.com/wp-content/uploads/2010/02/3043988249_165091e8e7_b-190x285.jpg" alt="Kite Flying on a Summer's Day" width="133" height="200" /></a>In <a href="http://www.aijazansari.com/2010/02/15/sometimes-testing-isnt-enough/">yesterday&#8217;s article</a> about Google Buzz, I guessed that &#8220;the problem was that the population for whom the system was designed wasn’t necessarily the only population actually using the system.&#8221;  I gave Google the benefit of the doubt:</p>
<blockquote><p>I am certain Google tested their application thoroughly.  They’ve been known to do extensive usability tests for the seemingly tiniest of changes to their web site.  But even the most well-implemented tests are incomplete if they’re not performed on a statistically representative sample of the audience.</p></blockquote>
<p>But today, the BBC reported that <a href="http://news.bbc.co.uk/2/hi/technology/8517613.stm">Google has admitted that they only tested Buzz internally</a>, and bypassed their regular rigorous testing procedures &#8212; possibly in an attempt to get it out the door as soon as possible. I&#8217;ll let the pundits decide if it did more harm than good to the firm, but it&#8217;s a warning to other software developers: skipping testing can lead to embarrassing failures.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aijazansari.com/2010/02/16/follow-up-google-admits-buzz-was-only-tested-internally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sometimes Testing Isn&#8217;t Enough</title>
		<link>http://www.aijazansari.com/2010/02/15/sometimes-testing-isnt-enough/</link>
		<comments>http://www.aijazansari.com/2010/02/15/sometimes-testing-isnt-enough/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 07:41:07 +0000</pubDate>
		<dc:creator>Aijaz Ansari</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Buzz]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[My Software]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[SMS]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Virgin Mobile]]></category>

		<guid isPermaLink="false">http://www.aijazansari.com/?p=318</guid>
		<description><![CDATA[In the first few days after the release of Google Buzz many people (including myself) criticized Google for exposing their users' private information.  This was a couple of weeks after Apple got a lot flak for their unfortunately-named iPad, and the same week that we heard reports of a woman who broke up with her boyfriend after finding some suggestive text messages on his cell phone - messages that came pre-loaded on the phone.  I think that all these cases were not caused by a lack testing, but by testing the wrong audience.  Let's examine these three cases and see what we can learn from them:]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-333" href="http://www.aijazansari.com/2010/02/15/sometimes-testing-isnt-enough/img_7679/"><img class="alignleft size-thumbnail wp-image-333" title="A Bee.  Buzzing." src="http://www.aijazansari.com/wp-content/uploads/2010/02/IMG_7679-170x170.jpg" alt="A Bee.  Buzzing." width="170" height="170" /></a>In the first few days after the release of <a title="Google Buzz" href="http://www.google.com/buzz">Google Buzz</a> many people (including myself) criticized Google for <a title="Google Buzz Has A Huge Privacy Flaw" href="http://www.businessinsider.com/warning-google-buzz-has-a-huge-privacy-flaw-2010-2">exposing their users&#8217; private information</a>.  This was a couple of weeks after Apple got a lot flak for their unfortunately-named iPad, and the same week that we heard <a title="Built-in text messages ruined his life" href="http://www.winnipegfreepress.com/local/built-in-text-messages-ruined-life-says-city-man-83622857.html">reports</a> of a woman who broke up with her boyfriend after finding some suggestive text messages on his cell phone &#8211; messages that came pre-loaded on the phone.  I think that all these cases were not caused by a lack testing, but by testing the wrong audience.  Let&#8217;s examine these three cases and see what we can learn from them:<span id="more-318"></span></p>
<h4>Google Buzz</h4>
<p>Almost immediately after Google started rolling out Buzz to its Gmail clients various blogs reported that there was an egregious flaw in the system that exposed people&#8217;s private contacts to the rest of the world.  When a Gmail user logged in, they were presented with a dialog box that asked them if they wanted an introduction to Buzz or not.  If the user declined, it didn&#8217;t mean that Buzz was disabled &#8211; it only meant that they didn&#8217;t want the intro.  What Google did behind the scenes was that they scanned the user&#8217;s emails and collected the emails of the people with whom the user corresponded most often.  Then, it automatically modified the user&#8217;s Gmail account to &#8216;follow&#8217; those people in Buzz.</p>
<p>But here&#8217;s the thing that infuriated most people &#8211; it made that list of the people that user&#8217;s following public: Anyone who looked at the user&#8217;s public Google profile could see who that person was following.  In other words, anyone looking at that user&#8217;s public profile could see who that user emailed most often.</p>
<p>Now pretend you&#8217;re a reporter who&#8217;s communicating with dissidents in Myanmar or Iran.  Would you want your heretofore anonymous sources made public?  <a title="Google Buzz Privacy Issues Have Real Life Implications" href="http://techcrunch.com/2010/02/12/google-buzz-privacy/">In one reported case</a>, a woman&#8217;s most frequent contacts were her boyfriend and her mother.  Her third-most-frequent contact (with a lot fewer emails) was her abusive ex-husband, from whom she had kept her email address hidden.  But what Google did when they released Buzz is automatically have her follow her ex, and share her shared Google Reader messages, including her location and workplace with her ex.</p>
<p><a title="Google Buzz: Privacy Nightmare" href="http://news.cnet.com/8301-31322_3-10451428-256.html">Another blogger reported</a> that her Android phone uploaded to her public profile a photo that she had taken, but not uploaded. She thought her photo was private, but Google&#8217;s assumption was that if the photo was on her phone, it would be okay to upload it to her public profile.</p>
<p><a title="Watch Out Who You Reply To On Google Buzz" href="http://techcrunch.com/2010/02/11/reply-google-buzz-exposing-email/">The third problem</a> that surfaced in the two days after Buzz was released was that in some cases users thought that they were referencing a person&#8217;s public email address in a buzz (think of it as a retweet or a reply) but in reality were referencing a private email address.  When they selected a person by their name, it wasn&#8217;t clear which email address was linked to that name.  For example, if John Smith&#8217;s public email address is john_smith@example.com, and his personal address is js_123@example.com, and the public address is associated with a Google profile, a Buzz user may inadvertently select the private email address in a buzz, thus exposing John&#8217;s private address to everyone he follows.</p>
<h4>The iPad</h4>
<p>In the minutes after Apple&#8217;s Steve Jobs announced the new mobile appliance&#8217;s name, people started making very funny, original and sometimes vulgar jokes about the name iPad.  I could post them here, but the jokes are old by now.</p>
<h4>Salacious Texts On Samsung Virgin Mobile Phones</h4>
<p>According to <a title="Built-in text messages ruined his life" href="http://www.winnipegfreepress.com/local/built-in-text-messages-ruined-life-says-city-man-83622857.html">this article</a>, a 49 year old man from Winnipeg can no longer have a relationship with the woman he loved because she accused him of cheating on him.  Her proof?  Sexy text messages on his cell phones.  He denied the affair, but couldn&#8217;t explain how they got there.  Only later did he learn that the messages were pre-loaded by Virgin Mobile.</p>
<h4>What Do These Cases Have in Common?</h4>
<p>As an outsider it appears to me that in each of the three cases the problem was that the population for whom the system was designed wasn&#8217;t necessarily the only population actually using the system.  Let&#8217;s look at the Google Buzz case.  If we claim that Google is neither evil nor stupid, what went wrong?  I think there were several assumptions that the Google developers and designers made that were incorrect.</p>
<p>Buzz seemed to have be designed for people who collaborate together in tightly knit groups.  The assumption is that people who want to share information with each other communicate a lot with each other.  In real life that isn&#8217;t always true, and neither is the converse.  In many cases the people that I want to share the most with are people with whom I have so many channels of communication (including the dinner table) that any single channel like email contains a fraction of the actual communication taking place.  Similarly, as in the case of the lady who was hiding her online identity from her ex, the people we communicate with aren&#8217;t always the people we want to share information with.  If Google&#8217;s designers approached their product with that bias, they could have made (and did make) a technically excellent product that worked as they intended, and whose test cases passed, but which did exactly the wrong thing.</p>
<p>I think that that&#8217;s essentially the core problem with the issue of the publication of private photos and email addresses.  The joke in the blogs was that Buzz was designed for an people like engineers at Google, not for people who go to parties and take pictures that they would regret the next morning (and I know they&#8217;re not mutually exclusive groups).  Unlike in the business world and the networks of sites like LinkedIn, people sometimes guard their email addresses jealously and do not want them published without their authorization.</p>
<p>I am certain Google tested their application thoroughly.  They&#8217;ve been known to do extensive usability tests for the seemingly tiniest of changes to their web site.  But even the most well-implemented tests are incomplete if they&#8217;re not performed on a statistically representative sample of the audience.</p>
<p>The same can be said for Apple and Virgin Mobile.  On of the most insightful questions asked after the iPad announcement was, &#8220;Did Apple not have any women on the product naming committee?&#8221;  Did Virgin Mobile think that their only consumers would be teenagers who would find the default text messages cute and funny and have the technical expertise to realize that these messages were pre-loaded?  While Apple seemed to have failed to consider about half of the human race while naming their product, Virgin failed to consider the less savvy part of the population who are their customers.</p>
<p>What I don&#8217;t know is this: Let&#8217;s assume I&#8217;m wrong, and that in all three cases a statistically-representative portion of the population was tested or considered.  If that&#8217;s true, then could these three cases be considered edge conditions?  While a problem could exist in theory could the actual problems be so few that they&#8217;re statistically insignificant?  If you&#8217;re the person whose lost a relationship or now have to worry about being stalked by an ex it doesn&#8217;t really matter.  It&#8217;s affected your life in a significant way.</p>
<h4>What Can Software Developers Learn From This?</h4>
<p>I don&#8217;t think anyone or any company (not even Google) can make the perfect application that pleases everyone.  But I think that there are a few rules of thumb that we should follow, to prevent embarrassing and distressing problems.</p>
<p>First: Applications like these should not take action on behalf of the user.  The system should assume that the user always knows what&#8217;s best for them.  The most the program should do is make suggestions that the user can then decide to obey or ignore.  This is exactly what Google did (among other things) to change Buzz after the huge public outcry.</p>
<p>Second: Features, no matter how well-intentioned, no should never be opt-out.  They should always be opt-in.  Buzz was essentially an opt-out system.  You could be vulnerable by not doing anything. It isn&#8217;t that way now, but it was for those two days when Google&#8217;s reputation took a massive hit.</p>
<p>Third: Designers and service providers need to pay careful attention to who their users actually are.  They&#8217;re not necessarily men, not necessarily tech-savvy teens or professionals looking to increase their network.  They could include people very different from us.</p>
<p>As developers and designers we need to realize that the products we make will be used in manners that we never imagined, by people who we don&#8217;t understand.  If we give our customers the ability to control how our products and services are used, we&#8217;ll be helping them and thus helping ourselves.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aijazansari.com/2010/02/15/sometimes-testing-isnt-enough/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
