Sunday, 25 January 2009

Review Catch-up

I've been falling very far behind on my book reviews. I have actually been reading, I just haven't been reviewing. And, well, once the backlog of books gets more than about four high it's pretty hard to write proper reviews.

I'm cheating. I'm going to catch up by writing short reviews of all the books I've read in the last six months or so. And from there I should be able write real reviews for books again.

Without further ado, here's six months worth of books in three sentences, or less.

On Her Majesty's Secret Service, Ian Fleming. Part of the book club, I wanted to get a feel for actual Ian Fleming Bond books, before reading Faulks'. Fun, enjoyable, if you can avoid hurling the book across the room in the first 20 pages out of frustration over the blatant misogyny. I managed - just - and found it got better.

Devil May Care, Sebastian Faulks. The actual book club book - a Bond story, set in the '60s, but written just last year by Faulks, in the style of Ian Fleming. Less misogynistic and generally offensive, but a lot less enjoyable. I frequently got bored and would put the book down, forgetting to pick it up again for a little while.

The Road, Cormac McCarthy. Another book club book - this one was brilliant, some thought it was depressing, but I found it uplifting. The ash and the grey bleakness practically leaches onto your fingers out of the page, which is nothing on the handful of images in this book that you will probably never forget. It's a fantastic book, but be warned.

The End of Mr Y, Scarlett Thomas. A potential contender for most pretentious book I've ever read, possibly even beating Virginia Woolf's Orlando, but don't let that put you off, it's actually pretty good. It a tour through literary criticism and modern physics with a significant dash of metaphysics tossed in - it felt inspired by Pynchon. Quite original though, and recommended.

One Day in the Life of Ivan Denisovich, Aleksandr Solzhenitsyn. Another book club book - chosen because, well, he'd just died. An absolutely great book, and a deserved classic, I have essentially no complaints and instruct you all to read it - it's short, funny and a very easy read. However, apparently this book inspired many in the west to embrace communism, and that I just can't see.

A Clockwork Orange, Anthony Burgess. A book club companion book, for One Day In the Life..., chosen because it was a banned book, and coincidentally it features a lot of Slavic inspired slang, without any explanation - which was actually surprisingly cool. Unfortunately, I haven't seen the famous movie. The book was a good, but a little weak.

Seize the Day, Saul Bellow. Because of all the short books, I went for another companion book - this one was a 'day in the life' story. Fellow book clubbers felt that our last two books (The Road and One Day in the Life of Ivan Denisovich) were very depressing - but this, this is depressing. Every single character is deeply detestable, not just in nature and behaviour but also in past: this is a book to attack your opinion of your life and make you doubt everything. Be warned.

Stranger in a Strange Land, Robert Heinlein. A monster sci-fi classic from the golden age of science fiction, regarded as serious, deep and important. Also, utterly hilarious, and quite irritating. The funny comes from Heinlein's sexism: he simply could not conceive of any kind of female equality that wasn't some kind of weird submissive promiscuouity. That and the long discourses on various aspects of science are also very irritating: please don't put incidental exposition in dialogue, it's trite.

Twilight, **Stephenie Meyer"". Book club again - vampire chick-lit was the required genre and this hit it. Very readable, but I was hoping that something would happen. I guess I was never a teenage girl.

The Graveyard Book, Neil Gaiman. Excellent: just the right line between a fun story and something that felt just a little darker and deeper. It's a re-writing of Kipling's The Jungle Book, though this is subtle. While it is a 'young adult' novel, read it and enjoy it, a very good book.

Odd and the Frost Giants, Neil Gaiman. A very short $2.50 novel that I read in 45 minutes. Cute.

The Virgin Suicides, Jeffrey Eugenides. Wow, one of the best books I've read in a very, very long time. It's different, it draws you in, you become part of the story; in a very engaging way. Shortly after reading I saw the movie: and also wow, a very faithful to the spirit rendering.

Still Life, Louise Penny. Wow, one of the worst books I've ever read. Seriously, this is absolutely abysmal. Murder-mystery in genre, but pure rubbish in execution. All the way through the book I had to keep putting it down to avoid the hurl-across-the-room feeling. For example, first chapter identifies the murder victim; second chapter goes back in time a couple of days, to the victim talking to a friend in a café, she reveals that she saw a crime. And then without any pretense, the description the crime is skipped. I mean, come on! Gee, do you think that could have something to do with her death? But then, in a few pages you find out what happened anyway. And! In the end, that crime has nothing to do with the murder. Christ. After this and The Blind Assassin Canadian literature is dead to me. Oh, and this was a book club book as well.

