Petri Wessman's weblog

New Typo

Upgraded to Typo 5.4.2. Ran into some snags but managed to solve them (I think), they were due to some nonstandard stuff I had floating around.

Published on by Orava, tags ,

Avatar and other stuff

We stayed cooped up inside for most of the New Year extended weekend; we originally intended to “do some stuff”, but the extra-chilly weather and general laziness put a stop to that. It was nice to just cozy up inside for days, don’t get me wrong. Anyway, yesterday we felt like doing something, so we decided to go see Avatar since a) it’s by Cameron who is generally awesome and b) it had been getting generally positive though slightly mixed reviews.

Well, it was very much worth seeing. It’s not a perfect movie; the plot is more than a tad predicable and follows the classic “boy meets girl and becomes hero” pattern a bit too much by-the-numbers. Maybe the most fitting thing to say about the plot is that it was serviceable; while it could have been (a lot) more original, it didn’t get in the way. But the visuals. Damn, they were jaw-dropping, especially when seen on the large screen with 3d. This is the best visualization of a science fiction world and native culture that I recall even seeing. Even though I knew that most of what I was seeing was computer-generated, my eyes were telling me the stuff was real. During the whole 3-hour span, there was only one short clip where the CGI was obviously CGI in a way that jarred me. That’s damn well done.

So. The complaints about the plot do have merit. But it’s not that bad, and this is one movie that is worth seeing for the visuals alone. They are just that good. The star of this movie is the planet Pandora.

(Added later: here is a hilarious plot summary. Spoiler alert, you might want to skip until you’ve seen the movie!)

Apart from that, I actually spent a large part of the mini-vacation coding and watching “TV” – coding in one window with a video player running in another. I’m working a hobby-project Exalted character generator web thingy. I’m not sure when if ever it will be ready, let alone ready for general use, but it’s one of those things – a way to learn lots of new tech while building something useful. I’m using a lot of bleeding-edge stuff, and Ruby on Rails of course. Among the toys are: authlogic, declarative_authorization, formtastic, css_dryer, jQuery & jQuery-UI, AJAX (with dynamic jQuery/Javascript generation via Rails views), and rspec test cases for all models and controllers. Fun stuff, and complicated enough to keep it interesting.

On the TV side, I managed to watch:

  • True Blood season two. Good stuff, and very interesting “bad guy”. Still among the best of the current crop of series. Not for the prudish, though.

  • Californication season two. Very good and very funny. Also not for the prudish, and I mean it: this show is mostly about sex. And about how people deal with it. I really like this show, because the characters are excellent and it somehow manages to be lewd & irreverent and warm & understanding at the same time. The characters screw up (and just screw) all the time, but you can’t help understanding and liking them at the same time.

  • The Doctor Who “specials” Waters of Mars and End of Time (parts 1 & 2). Watchable but nothing all that special. Will be interesting to see how the new Doctor works out, since these were the final ones with the (great!) David Tennant.

  • Some other bits and pieces… some Heroes (meh, but at least getting a bit better), Sanctuary (meh), etc. Nothing much worth commenting on.

Comments should now work (again)

Ok, seems that the new Typo version has a small bug with comments and the sort of url-prefix setup I’m using. Made a quick & dirty hack which should potentially fix things, and also submitted a bug report so hopefully it’ll get fixed in the trunk code too.

Published on by Orava, tags ,

New version of Typo

