Archive: July, 2004

17

sparkline
                    5th                     10th                     15th                     20th                     25th                     30th     
12am      
4am
8am  
12pm                
4pm
8pm          

Saturday, July 31st, 2004

What's that you're listening to?

I’ve been doing a little tinkering behind the scenes here.

On my journal page, under the heading “music”, I have a “last iTunes track” feature. This shows whatever song I’m listening to. There’s a link through to the iTunes music store for the track. There’s also a link to Google for a search on the artist.

I’ve modified it so that it now offers a third link, this one to Amazon. Wherever possible, there’s also album artwork displayed. This is done using a combination of iChatStatus, PHP, Amazon’s web services and XSLT.

iChatStatus is a nifty little app that basically runs an applescript whenever the current track in iTunes changes. A number of scripts are available. The default one updates the availabilty status in iChat to show the name of the current song and artist. An extension of that script also changes the buddy icon in iChat to show the album artwork of the current song. Another script FTPs a text file containing information on the current song to a specified server.

What I’ve done is to combine those applescripts into one. When a track changes on iTunes, my iChat status is updated, my iChat buddy icon changes and a small file is uploaded to adactio.com. This file is then included via PHP on my journal page.

To get the Amazon functionality to work, I only needed to change the applescript slightly. Basically all I do is, as well as writing out some HTML, write out a PHP variable. Here’s the text file. You can view source to see the PHP variable being set (.txt files don’t get parsed when they’re viewed alone like this but they are parsed when they’re included via a PHP script).

Now I have a PHP variable containing the album and artist names. From here, it’s a simple matter of adapting the scripts I used for The Session Shop.

I make a call to Amazon’s web service running a search on the album and artist. I’m not interested in seeing all the results: I just want to show the first one. Using a very simple XSL file, I get the ASIN number of the album and, where available, the album artwork.

Using PHP’s readfile function, I dump the generated XHTML to the screen. If, for whatever reason, something goes awry with Amazon’s web services, a simple link to search Amazon for the album and artist appears instead.

That’s it. If you’re visiting my journal page and see that I’m listening to an album that you’d like to check out, one click will take you straight to Amazon with an option to add the album to your shopping cart, buy it and enrich this associate by a couple of cents.

Next step: adding the means to toggle between amazon.com, amazon.co.uk and amazon.de. Watch this space…

P.S. Please forgive the preposition-ending title of this post. But what am I supposed to say? “What’s that to which you’re listening?”… it just doesn’t have the same conversational ring to it.

Thursday, July 29th, 2004

Brain Lego

Others redesign. I just pile new designs on top of the old.

For a while now, I’ve been meaning to turn my attempted CSS Zen Garden entry into a theme for this site. I finally got ‘round to doing it and I believe it’s ready for prime time:

The Hirnlego theme.

It’s more or less a three-columed layout so it doesn’t look so hot at very small resolutions. At 800x600, the cracks begin to show and some of the image positioning trickery is revealed. If you tend to browse with a very small window, I suggest using one of the other themes instead. Sci-fi perhaps, or maybe a nice simple default layout.

When I originally came up with the design for the CSS Zen Garden, I wrote up the process behind it. I’m still very happy with the design. I think it’s good clean fun.

I hope you like it too. If you don’t, feel free to stick with one of the themes for the site.

Wednesday, July 28th, 2004

Day of the t-shirts

Yesterday the postman delivered not one, not three, but TWO t-shirts.

The t-shirt I designed for The Session looks pretty smart. I’m very pleased with the quality. The range of colours on offer enabled me to get a t-shirt with a colour that matches the background colour of the website fairly closely.

The other t-shirt is from Daring Fireball. I’m now a card-carrying, snazzy t-shirt wearing member.

two t-shirts, one yellow and one grey

Monday, July 26th, 2004

Dear Auntie Beeb

In the article “Real ‘frees’ Apple’s iPod player”, the following paragraph appears:

“Previously, Apple’s player was limited to digitally-protected tracks downloaded from iTunes online stores.”

Which would suggest that the iPod can only play music downloaded from the iTunes music store. But the iPod is first and foremost an MP3 player. The majority of music on most iPods is in the MP3 format and comes not from the iTunes music store but from “ripping” previously purchased CDs.

For an example of accurate reporting, I point you to the article “Here comes the MP3 revolution” in the Contra Costa Times:

“Music gets into an MP3 player in a couple of ways. One can move tracks from existing CDs into a computer, then download them into the MP3 player. Or one can acquire new music from an online site — be it an online store such as Apple’s iTunes, or a band or record label’s Web site — and download it to the iPod, usually for a charge per song.”

