-
"We've been testing Buzz internally at Google for a while. Of course, getting feedback from 20,000 Googlers isn't quite the same as letting Gmail users play with Buzz in the wild." No, it isn't.
-
Good intro to Django from a former Yahoo! Java developer.
-
Some awesome images on display here by the White house News Photographers Association. The top navigation is a little confusing, but within the Still Photography category the Picture Story/News, Political Portfolio and Portfolio sections are particularly impressive.
February at paulcarvill.com, the home of Paul Carvill on the web 2010 at paulcarvill.com, the home of Paul Carvill on the web
paulcarvill.com
Hi, I'm Paul Carvill and I'm a web developer. I am Head of Interface Development at LBi, Europe's largest digital agency.
I also like walking, cooking, Bollywood and rock 'n' roll.
Archive for February, 2010
links for 2010-02-18
Thursday, February 18th, 2010links for 2010-02-17
Wednesday, February 17th, 2010-
"We've been testing Buzz internally at Google for a while. Of course, getting feedback from 20,000 Googlers isn't quite the same as letting Gmail users play with Buzz in the wild." No, it isn't.
-
Good intro to Django from a former Yahoo! Java developer.
-
Some awesome images on display here by the White house News Photographers Association. The top navigation is a little confusing, but within the Still Photography category the Picture Story/News, Political Portfolio and Portfolio sections are particularly impressive.
-
"Do you have exercise in Estonia?" There's a few really good ones towards the end — Mario/Luigi, Red/Green and the guys with matching red heart sunglasses:
"is this a sign?"
"probably"Awwwwww.
-
"Grisoni retained Peace’s noir fatalism, his colloquial, bitter pungency—the gibes and roughhousing of male camaraderie and rivalry—and he filled out the social background. Pummelled by the repeated crimes, the population seems as cursed as the landscape, which has been stripped of its famous beauty. Many of the women are frightened or grieving, many of the men vaguely or openly guilty, even those who haven’t done anything, whose only crime is being fallible or knowing things that trouble them."
-
The W3C have helpfully published a FAQ list which helps clear up some of the confusion around their process which surfaced as part of the recent WHATWG/Adobe debacle.
links for 2010-02-16
Tuesday, February 16th, 2010-
Some details on the REALLY BORING telecommunications operators' and device manufacturers' "open global alliance".
-
"It has been nearly four years since Roger Ebert lost his lower jaw and his ability to speak. Now television's most famous movie critic is rarely seen and never heard, but his words have never stopped." Astonishing.
links for 2010-02-15
Monday, February 15th, 2010-
Useful for last-minute panics when you're going to open a business banking account…
-
Great series of articles from a few years back. The first article is at the bottom, then work your way up.
-
Lovely Calvin and Hobbes reference in this one.
Mobile network operators are just big dumb pipes in the sky
Monday, February 15th, 2010I think the idea of 24 of the world’s largest mobile phone operators coming together to ‘make it easier to sell and distribute mobile phone apps’ is laughable. This is what’s being announced today at a huge mobile trade show in Barcelona.
Apparently the mobile phone networks fear that at the moment they are in danger of becoming little more than “dumb pipes in the air”, with all the revenues created by applications going to software developers and the companies that operate the stores that supply them.
Well here’s news, mobile network operators — I would like NOTHING MORE than for you to be dumb pipes. Which shouldn’t be a problem because THAT’S WHAT YOU ARE! I want you to act in the same way I want all my other utilities — water, sewage, gas — to act. Like great, big literal dumb pipes. Subservient conduits. Enslaved vessels. I don’t ask British Gas to get together with all the other gas companies and brainstorm new hot dinner ideas I might want to try out. You know, using their GAS and all? No, I’ll rely on trained chefs, food writers and my vast collection of suspiciously cleanly-paged cookbooks for that. Specialists, in other words. Just you keep the gas coming, guys. In fact I’m not even sure British Gas are the people who supply my gas — THAT’S how little I care about my gas utility supplier.
Your problem, mobile network operators, is you think you’re better than that. You want us to love you. You want us to wonder what we’d do without you. But I mean, to continue the utilities analogy, it’s not like you even manufacture the porcelain toilet, or the brushed steel taps, that connect to the dumb pipes. Nope, you just take care of all that stuff sloshing about inside them, the stuff everyone takes for granted. I really don’t want Thames Water forming coalitions with other water companies to provide me with new and improved cocktail ideas, that I could make using, you know, the water they send to my house. No thanks, fellas, just keep the wet stuff coming, though, you’re doing a great job.
But the mobile operators don’t really care about their customers. They’re just worried about their profits, and how they’ll steadily lose them to every innovative company that encroaches into their tradtional space. Customers have literally zero loyalty to any of their carefully nurtured and obviously humanised brands. People are interested in technology and functionality, which are provided by the handset manufacturers and the software developers respectively. Those two groups are both also driven by profit, but, importantly, their mission is to deliver better technology and functionality than their rivals. Mobile operators, on the other hand, offer a binary proposition — you can either telephone, SMS or get on the web, or you can’t. Not a hard job, youd have thought.
Worse still, the mobile operators got themselves into this mess in the first place by offering their customers closed systems and restricted access; they attempted to own content and access to content through walled-garden web access. Their very offering relies on restriction and artificial handicapping, as they attempt to categorise and upsell customers into various arbitrary packages, the difference in whose actual cost is negligible. Mobile phone operators have a target figure they aim to extract from each customer every month. The actual makeup of the services and products they offer is virtually meaningless. So they have no one but themselves to blame when customers eagerly jump ship in favour of unlimited data access, real web access and a semblance of choice in what you do with your mobile.
Mobile phone operators have repeatedly show themselves to be unimaginative, exploitative, moneygrabbing corporate behemoths with no real understanding the mobile data world. I don’t see that changing any time soon.
links for 2010-02-14
Sunday, February 14th, 2010-
"Now, two new prototypes for beer glasses have been unveiled, as part of a programme involving the Design Council. Launched by the Home Office's Design and Technology Alliance, the aim is to use design to tackle crime."
-
"The tide may be turning. There's still a month out before the Academy Awards, but so far, fewer Oscar screeners leaked online this year — only 14 out of 34 nominated films, the lowest percentage ever. And they're taking twice as long to leak — a median 21 days after theatrical release, up from 11 days the previous year."
-
Your Flickr stats explained
In bed with CSSEmbed – using data URIs and mhtml to reduce HTTP requests
Friday, February 12th, 2010My team at LBi have added a pimped version of CSSEmbed into the continuous integration process of the project we’re working on. CSSEmbed is a tool by Yahoo’s Nicholas Zakas which takes CSS files as input, searches them for usages of image URLs, locates each image file being used via its URL or filepath, converts it into base64-encoded data and embeds that data back into the stylesheet in the form of a data URI, replacing the original URL. This has the effect of reducing the number of HTTP requests your browser has to make to load all of the images a page requires — everything in the stylesheet is downloaded in a single request. Because the number of concurrent HTTP requests your browser can make is limited, using CSSEmbed increases the browser’s chances of downloading all assets as quickly as possible.