Upgraded to the latest version of Typo (the blog engine I'm running), mainly because the newest stable version of Ruby (1.8.7) isn't compatible with the version of Rails the older Typo was using. Sigh.

Seems to work, more or less, and the admin interface is nicer at least (though the article writing interface seems to be a bit funky). Will have to play around with it.

Published on by Orava, tags , , ,

Railscasts considered awesome

I have to give a shoutout to Railscasts, a screencast series by Ryan Bates, which is made of Awesome. As might be guessed, the subject is Ruby On Rails programming. In each episode, he talks about one specific subject (be it a technique, plugin, gem, or whatever) and shows how things work. I typically at least try out most of the things he talks about, often adopting them permanently for my own use (sometimes not; I’m not wild about Cucumber for example).

Many of the episodes are also available as “asciicasts”, for those without required video codec etc, and/or for those who want easy cut+paste access to code.

Without exaggeration I can say that at least half of the advanced Rails techniques I’ve learned (and sometimes forgotten) over the past few years have been due to Ryan’s screencasts. So… thanks, man. Keep on rocking.

Published on by Orava, tags , , , ,

Good Old Games

You know how some old computer games used to rock and probably still would, despite retro graphics and limited technical merits? And you know how hard some of those games can be to actually find nowadays, even via eBay and such? …and if you answered “sure” to both of those, you’re probably familiar with the frustration of finally getting that game (or installing an old favorite) and finding out that no, it no longer runs in Windows XP or Vista. Or if it runs, it runs at 60x speed and is totally unplayable. Or some such.

Well, the guys behind Good Old Games are trying to do something about that, and make some money on the side. They are promising a selection of classic games (including Fallout 1 & 2, Freespace 1 & 2, and so forth), tweaked to run on XP/Vista, with absolutely no DRM, and for a cheap price. Sounds a bit too good to be true… but looks like it isn’t. The site is currently in open beta test (I have an access key), and judging by my experiences so far: they are delivering what they are promising, and more besides.

I signed in to my beta account and bought a copy of the first Fallout game for $6. Download was smooth and included a bunch of extras including wallpapers and the game soundtrack in mp3 form (!). It installed without a hitch and ran perfectly (on Windows XP). I’ve never really played Fallout before, just tried it out a bit on a friend’s computer – so I’m now actually playing it for the first time. Sure, the graphics are pretty retro, but the game itself is great. I hear Fallout 2 is even better

…and since beta testers apparently get one free game as thanks, so I also got me a free copy of Fallout 2. That one also worked right “out of the box” (so to speak), and included an mp3 soundtrack etc.

I find it really hard to find anything negative to say about this new service. The games really do work, there is no crap DRM, the price is low, and the website is both stylish and has a nice and smooth user interface. Sure, the game selection now in the beginning is small, and that’s the only bad thing here – but if there is any justice in the world, this thing will take off and their catalog will expand.

Want to try it out? Head over to the site and sign up in the beta, I think they are still open. Getting both Fallout games for a total price of $6, with runs-on-XP tweaks, is a bargain.

Published on by Orava, tags , , , , ,

Rails, Passenger, Shoulda

My Rails coding project is proceeding, I’m currently working on getting a user permission system in shape so I can open up my alpha test Exalted character tool to a friend who is interested in checking it out. Still quite a bit of work to do, but it’s proceeding nicely. A big helper has been the fact that I’ve dived pretty deep into test-oriented programming here – I probably have more test code than “actual” code, and have most of the model and controller functionality covered. It’s nice to type ”rake test” and see hundreds of tests get run in an instant, it gives a nice instant sanity check to any changes I make to what is at times somewhat tricky code.

I’ve been using some of the new Rails 2.1 features; named scopes are useful, as are many other helpful additions. In addition, I recently decided to give Phusion Passenger a whirl and was pleasantly surprised to be able to move all the current Rails apps on my server (including this blog) to run under it with minimal hassle. Much nicer than Mongrel, especially since it does automatic load balancing “out of the box” – and it makes Rails as easy to host as PHP, which is extremely welcome.

One other nice recent find was the Shoulda plugin, which provides syntactic sugar on top of Rails unit and functional tests. Very cool, and encourages grouping of tests into functional blocks. In addition, it provides macros which generate tons of tests for restful resources with just a few lines of code.

Published on by Orava, tags , , ,

Coding on Rails

This week I’ve been coding quite a bit on my free time, for a change. I’ve been following Ruby on Rails since it was at version 1.0 and have done some small toy test apps, but to date I haven’t really built anything biggger with it. I’ve had plans, sure, but somehow just never got started – part of that is just an overabundance of stuff I’d like to code, I could never decide what to do. I’d like a wiki that works just like I want, I’d want a nice simple photo gallery, I’d like lots of tools to help with rpg gamemastering, I’d like a pony… well, scratch the pony, but you get the drift.

Rails is (really!) great, and it allows you to develop more or less as fast as with PHP without needing to touch the Mindshatteringly Horrid Piece of Shit(tm) that is PHP. You can write web apps in an “agile” fashion while keeping the architecture clean, with a level of abstraction that I like. It’s somewhere between the over-engineered N-levels-of-cumbersome-abstraction maze of J2EE and the “easy web apps for people who don’t know how to code” of PHP. Me likes.

…but naturally there’s some setup involved when you want a system with user management and authentication, deployment with Mongrel & Capistrano, and all that stuff. The restful authentication plugin makes building a user auth system a bit less painful, but it’s still quite a bit of work (I’ve been following hints from various sources). So there’s quite a bit of startup intertia involved whenever you want to write a non-toy app. It’s a whole lot less intertia than with most other system, but it’s there, still.

Anyway, I realized that I don’t need to write N separate web apps, each duplicating a large part of this functionality – I can just write one app, with lots of subsystems, expanding them as needed and using one user auth system for all. Since this will be mostly for my own use and I don’t need to worry about it being modular and useful for others, keeping the apps separate would just involve (a lot) more work for me and bring no real benefit.

So I’ve been coding during evenings, using a snapshot of the new Rails 2.1 and using all the new conventions and toys (REST, named paths, named scopes, etc). It’s been fun, it’s been a while since I had a coding project, and I’ve been learning a lot of practical Rails stuff at the same time.

To date, I have a working (if simplistic) wiki, a user authentication system with email confirmation, and the beginnings of an Exalted character builder/manager tool for my Exalted game. Deployment is handled by Capistrano, and the thing runs on a (currenly single) Mongrel instance with Apache proxying. The intention is to expand it with a blog engine at some point, and maybe move this blog over – but that’s (far) in the future. That would also need some sort of image upload capability, which overlaps with the photo gallery I’d also like to have one of these days. Work work.

In any case, it’s a fun project.

Otherwise it’s been pretty quiet. Went to basic swords training on Tuesday, was fun – but somehow managed to do something bad to my heel. Didn’t notice anything that evening, but the next day it was very sore and I had to limp along. Janka thinks I may have inadvertently over-stretched my Achilles tendon (or some such) before it was warmed up properly, but that’s just a theory. In any case, it seems to be getting better now and it hardly hurts at all even if I stretch the sore spot… so should be able to go to training next week without problem. It might have been ok to go yesterday, but I tend to be very careful when it comes to foot/joint/tendon problems. I’d much rather miss out one week than to really aggravate some spot, that an easy recipe for getting problems that will need weeks or months to heal. Sore muscles, no problem. Seriously hurting tendons or joints? Danger sign. For me, at least.

I’m still a bit mystified by what caused the thing, but sometimes these things happen. My body is telling me that something is (or was) wrong, so that’s that.

Looks to be a busy weekend, a party on Saturday and an Exalted game to run on Sunday. Need to squeeze in some game prep today and Saturday, even though I’m mostly ready… some details still need fleshing out.

Published on by Orava, tags , , , , , ,

Freak Angels and Half-Life

On Friday, Warren Ellis and Paul Duffield published the first “episode” of Freak Angels, their new collaborative free web comic project. Ellis is one of my favorite comics writers (Transmetropolitan rocks like few things do), and the art on FA looks lovely. Some sort of British post-apoc deal, with the Midwich Cuckoos thrown into the mix – as the protagonists, it seems. Or something. I’ll be following this.

For a change, I spent most of Sunday playing Half-Life 2. I had almost forgotten how fantastic a game this was. I’d previously played this up to the point where you fight a helicopter gunship under a huge railway bridge (on the coastal highway), now I started the game from scratch and actually got past that point by midnight or so. It’s a lot faster when you know/remember what you need to do – but now I’m again in unknown territory.

Good single-player games can be a huge amount of fun. The original Half-Life was one of the very few major games I’ve actually completed. Took a long, long time… but still. HL2 is, if possible, an even better game; I’d venture to claim that it’s currently the best FPS out there. Yes, there are better graphics to be found (though HL2 is very pretty, too), but HL2 has a great story and a huge amount of variability. You don’t get stuck in a rut, mowing down the same group of bad guys on levels that all look the same. Here you go from hydrofoil chases to dune buggies, from whimsical weaponless story interludes and physics puzzles to full-out firefight brawls. Oh, and the Gravity Gun rocks.

Special positive mention goes to the character of Alyx Vance. An actual smart female character in a computer game, and one who dresses and acts like… a normal person. Who’d have thunk. Oh, and can’t forget Dog. Dog rocks.

At the moment, HL2, Baldur’s Gate 2 and System Shock 2 top my personal “best computer games ewah!” list. Maybe it’s the number “2” that does it? Dunno.

Weekend approaching

End of the week nearing, which is nice – except that it doesn’t look like a weekend full of rest. Hopefully some fun, though. Teemu is running some VTES tournaments on Saturday, a quick Duffin Draft starting at 10am, followed by a normal constructed tournament at 12am. I still don’t have a deck ready, looks like I’ll have to play with an untested deck yet again. Defeat is always an option!

Sunday will have me doing cutting practice with sharp swords. Never done that before, should be interesting.

A funny thing with exercise: I’ve been feeling less dead after the 3h sword practice sessions lately. Very tired, yes, and often aching in various places, but less physically wiped out. Which is nice. Yesterday was mentally a catastrophe, though, the first 2 hours of longsword was no problem but the last hour of backsword just totally overwhelmed me, I probably got whacked on the mask more that I managed to parry anything. Somehow I just could not process the (simple) stuff at the pace we were going, and was just perpetually confused. It happens, sometimes. Not sure why, since on other days the same things flow by with no problems.

I’ve been playing around with Rails again a bit, I have a small project going on which might even end up being useful but is mainly intended as a exercise in trying out all sorts of cool Rails stuff. I’m still waiting for my physical copy of the 2nd edition of Agile Web Development With Rails to get here, in the meantime I’m making do with the PDF edition. Yesterday I noticed that O’Reilly has a “buy 2 books, get 3” deal that also applies to PDFs, so I bought myself PDF copies of Rails Cookbook, Ajax on Rails and CSS Cookbook, 2nd ed, for a total of a bit over $40. Not bad. Haven’t had time to read them yet (obviously), but a quick browse leaves me happy with what I bought, they look like good additions to my tech bookshelf.

I should probably also mention dokuwiki. I’ve played around with various Wiki engines so far, some have been horrible, some have been ok, and some have been very good. Up to now I’ve preferred mediawiki, since it has a nice layout and features, but I’ve always found the setup and configuration of it to be more cumbersome and complicated than I like. Enter dokuwiki, which is ultra-simple to set up; it doesn’t even use a database, just flat files. In spite of the simplicity, it offers a nice selection of features and nice, clean default layout. All in all, it looks like just the right balance of features vs setup/config complexity for me, and I set up an instance for a personal wiki. I also have a private instance for (duh) private stuff, the fast and simple setup makes creating a new wiki a breeze. Me likes. Sure, the thing probably doesn’t scale all that well with no database, but who cares; I’m not running wikipedia here. Also, it’s PHP which I normally avoid like a plague due to security concerns, but this app is just so good I’m willling to ignore the evil of PHP.

A fact of life, which I’ve discovered, is that most people are absolutely horrible programmers. Even the ones who make their living as one. Especially some of them. If I had a dollar for each utterly horrible piece of code I’ve had to see (or fix), I’d be somewhere warm with a drink in my hand and “should I buy a Jaguar?” as my main concern. Take that into account, and enter PHP into the equation. PHP, which lets people who have no business writing anything more complicated than Excel macroes suddenly become “web developers”, with naturally no idea of what a “web exploit” even means let alone how to protect against one. Stir into that pot the fact that the PHP development team has a Microsoft-like attitude about security, i.e. features and ease of use are always seen as more important… and voila!, you have a framework which is singlehandedly responsible for a massive amount of server compromises. Sure, a competent person can use PHP responsibly and write a secure app, just like a competent person can write a massive transaction processing system in Visual Basic. Doesn’t make either of them into good tools, or change the fact that PHP is what is technically known as a ”massive piece of shit”.

Ahem. Anyway… Rails good. Dokuwiki good. PHP bad. Beer good. Wife cute.

Published on by Orava, tags , , , , , , , , ,

Powered by Publify – Thème Frédéric de Villamil | Photo Glenn