The article is more verbose than the BBC’s but it reads as being far more accurate and unambiguous.

I’m afraid the Beeb might be inadvertently guilty of spreading some FUD on this issue.

UPDATE: the auntie makes ammends:

“Previously, the only tracks with digital protection the iPod would play were those from the iTunes store.”

Friday, July 23rd, 2004

The do-DOM-DOM-DOM, the do-DOM-DOM

Yesterday was JavaScript day.

Richard and I had the pleasure of delivering a SkillSwap presentation on "JavaScript and the DOM". We’ve been preparing it for a few weeks now. Before the event yesterday, we got together at Richard’s place to combine our notes and examples.

I also had the pleasure of savouring Richard’s cooking: a succelent roasted pork fillet wrapped in Parma ham, garnished with rhubarb and served with organic broccoli and potatoes. Is there no end to this man’s talents?

I wasn’t about to rush a meal like that which explains why I made it to SkillSwap presentation just in the nick of time. I connected my iBook to the projector, activated Salling Clicker and got the show on the road.

It went well. I talked about the history of the DOM, Richard provided a refresher in JavaScript syntax and we both talked through some examples. After that, I explained the concept of unobtrusive JavaScript and we then worked through some more examples of nifty little widgets. I think we managed to put a few lightbulbs above people’s heads and get them thinking of the great possibilities that the DOM offers.

Today is not JavaScript day. Today is Jessica’s birthday. My task for today is to fulfil her every wish, shower her with gifts and take her out to dinner.

Thursday, July 22nd, 2004

Mother London

I was in London yesterday for a meeting with one of Semantico’s clients.

I don’t get up to London that often so I was determined to make the most of it. The meeting went well and once it was over, I took a stroll around the area. My feet took me to the British Museum and I was irresistably drawn inside.

Walking into the great court never fails to give me a thrill. It is truly a remarkable architectural achievement. I strolled into the Library and wandered ‘round the exhibits, soaking up the treasures of the world. When it came time for me to my make my way back to Brighton, my head was swimming with cultural sensory overload.

Speaking of feeding the senses…

If you’re planning on reading William Gibson’s Pattern Recognition, I highly recommend doing so when in transit to London. The novel is a fantastic snapshot of life in early 21st century London. Reading in its setting adds another level of richness.

Much as I love visiting London, I’m always quite glad to get back to dear little provincial Brighton. Certainly, after just one day of getting the train to London and back, I’m eternally grateful that I don’t have to make the commute more often. Sorry Richard. Sorry Jay. I don’t know how you guys do it.

Tuesday, July 20th, 2004

Registering my displeasure

The hot topic of the day would appear to be newspaper sites that require visitors to register before allowing them to read any articles. Wired is running a story which ties in nicely with last week’s article about The New York Times and its lousy pagerank.

Jeff Veen points out that visitors will view the registration process as damage and find a way to route around it. Simon Willison is also on the case.

The unanimous verdict is that registration is annoying, dangerous and, given the copious of amounts of fake data, a complete waste of time. One positive aspect about the whole debate is that it’s generating plenty of publicity for a tremendously useful site called BugMeNot which stores and retrieves usernames and passwords in order to bypass the registration process.

I came up with a little bookmarklet for the site. You can drag this link to your toolbar:

Bug Me Not

Whenever you come across an article that requires registration, you can click on that link to query BugMeNot’s database for a username and password.

I thought I was being very clever until I realised that there’s already a bookmarklet on the front page of the BugMeNot site. Doh!

The grand alliance

Given the martial tone of some of my recent posts, I’m starting to feel more and more like a warblogger.

This’ll be the last watch-the-skies type linkage about the impending browser apocalypse for now, I promise…

David Temkin attends a workshop on web apps:

"What will stem the XAML tide is an alternative application markup technology that is deployable across the Web, and not specific to Windows. Coming from the W3C viewpoint, this would be a difficult problem to solve considering the realities of what it would take to upgrade the browser and get it installed on everyone’s desktop."

Partly as a result of that same workshop, the WHAT-WG was formed by attending representatives of Mozilla and Opera. Here’s an audio interview with the Gilmour gang about WHAT-WG and more.

Finally, Jon Udell has a chat with some open-source mavens about Longhorn, XAML and Avalon.

That concludes this public service announcement. Go about your business, citizens. Remain vigilant.

Saturday, July 17th, 2004

Regurgitating the chestnut

Andy Clarke has resurrected the always topical issue of fixed width vs. liquid layouts. This is something that also arose on the Brighton New Media mailing list last week.