Performance
In practice getting the best performance out of cssembed is something of a balancing act, and takes some trial and error to get right. The size of the CSS file bloats pretty quickly once you start embedding even relatively small images in it. My first attempt increased one CSS file from around 80KB to almost 900KB! Now, while this file only takes one HTTP request to fetch, it also blocks downloads in that request channel for the entirety of the time it takes to come down the wire. After some experimentation we found the sweet spot was to embed images that were less than 1k in size, as the increased CSS file size was in a much better ratio to the number of HTTP requests saved.
We’ve tested this using PNG, GIF and JPEG in Firefox, Safari, Chrome and IE versions 6, 7 and 8.
Comparison
Here’s a comparison of a page I picked at random from our current project, showing data for using data URIs, both with and without Gzipping of the transfers:
| Page size (KB) | Number of HTTP requests |
Avg cold cache download time (ms) | Avg warm cache download time (ms) | |
| Using data URIs | 540 | 45 | 792.30 | 726.60 |
| Using data URIs, gzipped | 235 | 45 | 802.00 | 748.30 |
| Using original css/images, gzipped | 194 | 56 | 882.60 | 771.00 |
| Using original css/images | 483 | 56 | 849.00 | 773.60 |
That’s a 19% fewer HTTP requests. Pretty impressive!
Pimping CSSEmbed
With some great help from my fellow LBi-ers Andrew and Raul, we amended CSSEmbed to take more arguments than the standard version, including a maximum image size to convert to data, a .txt file listing the CSS files to convert, a file extension to append to the outputted files and a directory to output to.
Continuous integration
Here’s a quick list of the steps we took to automate our CSSEmbed process:
1. Create a manifest of the stylesheets you want to embed image data into
2. Add an ant target that executes the cssembed jar twice, once to create files containing datauris (for modern browsers) and then again to create mhtml files (for older version of IE). Supply argument lines as necessary. Our ant targets do the following:
a. Supply root URLs to be prepended to relative URLs in the stylesheet, so the cssembed jar can locate the image files
b. Specify output directories: /datauri and /mhtml, respectively
c. Specify a file extension for the mhtml files: mht
d. Specify the location of the manifest .txt file
3. Amend your page’s head to serve the appropriate stylesheets to each browser
Here’s one of our ant targets:
<java jar="tools/cssembed-0.3.5.jar" fork="true">
<arg line="--root '${deploy.home}/${project}-build/'" />
<arg line="-o '${deploy.home}/${project}-build/assets/css/mhtml'" />
<arg line="--maxsize 1"/>
<arg line="--mhtml --mhtmlroot http://${project}.build/assets/css/mhtml/" />
<arg line="--outextension mht" />
<arg line="'tools/css-manifest.txt'"/>
</java>
A brief word on mhtml
The reason we output the mhtml files with a different file extension and put them in their own directory is to work around some presentation bugs in IE7, specifically IE7 on Windows Vista. IE7 on Vista doesn’t seem to like parsing PNG files as mhtml data unless the data is hosted in a separate file and served up as Content-Type: text/plain. Putting the mhtml files in a seperate directory with the ir own file extension means our client can use Apache directives either to serve either files with that extension as plain/text, or to serve any files from a particular directory as plain/text. It gives them the option and adds no performance overhead at all.
Serving it all up
Finally, with some clever use of conditional comments, we can produce valid markup that will let each browser download just those files it needs to. Here’s how to do it:
* Stylesheets for all browsers go here <link rel="stylesheet" href="/path/to/styles.css" /> <!--[if gt IE 7]>--> * The datauri stylesheets go here. * Modern browsers and IE > 7 will see them. * * Note that the opening tag of the * conditional comment above is fully * enclosed in an HTML comment. * * All IE browsers read the conditional * comment and act on it, so only IE 8 * sees these links <link rel="stylesheet" href="/datauri/styles.css /> * Note again that the closing tag of the * conditional comment below is fully * enclosed in an HTML comment <!--<![endif]--> <!--[if lt IE 8]> * The mhtml stylesheets go here. * * Only IE < 8 will see them. * * This whole section is inside an HTML * comment, so only IE browsers read the * conditional comment and act on it. * * Only IE < 8 sees these links <link rel="stylesheet" href="/mhtml/styles.mht" /> * Note the closing HTML comment tag below. <![endif]--> <!--[if lt IE 7]> * Here's an example of another conditional * comment, for supplying IE 6 stylesheets * * This is nothing to do with cssembed, it's * just here for illustration <link rel="stylesheet" href="/ie6styles.css" /> <![endif]-->
Now whenever our build script runs, our CSS files are checked for image URLs and new CSS files are created with image data embedded. At runtime each browser downloads the appropriate stylesheets using almost 20% fewer requests than before. This means the page is ready faster than it was before we used data URIs, and we've freed up bandwidth for other activity to take place.
links for 2010-02-11
Thursday, February 11th, 2010-
"iProcessing is an open programming framework to help people develop native iPhone applications using the Processing language. It is an integration of the Processing.js library and a Javascript application framework for iPhone.".
This sounds like JavaScript encapsulated and executed within a native app package. Am I right?
-
Interesting JavaScript quiz based around closures and orders of evaluation. Some of the questions are quite mindbending.
-
I don't know but it's a very fucking weird, dark place.
links for 2010-02-10
Wednesday, February 10th, 2010-
"The U.S. has spent more than $5 billion on military and anti-narcotics aid for Colombia in recent years. In a new article for Slate, Ray Fisman points to a new paper that analyzes conflict and coca production in areas with and without Army bases to determine the impact of all that aid. The researchers found that U.S. military aid is associated with increased paramilitary attacks and fewer anti-narcotics operations. “There’s also some evidence that U.S. dollars may have been channeled to paramilitaries to intimidate voters and keep its government allies in power,” writes Fisman. “Greater U.S. aid is associated with a decline in voter turnout, concentrated in municipalities with Army bases.”"
-
Instead of another boring old textual list of Photoshop keyboard shortcuts, this one puts the shortcuts on a visual map of the keys themselves. PC only, though. So, basically, no good at all, to anybody whatsoever.
-
This is where I work. LBi's London office — the Atlantis building in the Truman Brewery complex, Brick Lane — at dawn.
-
"crowdsourcing…can also be bad. When we appealed for posters, what we wanted was high-minded satire about deficit reduction. What we got were hundreds of images of Cameron saying, and sometimes doing, unspeakable things. Some were funny, most weren't. And so we abandoned plans to upload them all, in favour of keeping a bit of good old-fashioned editorial control, which is what kept the quality so high."
-
"Glitch shares the DNA of many different games and genres, Butterfield told me. It's casual and cute on the surface, but underneath it has deep collaborative puzzles, exploration and elements of play that suck in everything from Mario to the Hitchhikers' Guide."
links for 2010-02-09
Tuesday, February 9th, 2010-
Nick Bilton, editor of the NYTimes Bits blog, interviews data maniac Nicholas Felton, he of the Feltron Annual Report.
"The works of Mr. Felton blur the line between art and data. They are a poetic haze of information and well-designed storytelling — and of course, the discipline to collect all this information each year. But they also signal the kind of data collection that is becoming easier for all of us to do."
-
Jonathan Zittrain writes on FT.com on Apple's closed system for the iPhone and iPad. "The Apple II was a clean slate, a device built – boldly – with no specific tasks in mind…Thirty years later Apple gave us the iPhone. It was easy to use, elegant and cool – and had lots of applications right out of the box. But the company quietly dropped a fundamental feature, one signalled by the dropping of “Computer” from Apple Computer’s name: the iPhone could not be programmed by outsiders"
-
I'm inexplicably excited by this guy's experiments with audio in the browser, having never really been interested in this area before and considered it pretty much a dead end:
"I’m working with an ever growing group of web and Mozilla developers, along with some talented audiophiles, on a project to expose audio spectrum data to JavaScript from Firefox’s audio and video elements."