Sunday, September 23, 2007

Some Articles

Saturday, September 15, 2007

SQL: Check Existing Rows Matching A Condition

Instead of this:

IF (SELECT COUNT(*) FROM Table1 WHERE ... ) > 0

use this:

IF EXISTS(SELECT * FROM Table1 WHERE ...)

Great tip provided by this article.

Wednesday, September 12, 2007

Programming Can Ruin Your Life

The application of programming specific processes and habits to the everyday is where peril lies. The same traits that make you a great programmer can make you an awkward, misunderstood and miserable human being.
Amazingly good read.

Monday, September 10, 2007

Game: Bioshock

I finished Bioshock a few moments ago. There's not much I will say about this game because it has been reviewed and analyzed to dead at other sites and by other people.

I can say though that this game is fantastic, both story- and graphic-wise. Also: it often scared the hell out of me.

There is one big downside with this game: the constant crashing. Maybe my configuration is getting old, but this game is actually running quite fine when it's not crashing.

It also could have something to do with Windows Vista. Here's how a typical game session goes for me.

1. After a while it became clear that I have to disable high detail shaders. This will cause the game to crash less with certain video cards.
2. Start Bioshock. "Bioshock.exe has stopped working and has to close." Start Bioshock. "Bioshock.exe has stopped working and has to close." (Repeat this one to ten times.) Finally I see the splash screen and the game loads (strange).
3. Play and enjoy.
4. A new area is coming up, save right before going to the next level. Exit.
5. Edit Default.ini (toy with the audiodevice, add a new D3DDrv, comment out FMOD):

;AudioDevice=FMODAudio.FMODAudioSubsystem
AudioDevice=D3DDrv.D3DAudioDevice


6. Start game again (don't forget to repeat step 2 a few times). Load my save. Go to next area.
7. Wait until area finished loading. When I don't use step 5, my whole system locks up slowly and the area never loads. Save. Exit again.
8. Edit Default.ini again, otherwise I have no in-game sound:

AudioDevice=FMODAudio.FMODAudioSubsystem
;AudioDevice=D3DDrv.D3DAudioDevice


9. Start again, load save, loads fine, continue from step 3.

But still, the game is awesome (but release a patch, quick!).

Also I want you to see the cinematic trailer if you haven't. Don't forget to pick up all the audio diaries in the game and listen to them, the story and characters are so great.

One final note: if you were wondering, I saved all the Little Sisters. After being presented with the first choose to either harvest or rescue them I was too moved not to save them (it was just a sad sight). So I got the 'good' ending. I was happy I did, I would've felt very guilty otherwise, especially after seeing the 'bad' ending (look on Youtube or play the Bink vids).

Pros:
  • Amazing story.
  • Great atmosphere.
  • Possibly best graphics seen in a game up to date.
  • Can be real creepy at times.
  • The music (both the grammophone music and the orchestral score are great).
  • Nice set of weapons, plasmids, hacks and more.

Cons:

  • You'll need a very high-end PC.
  • Game loves to crash.
  • The activation system-slash-copyright protection is a royal pain.
  • No multiplayer (not a real downside for me, but might be a pity for some).
  • The story is just a tad predictable at times.

And now I'm going to rip the music out of the fmod files :).