What’s refreshing about Andy’s post is his honesty in admitting why he’d rather simply use fixed widths:

"I struggle very hard with letting go of fixed-widths and I am also sometimes guilty of convincing myself that a fixed-width is ‘OK’ because it ‘suits the content of the site’ better than fluid."

All too often, designers try to justify using a fixed width layout by falling back on weak arguments when the real issue is one of control. It’s nice to see a designer being honest with himself about his motivations.

I’ve since been chatting with Andy about the whole issue of making layouts fixed or liquid. My approach is to always make the layout liquid to begin with. Then, if circumstances (read: clients) truly dictate that a fixed width is required, the simple addition of one line to a stylesheet constrains the width:

body { width: 750px; }

Then, weeks later, sneak in during the night and serrupticiously delete that line. All in the name of freedom, of course.

Unsurprisingly, Andy’s post generated some lively debate which raised the wider issue of "who are we making web sites for?". My take on this issue is:

"While it’s true that you are building the web site for the client (in the sense that you are exchanging a service for money), the site is going to be *used* by someone completely different. Unless you’re building for a one-person intranet, the client is not the user. Web sites aren’t like paintings that we create for someone to put up on their own wall to be looked at: they are created for the world to use."

As web designers we should always be trying to please our clients but, more importantly, we should endevour to please the people who will be using the web sites we make. Simply saying "the client made me do it" will only stretch so far.

Yeah, I know: I’m coming across as pompously idealistic. Believe me, I know how much pragmatism is required in the world of web design. But always remember: the users are counting on you.

Now, let’s get out there and make some web sites. Hooah!

Pop-up blocker stopper

I probably shouldn’t even mention this for fear of giving anybody any ideas but it looks like there’s a way of circumventing pop-up blockers.

If you visit the gas face site using a browser that blocks pop-up windows, like Safari or FireFox, you’ll still be presented with a new browser window. Normally these browsers stop this from happening by cancelling any JavaScript “onload” events that involve the creation of a new window. Viewing source on the gas face site shows that, although there’s a JavaScript function for the creation of a new window, it isn’t triggered by the “onload” event. Instead, it’s being triggered by a .swf file.

Because Flash is capable of executing JavaScript, the pop-up window is created as soon as the .swf file loads. Tricksy.

I sure hope there’s no advertising executives reading this.

It’s time to nip this in the bud. Although it’s not technically a bug, I’m going to press that little button in the top right corner of my browser chrome and inform Dave Hyatt of this discovery. I think I’ll also do a bit of digging to see if anyone has reported this as a Mozilla bug.

Friday, July 16th, 2004

Picture perfect

Tim Bray points to a great collection of photographs by Richard Friedman.

This one of the Lauterbrunnen valley in Switzerland looked familiar immediately. I’ve clearly been spending too much time at the Apple site.

Thursday, July 15th, 2004

The gathering storm

At the risk of turning this site into “Browser Watch”, I simply have to point to Ben Hammersley’s article in today’s Guardian called “The second browser war”.

The first half of the article deals with Internet Explorer’s slipping market share:

“This last year has seen a series of well-publicised security issues with IE coincide with the maturation of the various alternatives to IE. This results in many people moving to systems such as Firefox, prompted invariably by news reports, good reviews or the recommendations of friends.”

That certainly fits with what I’ve been seeing, including this fifty step programme on how to stop Internet Explorer pop-ups (including pop-ups that occur when Internet Explorer isn’t even open).

Then there’s Microsoft’s decision to stagnate browser development while the competitors have been forging ahead in leaps and bounds. Ben points out something that allays my fears somewhat about the way that browser manufacturers develop their products today compared with the bad old days of the browser wars:

“The developers of alternative browsers have been concentrating on the support of openly developed standards. Instead of developing things in-house and dropping them on a previously unsuspecting opposition, Microsoft’s rivals are working with each other to implement public standards from bodies such as the World Wide Web Consortium (W3C).”

The second half of the article deals with the issue so succinctly summarised by John Gruber:

“However, what would happen if people’s web browsers were capable of running complex applications, with code based on openly published specifications? Two things: first, the operating system would become irrelevant, so there would be no need to upgrade to the next version of Windows, and second, the playing field for everything else would be thus levelled. The majority of Microsoft’s business, therefore, could have been threatened if the IE browser team had continued past 2001.”

I guess that answers my question about why Microsoft decided against going the standards-based route for XAML: if they did that, they’d have to compete on a level playing field that could potentially endanger their main source of income.

It looks like the battle lines are being drawn with the WHAT-WG and other standards bodies on one side and Microsoft on the other:

“By wrenching control of the standards for building such applications away from Microsoft today, rivals hope they can prevent another near decade of Windows domination. Microsoft, for its part, is not going to go down without a fight.”

I don’t think it’ll all be over by Christmas.

Wednesday, July 14th, 2004

Embrace and extend

Dave Hyatt has been blogging about the way that Dashboard will require some new HTML elements.

‘Some new HTML elements’… there’s a phrase that’ll sound a note of dread in the hearts of any developers who lived through the browser wars. Let’s face it: adding new HTML elements like <canvas> is no different than adding elements like <marquee> or <blink>.

Tim Bray and Eric Meyer, two people I admire immensely, made their voices heard. They both made basically the same point which is that, when you want to extend HTML, you should really be using XHTML and simply adding a namespace.

It’s extremely reassuring to see that Dave Hyatt has listened to these suggestions. He’s not only listening, he’s also acting on them.

I’m still nervous about the idea of adding non-standard elements to HTML, as is Ian Hixie, but the transparency that Dave is maintaining is very encouraging. The overall consensus is that, thanks to this debate, things are going in the right direction.

The same can’t be said for the future development of Internet Explorer. Despite holding a chat, ostensibly to listen to developers’ wishes, it sounds like Microsoft are just going to ignore the pleas for better standards support and security.

Saturday, July 10th, 2004

Home again, home again

I’m back from the west of Ireland. I was sorry to leave. I had a wonderful, music-filled time.

I’ve already filed my music travel report over at The Session so if you’re interested in Irish traditional music, that’s the place to catch up on what’s been happening in Miltown Malbay.

If you’d prefer a more pictorial impression of the past few days, I’ve put together some pictures of my time in West Clare.

The weather was lovely and mild the whole time. Jessica and I took advantage of the weather and the scenery. We started each day with a five mile walk down to the beach and into town. When we got back to England we heard about all the really bad weather that hit the south coast. I’m glad I missed it.

The trip started with a bit of an upset. When I got to Heathrow I realised that I had forgotten my passport. Someone just kick me. Technically, a passport isn’t required for travel between the UK and Ireland but some form of photo ID is needed. I didn’t have any. Luckily for me, the man at Shannon airport was more than happy to let me into the country anyway.

The friendliness continued with a nice chatty bus driver who took us to Ennis. From there, we decided to get a taxi.

Now, when I was planning this trip and arranging the accommodation at a Bed and Breakfast over the phone, I asked for the address so that we’d be able to find the place.

"Sure, just tell them my name", the proprietress told me. "Everyone here knows where it is."

I decided to give it a try. I told the taxi driver the name of the woman who ran the B&B. Sure enough, they knew each other for years and when we arrived, they had a nice cup of tea together.

The B&B was in a beautiful, peaceful location. The calm was shattered on our first night there, however, when a gaggle of loud guests from Kerry, who were returning late, woke up the donkey in the field next door.

Take it from me, you don’t want to be woken up by a donkey at four in the morning.

Apart from that, everything went smoothly. Jessica and I hung out with another girl staying at the B&B who was writing the third edition of Ireland For Dummies. Together, we investigated the local cuisine and, of course, the magnificent non-stop music.

Getting back to Brighton proved to be something of a chore. Our flight was delayed but I didn’t mind that so much seeing as Shannon airport (along with Dublin) offers free WiFi. Our bus back from Heathrow was also running late. We didn’t make it home until midnight.

Now it’s back to reality. I’ve left behind a land where the pubs have good drink, no smoking and civilised opening hours. I’ve returned to a backwards civilisation where the so-called beer tastes like dishwasher, my clothes are permeated with other peoples’ smoke and an evening in the pub ends with forcible ejection as soon as the curfew is sounded.

I might start planning my next trip right now.

Saturday, July 3rd, 2004

Have t-shirt, will travel

I just finished coding an e-commerce site with Message. The Rapha website, selling cycling apparel, has launched just in time for the Tour de France.

It was a fun project to work on and I’m pleased with how the shopping cart functionality turned out. If you’ve ever wanted to spend £130 on a cycling shirt, you can now do so from the comfort of your browser.

If that’s a bit too rich for your taste, might I recommend the official t-shirt of The Session? It’s a relative bargain at $14.95 and it comes in a range of sizes and styles.

I threw the design together quickly last night after reading this discussion requesting just such an item. Now I wish I had done it sooner. Then all of us Session folk could easily recognize each other at the Willie Clancy Summer School in the west of Ireland.

