.

Cat O’ Nine Tales

Over the last several days I’ve been enjoying short stories written by one of my favourite authors, Jeffrey Archer. His book, Cat O’ Nine Tales, is a collection of short stories based largely on stories he heard in prison. It’s been on my shelf for quite a while, (I think I received it last year for Christmas in 2008), and for some reason I haven’t picked it up, a mistake I will try to avoid in the future.

It’s refreshing to change from the longer books that I’ve been reading to short stories. They’re fun to read and each one doesn’t take too long, especially when they’re as engaging as these ones.

I have another Jeffrey Archer book that I haven’t read, Shall We Tell the President but I’m told that I should read The Prodigal Daughter first, and I don’t have that one, so I am keeping my eye out for a copy.

The cover of Cat O' Nine Tales
Want to read it yourself? Get it from one of these places and I’ll receive a small kickback:

Amazon.com (US) Amazon.ca (Canada) Amazon.co.uk (UK)

Show your Olympic Colours

I’ve turned johnbeales.com and @johnbeales red for the 2010 Olympic Games in Vancouver. Join me and do the same for your blog, Twitter profile, or both.

Look how awesome my twitter profile looks all decked out for the Vancouver games:
Vancouver 2010 Twitter theme

You can do the same. Here’s a ZIP file containing the PSD Source, and PNGs of both my Twitter background, (with the text), and the blog background, (without the text).

Go nuts, and let me know here or on Twitter about it!

Edit: Here are direct links to the backgrounds with text, and without text.

Up in the Air

After reading about the economy and about Javascript it was time for some Fiction. I received a copy of Up in the Air, (the book that they based the movie on), for Christmas that’s just been sitting on a shelf so I pulled it out and read it.

I haven’t seen the movie, (although I will probably rent it when I can), but had read some reviews that were critical of it because, at least according to the reviews, we’re supposed to feel sorry for Ryan, (the George Clooney character), and he’s a guy that goes around the country firing people, essentially making their jobs miserable. I’m not sure if it’s a difference of interpretation, or if things have been sensationalized for the movie, but in the book he’s the guy that “counsels” employees right after they are fired, mostly to stop them from suing. It’s not much better, I know, but it does seem slightly better. In the book, though, we really get inside Ryan’s head, which can be a confusing place at times, and we see what he really thinks about his job, the people around him, and the world. It’s especially interesting to see how his impressions of people change over the course of the story.

I’m really interested to see if we get the same level of intimate access to Ryan in the movie as we do in the book, and how they made the jump in general. If the movie is half as interesting as the book, it should be an interesting film to see.

The cover of Up In The Air
Want to read it yourself? Get it from one of these places and I’ll receive a small kickback:

Amazon.com (USA) Amazon.ca (Canada) Amazon.co.uk (UK)

Getting Started with HTML5

I’m working on a project now were we’ve decided to go with as pure HTML5 as posible, and it’s a breath of fresh air. Things work more or less how they should, and Internet Explorer is even playing along, with a little help. Getting started was a bit of a trick, though, as it can be hard to find information on how HTML5 works without diving into specification documents, which is never fun, or easy, (if you don’t want to read the story, skip straight to the resources).

I hadn’t been following the development of HTML5 with more than a passing interest. I figured that when it was ready, then I would start using it. I also understood that there were different parts that may reach completion at different times, and was keeping my eye open for some sort of “completion” signal. 2009′s 24 Ways was that signal for me. There were several articles on using HTML5 features along with their CSS3 counterparts, and enough evidence that browser support is there to start my investigation.

Here’s the deal: Basic HTML5 support is pretty good in webkit-based browsers, alright, (read usable), in Gecko, and kind of lacking in Internet Explorer. However, if you can rely on Javascript being present, (which I can in my project), there’s an HTML5 Shiv Javascript by Remy Sharp that makes it so that you can style HTML5 in Internet Explorer. Add it using a conditional comment and you’re good to go.

So, we have useable cross-browser support, but where do we turn to learn about which tags are in, which are out, the correct doctype and mime-type, and all that? We could read the specification, (and we will have to read a bit, at least), but it would be nice if there was an introduction to HTML5 somewhere. It turns out that Robert Nyman has written an Introduction to HTML5. It’s detailed enough to get you started, but not so detailed that you get lost, (like the spec), and if you’re looking to be convinced of the value of HTML5, check out HTML5: Tool of Satan, or Yule of Santa?, Have a Field Day with HTML5 Forms, and Breaking out the Edges of the Browser from 24 Ways 2009.

Once you dive a little deeper you’ll find that there are elements of HTML5 that you need more in-depth information for, so it’s time to turn to the spec. However, there are 2 groups, (W3C and WHATWG), working on HTML5, and therefore 2 spec documents, (fun!). Fortunately, the two groups have the same editor, so they’re more or less working on the same thing. I find the WHATWG HTML5 document easier to read, but if you prefer the W3C version, go nuts.

Finally, the whole content-type debate that’s been going on for what seems like centuries is still a mess. In HTML5 you’re supposed to include a Document Type Definition and there should be no namespaces on the HTML element if you’re serving as text/html, and you’re supposed to serve in application/xhtml+xml if you want to use namespaces, or force XML validation, or anything like that. The problem is that Internet Explorer really doesn’t like application/xhtml+xml, (it shows the raw XML document), so if you need a namespace for some reason, (for example, you want to use Facebook Connect on the site), you can’t serve valid markup.

So, that’s it. HTML5 has arrived, or at least parts of it. If you can rely on Javascript being present, or rely on IE users not using your web app, you can go ahead and start using it. Here’s a quick recap of the resources:

Javascript: The Good Parts

Over the weekend I finished reading Douglas Crockford‘s JavaScript: The Good Parts.

This book spent quite some time on my to-read list and I am really happy to have finally read it. I now feel that I really know how to use closures in Javascript, and Mr. Crockford has inspired me with his use of functions as values, and creating functions that return functions or objects, maintaining access to local variables within a closure, is genius.

I found myself leaning heavily on my previous knowledge to understand The Good Parts, making it, as it says in the preface, not a book for beginners. I can imagine that the Regular Expressions chapter might be tough without a pre-existing understanding of regular expressions, however, that’s easy to obtain at regular-expressions.info.

After reading The Good Parts I’m really excited to work on some Javascript that I’m going to be refactoring and improving over the next few weeks. I can apply the some of principles contained here to write smaller, faster, and easier to maintain Javascript, something that is always my goal.

The cover of Javascript: The Good Parts
Want to read it yourself? Get it from one of these places and I’ll receive a small kickback:

Amazon.com (USA) Amazon.ca (Canada) Amazon.co.uk (UK)