Upgraded to latest version of Typo (still haven’t gotten around to writing my own blog engine). Old theme doesn’t work, but that’s no biggie since it wasn’t that hot anyway. More aggravating are the small new bugs here and there, trying to trace them down and get things to work again.
Note to self: get started on writing that blogger app…
Noticed that commenting has apparently been broken on this site for quite a while now. No wonder it’s been so quiet :D.
Ruby on Rails, nowadays sporting a major version number of 3, has become one of the more popular web development platforms – for good reason, in my opinion. The design is quite elegant, and the emphasis on “convention over configuration” lets you design apps with surprisingly few lines of code. Also, being based on Ruby gives it another layer of elegance (again, in my opinion).
However, all this seeming simplicity hides the fact that both the language (Ruby) and the platform are actually quite complex, underneath the simple exterior. Things work well if the designer follows the Rails (and Ruby) conventions and has at least some understanding of how a web app stack works. Unfortunately, in reality all too many programmers try to use Rails to emulate what they are already familiar with (PHP, in many cases), and even “professional programmers” seem to sometimes have only the faintest idea of how web apps actually work underneath the hood. The result can be a horror show.
Which brings us to this book, Rails Antipatterns. While it’s nominally about Rails “antipatterns” (design patterns that should not be emulated), it’s more properly a book about best practices and refactoring Rails apps. Written by people with extensive and painful knowledge about the horrors involved, it contains a ton of useful advice about how to (and how not to) design Rails apps. Each section focuses on a certain area of the software stack, and highlights the most common mistakes (and how to fix them).
I found it to be a great read, and even though Rails itself is nearing the publication of version 4.x at this point, virtually all of the advice within still holds true (the tiny part that doesn’t is the stuff about plugins, which are being phased out completely). If you already know Rails to some extent, this book will probably teach you a thing or three. If you don’t, you’ll be better of first reading some intro text and doing some coding of your own, and then going back to this book to see all the ways you screwed up.
As always with power tools, Rails only works properly if you know how to use it, and a large part of that is conventions, best practices and other not-initially-obvious design factors.
I personally most enjoyed the section on how to “thin down” a “fat” controller action, using ActiveModel callbacks and other related tricks. I used the advice here to refactor some of my own code with similar problems, and the end result was much cleaner.
It’s been a good long while since I last read a book on Java. I’ve been using the language in my professional work for well over a decade, and while I don’t consider myself an authority on the language I do consider myself quite competent in using it. However, there is a tendency for a certain type of statis to set it in these matters; once you learn something to “good enough” levels and find techniques that work for you, you tend to settle into using those techniques and being happy. There’s nothing wrong with this as such, but with a dynamic environment it does mean that you may be missing out on new stuff – and Java has gotten quite a few tweaks and additions since I originally learned it. Some of these I use all the time, some I use now and then but don’t deeply understand, and some I’ve only heard of but never used.
Effective Java is a book than attempts to encapsulate best practices in programming with Java, including the new 1.6 additions. As the book notes, a lot of books concentrate on the basics of languages and the mechanical details, but the “how best to use this in practice” part is typically either missing or an afterthought. This book is only about that, it assumes you already know Java and have some experience with it.
The book has a ho-hum name and cover illustration, and doesn’t really scream “read me now!”. However, it’s been getting consistent rave reviews ever since the first edition, and this new edition is an updated one which (also) covers new features in the language and how to best use them (generics, enums, all that stuff). I mostly bought it based on the reviews, and I’m glad I did.
The book is a long list of “how best to” articles on various Java subjects, grouped by general subject. While the book says it’s not really mean to be read cover to cover, that’s precisely what I did and I found it a good read – the language used is light enough, while staying focused on the subject, and the discussion is quite fascinating. I learned a lot of stuff from this book, and while there are lots of things here which I do not do in my work programming, I at least know that I should be doing them. There’s very little if anything here that I disagree with, though some of the details here do not really apply in my work; the author has been involved in creating parts of the Java main libraries, where there is need to protect against hostile code linked with your own. In my own work, the danger of hostile code in the same EAR package is not a realistic one, so some of the issues here can be sidestepped. That said, it’s good to be aware of what is dangerous in theory and what isn’t, even if that danger isn’t a valid one for you at the moment.
All in all, I fully endorse the five-star reviews this book has been getting. If you consider yourself a Java programmer, you really can’t go wrong in reading this book. Chances are you’ll learn quite a bit (I did), and this book doesn’t insult your intelligence and try to teach you obvious things.
“It’s not a lake. It’s an ocean.”
I’ll have to begin here with a disclaimer: one of the writers of this one is a friend of mine. However, I only remembered that fact after I had finished the game and was watching the end credits roll. Thing is, I remember him talking about the game way back when it was first published on the XBox, but since at that point it was console-only and I don’t do consoles, I wasn’t really paying all that much attention. Now, years later when Remedy finally released Alan Wake on the PC, I’m finally paying attention. It’s a very good game.
[Here I originally had a rant about the stupidity of Remedy originally claiming that the game was console-only for “artistic reasons” and was only suitable for sofa + TV in living rooms. Well, I have since been educated that Remedy didn’t in fact make any such claims, it was Another Party. My bad, I remembered something I read when the game was originally published, and got that bit wrong. Glad to hear that Remedy isn’t the stupid party in that one. Their reasons for originally going XBox-only were only due to contract reasons with Microsoft, to the best of my knowledge.]
Anyway, now that the game actually is out on the PC, how is it? Pretty damn good, but not without its faults. I’ll talk about the good first: it mostly involves the plot and the writing. The game is a linear story about a writer who goes to a Twin Peaks -style town on vacation with his wife, and weird bad shit starts to happen. There are multiple references to Stephen King in the game, and the town even has a Log Lady analogue. Now, since I love Stephen King (when he’s good) and Twin Peaks, this made the game a fairly easy sell for me. The writing is very good here, and I played many a long night just to see what twists we get next. Sure, it’s very linear, but here that doesn’t bother (me) much – the story is king, here. In more ways than one. Most of the action happens at night, and the atmosphere is mostly very nice; you spend a lot of time in the dark with your flashlight, with fog twirling all around. The combat mechanic is interesting: the bad guys hate light, so you use your flashlight to slow them down or drive them back, and then you shoot them until they drop. It’s a nice enough mechanic, but…
… here we come to the “not so good” section. The action scenes get very repetitive as the game progresses. There are some set pieces with nicely creative solutions needed, but all too often it’s just “walk along forest path at night, wait for next predictable bunch of bad guys to appear”. Also, perhaps it’s just because I suck, but I found the combat very difficult at times, even on “normal” difficulty level. There were some scenes where I had to retry the damn battle time and time again until I got lucky. Most of these involved hordes of bad guys, and me being low on critical things like flares, so the moment they closed in I was toast.
Also, the PC port is a fairly quick port from the XBox base version, and it shows in performance at times. Playing at 1920x1200, I had to tone lots of details down before the thing became playable, and this was with a fastish video card (560 GTX). It’s plain to see that Remedy didn’t spend all that much time with performance tweaks on higher resolutions (the comparatively crappy resolution of an XBox is quite different from a modern-day gaming PC).
Getting back to the good stuff, the story is told in a style that mimics a TV series. There are “happened in the previous episode” preludes, and the game is split into a number of episodes (with end soundtracks, one of which is the brilliant song “Haunted” by Poe). It works very nicely, and helps the storytelling by embedding the game into a familiar storytelling format. The PC version also comes with two additional episodes (which I also liked a lot), where the cliffhanger end of the base game is expanded on and where things get really weird.
Another good point was the environments. Even though the game progress was totally linear, most of the environments felt lived-in and more open than then actually were.
In sum, it’s a game with an addictively good Stephen King / Twin Peaks -style story, which is punctuated by lots of annoyingly repetitive combat. I usually find myself putting up with mediocre plots to get to the interesting action in games, but here the usual situation is reversed. I’ll definitely be picking up “Alan Wake 2” when/if it comes out (and will be pissed off if it’s again some “console only” crap), and I’ll probably pick up the sort-of-but-not-quite sequel “Alan Wake’s American Nightmare” at some point.
I could bitch about some small annoyances… the game is extremely linear, some of the character animations are non-optimal, the weird thermos flasks all over the place served no useful purpose, and some plot twists are a bit redundant… but I don’t feel like it. On the whole, they didn’t detract from my enjoyment of the game. It’s rare enough for me to actually play a game from start to end nowadays, and here I did.
Some time ago, I finally finished The Witcher. The “finally” there is relevant, since I’ve been playing this game on and off (mostly off) for years and years. I started it before the current “Enhanced Edition” existed, quite enjoyed it despite the poor English translation (from the Polish original) and other woes. Left it for a bit, and started again when the (awesome!) Enhanced Edition was introduced. Played until midgame, where the endless swamp and its deadly denizens tired me out… and it’s been sitting on my hard drive ever since. Until a short time ago, when I got a twinge to finish the thing. Glad I did, it was a great story and a very good game as a whole.
It’s also a huge game, and the fact that it’s very uneven doesn’t help. There are lots of great sequences and characters, but especially the quite freeform midgame portion has some problems. You get tons of side quests, most of which are boring Fed Ex ones, but you’re never quite sure of what’s relevant and what’s not. At some point the main plot kicks in again, and things start moving. The game interface is, frankly, a bit weird and takes some getting used to, but it’s fine after a while. The combat is a bit tricky and can be somewhat frustrating, especially since some of the fights are quite difficult.
The best thing here is the “shades of grey” plot and the general Slavic fantasy tone, quite welcome after your generic D&D-inspired typical fantasy game world. Sure, there are elves and dwarves here, but neither are quite what they tend to be in other games. Elves are especially interesting, since here they are at the brunt of racial discrimination and have by and large turned to terrorist tactics. In many rpg games, you do get choices, but the choices are of the stupidly black/white “help old lady cross the road” vs “kill her, take her stuff, and set the corpse on fire” type. Not so here, the game specializes in choices with no really good options available. You can choose to help the elves… but in this case you are specifically helping terrorists, the sort that thinks killing civilians to support their cause is fine (especially if said civilians are lowly humans). You can choose to help a knightly order trying to fight the elves… but then you’re helping a bunch of self-righteous bigots, whose attitudes are the root of many of the problems. And of course, you can try to stay neutral, in which case everyone will hate you (and potentially try to kill you).
The main plot is fun pile of political maneuvering, with lots of false fronts and wheels-behind-wheels.
Much has been made of the sex in this game. I mostly thought it ok… sure, it can be viewed as somewhat sexist (why are so many of the women in skimpy dress and why do pretty much all of them want to jump in the sack with Geralt?) and the “cards” you get after each sexual encounter arequite juvenile. On the other hand, the main character is both sterile and immune to sexual diseases, so it’s more in the “safe sex” department than most fantasy rpgs – and also, there are quite a few strong female roles here. In the end, I found the sex content here mostly entertaining, if a bit juvenile in places.
My final score on this one is very positive. It’s a huge, complex game based on Slavic mythology, with many interesting and personable NPCs and a good plot. The action is fun once you figure it out, and the same can be said for the character advancement mechanic. Some minus points for a very uneven game experience and an over-abundance of semi-useless side quests, and also for a UI which really takes a bit of getting used to.
One of the better fantasy roleplaying games I’ve played.
The recent New Zealand trip was a good excuse to test something: would an e-book reader work for me in practice? Janka got herself a new-generation Kindle, and I “inherited” her older Sony PRS-505 – quite a few generations older as far as technology goes, but still a decent piece of equipment. We needed to take along a ton of stuff because of Saiga, so lugging around physical books didn’t seem like the smartest thing to do. I did take one old-fashioned paperback, just in case, but everything else was on the Sony.
Technology-wise, the screen contrast is a bit worse than Janka’s Kindle, but the difference isn’t vast. It’s significantly heavier and somewhat bigger, but still light enough to read comfortably. The base software has its limitations, but I installed a third-party OS upgrade (prs-plus) which fixes some of those. I also hacked the font a bit, since the default one isn’t all that great. Happily, that hacking was just a matter on mounting the reader as a USB disk and adding some custom CSS in the correct place. As far as formats go, ePub is native (which is nice since most of my books are in that format), and it supports various other stuff either natively or via Calibre. So all in all, it’s a decent reader despite being a bit old. In this age of insta-obsolete gadgets, that’s a point for Sony (prs-plus also helps, of course).
In practice… I was almost surprised at how handy and useful the Sony was. It provided me with a big pile of books in a tiny form factor, and due to the e-ink tech the battery charge is good enough for a long while. I didn’t do any measurements, and of course the battery on the thing isn’t brand-new – but still, I didn’t need to charge it very often.
So yes, I found e-readers to be decent substitutes for dead tree books. The contrast still isn’t what it is with traditional books (a problem in low light), and it does need charging now and then. I still like traditional books, and largely prefer them. Still, any time when I need to pack light and grab some reading to take along, the e-reader is now my first choice. It also great as “bus reading”, a way of always having a book on hand. I don’t really doubt that dead tree books will go away on some timetable. Not vanish totally, just become more “special”… stuff you buy when you want a fancy edition to sit in your bookshelf, or when the book is in some other way one that doesn’t suit the e-reader format too well. That means that “bulk” fiction will be the first to completely migrate – and we’re already seeing that happen.
As for content and ecosystem wars… well. Janka loves her Kindle. It has a working ecosystem and instant delivery of pretty much anything. She’s a fast reader, so Kindle works wonderfully for her. As for me, there are several reasons I’m avoiding the Kindle. The first is that I dislike the strong-arm tactics Amazon is using to attempt a monopoly position and crush everyone else, especially the smaller players. It’s very much what Apple is doing; both companies have very nicely integrated ecosystems (with high walls around them), and they provide devices and a service that works. I have nothing against that, as such, Amazon is largely succeeding because the other players had their heads stuck in the sand and tried to ignore e-books and the Internet in general, and are not paying the price. Still, I don’t much like their overly strong position here (neither do I like Apple’s positioning and walled garden).
Then there’s the DRM. To Kindle users, the DRM is invisible, but it’s still there. If I buy an e-book from Amazon, I don’t really own it. Amazon can revoke it at any point, and I also can’t transfer that book to another device (without using Amazon’s Kindle app). I much, much prefer buying no-DRM books (usually these are in ePub format, which is the only format Kindle doesn’t support – since it’s what the competition uses.). I already have quite a few books as no-DRM ePub, so the Sony works for me. Of course, this means that I’m very limited in buying options, and have no (legal) way to buy most books in e-book format. This doesn’t bother me much, since there are small stores which sell me what I want and in any case I have a long reading list on the traditional book side. Even with limited choice, I still have lots of books on the Sony, waiting for me to read them. I’m fine with that, though I would of course prefer more options.
We’ll see how it all develops. I don’t want to see a future where Amazon has a strong-arm lock on all e-books and where my “library” can vanish without warning if Amazon so decides. I want options, and full ownership of the e-book copy after I bought it, without this DRM crap. Will I get that? Hard to say. After millions upon millions spent in fighting music piracy, the record companies pretty much gave up; now you can buy most music in no-DRM form. The book publishers seem determined to repeat the same mistakes… though the situation is a bit different. DRM gives Amazon and Apple a way to lock customers to their own devices, so of course they are going with it. It also helps that publishers are (at the moment) buying into the “piracy” hysteria and are happy to let Amazon and Apple get the digital stranglehold (which will rebound on the publishers, it’s no secret that at least Amazon wants to sidestep the publishers completely).
Will be interesting.
Well, I finally finished Deus Ex (the original one), after deciding to play it start to finish for the first time some months ago. The game clock says it took me a bit over 23 hours of playing, so it’s a pretty hefty game. Not sure if it’s quite as huge as Half-Life 2, but it’s close.
They say this is one of the best PC games ever, and “they” were pretty much right. While I can’t claim it’s the best game I’ve ever played, it’s firmly somewhere in the Top 10 (along with such greats as System Shock 2, Half-Life 2, Baldur’s Gate 2, etc). Sure, the graphics are extremely dated by today’s standards (though the highres texture pack helps a small bit), but in the end what matters is the game itself… and that’s where Deus Ex shines. The plot is classic cyberpunkish conspiracy paranoia… you are “JC Denton”, a cybernetically augmented agent of the U.N., in a future where many governments have collapsed and the U.N. has taken over as a form of world government. Initially you are tasked with hunting terrorists, but it slowly becomes clear that things aren’t quite what they seem. The number of classic conspiracies this game throws at you verges on the ridiculous; it has Templars, the Illuminati, MAJESTIC-12, Men In Black, “greys”, black helicopters, Area 51, rogue AIs… it’s a long list. Of course, spotting the pop-culture conspiracy references is part of the fun here.
The best part of the game is its freeform nature. I don’t mean it’s a sandbox; it’s not, and the game itself is quite linear. However, you have tons of options on how to approach the specific scenarios. You can sneak around and minimize violence (with hard core players trying for zero kills, using shock prods and tranquilizer darts to incapacitate when needed), or you can go in guns blazing. Computers can be hacked, or you can search the environment for clues on how to access systems. You gain more cybernetic augmentations (and improve existing ones) as the game progresses, and here too you can choose ones that conform to your playing style. The maps are quite cleverly designed, with freeform areas connected by specific checkpoints and access routes. All this leads to an illusion of freedom and makes the game world feel interesting, despite the dated graphics and sparse environment (due to the game tech). It’s not quite a shooter, and it’s not quite a “sneaker”, it’s a smart mix of the two. At the time it was made, this game pioneered new trends in game development (at that point in time, straight-up shooters were the norm).
The difficulty level is pretty much spot on. At no point was it frustratingly difficult, but in most places if you just run in guns blazing you’ll end up dead fast. Even with beefed-up augmentations, military bots and gun turrets will make short work of you. There are usually quite a few solutions to the problems presented, so what happened quite a few times was that I did something with enormous effort… only to figure out a much easier shortcut soon after. The game rewards creative thinking and exploration, and punishes a “just run in and shoot” style. It’s not a game for casual players, being more than a bit complicated in places.
Of course, it’s not a perfect game. As noted, the graphics are very dated and the environments are sparse and angular, both due to the technology used at the time (which of course was cutting-edge in its time). I didn’t run into bugs, but on the other hand I was running a version with some community patches and fixes, so my experience was probably better than someone playing the vanilla version. Maybe the most annoying thing in this game is the random stupidity of the NPCs. While at times they notice you (as they should) and give chase in a somewhat reasonable fashion, at times I could shoot their squadmate down next to them and they’d just continue as if nothing had happened. Of course, “stupid enemy AI” is something that plagues more modern games, too, so I can’t be too hard on Deus Ex here (especially when compared to older games).
So yeah, I understand why people are still (re)playing this, 11 years after publication. It’s a classic.
Since the topic came up on an IRC channel, here are some notes on what I did to get Deus Ex (the original) running on my gaming rig, in widescreen. It’s a classic game, considered one of the all-time greats. I played it a bit years and years ago, but didn’t get too far. I don’t remember why I stopped, but probably just other things came up and I just never got back to it. The old “first world problem” of too many great games, too little time. Sure, I could find time to play all the PC games I have, but then I wouldn’t have time to do all the other stuff I want to do in my free time.
In the year 2000 when it was published, it was a groundbreaking game: a first-person shooter / rpg hybrid, with a deep storyline and multiple ways of achieving goals. The fact that it still holds its own as a game, even though game technology has evolved by leaps and bounds, speaks volumes. Of course, there is no getting around the fact that technology-wise it’s an old game, and the vanilla version looks like crap on modern widescreen systems. Fortunately, there are mods available that improve the look&feel, though it still looks aged no matter what you do.
Anyway, I’m now playing the game seriously for the first time, partly fueled by the just-published Deus Ex: Human Revolution which I hear is equally brilliant. I sort of want to play the original game first, assuming I don’t run into any showstopper bugs or such. I’m not too far yet (New York subways at the moment), but so far the game has only crashed once (at the end of the tutorial) so things are looking good.
Since people asked, here is what I have installed (in installation order):
- The Steam version of Deus Ex (Game of the Year edition)
- The New Vision Mod version 1.0, provides high-def textures for the game
- Hotfix (v1.000001) for the above, from the same site.
- Kentie’s DX10 renderer (from his site, not from the New Vision package), version 3
- The Shifter Mod, version “1.8.4. probably”. Fixes and tweaks for the game engine, including secondary fire buttons for most weapons, increased NPC lethality, etc.
- The Deus Ex Enhanced Mod. The new version 2.0.0, which includes some hi-def icons, did not work for me. Version 1.3 (which just fixes scopes and binoculars) worked.
In all cases, I followed the installation instructions, taking a backup of the original files first. I set “Default GUI”, 16:10 aspect ratio, and 1920x1200 resolution on Kentie’s launcher, and things worked. Looks pretty nice, all things considered, though the fonts and icons are quite blocky. The new “Deus Ex Enhanced” mod is supposed to fix those, but as noted it didn’t work for me.
Maybe the above will help someone. Of course, it’s only with a “worked for me, if it doesn’t work for you I can’t really help” disclaimer.
Upgraded to version 6.0.8 of Typo (the blog engine I’m using). I’m hoping that it will fix some of the annoying bugs the earlier 6.x releases have had. At least image uploads should work again…
There’s a big fight brewing out there, between Apple, Google, Adobe and many other companies. Apple is slowly edging into the “big player” role and is fighting very dirty. Not that Adobe’s slate is totally clean either, and bad old Microsoft is infamous for stuff like this… but as I’ve said before, Apple in a monopoly position would be much worse than anything Microsoft did even during their worst periods of dominance.
Daring Fireball provides an analysis that sounds right on the money. Apple doesn’t want developers developing for any other platforms, and they are doing all they can to hinder any sort of cross-platform apps. The moment the iPhone becomes “just one more phone”, they’ll have problems. Apple wants apps only on their phones, not on competitors’ models. And hey, I can understand that, from a pure business perspective. It’s a ruthless move, but it makes sense.
That doesn’t make it something that anyone sane wants to support. The whole of Apple’s Disneyfied walled garden app ecosystem is something that makes me deeply uneasy. Also, I have zero doubt that Jobs would push the same model on the OS X computer front, if he could just figure out how. Walled gardens and a captive audience? Sure. It’s a license to print money, without all that nasty “competition” stuff.
It’s actually quite analogous to DRM in music. When that came out, the “geeks” and technical people were vehemently opposed. The ordinary “man on the street”? He didn’t care. He thought the geeks were overreacting. He just wanted something easy, “who cares about all that technical and ‘freedom’ stuff”. Then, slowly, he discovered what the geeks had figured out long before: the system was broken, the music was nonportable and often stopped working at some point.
I feel a bit the same way about Apple’s iPhone/iPad ecosystem. It’s not something I want to support, sending money in its direction would feel “dirty” in the same way as paying for DRM’ed music would. Voting with your wallet is, after all, still a valid form of expressing an opinion.
The other side of the coin is the fact that Apple does tend to do beautiful and very polished products. At some point I do want a portable PDF reader, and at that point I hope there is an alternative to the iPad available. Me, I’m hoping to see an Android-based tablet. Rumor has it that Google is working on such, but… well, rumors are just that.
I’m rooting for Google to kick Apple’s ass, somewhat. Jobs is both the best thing that Apple has going for them and the worst. His perfectionist attitude has resulted in Apple climbing out of the 1990s proprietary, ultra-expensive pit that they had sunk into. However, that same perfectionism manifests in a total control freak, “Jobs way or the highway” attitude. With the more and more proprietary and closed direction Apple is heading in, there is a real danger that they will repeat the mistakes of the 1990s all over again.
I’m sure that hordes of Apple apologists will totally disagree, and quote some tired old “well, don’t buy one then!” refrain. That’s fine. Instead of typing additional words, I’ll just link to iPad: The Disneyland of Computers and Why I won’t buy an iPad (and think you shouldn’t, either), both of which are views I mostly agree with.
I’ll have to reiterate: I do like many of Apple’s products, and love the attention to detail in them. I just hate the more and more obnoxious walled garden restrictions that surround the iPhone and iPad. That’s also the reason I’m more and more interested in Android.