Archive for June, 2006

An evening’s work

Wednesday, June 28th, 2006

Finished

Finished

Yep, I’m a bit knackered after building these two shelving units after work tonight. At least my reward seems to be a solution to my Ruby programming problem.

One flaw of Rails

Wednesday, June 28th, 2006

… is that it’s only relatively recently become popular so it can be hard finding advice on problems when programming. I’ve come across a couple of issues so far where I’ve posted on forums and it’s taken a day or two before you get any kind of response and a couple of times there just plain hasn’t been a response.

I think Ruby developers seem to gravitate more towards mailing lists however, so I may have to try using one of them instead.

I’m currently having trouble with the following issue. If you know of a solution, PLEASE let me know. Otherwise, if I ever find a solution I’ll try to post here for others’ reference.

  • Dynamic class names
    • I’ve found the answer to the first part of this (i.e. being able to instantiate a class where the class name is variable), you use:
      • foo = object.const_get(”class_name”).new
    • The second part is a problem caused by Rails controller ‘modules’ - i.e. where you have SomeName::SomeController which isn’t a constant. I thought I’d found the answer when I found this mention on Ruby Weekly News of a method class_name.constantize but I now get this error:
      • Manage::UsersController is not a symbol
    • Full description of the problem with code

Blood Bowl games on the way

Wednesday, June 28th, 2006

Part of my life as a computer gamer involved running a site dedicated to the game Chaos League for a year or two, chaosleague|players (still running but not updated). Part of my much younger life was involved playing tabletop games such as Warhammer 40,000 and Blood Bowl. The two have just combined.

The reason chaosleague|players died off was that the UK publisher went but and so support for the game disappeared. The developers also got sued by Games Workshop, who felt that Chaos League ripped ideas from Blood Bowl. They’ve now made friends, with the Chaos League property going to Games Workshop and a licence to develop a series of three Blood Bowl games heading in the other direction.

It’s nice to see them come to such a good agreement and aside from the iffy PR of GW suing Cyanide, it could work out very well for them both. Chaos League had massive potential and Cyanide is a great development studio, but the publisher backing wasn’t there to allow them to evrything they wanted. Chaos League was also, in truth, the closest thing Blood Bowl fans had to an official Blood Bowl game (and a very good game it was too), so there was a ready (though under-exploited) market. The market bit was presumably what GW worried about and why they started legal proceedings. Now Games Workshop has a great developer working on Blood Bowl computer games with a good base of experience in the genre to start from, while Cyanide has official GW backing and should get more publisher support as a result.

I have to admit I’m enthused by this and I’ll be trying to get back in touch with Cyanide, who I had a good relationship with, to see if they can discuss any of their plans for the first game. I had been writing a full online league system for Chaos League’s expansion pack just before Digital Jesters died, so it never came to fruition and I’d like the chance to do it again (in Rails this time I think!) for a game that’s gonna have enough fan and publisher support to use it.

Loving Rails

Tuesday, June 27th, 2006

I’m really getting into Ruby and Rails now - I don’t think I’ve touched a PHP script for over a week now (and this for someone who’s been writing PHP apps for six years!).

Obviously my job is as a PHP developer, but I’ve been fortunate enough to get my current project going in Rails rather than PHP so I’ve even been using Rails at work. That’ll change shortly as an existing client has some major additions to be made to the PHP-based system I wrote for them and I’m actually kind of dreading having to make the changes in PHP.

As much as I wrote the system to be as extensible as possible, the rapid prototyping and then main development possible with Ruby on Rails really gets you used to the good life. It shouldn’t actually be that bad as the system I wrote is reasonably similar in structure to Rails and even goes further in some parts (full form-building code), but there are certain things that either Ruby or Rails just make simpler (and quicker) than anything you can do with PHP (and I didn’t think I’d ever say that).

In my spare time I’ve been working on a content management system in Rails, primarily for two related projects, but also hopefully as a general system I can re-use on more websites. The speed at which I’ve been able to build it up is great, to the point where from a few weeks of programming where I get a bit of spare time here and there I now have a basic CMS handling logins, dynamic menu/sitemap generation, calendar system, news, general content pages, swish permissions back-end admin and even the beginnings of a file/image manager to be incorporated into TinyMCE to help non-techy authors who’ll be working on the finished websites.

The two websites in question are the Maserati Resource Centre (a non-commercial info resource and community for Maserati enthusiasts run by my Dad) and The Maserati Club (the international club). Both sites are in need of a serious update and I’ve re-designed them both as well (TMC site in conjunction with Andy Katz), but it’ll still be a month or two before the CMS is ready for either to go live.

In the meantime, I’m enjoying getting further into this Rails lark and building up what will hopefully be a very nice content management system when finished. I’ll post little screenshots once it’s a bit further along, though I’m trying to keep both site designs largely under wraps, so they’ll be more snippets than full screens.

One big laptop!

Friday, June 23rd, 2006

I just got an email from Dell announcing their new XPS range of computers, including the XPS M2010, a 20.1″ widescreen ‘laptop’. They’re fortunately not (as far as I can see) trying to suggest you carry this beast with you on the move, rather that it’s an ‘entertainment’ machine that you can relatively easily move around your house.

Dell XPS M2010

It’s got a pretty good spec and the 20-inch screen would obviously be nice for watchng movies, etc. but I’m not sure how useful it is being able to move your computer around the house when it’s so large. I recently bought a 20″ widescreen TFT for my desktop and I can’t say I’d fancy moving that around the house, let alone if it was attached to an over-size laptop body.

Moving your computer with you around the house is great - I can sit with my family while I tap away on my laptop, which is at least marginally more sociable than being upstairs on my desktop in isolation. I can sit outside on sunny days and get a tan while I type. I can’t imagine sitting watching TV with a 20.1″ mega-laptop on my lap.

