<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.friendlybit.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Friendly Bit - Web Development Blog</title>
	
	<link>http://friendlybit.com</link>
	<description>You have found Friendly Bit, a web development blog. I focus on client side technologies like CSS, HTML and Javascript. I try to post once per week (average).</description>
	<lastBuildDate>Sat, 12 Jan 2013 13:05:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="friendlybit" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://friendlybit.com/feed/" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://friendlybit.com/feed/" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffriendlybit.com%2Ffeed%2F" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffriendlybit.com%2Ffeed%2F" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><item>
		<title>My text editor: Sublime Text</title>
		<link>http://friendlybit.com/tools/my-text-editor-sublime-text/</link>
		<comments>http://friendlybit.com/tools/my-text-editor-sublime-text/#comments</comments>
		<pubDate>Sat, 07 Jul 2012 21:53:03 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=882</guid>
		<description><![CDATA[What text editor you use when coding is a very serious subject. I&#8217;ll hardly be able to talk about what I prefer, without some people (other than you, of course ;) taking it as me trying to steal their editor from them. I&#8217;m not going to. I&#8217;m just going to tell you what I think, [...]]]></description>
				<content:encoded><![CDATA[<p>What text editor you use when coding is a very serious subject. I&#8217;ll hardly be able to talk about what I prefer, without some people (other than you, of course ;) taking it as me trying to steal their editor from them. I&#8217;m not going to. I&#8217;m just going to tell you what I think, and you can just decide of you agree or not. My hope is that it helps you be more certain about your own choice of editor.</p>
<p>What I look for in a <del>woman</del> text editor:</p>
<ol>
<li><strong>Support both Mac and PC</strong>. I use a Mac for work, and a PC at home, and I want to be able to use the editor skills I&#8217;ve learned at work for my hobby projects, and vice versa.</li>
<li><strong>Less than 3 seconds starting time</strong>. Big projects means lots of little files to open. So while programming I will open files and close files all the time. Each delay waiting for the editor to open, or a file to load, means hundreds of seconds over time.</li>
<li><strong>Syntax highlighting for web languages</strong>. I work with web stuff, both front end and back end, and I need colors to be able to scan files quickly. I don&#8217;t really care about the exact ones, light or dark, I just want it to look decent. What &#8220;web languages&#8221;? HTML, CSS, Javascript, JSON, Python (Django), Ruby (Rails), PHP, SQL.</li>
<li><strong>Handle big files </strong><strong>(&lt; 1 Gb)</strong>. From time to time I work with big files. Can be database dumps or large text files. I&#8217;m not expecting &lt; 3 sec to open them, but at least &lt; 15 sec, and then be able to work with the file without the editor lagging.</li>
<li><strong>Some kind of file browsing/project support</strong>. There&#8217;s never just one file and there&#8217;s needs to be a way to overview all the files in a certain directory structure, and pick from them. I&#8217;d like there both to be file searching support and a way to click to a file through the directory structure.</li>
<li><strong>Code auto-completion for web languages</strong>. Do I use font-variant, font-style, or font-decoration to set italic? I want my editor to show me a list of options, and let me pick. This is harder to do well for the dynamic server-side languages, but I still want it.</li>
<li><strong>Look good</strong>. I don&#8217;t want something that looks like the terminal, and want something beautiful. For me this means gradients, nice rounded tabs to click on, a nice font, a color scheme that matches.</li>
</ol>
<p>With that list of priorities in mind, let&#8217;s look at a couple of popular editors:</p>
<ul>
<li>Editors that are not available both for Mac and PC: <strong>Textmate</strong>, <strong>Coda, </strong><strong>Notepad++</strong>, and <strong>Visual Studio</strong>.</li>
<li>Editors that are slow: <strong>XCode, Eclipse</strong><strong></strong>, <strong>NetBeans</strong>, <strong>Dreamweaver</strong>, and most other editors built with Java.</li>
<li>Editors that don&#8217;t handle syntax highlighting and code completion: <strong>Notepad</strong>, <strong>Wordpad</strong>.</li>
<li>Editors that don&#8217;t handle big files well:<strong> Komodo Edit</strong> (what I used til recently).</li>
<li>Editors that look like shit: <strong>Emacs</strong>, <strong>Vim</strong>.</li>
</ul>
<p>And then there&#8217;s <a href="http://www.sublimetext.com/"><strong>Sublime Text</strong></a>. Which does all of the above, perfectly. You should try it.</p>
<p>&nbsp;</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=F4QP3xgFsAM:NfpRThP-nRY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=F4QP3xgFsAM:NfpRThP-nRY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=F4QP3xgFsAM:NfpRThP-nRY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=F4QP3xgFsAM:NfpRThP-nRY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=F4QP3xgFsAM:NfpRThP-nRY:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/tools/my-text-editor-sublime-text/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>[The Listserve] I’m sorry to break this to you…</title>
		<link>http://friendlybit.com/other/the-listserve-im-sorry-to-break-this-to-you/</link>
		<comments>http://friendlybit.com/other/the-listserve-im-sorry-to-break-this-to-you/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 11:02:33 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Other topics]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=874</guid>
		<description><![CDATA[I just got the fantastic chance to send an e-mail to ~10.000 people. What would you write if you got that chance? This is what I wrote: &#8220;I&#8217;m sorry to break this to you, in an e-mail from a random stranger like this, but it needs to be said: Most of your life won&#8217;t be [...]]]></description>
				<content:encoded><![CDATA[<p>I just got the fantastic chance to send an e-mail to ~10.000 people. What would you write if <a href="http://thelistserve.com/">you got that chance</a>? This is what I wrote:</p>
<blockquote><p>&#8220;I&#8217;m sorry to break this to you, in an e-mail from a random stranger like this, but it needs to be said: Most of your life won&#8217;t be fantastic. I&#8217;m not joking. The adventures you&#8217;ll tell your children about will be a minuscule part of it. So if you want to avoid the feeling of utter disappointment as you grow older, you need to accept that fact. Sorry.</p>
<p>This leads us to the insight: You should focus more on the non-fantastic parts. The parts where you eat breakfast, walk to the bus, have a boring day at work, eat your ordinary lunch, shop groceries, and brush your teeth. After all, this is the major part of your life, and neglecting it is a wasted opportunity.</p>
<p>Here&#8217;s the thing: Most of the boring stuff in your life is so dull, that even the tiniest thing can make it seem fun. The tiniest thing. This means the you could make it better with extremely simple means.</p>
<p>What exactly am I talking about here? Little things. Like these:</p>
<p>* Challenges: When brushing your teeth tonight, use your left hand.<br />
* Mind games: When you enter work (or school!), imagine the sound &#8220;Kabaaaam!&#8221; as you enter, as if your presence changed the whole room.<br />
* Action: Jump down from the side-walk, instead of just stepping down.<br />
* Changes: Buy some fancy tomato sauce tonight, instead of your usual brand.<br />
* More action: Count the number of pink things on your way to work, as if your life depended on it.</p>
<p>See? Easy stuff. I really try to live by this &#8220;Everyday Action&#8221; idea, and I think it works for making the boring parts of life more fun. Because that&#8217;s the thing: just because the fantastic moments are few, there&#8217;s no reason to just sit there, waiting for the next big thing to swipe you off your feet. Have some fun meanwhile, it&#8217;s easy&#8230;&#8221;</p></blockquote>
<p><a href="http://thelistserve.com/">Sign up for Thelistserve</a>. I&#8217;m guessing there&#8217;s more inspiration to come&#8230;</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=qCSbmOLhfpY:Tj3PzK2YuzQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=qCSbmOLhfpY:Tj3PzK2YuzQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=qCSbmOLhfpY:Tj3PzK2YuzQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=qCSbmOLhfpY:Tj3PzK2YuzQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=qCSbmOLhfpY:Tj3PzK2YuzQ:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/other/the-listserve-im-sorry-to-break-this-to-you/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>What movies on Piratebay will you like the most?</title>
		<link>http://friendlybit.com/python/what-movies-on-piratebay-will-you-like-the-most/</link>
		<comments>http://friendlybit.com/python/what-movies-on-piratebay-will-you-like-the-most/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 21:07:29 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=851</guid>
		<description><![CDATA[Christmas, and the weeks thereafter, are times for coding. And I&#8217;ve been playing around with piratebay and filmtipset (a Swedish movie recommendation) a little bit. I just pushed it to the filmtipset-piratebay project on GitHub, if you want to take a look. CSS for screen scraping The script is using CSS for screen scraping; something [...]]]></description>
				<content:encoded><![CDATA[<p>Christmas, and the weeks thereafter, are times for coding. And I&#8217;ve been playing around with <a href="http://thepiratebay.org">piratebay</a> and <a href="http://filmtipset.se">filmtipset</a> (a Swedish movie recommendation) a little bit. I just pushed it to the <a href="https://github.com/EmilStenstrom/filmtipset-piratebay">filmtipset-piratebay project on GitHub</a>, if you want to take a look.</p>
<h2>CSS for screen scraping</h2>
<p>The script is using <strong>CSS for screen scraping</strong>; something that works extremely well:</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">from</span> lxml <span style="color: #ff7700;font-weight:bold;">import</span> html<br />
<span style="color: #ff7700;font-weight:bold;">import</span> requests<br />
response <span style="color: #66cc66;">=</span> requests.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;http://thepiratebay.org/browse/207/0/7&quot;</span><span style="color: black;">&#41;</span><br />
document <span style="color: #66cc66;">=</span> html.<span style="color: black;">document_fromstring</span><span style="color: black;">&#40;</span>response.<span style="color: black;">content</span><span style="color: black;">&#41;</span><br />
links <span style="color: #66cc66;">=</span> document.<span style="color: black;">cssselect</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;.detLink&quot;</span><span style="color: black;">&#41;</span><br />
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: black;">&#91;</span>link.<span style="color: black;">text_content</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> link <span style="color: #ff7700;font-weight:bold;">in</span> links<span style="color: black;">&#93;</span></div></div>
<p>Note: You need <a href="http://lxml.de/">lxml</a> and <a href="http://docs.python-requests.org">requests</a> to run the above example.</p>
<p>Saving the above snippet to a py-file and running it will give you a list of all torrents on the given url. Play around with the CSS selector to get some other data from the page.</p>
<h2>Extracting movie titles from torrent names</h2>
<p>It&#8217;s surprisingly easy to convert torrent names to movie titles. Just follow this simple algorithm:</p>
<ol>
<li>Split the torrent name into words by treating all non-alphanumeric characters as space.</li>
<li>Loop over the remaining words, and look for a predefined set of &#8220;torrent endings&#8221;. </li>
<li>When you find an ending, cut the name from there</li>
<li>(Optional) Remove the year if there is one at the end of the remaining string</li>
<li>(Optional) Remove all movies which really are bundles of movies, and not single movies. This is easily done by looking for a set of common strongs such as &#8220;trilogy&#8221; and &#8220;series&#8221;</li>
</ol>
<p>Result: &#8220;Real.Steel.2011.720p.BluRay.x264-REFiNED&#8221; &#8211;&gt; &#8220;Real Steel&#8221;</p>
<p>You can find my <a href="https://github.com/EmilStenstrom/filmtipset-piratebay/blob/master/parse.py#L91">movie title finder implementation in parse.py on GitHub</a>.</p>
<h2>Cache all HTTP Request</h2>
<p>To both save time, and be nice to the services we&#8217;re querying, the script caches all HTTP requests for a number of days. I do this by simply saving the returned HTML/JSON to a file, and checking the file system for that file before making a new request. Saving the HTML/JSON, and not the processed result, makes it possible to experiment with the parsing, without having to wait for new requests from the server.</p>
<p>My <a href="https://github.com/EmilStenstrom/filmtipset-piratebay/blob/master/parse.py#L16">caching implementation is of course also on GitHub</a>.</p>
<p>***</p>
<p>All and all, this has been a fun little project, and I&#8217;ve learned a lot. But I&#8217;m sure we can make this even better. Feel free to send pull requests!</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=PQrTQJbwlBM:wr-_mFxzl_Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=PQrTQJbwlBM:wr-_mFxzl_Y:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=PQrTQJbwlBM:wr-_mFxzl_Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=PQrTQJbwlBM:wr-_mFxzl_Y:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=PQrTQJbwlBM:wr-_mFxzl_Y:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/python/what-movies-on-piratebay-will-you-like-the-most/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Partial XMLHttpRequest responses?</title>
		<link>http://friendlybit.com/js/partial-xmlhttprequest-responses/</link>
		<comments>http://friendlybit.com/js/partial-xmlhttprequest-responses/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 14:28:49 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[JS]]></category>
		<category><![CDATA[Modern web]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=839</guid>
		<description><![CDATA[We all know how to make an AJAX request, and fetch some data. But as soon as you need to fetch data incrementally, have the server push data to you, you have to resort to all sorts of complicated stuff. Websockets; with all their different versions and shady support, different kinds of polling, hidden iframes, [...]]]></description>
				<content:encoded><![CDATA[<p>We all know how to make an AJAX request, and fetch some data. But as soon as you need to fetch data incrementally, have the server push data to you, you have to resort to all sorts of complicated stuff. Websockets; with all their different versions and shady support, different kinds of polling, hidden iframes, ActiveX for IE? </p>
<p>The simplest way, that almost workds is partial XMLHttpRequest responses. I first read about them as <a href="http://www.kylescholz.com/blog/2010/01/progressive_xmlhttprequest_1.html">progressive xmlhttprequests on Kyle Schulz blog</a>, but really think that method should get more recognition.</p>
<p>Note: I&#8217;ve only tested this with Webkit, against Twitter&#8217;s Streaming API, with a XMLHttpRequest that allows cross-domain requests. I think it works with Firefox too, but it will definitely not work in IE. Sorry.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> xhr <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;streaming-url-on-you-own-domain-or-CORS&gt;&quot;</span><span style="color: #339933;">;</span><br />
xhr.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">,</span> url<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
xhr.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Define a method to parse the partial response chunk by chunk</span><br />
<span style="color: #003366; font-weight: bold;">var</span> last_index <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> parse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> curr_index <span style="color: #339933;">=</span> xhr.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>last_index <span style="color: #339933;">==</span> curr_index<span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// No new data</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> xhr.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span>last_index<span style="color: #339933;">,</span> curr_index<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; last_index <span style="color: #339933;">=</span> curr_index<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Check for new content every 5 seconds</span><br />
<span style="color: #003366; font-weight: bold;">var</span> interval <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span>parse<span style="color: #339933;">,</span> <span style="color: #CC0000;">5000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Abort after 25 seconds</span><br />
setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; clearInterval<span style="color: #009900;">&#40;</span>interval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; parse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; xhr.<span style="color: #660066;">abort</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>The biggest problem with this method is that the responseText property keeps filling up with data. The longer you receive data, the bigger the data in memory will be. The only way I can see this fixed (today) is to simply kill the connection after a certain amount of data has been received, and open it up again.</p>
<p><strong>I would love to see a better way to do this</strong>, from native javascript, without all the numerous hacks that are out there. If you know of a way that fills these requirements, please let me know:</p>
<ol>
<li>Easy to implement on the <strong>client side</strong>. Ideally I would like to use XMLHttpRequest, and just get a callback each time the client sends data, with the NEW data specified as a callback parameter.</li>
<li>Easy to implement on the <strong>server-side</strong>. I can set some headers if you make me, but ideally I would like to use this against existing Streaming APIs (like <a href="https://dev.twitter.com/docs/streaming-api">Twitter&#8217;s</a>), without adding custom stuff.</li>
<li>As cross-browser, cross-platform as possible.</li>
</ol>
<p>Is there a way to get this working? It&#8217;s so annoying to see something that&#8217;s a curl one-liner, be 100s of lines of code with web technologies&#8230;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">curl https://stream.twitter.com/1/statuses/filter.json?track=&lt;your-keyword&gt; -u &lt;your-twitter-nick&gt;</div></div>
<p><strong>Is the web really that far behind?</strong></p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=JcL66xzlKqQ:NJvVZpVE-Nw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=JcL66xzlKqQ:NJvVZpVE-Nw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=JcL66xzlKqQ:NJvVZpVE-Nw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=JcL66xzlKqQ:NJvVZpVE-Nw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=JcL66xzlKqQ:NJvVZpVE-Nw:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/js/partial-xmlhttprequest-responses/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Suggestions for TweetDeck</title>
		<link>http://friendlybit.com/ui/suggestions-for-tweetdeck/</link>
		<comments>http://friendlybit.com/ui/suggestions-for-tweetdeck/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 10:35:04 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=821</guid>
		<description><![CDATA[To be an effective twitter user you really need a permanent window on your desktop, that shows you what&#8217;s happening right now. I&#8217;ve been using TweetDeck for a long time now, with short detours into Seesmic and various smaller clients. TweetDeck is the best client I&#8217;ve found for my needs, but its interface has lots [...]]]></description>
				<content:encoded><![CDATA[<p>To be an effective twitter user you really need a permanent window on your desktop, that shows you what&#8217;s happening right now. I&#8217;ve been using <a class="zem_slink" title="TweetDeck" href="http://www.tweetdeck.com" rel="homepage">TweetDeck</a> for a long time now, with short detours into <a class="zem_slink" title="seesmic" href="http://seesmic.com" rel="homepage">Seesmic</a> and various smaller clients. TweetDeck is the best client I&#8217;ve found for my needs, but its interface has lots of little bugs and inconsistencies; small things that together add up to a bad user experience.</p>
<p>I hope someone from TweetDeck reads this, and can start working on these (simple) issues. I really think they would improve the general user experience a lot.</p>
<ol>
<li><strong>Compose pane should close after a tweet as been sent</strong>. I&#8217;ve looked over the shoulder of lots of people using TweetDeck, and the most common pattern is to click the reply button on someone&#8217;s avatar to write a new message. If writing multiple messages directly after eachother was more common than writing them one by one, then it should stay open, but that&#8217;s not the case.</li>
<li><strong>Tweets should be as compact height-wise as they can be</strong>. All tweets in TweetDeck are displayed as if they where full 140 chars. This means that valuable screen space is lost, something TweetDeck pushes one of its advantages over the official Twitter client or the web. &#8220;More Tweets per screen!&#8221;. What&#8217;s worse, having tweets aligned horizontally over several columns makes it look like there&#8217;s some connection between then. Why do they align my third timeline tweet with my third mention? No idea.</li>
<li><strong>All retweets should be shown, not only the last one</strong>. Retweets are a very important part of Twitter. By seeing who retweets you, you learn who your active followers are, and maybe even find people that are interesting for you to follow. But TweetDeck does not follow the lead of the official client that shows &#8220;Retweeted by [user] and 3 others&#8221;, instead they show just the last one.</li>
<li><strong>The buttons at the bottom of each column should be hidden</strong>. The bottom buttons of each column are for things that people rarely use, but they still are allowed to permanently take of screen estate. Instead they should be hidden behind one button, and put at the top of the window with the column title. This would leave even more space for tweets to be shown.</li>
<li><strong>The &#8220;Quick jump to column&#8221; buttons at the bottom of the window should be removed</strong>. Having clickable icons that set the scroll offset is a very strange interface concept. I understand the need to jump between columns when you have 10-15 columns, but most people don&#8217;t have that. Letting an interface element that is used seldom by most people take up that much space is just a waste. It users with that many columns is an important part of the target audience, use tabbed workspaces instead. Each workspace could show up as a tab at the top of the window, and each workspace could have its own set of columns. Until that&#8217;s done, remove the clunky icons at the bottom and free more space for tweets.</li>
</ol>
<p>Here&#8217;s a quick sketch of how TweetDeck looks *<strong>before</strong>* any changes:</p>
<p><a href="http://friendlybit.com/wp-content/uploads/2011/07/tweetdeck_original.png"><img class="alignnone size-full wp-image-824" title="tweetdeck_original" src="http://friendlybit.com/wp-content/uploads/2011/07/tweetdeck_original.png" alt="" width="730" height="612" /></a></p>
<p>&#8230; and here&#8217;s the same view <strong>*after*</strong> the five interface improvements have been implemented:</p>
<p><a href="http://friendlybit.com/wp-content/uploads/2011/07/tweetdeck_redesign1.png"><img class="alignnone size-full wp-image-826" title="tweetdeck_redesign" src="http://friendlybit.com/wp-content/uploads/2011/07/tweetdeck_redesign1.png" alt="" width="730" height="612" /></a></p>
<p>These are changes I really would like to see in TweetDeck, what do you think?</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=JgbNAen29Hs:KaAS1YwfeaA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=JgbNAen29Hs:KaAS1YwfeaA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=JgbNAen29Hs:KaAS1YwfeaA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=JgbNAen29Hs:KaAS1YwfeaA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=JgbNAen29Hs:KaAS1YwfeaA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/ui/suggestions-for-tweetdeck/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Fixing Microsoft’s bad reputation</title>
		<link>http://friendlybit.com/strategy/fixing-microsofts-bad-reputation/</link>
		<comments>http://friendlybit.com/strategy/fixing-microsofts-bad-reputation/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 12:07:32 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Strategy]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=492</guid>
		<description><![CDATA[Microsoft has continuously failed at getting people in the tech crowd to like them. This is a growing problem for them, and something they need to start taking seriously. To understand how to turn this around, let&#8217;s start a decade ago, with Slashdot. Slashdot has always been one of the pillars of Microsoft-negative news. They [...]]]></description>
				<content:encoded><![CDATA[<div class="zemanta-img">
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/88442983@N00/2228633614"><img title="Blue Screen of Death" src="http://friendlybit.com/wp-content/uploads/2011/06/2228633614_e26ea98fbe_m.jpg" alt="Blue Screen of Death" width="240" height="187" /></a><p class="wp-caption-text">Image by taberandrew via Flickr</p></div>
</div>
<p>Microsoft has continuously failed at getting people in the tech crowd to like them. This is a growing problem for them, and something they need to start taking seriously. To understand how to turn this around, let&#8217;s start a decade ago, with Slashdot.</p>
<p><strong><a href="http://slashdot.org/">Slashdot</a></strong> has always been one of the pillars of Microsoft-negative news. They have a whole <a href="http://slashdot.org/index2.pl?fhfilter=microsoft">category on Microsoft</a> (And the others have lots of articles too: <a href="http://digg.com/search?q=microsoft">&#8220;Microsoft&#8221; articles on Digg</a>, <a href="http://www.reddit.com/search?q=microsoft">&#8220;Microsoft&#8221; articles on Reddit</a>, <a href="http://www.hnsearch.com/search#request/submissions&amp;q=microsoft&amp;start=0">&#8220;Microsoft&#8221; articles on Hacker News</a>). With a few exceptions, articles (and comments) are about Microsoft using their monopoly to crush smaller businesses, how their technology is inferior to what the open source world creates, on them creating data lock-in where users are unable to switch away from them, and so on. Slashdot, Digg, Reddit, Hacker News together have millions of daily users, who place as much faith in them as others do in their morning newspaper.</p>
<p>But these sites are only read by disgruntled teens right? No. <a href="http://www.vonsharp.net/HNSurveyCharts.aspx">Hacker news users are ~26</a>, <a href="http://www.reddit.com/r/reddit.com/comments/7oaxh/experiment_how_old_is_the_average_redditor_vote/?sort=top">Reddit users are ~24</a>, <a href="http://www.ignitesocialmedia.com/social-media-stats/2011-social-network-analysis-report/#Digg">Digg users are 35-44</a>&#8230; When asked: &#8220;What computer do you want?&#8221; These users answer: &#8220;<strong>A Mac (or Linux) laptop</strong>&#8220;. When asked: &#8220;What software? They answer: &#8220;<strong>Google Docs (or LibreOffice/OpenOffice)</strong>&#8220;. All those individual choices are starting to pile up, and have far-reaching consequences for Microsoft: Windows and Office licenses are the <a href="http://www.businessinsider.com/chart-of-the-day-microsoft-operating-income-by-division-2010-2">major part of Microsoft&#8217;s income</a>. Choosing a Mac or Linux laptop means no Microsoft Windows, choosing Google Docs or LibreOffice/OpenOffice means no Microsoft Office.</p>
<p><strong>Tech users are a major force</strong> inside real companies, and not something Microsoft can just ignore. What about beginners and business users? They are both heavily influenced by by tech users. Beginners because they ask others for advise before buying their computers and software. Business users are instead controlled by their IT departments, which in turn try to find the most knowledgeable tech people to work for them. The small hold Microsoft still have on some IT departments is slowly shifted away from them when employees get empowered to choose their own equipment, moving them from business users to beginners in their purchase patterns. The tech crowd has more influence than you&#8217;d think.</p>
<p>Question is: <strong>where do you start</strong> fixing all this distrust? There&#8217;s only one way: you start talking to tech users on their own terms. Here&#8217;s how I would do it:</p>
<ol>
<li>Hire some good of <strong>community managers</strong>. Their job      will not be to market Microsoft, but to be the communication channel that      can aggregate community opinions to Microsoft. The more rooted they      already are in their respective communities the better; that makes it      easier to start get the discussion started at a respectful level. You      don&#8217;t yell &#8220;Microsoft sucks!&#8221; at someone you respect.</li>
<li>Start by <strong>monitoring news</strong> about Microsoft and      send monthly reports to managers inside Microsoft. Couple each news item      with an approximate number of users that read them. This will paint an      image of how tech users see the Microsoft brand. Pretty soon they will      want to change that image.</li>
<li>Use community managers to ask for <strong>opinions on what      to do next</strong>. Ask for small things that are likely easy to get done, and      make sure to manage expectations right away. Windows 8 won&#8217;t be open      sourced :)</li>
<li>Have a <strong>small engineering team</strong> whose sole purpose      is to make the suggestions from the tech crowd happen. They need to be      cross-disciplinary, be well connected across the company, and have mandate      from high up the organization. Employing this team is a small cost      compared to other forms of marketing. Feed back any progress they make      back as articles where they fit.</li>
<li>Lastly: Use insights from community managers to create <strong>marketing      campaigns directly aimed at the tech crowd</strong>. A good community manager      can have a pretty good guess at what work and what will. Many of the      things will not only be marketing, but also require engineering, but there      already is a team for that.</li>
</ol>
<p>Working through that list will make Microsoft slowly earn their trust back from the tech crowd. It won&#8217;t happen overnight; you don’t reverse 10 years of silence that fast. But I think this is doable, reasonable, and something that really could work.</p>
<p>Would you be willing to be a community manager for Microsoft? What would you suggestion Microsoft did to please the tech crowd? I&#8217;d love to hear your opinions.</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=w2vt6EhuTpU:nG91IEhmzCg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=w2vt6EhuTpU:nG91IEhmzCg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=w2vt6EhuTpU:nG91IEhmzCg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=w2vt6EhuTpU:nG91IEhmzCg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=w2vt6EhuTpU:nG91IEhmzCg:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/strategy/fixing-microsofts-bad-reputation/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Geolocation and Google maps</title>
		<link>http://friendlybit.com/js/geolocation-and-google-maps/</link>
		<comments>http://friendlybit.com/js/geolocation-and-google-maps/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 12:11:11 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[JS]]></category>
		<category><![CDATA[Modern web]]></category>
		<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=591</guid>
		<description><![CDATA[Google Maps has has geolocation support for a long time, but I still find people surprised of how it all works. So here&#8217;s a short writeup, skip it if you already know all about geolocation. Lets start at the Google Maps frontpage. Among the zoom controls, above the little old man, there&#8217;s a button in [...]]]></description>
				<content:encoded><![CDATA[<div class="zemanta-img">
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/57552634@N00/3791431635"><img title="Google Maps Marker in Tokyo" src="http://friendlybit.com/wp-content/uploads/2011/06/3791431635_c722c1d51a_m.jpg" alt="Google Maps Marker in Tokyo" width="240" height="120" /></a><p class="wp-caption-text">Image by heiwa4126 via Flickr</p></div>
</div>
<p>Google Maps has has geolocation support for a long time, but I still find people surprised of how it all works. So here&#8217;s a short writeup, skip it if you already know all about geolocation.</p>
<p><strong>Lets start </strong>at the <a title="Google Maps" rel="homepage" href="http://maps.google.com/">Google Maps</a> frontpage. Among the zoom controls, above the little old man, there&#8217;s a button in the form of a small circle. It does not look like much, but what it&#8217;s doing is incredibly cool. Click it and the map moves to where you are, with an accuracy of ~20 meters. Sci-fi crazy!</p>
<p><strong>How does it work? </strong>In the newer browsers (all but IE6, IE7, or IE8) may ask you for your positioning information from the browser. It usually shows up as a bar at the top of the browser. The browser then gathers two specific forms of positioning information from your computer: your <strong>IP address</strong> and the <strong>signal strength of any wireless network</strong> near you. That information is then sent, if you approve it, to Google, which returns the coordinates you are at the moment.</p>
<p>Google can do this because they&#8217;ve been driving around with their street view cars all over the world, and measured signal strength of WiFi networks (public and private) at each specific location. Now they can use that information, combined with your local signal strength conditions, to triangulate their way to where you are. And it&#8217;s both accurate and fast.</p>
<p>If your wireless reciever is turned off, or you&#8217;re at a stationary computer, all calculations are based on the IP number. These kind of lookups are quite arbitrary and inaccurate, I just get to the nearest big city when trying to use it over a non-wireless line. But mobile connections are slowly taking over landlines, so I guess this problem will solve itself automatically.</p>
<p>The best kind of technology throws you forward in time, and make your realize that we&#8217;re actually making progress. Geolocation has feel to it.</p>
<p>Looking for the techy explaination of geolocation? Have a look at <a href="http://robertnyman.com/2010/03/15/geolocation-in-web-browsers-to-find-location-google-maps-examples/">Robert Nyman&#8217;s writeup</a>.</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=RfNR2TTGF6A:JpT6EeVg96w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=RfNR2TTGF6A:JpT6EeVg96w:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=RfNR2TTGF6A:JpT6EeVg96w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=RfNR2TTGF6A:JpT6EeVg96w:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=RfNR2TTGF6A:JpT6EeVg96w:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/js/geolocation-and-google-maps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Animate from one element to another (jQuery plugin)</title>
		<link>http://friendlybit.com/js/animate-from-one-element-to-another-jquery-plugin/</link>
		<comments>http://friendlybit.com/js/animate-from-one-element-to-another-jquery-plugin/#comments</comments>
		<pubDate>Thu, 05 May 2011 20:52:14 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[JS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=700</guid>
		<description><![CDATA[Have you even tried clicking an &#8220;Add to cart&#8221;-button and not understood what happened? I have. An although I understand the idea of adding a product to the cart, and then letting the user continue browsing from where he is, I still get stumped when &#8220;nothing happens&#8221; when I click the button. So what to [...]]]></description>
				<content:encoded><![CDATA[<div class="zemanta-img">
<div class="wp-caption alignright" style="width: 225px"><a href="http://commons.wikipedia.org/wiki/File:Stencil_shopping_cart.jpg"><img title="Stencil of a shopping cart with the head of th..." src="http://friendlybit.com/wp-content/uploads/2011/06/300px-Stencil_shopping_cart31.jpg" alt="Stencil of a shopping cart with the head of th..." width="215" height="162" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
</div>
<p>Have you even tried clicking an &#8220;Add to cart&#8221;-button and not understood what happened? I have. An although I understand the idea of adding a product to the cart, and then letting the user continue browsing from where he is, I still get stumped when &#8220;nothing happens&#8221; when I click the button. So what to do?</p>
<p>Simple: Add a <strong>animation from the add button to the cart</strong>. That way you communicate what just happened. &#8220;The product moved in there, and by clicking the cart you&#8217;ll find it again. Now continue buying stuff!&#8221;.</p>
<p>Somebody must have done this before, so I started looking for a <a class="zem_slink" title="JQuery" rel="homepage" href="http://jquery.com/">jQuery</a> plugin to do this (jQuery was already on the page, so why not?). I found <a href="http://i1t2b3.com/2009/01/29/add2cart/">add2cart</a> &#8211; A plugin that looks good, but that misses a few features I wanted:</p>
<ul>
<li>The <strong>animation duration</strong> is set in seconds, meaning products further down the page will move faster than those further up. I wanted constant speed.</li>
<li>It didn&#8217;t allow me to <strong>customize the look</strong> of the animated element.</li>
<li>The code rely on concatenating strings of CSS and generally could use <strong>lots of improvement</strong>.</li>
</ul>
<p>So I did what anyone would do: rewrote the code from scratch, and posted it on GitHub.</p>
<p><strong>Get the code: <a href="https://github.com/EmilStenstrom/jQuery-animate_from_to">Animate From To 1.0</a></strong></p>
<p>It&#8217;s my first jQuery plugin ever, and my first public GitHub project, so let me know if I&#8217;ve done something wrong. Is this something that could be useful in one of your projects?</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=N5dxjb9KfuY:RtebhPsEla4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=N5dxjb9KfuY:RtebhPsEla4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=N5dxjb9KfuY:RtebhPsEla4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=N5dxjb9KfuY:RtebhPsEla4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=N5dxjb9KfuY:RtebhPsEla4:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/js/animate-from-one-element-to-another-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Will newspapers die?</title>
		<link>http://friendlybit.com/modern-web/will-newspapers-die/</link>
		<comments>http://friendlybit.com/modern-web/will-newspapers-die/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 23:41:17 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Modern web]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=668</guid>
		<description><![CDATA[A journalism student in Toronto, Canada, asked me some questions via e-mail about my old article about newspapers and online reading. Instead of just sending an e-mail out in the void I thought I&#8217;d persist my answers here: 1. Do you think it would be best for newspaper publications to get rid of their print [...]]]></description>
				<content:encoded><![CDATA[<p>A journalism student in Toronto, Canada, asked me some questions via e-mail about my old article about <a href="/modern-web/why-people-skip-newspapers-and-read-news-on-the-web-instead/">newspapers and online reading</a>. Instead of just sending an e-mail out in the void I thought I&#8217;d persist my answers here:</p>
<blockquote><p>1. Do you think it would be best for newspaper publications to get rid of their print and go strictly online only? Why or why not?</p></blockquote>
<p>I think they should keep their print papers for a while longer. It&#8217;s a simple question of profit and catering to what users want. If you have thousands of users that want their paper, and it&#8217;s economically justifiable, just keep it.</p>
<p>The tricky part is determining how much loss in paper subscribers you should tolerate before shutting down the huge printing presses. I have no good answer to that other than to know your numbers. Paper profit needs to cover paper printing and distribution. Journalism costs can be split between channels. Do the math.</p>
<blockquote><p>2. Many people believe newspapers are dying and eventually will no longer exist. What are your thoughts on this?</p></blockquote>
<p>I think they will persist, just not their paper versions. Many of them are looking at dwindling subscription numbers, year after year, and are trying to figure out what to do. How do you move to the digital worlds while keeping quality, relevance, and profit.</p>
<p>The iPad is one way to get people to pay for news again, and some newspapers are seeing success doing that. Over a longer haul just the iPad won&#8217;t be enough, you need to be able to deliver your news to wherever your customers want them. Generally, this means being able to get your content on all kinds of devices, both mobile and desktop. The only format that can really do that, and still deliver a somewhat consistent design across devices, is HTML and CSS. Building one native app for each platform is just not worth it.</p>
<p>So it&#8217;s simple really: newspapers that figure out how to transition to digital (while still getting paid enough to afford quality journalism) will persist, all others will (slowly) die. This means an end to both paper-only newspapers, and those that fail to find the right payment model.</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=X25RqX8_iXc:IyRigZYMLEI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=X25RqX8_iXc:IyRigZYMLEI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=X25RqX8_iXc:IyRigZYMLEI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=X25RqX8_iXc:IyRigZYMLEI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=X25RqX8_iXc:IyRigZYMLEI:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/modern-web/will-newspapers-die/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>HTML5 is not an option</title>
		<link>http://friendlybit.com/html/html5-is-not-an-option/</link>
		<comments>http://friendlybit.com/html/html5-is-not-an-option/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 19:20:42 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=648</guid>
		<description><![CDATA[HTML5 is HOT! Developers all over the world are adapting their sites, browsers are catching up, and new fallback solutions are released every day. But many developers misunderstand one thing: You can&#8217;t choose to use HTML5 or not, your site will be parsed as HTML5 no matter what. The reason is simple, HTML5 is made [...]]]></description>
				<content:encoded><![CDATA[<p>HTML5 is HOT! Developers all over the world are adapting their sites, browsers are catching up, and new fallback solutions are released every day. But many developers misunderstand one thing:</p>
<blockquote><p><strong>You can&#8217;t choose to use HTML5 or not, your site will be parsed as HTML5 no matter what.</strong></p></blockquote>
<p><img class="alignnone size-full wp-image-656" style="max-width: 100%;" title="no-choice" src="http://friendlybit.com/wp-content/uploads/2011/03/no-choice-e1288811809935.jpg" alt="Voting is pointless. I am your leader now. It is useless to resist me." /></p>
<p>The reason is simple, HTML5 is made to be backwards compatible with the current web, so browsers don&#8217;t need to keep their current parsers. All of them have soon switched to HTML5 parsers. You want to continue using HTML4? Not possible.</p>
<p>Now. You <strong>can </strong>choose whether you want to use the new features or not: New semantic tags, Microdata attributes, new form field types, accessibility features, 10-15 new JavaScript API:s (depending on how you count). Lots of new interesting stuff to learn.</p>
<p>So, go read up on HTML5 if you haven&#8217;t already, but don&#8217;t think you can keep using HTML4. Your site is being switched over as we speak.</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=HlcQeReomzo:r1urJ443vE4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=HlcQeReomzo:r1urJ443vE4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=HlcQeReomzo:r1urJ443vE4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=HlcQeReomzo:r1urJ443vE4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=HlcQeReomzo:r1urJ443vE4:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/html/html5-is-not-an-option/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Lazy Loading Asyncronous Javascript</title>
		<link>http://friendlybit.com/js/lazy-loading-asyncronous-javascript/</link>
		<comments>http://friendlybit.com/js/lazy-loading-asyncronous-javascript/#comments</comments>
		<pubDate>Fri, 07 May 2010 22:15:06 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=613</guid>
		<description><![CDATA[Like many of you might know, I&#8217;m working on a site called Kundo with a couple of friends. It&#8217;s kinda like a Swedish version of Getsatisfaction, which means we have a javascript snippet that people add to their site to get feedback functionality. Cut-and-paste instead of writing the code yourself. Simple. The problem is, how [...]]]></description>
				<content:encoded><![CDATA[<p>Like many of you might know, I&#8217;m working on a site called <a href="http://kundo.se">Kundo</a> with a couple of friends. It&#8217;s kinda like a Swedish version of <a href="http://getsatisfaction.com/">Getsatisfaction</a>, which means we have a javascript snippet that people add to their site to get feedback functionality. Cut-and-paste instead of writing the code yourself. Simple.</p>
<p>The problem is, how do you load an external javascript with minimal impact on your customer&#8217;s sites? Here are my requirements:</p>
<ol>
<li><strong>Small</strong>. I don&#8217;t want a big mess for them to include on their sites. 10-15 lines, tops.</li>
<li><strong>Stand-alone</strong>. The environment is unknown, so we can&#8217;t rely on any external dependencies, like javascript libraries.</li>
<li><strong>Cross-browser</strong>. I have no idea what browsers my customer&#8217;s customers have, so I can&#8217;t do anything modern or fancy that isn&#8217;t backwards compatible. I assume at least IE6 and up though.</li>
<li><strong>Asynchronous download</strong>. The download of my script should not block the download of any script on their sites.</li>
<li><strong>Lazy Loading</strong>. If my site is temporarily slow, I don&#8217;t want to block the onload event from triggering until after our site responds.</li>
<li><strong>Preserve events</strong>. Any events used should not override any events on the customer&#8217;s site. Minimal impact, like I said.</li>
<li><strong>Don&#8217;t pollute namespace</strong>. Global variables should be avoided, since they could conflict with existing javascript.</li>
</ol>
<p>Note: I did not make all of this up myself. Lots of people did, I&#8217;m just writing it down for you. Thanks: <a href="http://lillbra.se">Jonatan</a>, <a href="http://stevenbenner.com/">Steven</a>, <a href="http://fleecelabs.se/">Peter</a>, and <a href="http://hanssonlarsson.se/">Linus</a>.</p>
<h2>Script tag</h2>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://yourdomain.com/script.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<p>While being the stand-alone, cross-browser, and the shortest piece of code possible; it doesn&#8217;t download asynchronously and doesn&#8217;t lazy load. <strong>Fail</strong>.</p>
<div style="overflow: auto;"><img class="alignnone size-full wp-image-619" title="Firebug screenshoot with script tag" src="http://friendlybit.com/wp-content/uploads/2011/06/script11.png" alt="" width="725" height="70" /></div>
<p><em><strong>Screenshot from Firebug&#8217;s net console: </strong>The script (set to load in 2 seconds) blocks the download of the big image (added after the above script tag, and used throughout this article as a test). Onload event (the red line) triggers after 2.46 seconds.</em></p>
<h2>Async pattern (A script tag written with javascript)</h2>
<p><a href="http://stevesouders.com">Steve Souders</a>, the web performance guru, has compiled a decision tree over <a href="http://stevesouders.com/efws/images/0405-load-scripts-decision-tree-04.gif">different ways to achieve non-blocking downloads</a>. Have a look at that graph.</p>
<p>Since we&#8217;re on a different domain, and only have one script (order doesn&#8217;t matter), the solution is given: We should create a script tag with inline javascript, and append it to the document. Voila! Non-blocking download!</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; s.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; s.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; s.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://yourdomain.com/script.js'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; x.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p><strong>Note</strong>: <code class="codecolorer javascript default"><span class="javascript">async</span></code> is a <a href="http://www.whatwg.org/specs/web-apps/current-work/#attr-script-async">HTML5 attribute</a>, doing exactly what we&#8217;re trying to simulate with our hack, so it&#8217;s added for good measure. Also, wrapping the code in an anonymous function prevents any variables to leak out to the rest of the document.</p>
<p>This is a pattern that is getting more and more popular nowadays, especially since <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html">Google Analytics uses it</a>. But there&#8217;s an important distinction here: The above snipped <strong>blocks onload from triggering</strong> until the referenced script is fully loaded. <strong>Fail</strong>.</p>
<p><strong>Update 2010-09-01</strong>: <a href="#comment-34047">Steve Souders</a> adds that the above is only true for Firefox, Chrome, and Safari, but not IE and Opera. So for a IE-only site, this might be the best method.</p>
<div style="overflow: auto;"><img class="alignnone size-full wp-image-617" title="Firefox screenshoot with the async pattern" src="http://friendlybit.com/wp-content/uploads/2011/06/asyncload11.png" alt="" width="726" height="69" /></div>
<p><em><strong>Screenshot from Firebug&#8217;s net console: </strong>The script (set to load  in 2 seconds) downloads in parallell with the big image. Onload event (the red line) triggers after 2.02 seconds.</em></p>
<h2>Lazy load pattern (Async pattern triggered onload)</h2>
<p>So, how to you make sure you don&#8217;t block onload? Well, you wrap your code inside a function that&#8217;s called on load. When the onload event triggers, you know you haven&#8217;t blocked it.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; s.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; s.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; s.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://yourdomain.com/script.js'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; x.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>This works, but it overrides the onload event of the site that uses the script. This could be OK in some cases, where you have control over the site referencing the script, but I need to cater for that. <strong>Fail</strong>.</p>
<h2>Unobtrusive lazy load pattern</h2>
<p>The logical solution to the above problem is to use an incarnation of addEvent. addEvent is simply a common name for an cross browser way to take the current function tied to onload, add it to a queue, add your function to the queue, and tie the queue to the onload event. So which version of addEvent should we use?</p>
<p>There&#8217;s been competitions for writing a <a href="http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html">short and compact version of addEvent</a>, and the winner of that competition was John Resig, with this little beauty:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> addEvent<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span> type<span style="color: #339933;">,</span> fn<span style="color: #009900;">&#41;</span> &nbsp;<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">attachEvent</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; obj<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'e'</span><span style="color: #339933;">+</span>type<span style="color: #339933;">+</span>fn<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> fn<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; obj<span style="color: #009900;">&#91;</span>type<span style="color: #339933;">+</span>fn<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>obj<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'e'</span><span style="color: #339933;">+</span>type<span style="color: #339933;">+</span>fn<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">event</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; obj.<span style="color: #660066;">attachEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'on'</span><span style="color: #339933;">+</span>type<span style="color: #339933;">,</span> obj<span style="color: #009900;">&#91;</span>type<span style="color: #339933;">+</span>fn<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span><br />
&nbsp; &nbsp; obj.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span>type<span style="color: #339933;">,</span> fn<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Note</strong>: This is unsafe code, since it relies on serializing a function to a string, something that <a href="http://my.opera.com/hallvors/blog/2007/03/28/a-problem-with-john-resigs-addevent">Opera mobile browsers have disabled</a>.</p>
<p>Thing is, we don&#8217;t need all that generic event stuff, we&#8217;re only dealing with onload here. So if we first replace the type attribute with hardcoded &#8216;load&#8217;, replace obj with &#8216;window&#8217;, and remove the fix for making &#8216;this&#8217; work in IE, we&#8217;ve got four lines of code left. Let&#8217;s combine this with the above lazy load pattern:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span> async_load<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://yourdomain.com/script.js'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; x.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">attachEvent</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">attachEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'onload'</span><span style="color: #339933;">,</span> async_load<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'load'</span><span style="color: #339933;">,</span> async_load<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>This is exactly what we&#8217;re looking for here. <strong>Finally!</strong></p>
<div style="overflow: auto;"><img class="alignnone size-full wp-image-618" title="Firebug screenshoot with the lazy load pattern" src="http://friendlybit.com/wp-content/uploads/2011/06/lazyload11.png" alt="" width="726" height="71" /></div>
<p><em><strong>Screenshot from Firebug&#8217;s net console: </strong>The script  (set to load  in 2 seconds) downloads after the onload event has triggered. Onload event (the red line) triggers after 0.41 seconds.</em></p>
<p>And that wraps up this article: Different tactics works for different scenarios, and only understanding them all makes you capable of picking the right one for your problem. As always, I&#8217;m waiting for your feedback in the comments. Thanks for reading!</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=3ef-cj8mdaE:PR6d_78n-TM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=3ef-cj8mdaE:PR6d_78n-TM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=3ef-cj8mdaE:PR6d_78n-TM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=3ef-cj8mdaE:PR6d_78n-TM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=3ef-cj8mdaE:PR6d_78n-TM:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/js/lazy-loading-asyncronous-javascript/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>My iPad – a short review</title>
		<link>http://friendlybit.com/modern-web/my-ipad-a-short-review/</link>
		<comments>http://friendlybit.com/modern-web/my-ipad-a-short-review/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 18:33:32 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Devices]]></category>
		<category><![CDATA[Modern web]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=594</guid>
		<description><![CDATA[About two weeks ago, I got my hands on an iPad. For those of you who have been living under a rock for the last months, and iPad is something that looks like a big iPhone, but behaves much like a small laptop. Since people who just spent over $500 for a toy, are very [...]]]></description>
				<content:encoded><![CDATA[<p>About two weeks ago, I got my hands on an iPad. For those of you who have been living under a rock for the last months, and <a href="http://www.apple.com/ipad/">iPad</a> is something that looks like a big iPhone, but behaves much like a small laptop.</p>
<p>Since people who just spent over $500 for a toy, are very subjective in their judging (buying something bad would make you look stupid!), you have to take this review for what it is: Me trying to justify buying an expensive toy. To help my mind balance things a bit, I&#8217;m going to talk about two good things, and two bad things about the iPad.</p>
<ul>
<li><a href="#ipad_ui"><strong>Good</strong>: Looks, UI and surfing the web</a></li>
<li><a href="#ipad_developer"><strong>Bad</strong>: A horrible Developer Platform</a></li>
<li><a href="#ipad_games"><strong>Good</strong>: Games that use the touch interface</a></li>
<li><a href="#ipad_itunes"><strong>Bad</strong>: Downloading apps through iTunes</a></li>
<li><strong><a href="#ipad_summary">Summary</a></strong></li>
</ul>
<h2 id="ipad_ui">Good: Looks, UI and surfing the web</h2>
<div id="attachment_597" class="wp-caption alignleft" style="width: 310px"><a href="http://friendlybit.com/wp-content/uploads/2010/04/ipad_and_banana.jpg"><img class="size-medium wp-image-597 " title="iPad and Banana" src="http://friendlybit.com/wp-content/uploads/2010/04/ipad_and_banana-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">An iPad, here shown next to a old banana for comparison. Click for bigger image.</p></div>
<p>The area where the iPad really shines is when it comes to the look and feel. It&#8217;s simply gorgeous, feels good in your hand, and makes all your friends instantly drool (like you expect them to). The screen is as sharp (or sharper) than a computer monitor, and its brightness could light up a dark room.</p>
<p>Working with it is just as pleasant. You click, swipe, pinch and type, like you&#8217;ve done nothing nothing else in your life. As someone who haven&#8217;t used an iPhone before, I&#8217;m impressed. Those that have, say that the iPad is even snappier than the iPhone. Some application are of course better fit for a touch interface than others. Google Maps is one of them, when a large display combined with panning and zooming makes the old arrow and zoom buttons on the traditional Google Maps interface feel like stone-age.</p>
<p>They keyboard surprised me by being even better than I expected. In landscape mode it&#8217;s almost as large as a laptop keyboard, and in some cases even faster than a traditional keyboard since you don&#8217;t have to push, just touch the buttons. The biggest keyboard problem though is of course that you usually only have one hand available. When you have two hands, it&#8217;s great.</p>
<p>Another area where the iPad really works is as <strong>a window to the web</strong>.  Safari comes pre-installed (Microsoft monopoly anyone?) but works like a  charm. Pages load quickly, and swiping to scroll and pinch to zoom  works just like it should.</p>
<p>Web standards are well supported, like  you expect from Safari. But some new problems emerge when looking at  HTML5 demos though:</p>
<ul>
<li>The Safari inside the iPad isn&#8217;t as performant as a desktop  browser. So there&#8217;s lots of lagging when trying to rotate things in  advanced ways.</li>
<li>Even though Apple has decided to ban Flash and pick a fight with  Adobe, many new apps are built to take advantage of the mouse moving  around. On the iPad, there&#8217;s no mouse pointer, so you have to simulate  one by touching the screen and moving the finger around.</li>
<li>Keyboard navigation is strange, because most of the time, you  don&#8217;t have a keyboard. The keyboard only shows up only when you focus a  text field, at other times, you&#8217;re lost.</li>
</ul>
<p>These things sound like annoyances, and they are, but they are also  quite minor. For all the surfing you usually do, the iPad works just  like it should.</p>
<h2 id="ipad_developer">Bad: A horrible Developer Platform</h2>
<p>As you&#8217;ve probably heard during the last few weeks, Apple have no clue whatsoever about how to cultivate a vibrant developer community. Let&#8217;s look at the facts:</p>
<ul>
<li>To distribute your app you need to join the iPhone Developer Program, that costs you $99-$299 per year.</li>
<li>To download the SDK you need to fill out a huge multi-step form (where almost all fields are required), and where you&#8217;re asked to give away lots of personal information.</li>
<li>When you &#8220;publish&#8221; your app it has to go through a manual approval process, which could take months if you are unlucky.</li>
<li>You need to approve to a ridiculous legal statement preventing you from using some programming languages, and making calls to some APIs.</li>
</ul>
<p>To quote:</p>
<blockquote><p>&#8220;3.3.1 — Applications may only use Documented APIs in the manner   prescribed by Apple and must not use or call any private APIs.   Applications must be originally written in Objective-C, C, C++, or   JavaScript as executed by the iPhone OS WebKit engine, and only   code written in C, C++, and Objective-C may compile and directly   link against the Documented APIs (e.g., Applications that link to   Documented APIs through an intermediary translation or   compatibility layer or tool are prohibited).&#8221;</p></blockquote>
<p>Needless to say,<strong> I&#8217;m never going to be develop anything for the Apple Platform</strong>. Apple and its developers is much like one big company (with strict rules). The only difference is that instead of a salary the developers get to pay to work for them. Good for Apple, horrible for developers.</p>
<h2 id="ipad_games">Good: Games that use the touch interface</h2>
<p>There are lots of good games that have started to take advantage of the big touch surface to make fun interaction styles possible.</p>
<ul>
<li><a href="http://itunes.apple.com/us/app/tap-tap-radiation/id364160328?mt=8">Tap Tap Radiation</a> builds on you tapping the screen in pace with the music playing. The place to hit move around, just like the markers that indicate where to tap.</li>
<li><a href="http://itunes.apple.com/us/app/id363998989?mt=8">Asphalt 5</a> is a beautiful racing game where you use the iPad as a steering wheel and tilt it back and fourth to steel. Since the accelerometer is so sensitive it works remarkably well.</li>
<li><a href="http://itunes.apple.com/se/app/n-o-v-a-near-orbit-vanguard/id343596730?mt=8">N.O.V.A. &#8211; Near Orbit Vanguard Alliance</a> is a first person shooter that uses gestures to control who you shoot and how. Advanced gestures makes it possible to throw grenades that fly around corners, and targeting multiple enemies at once.</li>
</ul>
<p>Simply put, there are lots of fun games for the iPad, and the reason is experimentation with the touch interface. Combine this with several days of battery power, and you have many hours of fun ahead of you.</p>
<h2 id="ipad_itunes">Bad: Downloading apps through iTunes</h2>
<div id="attachment_601" class="wp-caption alignleft" style="width: 162px"><a href="http://friendlybit.com/wp-content/uploads/2010/04/ipad_closeup.jpg"><img class="size-medium wp-image-601       " title="iPad closeup" src="http://friendlybit.com/wp-content/uploads/2010/04/ipad_closeup-225x300.jpg" alt="" width="152" height="203" /></a><p class="wp-caption-text">A closer look at the iPad, still with the banana present. Click for bigger image.</p></div>
<p>Sadly, the only way to get apps legally into the iPad is through iTunes. Since my iPad was bought in the US, the App Store icon leads to a &#8220;Your request could not be completed&#8221; with no further info. So it seems that the App Store is only launched in the US. Silly me, that thought the web was an international thing.</p>
<p>Anyway, it is possible to get apps into the iPad without getting a fake american App Store account. You just use iTunes to download the apps to a desktop computer, and then sync your app to the iPad. It&#8217;s easy.</p>
<p>Well, strike that, using the iTunes store is not easy. Not being a previous iPhone using I had thought that downloading apps from iTunes was like shopping on Amazon. <strong>IT&#8217;S NOT EVEN CLOSE</strong>. This is how Apple built iTunes:</p>
<ol>
<li>Take one  fully functional e-commerce web site.</li>
<li>Make it slow so that people like me that surf on a 100 Mbit/s fibre connection have to wait several seconds after each click.</li>
<li>Make sure you can only access the store through a special downloadable app, that requires you sign several legal agreements, and leave away personal information, before you even bought anything.</li>
<li>Remove the possibility to sort through listings, remove any information what the list is currently sorted by, and hide options to only show apps for the device they know you just connected (the iPad).</li>
<li>Tada! You&#8217;ve built iTunes!</li>
</ol>
<p>Needless to say, each visit to the iTunes App Store is a bad experience, and no something you want to do often.</p>
<h2 id="ipad_summary">Summary</h2>
<p>Situations where I see myself using my iPad:</p>
<ul>
<li>In bed, watching public television through Svtplay. They have a great app, that is mainly adapted for iPhone, but scales up when used on a bigger screen.</li>
<li>Casually surfing the web from the couch. This includes checking my e-mail (which is IMAP over SSL, which works fine), checking my feeds through Google Reader, checking Facebook through the iPhone app (which can be pixel-doubled to fit the screen nicely), and twitter through twitterific.</li>
<li>Surfing all kinds of maps, and wikipedia in some social context. If I ever get into an argument about where a country is exactly, I&#8217;m pull up my iPad instantly and check it.</li>
</ul>
<p>And that concludes this iPad review.</p>
<div id="attachment_607" class="wp-caption alignnone" style="width: 310px"><a href="http://friendlybit.com/wp-content/uploads/2010/04/ipad_off_and_banana.jpg"><img class="size-medium wp-image-607" title="iPad turned off" src="http://friendlybit.com/wp-content/uploads/2010/04/ipad_off_and_banana-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">iPad rests here, next to banana.</p></div>
<p>As usual<strong> </strong>I&#8217;m looking forward to<strong> your thoughts in the comments</strong>. Thanks for reading!</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=6uMCf680B64:HQuPVVMP0Ck:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=6uMCf680B64:HQuPVVMP0Ck:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=6uMCf680B64:HQuPVVMP0Ck:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=6uMCf680B64:HQuPVVMP0Ck:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=6uMCf680B64:HQuPVVMP0Ck:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/modern-web/my-ipad-a-short-review/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Rendering a web page – step by step</title>
		<link>http://friendlybit.com/css/rendering-a-web-page-step-by-step/</link>
		<comments>http://friendlybit.com/css/rendering-a-web-page-step-by-step/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 00:04:33 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=580</guid>
		<description><![CDATA[Have you ever thought about what happens when you surf the web? It&#8217;s not as simple as it seems: You type an URL into address bar in your preferred browser. The browser parses the URL to find the protocol, host, port, and path. It forms a HTTP request (that was most likely the protocol) To [...]]]></description>
				<content:encoded><![CDATA[<p>Have you ever thought about what happens when you surf the web? It&#8217;s not as simple as it seems:</p>
<ol>
<li>You <strong>type an URL</strong> into address bar in your preferred browser.</li>
<li>The browser <strong>parses the URL</strong> to find the protocol, host, port, and path.</li>
<li>It <strong>forms a HTTP request</strong> (that was most likely the protocol)</li>
<li>To reach the host, it first needs to <strong>translate </strong>the human readable host<strong> into an IP number</strong>, and it does this by doing a DNS lookup on the host</li>
<li>Then a <strong>socket needs to be opened</strong> from the user&#8217;s computer to that IP number, on the port specified (most often port 80)</li>
<li>When a connection is open, the <strong>HTTP request is sent</strong> to the host</li>
<li>The host <strong>forwards the request</strong> to the server software (most often Apache) configured to listen on the specified port</li>
<li>The <strong>server inspects the request</strong> (most often only the path), and <strong>launches the server plugin needed</strong> to handle the request (corresponding to the server language you use, PHP, Java, .NET,  Python?)</li>
<li>The plugin gets access to the full request, and starts to prepare a HTTP response.</li>
<li>To construct the response a <strong>database </strong>is (most likely) <strong>accessed</strong>. A database search is made, based on parameters in the path (or data) of the request</li>
<li>Data from the database, together with other information the plugin decides to add, is <strong>combined into a long string</strong> of text (probably HTML).</li>
<li>The plugin <strong>combines </strong>that data with some meta data (in the form of HTTP headers), and <strong>sends the HTTP response</strong> back to the browser.</li>
<li>The browser receives the response, and <strong>parses the HTML</strong> (which with 95% probability is broken) in the response</li>
<li>A <strong>DOM tree is built</strong> out of the broken HTML</li>
<li><strong>New requests are made</strong> to the server for each new resource that is found in the HTML source (typically images, style sheets, and JavaScript files). Go back to step 3 and repeat for each resource.</li>
<li><strong>Stylesheets are parsed</strong>, and the rendering information in each gets attached to the matching node in the DOM tree</li>
<li><strong>Javascript is parsed and executed</strong>, and DOM nodes are moved and style information is updated accordingly</li>
<li>The browser <strong>renders the page</strong> on the screen according to the DOM tree and the style information for each node</li>
<li><strong>You</strong><strong> see</strong> the page on the screen</li>
<li>You get annoyed the whole process was too slow.</li>
</ol>
<p>I, too, get annoyed when the above steps take longer than one tenth of a second. But now at least I have some documentation to look at, while waiting the remaining fractions of a second before the page renders.</p>
<p><a href="http://www.flickr.com/photos/amboo213/115034446/sizes/s/"><img class="alignnone" title="Spoiled dog - by amboo213 on Flickr" src="http://farm1.static.flickr.com/45/115034446_8bf43c2273_m.jpg" alt="Spoiled dog" width="240" height="180" /></a></p>
<p>Spoiled we are, all of us.</p>
<p><em>(Feel free to add more steps, through the comments&#8230;)</em></p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=lQFEvgZxzOs:4veCUiQC8DE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=lQFEvgZxzOs:4veCUiQC8DE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=lQFEvgZxzOs:4veCUiQC8DE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=lQFEvgZxzOs:4veCUiQC8DE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=lQFEvgZxzOs:4veCUiQC8DE:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/css/rendering-a-web-page-step-by-step/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Position: fixed CSS templates</title>
		<link>http://friendlybit.com/css/position-fixed-css-templates/</link>
		<comments>http://friendlybit.com/css/position-fixed-css-templates/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 14:14:26 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=573</guid>
		<description><![CDATA[In 2006 I wrote an article about simulating Frames and Iframes and from time to time, I get questions of how to make modifications to the templates presented. But one big thing has changed since 2006: Perfect support for IE6 is no longer mandatory. So yesterday, when Brandon Cobb of Super Fighter Team asked about [...]]]></description>
				<content:encoded><![CDATA[<p>In 2006 I wrote an article about <a href="http://friendlybit.com/css/frames-or-iframes-with-css/">simulating Frames and Iframes</a> and from time to time, I get questions of how to make modifications to the templates presented. But one big thing has changed since 2006: <strong>Perfect support for <abbr title="Internet Explorer 6">IE6</abbr> is no longer mandatory</strong>.</p>
<p>So yesterday, when Brandon Cobb of <a href="http://superfighter.com/">Super Fighter Team</a> asked about a design with a fixed header, fixed left column, and scrolling right column, I thought I&#8217;d renew my take on <a href="http://friendlybit.com/css/frames-or-iframes-with-css/">simulating frames</a> with CSS (The original article is still good for background information, so I still recommend reading it).</p>
<h2>Position: fixed CSS templates</h2>
<p>The idea is this: Instead of specifying what parts of the page should scroll, we can <strong>specify what parts should stay fixed when scrolling</strong>. This makes it easier to deal with several fixed parts of the same layout, but also allows us do to things frames cannot do.</p>
<p>So what&#8217;s the trick? Well, <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span></span></code> does exactly what we want. It works just like <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span></span></code>, but it stays still when the page is scrolled. So it&#8217;s really just a matter of making sure things don&#8217;t overlap.</p>
<ul>
<li><a href="http://friendlybit.com/files/fixed/fixedtopandleft.html">Demo: Fixed top, fixed left, scrolling right</a></li>
<li><a href="http://friendlybit.com/files/fixed/fixedtop.html">Demo: Fixed top, scrolling bottom</a></li>
<li><a href="http://friendlybit.com/files/fixed/fixedleft.html">Demo: Fixed left, scrolling right</a></li>
</ul>
<p><strong>Try resizing the page, and see how the scrolling works</strong>. The templates have been tested in: Fx 3.5, IE8, IE7, IE6 (see note below), Opera 10, Safari 4; all on Windows. Let me know if you can test it on more browsers, or find bugs.</p>
<p>You&#8217;re of course free to use this templates as you see fit, with or without a link back, commercially or not. Consider it public domain.</p>
<h2>Fixes for IE6</h2>
<p>As I&#8217;ve said, these designs don&#8217;t act the same in IE6. Instead of some parts being fixed, the whole page scrolls in IE6. The good thing about this is that <strong> IE6 users won&#8217;t see that your site is &#8220;broken&#8221;</strong>, they will just get another design. And as the number of IE6 users goes towards zero, your design will be more and more consistent :). The fallback is very simple, IE6 gets <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span></span></code> instead of fixed, using the <a href="http://www.webdevout.net/css-hacks#in_css-important">!important hack</a> (you should probably use <a href="http://www.quirksmode.org/css/condcom.html">conditional comments</a> instead).</p>
<p>Hope these templates are useful for some of you!</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=DgopdFOXSlM:4FJEHJQ0FCM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=DgopdFOXSlM:4FJEHJQ0FCM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=DgopdFOXSlM:4FJEHJQ0FCM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=DgopdFOXSlM:4FJEHJQ0FCM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=DgopdFOXSlM:4FJEHJQ0FCM:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/css/position-fixed-css-templates/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Google support gone wrong</title>
		<link>http://friendlybit.com/other/google-support-gone-wrong/</link>
		<comments>http://friendlybit.com/other/google-support-gone-wrong/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 13:00:28 +0000</pubDate>
		<dc:creator>Emil Stenström</dc:creator>
				<category><![CDATA[Other topics]]></category>

		<guid isPermaLink="false">http://friendlybit.com/?p=566</guid>
		<description><![CDATA[Google really produces great software. I use many of them: Web Search, Picasa, Reader, Feedburner, Analytics, Images, Groups, Docs, Translate, Code, Chrome, Maps, Video, Blog Search, Youtube, AJAX API, Webmaster Central, and Site Search. Just to name a few :) Problem is, with many of the above, if something breaks you&#8217;re out of luck. Because [...]]]></description>
				<content:encoded><![CDATA[<p>Google really produces great software. I use many of them: Web Search, Picasa, Reader,  Feedburner, Analytics, Images, Groups, Docs, Translate, Code, Chrome, Maps, Video, Blog Search, Youtube, AJAX API, Webmaster Central, and Site Search.</p>
<p>Just to name a few :)</p>
<p>Problem is, with many of the above, if something breaks you&#8217;re out of luck. Because it&#8217;s <strong>god damn impossible</strong> to get a hold of someone that you can talk to. Do you reach anyone at Google with your e-mails? Does anyone from Google read your forum posts? Highly unlikely.</p>
<p>Google is a great example of support gone wrong. I think the explanation is easy: Few of the programmers I know want to deal with support. They want to deal with coding! And since Google is a company of programmers, it doesn&#8217;t want to do support.</p>
<p>Let me tell two stories:</p>
<h2>Feedburner</h2>
<p>Feedburner once was a great company, with a simple but thought out service. They gave you subscriber statistics of your RSS feed. You just redirected your feed to them, and made all your subscribers sign up to their generated feed, and they did all the tricky calculations. Simple, efficient.</p>
<p>As a company Feedburner understood the value of being personal. Messages throughout the site stated &#8220;My feeds like a little namespace to call their own&#8221;, &#8220;Sometimes your feed just wants to look good. Spruce it up in the following ways&#8221;, &#8220;Oh dear, what kind of trouble?&#8221;. Nice personal touch :) Feedburner developers where easy to get in touch with, an e-mail and you had a friendly, knowledgeable person to talk to.</p>
<p>Then Google came along and bought the whole thing. Everything was rewritten to Google&#8217;s platform, domains where switched, and chaos ensued. Of course, during that time, Feedburner&#8217;s previous support people totally vanished, and everyone was directed to the Feedburner Status Blog, when you could confirm they where <strong>not </strong>working on your problem. Just great.</p>
<p>For three weeks now, my subscriber stats have jumped from 800 to 3000, back an forth, several times per week. Nice, isn&#8217;t it?</p>
<p><img class="alignnone size-full wp-image-567" title="feedburner_stats" src="http://friendlybit.com/wp-content/uploads/2009/10/feedburner_stats.PNG" alt="feedburner_stats" width="519" height="165" /></p>
<p>Feedburner is apparently broken, and the simple service of delivering feed statistics doesn&#8217;t work.</p>
<p>So I <a href="http://groups.google.com/group/feedburner-statistics/browse_thread/thread/3989f82b9efc3b26/e0990145155dca15?lnk=gst&amp;q=subscriber&amp;pli=1">post to their Google Group</a>, the place where you should ask questions about the service. Three months later, several other users have reported having the same problem, but no reply from a Feedburner developer.</p>
<p>Now I&#8217;m thinking of switching. Anyone have a good alternative ready?</p>
<h2>Google Wave</h2>
<p>Services that start at Google are even less likely, compared to acquired services like Feedburner, to have proper support. It&#8217;s just not a priority, and there&#8217;s far too many interesting programming challenges to deal with users.</p>
<p>So when Wave gives me an old picasa name as my username (&lt;company name&gt;.&lt;place of one of our conferences&gt;@googlewave.com), I know there&#8217;s very little chance that I&#8217;ll get help from anywhere. The official channel to ask for help is their support forum, but it doesn&#8217;t seem that they reply to issues there. <a href="http://www.google.com/support/forum/p/wave/thread?tid=6cb8ca45d22453e5&amp;hl=en">My message there from two weeks ago</a> stands on it&#8217;s own, with no replies.</p>
<p>It&#8217;s the proposed revolution that will replace e-mail, and I can&#8217;t use it :(</p>
<h2>Bad trend</h2>
<p>This trend of Google not offering even basic support from dedicated people is a unfortunate development, that should be taken seriously by executives at Google, and dealt with at a very high level.</p>
<p>Launching new web services is easy, improving a services based on feedback is much harder. Google has not yet managed to crack that nut.</p>
<div class="feedflare">
<a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=hevv1mC2Vno:0JyeRnshgyU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=hevv1mC2Vno:0JyeRnshgyU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=hevv1mC2Vno:0JyeRnshgyU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?i=hevv1mC2Vno:0JyeRnshgyU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.friendlybit.com/~ff/FriendlyBit?a=hevv1mC2Vno:0JyeRnshgyU:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/FriendlyBit?d=cGdyc7Q-1BI" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://friendlybit.com/other/google-support-gone-wrong/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/19 queries in 0.018 seconds using disk: basic
Object Caching 1408/1442 objects using disk: basic

 Served from: friendlybit.com @ 2013-05-09 08:16:56 by W3 Total Cache -->
