25 August 2009

500 days of Basterds

Well - that was fun! (no, it really was fun!) I had a ticket for a preview of a movie called 500 days of Summer; a rom-com, which, mainly because it features Zooey Deschanel, I was really looking forward to seeing.

Now, it's not uncommon for me to be rushing to get to these seefilmfirst showings, because they're always at 6:30 PM and my time-keeping is abysmal, but for once I was there in plenty of time, and what happens? It gets cancelled!

All was not lost however - in recompense, the Odeon gave everyone a free ticket for anything else, which, considering it was going to be free in the first place, was pretty amazing of them.

A couple of weeks ago I missed out on the chance to see a preview of Inglourious Basterds, the new Quentin Tarantino movie, and, what do you know - it was one of the options... SCORE!

I'm just back from seeing it and, let me tell you, if you're a fan of QT's previous work, you'll love this, it's brutal, it's comic and for the most part, the bad guys get what they deserve. If you have two and a half hours to kill - and I do mean kill - I heartily recommend it!

As for Miss Deschanel, maybe she'll reschedule, maybe she'll get lucky and I'll go and see her... we'll see (it doesn't do to come across too needy, does it?)

14 August 2009

RubyWMQ

I've been playing with ruby (and rails) for about a day now, and I'm starting to really like it. It's even beginning to collide with work, found a really useful interface into MQ - which is the product I work on, RubyWMQ. It's incredibly easy to use - the following, for example, connects to a queue manager and puts a 'Hello world' message:

require 'rubygems'
require 'wmq/wmq'

WMQ::QueueManager.connect(:q_mgr_name=>'RUBYQM') do |qmgr|
qmgr.put(:q_name=>'QL', :data => 'Hello World')
result = 'CC ' + qmgr.comp_code.to_s + ' RC ' + qmgr.reason_code.to_s
puts result
end

It even prints out the compcode and reason aswell!

13 August 2009

On the Rails

So, I thought I'd have a go at being all modern, I thought I'd try playing with Ruby and Rails, I'm following a book, and it looks like it ought to be really simple - it's not quite as simple as they say though, the book says that all I need to to is install Ruby then use ruby to install Rails, but actually to get something working you need to install Ruby, install Rails, Install the sqLite ruby support and download sqlite.
  • Install Ruby
  • gem install rails
  • gem install sqlite3-ruby
  • Download sqlite3.dll and copy it into the Ruby bin directory
This worked for me, at least - then create and serve a rails project with a welcome page:
  • rails projectname
  • cd projectname
  • start ruby script/server
  • ruby script/generate controller Welcome
  • edit config/routes.rb to comment out the existing map.connect lines and replace with

    map.root :controller => "welcome"

  • rake db:migrate
  • ren public cilbup to get rid of the public index.html - this could equally well become a deletion.