Altered Carbon, Richard Morgan. A tip: if you read something really bad, read something light that you know you'll enjoy very quickly afterwards or your brain will start to tell you that the hours you have to put into a book are a bad investment. This was a good counter: a really cool sci-fi noir story. Most interestingly, this was a novel centred around a highly socially disruptive technology, but in the window before the tech becomes ubiquitous and available to all. That window is interesting. There are also some Banks-ian characters, without quite the same detail in the characterisation, please read if you like sci-fi.

Pomegranate Soup, Marsha Mehran. Again, thanks to the book club, this was a simple story, and just plain nice. It wasn't particularly well written, there wasn't a great deal that happened and the characterisation was just plain atrocious, but in the end I enjoyed reading it and I found the story was... nice. Apart from the transparently good vs evil characters, a major criticism is the lack of direction: there are frequent, unexpected changes in direction. She almost redeems herself with a glimpse into the past of the main villain, but it just doesn't seem to go anywhere. Still, ... nice.

And the funny thing about all that? It seems to be much easier to write something about bad books than good books. That would say something the reviewer, I think. I shall work on that.

Monday, 19 January 2009

Finding Mutual Follows

When you're a Twitter'er you will often be in a situation where someone follows you, and you're wondering, 'Who is this person? Do I know them?' Well, I can't answer that question for you. But, I have found that one thing that tells you about your new follower is who they follow that you also follow. Follow?

I want to be able to ask the question 'Who do we know in common?', in short. A useful question, but one that can take quite a while to answer using the web site. I asked the lazy twitterverse if there was already an app for this, but my twitterverse is too small to get an answer. So, I wrote my own script. I don't have any handy web space to run this from, so you'll have to grab it and run it yourself. You will need to install the twitter4r gem first:

sudo gem install twitter4r

Then paste the following code into a Ruby file, and run. It takes two parameters, the names of the two users for who you want to find common ground.

require 'rubygems'
require 'open-uri'
require 'rexml/document'
require 'twitter'
class Twitter::User
  def all_friends
    users = friends.map { |f| f.screen_name }
    # If there's more than one page of users, we've already got the
    # first one
    page = 2
    found_users = friends.length
    while found_users >= 100
      found_users = 0
      open("http://twitter.com/statuses/friends/#{screen_name}.xml?page=#{page}") do |f|
        users_doc = REXML::Document.new(f.readlines.join(''))
        users_doc.elements.each('/users/user/screen_name') do |friend_name|
          users << friend_name.text
          found_users += 1
        end
      end
      page += 1
    end
    users
  end
end
def in_common(my_friends, other_friends)
  my_friends.select { |m_n| m_n if other_friends.member? m_n }
end
def main(me, other)
  c = Twitter::Client.new
  me_friends = c.user(me).all_friends
  other_friends = c.user(other).all_friends
  in_common(me_friends, other_friends).each do |f|
    puts "  #{f}"
  end
end
main(ARGV.shift, ARGV.shift)

Enjoy, and please let me know how it works out for you, or if you make any changes. And by the way, *this* is why RESTful APIs rock.

Sunday, 18 January 2009

The Kite Runner

The Kite Runner
Khaled Hosseini

You would have heard of the movie for this one. It achieved some fame when the two Afghani child actors had to be smuggled out of Afghanistan for their own protection. Apparently, acting in a rape scene put their lives at risk. I haven't seen the movie, I'd be interested to hear what people thought of it.

This book is in two parts. The first part is a child's impression of living in a relatively stable and developed third-world, feudal country before the rest of the world decided to use that particular patch of ground as a World War-by-proxy. The first part continues with a story of poor outsiders attempting to make a new life in a very different world. This part of the novel is very, very good: it's a charming view into a destroyed world that we don't hear much about it, and certainly nothing good. Continued with a very real feeling tale of making the best of a potentially unpleasant world, and building a new life there.

My recommendation is to read this first part and then stop. I'll tell you what, send me your copy of the book, I'll remove the second part and then it back to you. Because the second part is just plain terrible.

The second part is a long sermon on how damaged Afghanistan is now. I don't have a problem with being told this. I do actually think us cozy, safe residents in front of our TVs need more confrontation of the destruction done on our behalf. And I'm not uncomfortable with placing blame: the entire first world and all the individual citizens therein, are responsible. But, oh my God! Is this ever preaching! Yes, Afghanistan is in a very bad state. We see that, we know that. The real effect and impression of the damage done comes not from preaching, but from the contrast of what we hear and see with what we read in the first part of this book. Beyond the preaching, there is also a monotonous tone and freaky coincidences to wear you.

My advice again, read the first part and then stop. Pretend the book is over. You'll enjoy it better that way, trust me.

Saturday, 3 January 2009

Perhaps You Shouldn't Get Involved in Free Software