Willie Week, as it is fondly known, is a bacchanalian celebration of traditional Irish music that takes place every year in West Clare. I’m headed there tomorrow and I won’t be back ‘till Thursday. I’ll be flying into Shannon and then making my way to Ennis. After that, I have to figure out the simplest way to get to the somewhat innaccessible town of Miltown Malbay.

When I was planning the trip, I called up the bus station in Ennis to enquire about buses to Miltown Malbay. A woman answered the phone:

"Ennis bus station. Yes?’

"Hi. I’d like to ask about the times of buses to…"

"Hang on a minute: I’ll put you through to enquiries."

There then followed a short burst of bad midi muzak while I was on hold. Then I heard what was clearly the voice of the very same woman:

"Enquiries. Yes?"

Anyway, the up-shot of my enquiries is that, while there are no normally no buses going to Miltown Malbay, during Willie Week there’d be "loads of them".

It’s going to be fun. And, thinking about it, maybe it’s just as well that there won’t be any sort of spotting of Session t-shirts going on. That would be a bit nerdy.

Mind you, it wouldn’t be nearly as nerdy as this vignette from a musician attending a Renassaince Faire in full costume:

"We had some Trek costumed patrons once who walked by our performance and proclaimed "computer, freeze program" so, being the Trek fans we were, we did and started back up again when they announced, "computer, resume program"."

Friday, July 2nd, 2004

Dashboard confessional

One of the most contentious of the new Tiger technologies announced at Apple’s Developer Conference is Dashboard.

Most of the contention stems from its striking visual similarity to Konfabulator. My first reaction was that it was a direct rip-off but I wanted to wait for the dust to settle instead of voicing a knee-jerk reaction. I’m glad I waited. John Gruber explains in great detail that, despite the superficial similarities, Dashboard and Konfabulator are very different under the hood.

That’s where the next bone of contention arises: just what is Dashboard?

My first reaction to Dashboard was that it sounds like XAML: Web Apps that sit on the desktop. Redmond, we have a problem indeed.

In fact, Dashboard is more XUL-like than it is XAML-like. It’s going to use existing standards (CSS, the DOM, etc.) instead of creating its own proprietary format.

Dave Hyatt sees Dashboard as being more like:

"a collection of HTML sidebar panels liberated from the browser window and placed anywhere on your screen."

Todd Dominey initially thought Dashboard smellt like ActiveX although, after some clarification from Mr. Hyatt, that fear has been mostly allayed.

The simple answer is that Dashboard is a framework for viewing web pages. These pages use XHTML, CSS (including CSS3!) and JavaScript. But it’s not a browser.

So we’ve basically got mini web apps that sit on the desktop instead of the browser and that are wrapped in an Exposè-like container. It all sounds very cool but I do have some niggling doubts…

I think one problem is being swapped for another. Instead of worrying about browser compatibility, we’ll have desktop incompatibility.

Let’s say you want to write a little app that sits on the desktop and pulls back some data from a website in order to present in an attractive little widget. You can write it in XAML for Longhorn or Dashboard for OS X. But if you to write your application once and still have it work on both operating systems, your only choice is to take the app off the desktop and put it back in the browser.

It’s interesting to see how Apple and Microsoft have approached the same issue from different directions.

Apple have created a framework for web apps to sit on the desktop (although they work equally well, but without the eye-candy, inside the browser).

Microsoft, by all accounts, plan to kill the browser entirely. Certainly, they plan to merge the desktop and the browser into the same XAML-based environment.

Apple have an advantage in basing the Dashboard technology on existing standards. I believe that most developers will first and foremost make web applications to work in the browser. These may then get ported to desktop frameworks. Porting those apps to Dashboard will be very straightforward indeed. Porting them to XAML will involving re-writing all the XHTML, CSS and JavaScript.

Microsoft, however, can counter that with an advantage of their own: sheer force of numbers.

I really, really wish Microsoft would go down the standards-route with XAML. Then, we developers could concentrate on writing our apps using the standards and be assured that they will work on any platform. The platform makers, meanwhile, could concentrate on outdoing each other by coming up with the slickest interfaces and the smoothest execution.

In the meantime, the only environment that comes even close to that utopian ideal is the browser.

Thursday, July 1st, 2004

The mac rumour mill

Daniel Bogan pointed out this very interesting tidbit from the iMac page of the Apple website:

"Apple has stopped taking orders for the current iMac as we begin the transition from the current iMac line to an all-new iMac line which will be announced and available in September. We planned to have our next generation iMac ready by the time the inventory of current iMacs runs out in the next few weeks, but our planning was obviously less than perfect. We apologize for any inconvenience to our customers."

Let the rumour mongering begin.