This thing is likely still going to need a desk or some other flat surface to sit on, which isn’t generally available in all rooms of a house (unless you want to lie on the floor). It does have a removable wireless keyboard/touchpad much like the wireless keyboard/pad you get on media center PCs like the Sony Vaio, so I imagine you’re meant to set it up away from you and sit somewhere with the keyboard only.

The only real differences to a normal media center PC seem to be that it has a battery so it can be moved more easily and that it’s tied to the screen it comes with. The first bit will last you a couple of hours I’d imagine before you need to plug it back in anyway, so it’s not a huge bonus from what I can see. The second means that even if you hook it up to a big 32″ LCD TV, there’s still the 20″ one on the machine itself doing nothing. Why not buy a smaller laptop (e.g. my current object of desire, an Apple Macbook Black), a TV tuner and a 32″ LCD TV? With the money saved, you could potentially even get a 20″ widescreen as well and not go much over the £2k mark.
I’d better stop my rant here. I don’t see the benefit of being able to lug your media centre from room to room (or at least not enough of one to shell out two grand), but presumably there must be people who do.

It’s a really nice idea, but I think after a week or two the novelty would wear off and it’d probably just start sitting in one place like a normal PVR/Media Center.

Web Optimisation at NTI

Friday, June 23rd, 2006

The past few weeks our office (all three of us hehe) have been going along to a course at North East NTI at Teesside University on Web Optimisation. The course finished yesterday and it was actually pretty good. Although there was a reasonable amount I already knew, there were some interesting new bits, as well as nice techniques for building linking strategies, etc.

The guy who runs the course is Barry Hebbron and he struck a nice balance between casual banter and the hard information you’re meant to learn, with some good real-world examples too.

For anyone in the North East of England who fancies a bit of (free at the moment!) training, get in touch with NTI - there are courses on Flash and DreamWeaver as well.

At last, Ruby auto-completion!

Wednesday, June 21st, 2006

Komodo, an IDE I looked at a couple of years ago for PHP before settling on Zend Studio, recently hit version 3.5 and introduced support for Ruby and Ruby on Rails.

I’m checking out the 21-day trial at the moment and it seems pretty cool so far, so if it continues to impress over the next week or two I might go for a personal licence and start using it at home instead of RadRails (at least until RadRails can introduce a few key features like window splitting and code auto-completion).

Komodo still isn’t the perfect Rails IDE for me, but it looks like it could be the best so far. A few things that could make it near-enough perfect (for me at least - others will have different requirements):

  • Whole-project class/method/variable mapping
    The Code pane on the left is useful, but as with every IDE I’ve used bar the excellent Zend, it only lists code from files you actually have open to edit. Zend maps all the code in your project so that you can quickly jump to a class, variable declaration or function anywhere in your app without having to remember which file to open first.
  • Unlimited window splitting/cloning
    Komodo lets you split the window once, which is better than RadRails’ none, but again Zend offers no limit. jEdit actually does this even better by allowing more control over where the splits occur, making it easier to get a setup that fits your needs.
  • More Rails integration
    This is the one area RadRails trumps all - the ability to start/stop WEBrick servers and run generators from within the IDE. At the moment in Komodo I need a command prompt open to run the WEBrick server while coding to test locally and when I run a scaffold or similar generator I then have to tell Komodo to re-import the new files as it doesn’t notice them appearing
  • I had more but I’ve been doing other things while writing this and I’ve forgotten them. Guess they’ll have to wait for another post :)

Komodo is $29.95 for the personal licence and $295 for the pro licence, so not too bad for non-commercial use but I think I’ll have to wait a while before getting a pro licence to use at work.

Akismet still going strong

Tuesday, June 20th, 2006

Back in March I posted about comment spam on this blog and installed Akismet to try and cut it out. I’m pleased to say it’s still going strong.

Over the past couple of days alone it’s caught 253 spam messages and combined with leaving moderation on for un-registered users I only have the occasional comment to manually mark as spam, so kudos to Akismet!

Knew it was too good to last

Tuesday, June 20th, 2006

After years of having a couple of stable, reliable Windows XP installs (over two computers), my computer’s reset itself after Media Player 10 having frozen a couple of times recently.

I’m hoping it’s something to do with the Sound Blaster X-Fi and last night I installed the latest drivers from Creative’s website, so we’ll see, but I’ll be devastated if I get stuck with this as a persistent problem. It doesn’t even give a BSOD, just freezes then eventually restarts itself, citing an ‘unkown device driver’ error in the report.

Stop the beeping

Tuesday, June 13th, 2006

Via Vitamin, I just read a very good blog post by Matt Mullenweg about the beeping in his house. He came back from a trip to find an irritating beep every minute or so, but didn’t fix it for days.

The gist of the post is about how engineer-types are able to block out irritating noises or problems after a short period of getting used to them. Matt put up with a smoke alarm going off every minute for three days, happily getting on with his work and simply taking calls in another room, before finally getting that new 9-volt battery.

He ends his post by suggesting everyone go and check through their blogs/web apps/whatever and find the ‘beeps’, then concentrate on them and get them fixed. The point here is that we tend to start blocking out small irritations along the way when developing code (in order to concentrate on the important stuff) to the point where we’ve forgotten they were problems in the first place. That’s obviously not good for your finished product, so going back through and re-finding all the beeping noises will allow you to properly polish your system.

We’ve all seen these kinds of little irritations in either our own apps or others’ (e.g. flickr’s previous lack of a page to just find the newest comments on your posts) and Matt’s post provides a great analogy and reminder to get them sorted and improve user experience.