Say you're a bright young kid at Univeristy and you've decided that computer science is what you want to do with your life. What should you start doing with yourself to live that dream? One piece of advice you will frequently hear is 'Get involved with an open source/free software project.' Should you?

Short answer: yes, with an if. Long answer: no, with a but.

If you want to be working in computer science, you'll probably be programming. A lot. And in fact, this is probably what you want to do. Like all professional skills, programming takes a large amount of practice before you become truly proficient. The commonly cited figure is 10,000 hours of practice to become proficient in your chosen profession. The sooner you get started on those 10,000 hours, the sooner they'll be over.

Becoming involved with an open source project is a great way of getting your practice in. You could also practice on your own project of course. But, you'll get more satisfaction from contributing to an open source project that others use. To become involved though, you'll need some level of proficiency. So hack around with your own projects; write a game; then start reading the mailing lists of an open source project you use and pick a simple bug from the tracker. There's lots of advice out there on how to become involved, I'll leave that up to you.

That's a pretty good reason to become involved with an open source project. And if that is your reason, head on out there kid, you'll do great.

That's the 'if'. Now for the 'but'.

Notice above that I referred to getting involved with an open source project? Not the open source community? If you're a particularly bright kid in your class, then please let me beg you to think deep and long before becoming involved in the community.

Why are computers important? Step outside of your beloved field for a moment and ask yourself, why do you think computers have been an important and interesting invention? Why is writing software for expensive, abstract machines to be used by the middle-class of the first world a noble endeavour? How can better computer science help people? I mean really help people. Not allow them to quickly find a cheaper price on that expensive gadget they don't need, but do the really important things: cure malaria, educate the third world, connect with strangers, fall in love. Whatever it is you think needs solving.

Personally, I do think computer science has the potential to make the world a better place. And I believe you don't need to be working in some research lab to achieve that. My definition of making the world a better place is simple: find someone with a problem, solve it, and leave them to find other problems in need of solutions. As an organic, growing, network every individual has the ability to change the world for the better by focusing on this question: where do I see problems that my expertise can help solve?

And here lies my issue with the open source and free software communities: being able to recompile the kernel to your operating system is a problem that only other programmers have. The rest of the world see computers and software as tools to solve their own sets of problems. Anytime a computer or program does not do what they want, a problem goes partially unsolved. And that particular unsolved problem is a problem you're simply unqualified to solve. You, as a programmer, can only ever indirectly help with those problems.

Lifting our heads outside of our insular worlds of programmers and computer scientists, we can see that the rest of the world has a problem with computers. These supposedly powerful devices, that the first world has invested a huge amount of resources in improving over the last 20 or 30 years just don't seem to have reached their potential. Instead, rather than constant improvement with the goal of improving the lives of real people, computing has become insular. Insanely insular. Programmers either solve problems only other programmers have, or they simply duplicate the work of other projects, poorly. Very poorly. And this is most obvious in the free software communities. In my opinion, the world does not need another poor implementation of a 38 year old operating system. The world does not need another poor duplicate of photo editing software. The world does not need another poor duplicate of office productivity software.

The world needs the potential of computers applied to new problems. Or, at the least, original solutions to already solved problems. And in my opinion the free software community, in its current incarnation, will never deliver on either of those. The free software community is tackling what they see as a moral and ethical problem: source code wants to be free. Their current solution to this problem is to duplicate every popular piece of software with a suitably free license. So entrance into the free software community requires accepting this, and then duplicating existing commercial software. To me, that sounds like a complete waste of my brain.

And if you're as bright as I think you are, then it sounds like a complete waste of your brain as well. Please, choose to advance our industry, take it in new and interesting directions. Start your own company, work for a large company. These are not immoral decisions. You will be advancing the sum total of human knowledge, you will be solving real problems of other people. People without the expertise to solve these problems. Expertise you have.

And this is without even getting into the ethics of duplicating someone else's work.

The free software rhetoric can also damage both computing and free software. Personally, I found the moral aim of the One Laptop Per Child program repugnant. But, their efforts to re-imagine what computers could be was exciting and full of potential. But, eventually all for naught as the program has been tried, found guilty and executed in the court of free software. Why? Because they chose to use a non-free (gasp!) wireless network driver and because they chose to allow Windows to run on the device. The project was found wanting, and abandoned. Why does the choice of underlying operating system matter that much? If the project believes their new approaches were of value, why not try to improve Windows? It's not as if these computers would be powerful enough to re-compile Windows anyway, even if the code was available.

You're young, you have brains, you have energy. Please think about it before deciding that the free software community is where you want to devote your energy. Do not write off working for Google, Silverbrook Research, ThoughtWorks, or even Microsoft. There is nobility there, I dare say more than there is to be found in holding back our industry.