Goldfish. | January 5
Let's all come together and help each other out through this thing, says Airbag. It's not just the work they put out that makes them an impressive studio.
The Rise of HTML5 | January 5
I'm glad people are starting to tinker with HTML5, however limited its use might be at the moment.
Not a Test
January 3It's a new year, so it's time for a slight change of direction. You may have noticed your feed reader of choice just barfed up a few dozen posts from these here parts. I'm hoping that little bit of necessary unpleasantness will be one time only.
I've come to realize that my content-creating has become a lot more distributed, which means the long-form post format of this site has been seeing less and less love in recent years. Much has been written about Twitter killing the urge to write longer blog posts, and I won't dispute that as a cause. I liked Andy Budd's take on why his site has been suffering, I can relate to a lot of those reasons.
So for the past month I've been working on a way of piecing together content I produce on other sites and funnel relevant bits into a stream that I could present on this site.
You're now seeing the result. I'm merging my traditional posts with links from Delicious and Google Reader (which is what I was up to when I wrote about the latter's API), photos from Flickr, and Twitter posts (or tweets, if you prefer). The home page, archives, and primary Atom feed all work on this new system.
Totally nuts, right? The volume will be too high, and nobody wants to see every photo I upload or hear every inane thought I come up with while out for dinner. So that's why I'm exercising editorial control and only bringing over the bits and pieces I've hash- or machine-tagged.
Photos on Flickr, for example, can be tagged as either mezzoblue:post=description or mezzoblue:post=photo. Both tags will show the photos here, in slightly different configurations (see the bottom of the August 2008 archive for both).
On Twitter I'm using a hash tag (#mb) which shows up in the original, but I'm stripping from the on-site version. Google Reader pulls in shared items tagged with mezzoblue. And I'm just throwing in everything from Delicious for now, since I got into the habit of using it for the now-deprecated mezzoblue Dailies.
I'm still not sure if I'm going to write up the scripts I built to make this happen, or package it up into some kind of actual open source release. I think the latter way would be more interesting, but there's a lot of work that would have to happen to get to something even slightly worthy of putting out there for public consumption.
Now I do realize that not everyone will want this of course, so the way this site used to work isn't gone. You can follow the clutter free post-only feed, or browse just my original posts on the traditional archive pages. Both are accessible from the main archives page, and will continue to exist. It's just the defaults that have changed, but you can go ahead and ignore all the new stuff if you want.
Expect a few bugs as I stress-test my scripts live over the next few weeks, and let me know if you find anything horribly wrong.
Update: and first major bug has been found: the full Atom feeds weren't ready for prime time at all. For now I've backed out and made the default feed post-only again until I can figure out what's causing old items to duplicate. Sorry about the collateral damage to your feed reader.
today.getYear() returns 109, not 2009. Because that's certainly a year format any reasonable person would expect. Well done, Javascript.
Google tells users to drop IE6 | January 2
Every bit helps.
An Event Apart and HTML 5 | January 2
I wish I could say I'm surprised to hear using HTML5 today is an exercise in frustration.
From the Department of Badly Chosen Defaults | December 23
There's a built-in fix for Internet Explorer's crappy image scaling algorithm? News to me!
Yahoo! Query Language | December 19
Wow, this seriously ups the API ante. Google, your move.
How Very Fortunate - 2009 Calendar | December 18
Stunningly well-designed letterpress desk calendar. A steal at $20.
Web Stencil Kit | December 17
Paper prototyping just got a lot easier.
Using the canvas element brings back memories of hand-coding 3D scenes in POVRay in the late 90's. Which I hated doing then, too.
iPhone GUI PSD | December 16
A bit old, but still a great resource for iPhone design projects.
Grid Buildrr | December 15
Having draggable IAB units instantly propels this one ahead of all the others, in my mind.
Socket Deer | December 15
Now that's solving a common problem in a creative way. How many times has your phone been parked on the floor near a socket? No more!
Design Declarations | December 14
"Someone once told me to design my life, that was the best advice I ever got. Having a beautiful view is designing my life. Have a commute that’s a walk down the block. Choosing not to work in a glass cube with a view of a brick wall. It’s being closer to nature… Breathing fresh air. Sleeping well. Playing well… I don’t have too many clients or the wrong mix of clients. Because I can work at a pace I’m comfortable with, I can excel at what I do. I love what I’m doing."
Gerd Arntz Web Archive | December 14
Gerd Arntz was designing icons before there were computers. Fascinating archive of his work.
Christoph Niemann's illustrated coffee notes | December 11
Napkin illustrations done in coffee, that tell a story about coffee.
Authenticating the Google Reader API
December 11Last week I finally got around to doing something I've long intended: I moved all my RSS feeds into Google Reader and finally said goodbye to Bloglines. More interesting things have been coming from Google's direction lately, and though there's a public beta of a new version of Bloglines it's been feeling stagnant. The final tipping points for me were the ASP errors the mobile version's byte-trimming service has been issuing up for the past few weeks. So I switched, and after a very brief learning curve, I'm glad I did.
Aside from a nice iPhone-optimized version, one of the new toys I picked up in the switch is an unofficial Google Reader API. It's been in an unofficial state for a whole three years now, with no sign of an actual release, so documentation is sparse at best. This wiki seems to be the definitive source, and for non-programmers like myself, it's mind-bendingly vague.
One of the speculative reasons for the lack of an official release is the authentication currently necessary to log in and start using the API, and that proved to be exactly what I've spent the past few days banging my head against. Unless my Google-fu has weakened, there doesn't appear to be much publicly-available code for using the API, and virtually nothing in PHP. So I figured I'd share what I came up with.
This is a script for logging in with your own account and pulling out your latest unread items in the form of an Atom feed. Drop the script on your server, change the login id and password, and it should work as intended. I haven't explored much yet, and probably will never do anything beyond read-only, so you're on your own past this point. But hopefully it'll save someone a few hours anyway.
// ----------------------------------------
// Google Reader Authentication in PHP
// a basic script to get you in the door of
// Google's unofficial Reader API
// by Dave Shea, mezzoblue.com
// ----------------------------------------
// cobbled together from notes on:
// http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI
// these are the urls we'll need to access various services
$urlAuth = "https://www.google.com/accounts/ClientLogin";
$urlAtom = "http://www.google.com/reader/atom";
// our array of login data
$login = array(
"service" => "reader",
"continue" => "http://www.google.com/",
// Google id-only of the account holder
// ie. for example@gmail.com, just use example
"Email" => "google-id",
// the account's password in plaintext
"Passwd" => "password",
// an identifying name for your script, can be anything
"source" => "my reader script",
);
// first step is to authenticae
// let's build a POST request using the login data array
$postRequest = "";
foreach($login as $field => $value) {
$postRequest .= $field . "=" . $value . "&";
}
// start buffering what we get back
ob_start();
$ch = curl_init($urlAuth);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postRequest);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec ($ch);
curl_close ($ch);
// throw the buffer into a variable
$loginResult = ob_get_contents();
ob_end_clean();
// we just received three lines of ugliness to contend with.
// each line is a huge string preceded with an ID
// the IDs are: SID, LSID, and Auth; we only want SID
// let's use some string parsing to weed it out
if ($i = strstr($loginResult, "LSID")) {
$SID = substr($loginResult, 0,
(strlen($loginResult) - strlen($i)));
$SID = rtrim(substr($SID, 4, (strlen($SID) - 4)));
}
// so we've found the SID
// now we can build the cookie that gets us in the door
$cookie = "SID=" . $SID .
"; domain=.google.com; path=/; expires=1600000000";
// this builds the action we'd like the API to perform
// in this case, it's getting our list of unread items
$action = $urlAtom .
"/user/-/state/com.google/reading-list";
// note that the hyphen above is a shortcut
// for "the currently logged-in user"
// start buffering what we get back
ob_start();
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $action);
curl_setopt ($ch, CURLOPT_HTTPGET, true);
curl_setopt ($ch, CURLOPT_COOKIE, $cookie);
curl_exec ($ch);
curl_close ($ch);
// throw the buffer into a variable
$xml = ob_get_contents();
ob_end_clean();
// and finally, let's take a look.
echo $xml;
This is what I call inventive... | December 11
A coffee company in the Netherlands wanted to attract more students. So it installed WiFi in some of its stores near universities. Except students just came for the WiFi, not the coffee. Solution? Creative and spontaneous SSID naming.
you mean strtotime("1 month ago") actually *works*? Instant favourite PHP function.
Next-Gen Dashboards Teach Leadfoots How to Hypermile | December 9
Since I drove a Prius for the first time, I've suspected that simply putting more information about fuel usage on a car's dashboard would lead to big shifts in behaviour. Glad to see I'm not alone.
You mean I don't have to feel ashamed to use MyFonts anymore? http://new.myfonts.com/ is a lovely—albeit way overdue—redesign.
get crafty, people! swissmiss alpenglow project | December 9
A simple little craft project that ends up looking great. I don't often do paper, but I'm sorely tempted.
HTTP errors | December 8
Illustrated common HTTP errors. Brilliant.
Rewriting Twitter for web best practices | December 8
This is a great read even if you don't care about Twitter. The best practices are tips we'd all be well-served to keep in mind.
The State of the Web 2008 | December 8
John Allsopp and Web Directions are conducting a survey of common web design and testing practices. This will be good to know, I suggest you take it.
iPhone Vector Pack: A Bumper Pack of iPhone UI Elements for Photoshop | December 8
"Last month, I was asked to create a mobile website mock-up using the iPhone as a medium. I needed to show several parts of the interface, none of which I had graphics for. I set out to create an iPhone starter kit for myself.
Create A Style Toolkit, Save Time and Mental Energy | December 8
"In my constant quest to simplify everyday tasks, I've started creating a style toolkit PSD file to go along with each new project. As I create reusable elements, such as a header font treatment or a button style, I drag them right into my toolkit PSD. I keep this document open on my second monitor so I can easily grab things when I need them."
Free fonts from FontFont | December 8
Free FontFont type? Yes please.
delving into XML, REST, PHP's curl, and Tylenol.
World of Warcraft is more secure than your bank | December 7
It's downright shameful that a game beat most North American banks to the punch on this type of security.
20 signs you don’t want that web design project | December 4
A sampling of Zeldman's true life horror stories. I can relate to far too many.
Tactile Silicon Case for the iPhone 3G | December 2
The iPhone as a highly-usable phone for the blind? Incredible. Too bad it's only a concept for now.
American English vs. British English for Web Content | December 1
Pretty much confirms what I've long suspected; there are reasons to choose on spelling over the others.
StateStats | November 26
Interesting demographic breakdown of search terms. US-only, at the moment.
Browse Archives › | Full Archive Feed (buggy at the moment) | Post-Only Feed