Archive for December, 2007

Hostel

Sunday, December 23rd, 2007

I saw Hostel yesterday so I figured I will subject you guys to a review of sorts. Yeah, I know, it’s an old movie (2005) but since I’m kinda short on material this is what you get for today. P

The film doesn’t start as your usual slasher flick - in fact it it is reminiscent of the *trip movies (Eurotrip, Roadtrip, etc..) considering the amount of gratuitous nudity and sex and drug related jokes. We get introduced to the 3 protagonists: Paxton, Josh and Oli. who are backpackers on their own crazy Euro-trip. We meet them in Amsterdam where they proceed to get high, gawk at the prostitutes and then finally visit a brothel. They get a tip from another tourist to hit a little known hostel outside of Bratislava where they can meet tons of easy and willing girls. Apparently, because of the war, there is so few men in Slovakia that women there will throw literally themselves at foreign tourists.

The Protagonists: Josh, Paxton and Oli

Funny they mention a war. Which war would that be? Slovakia haven’t been involved in any major conflict since WW II and if they haven’t replenished their male population since then, they must be doing it wrong or something. I’m guessing that maybe Eli Roth confused Slovakia with Slovenia or something like that. roll Oh boy…

But then again I guess I can’t expect geographical accuracy from a movie in which the main selling points are gratuitous violence, and gore. Or perhaps, that war comment was just a piece of purposeful misinformation, that was lost on the characters, but should tip off the audience that something is amiss? Who knows. It was either very clever, or very stupid…

This pretty much sets up the mood - there will be some more sex, more silliness and after that our heroes will start dying in brutal ways, at the hands of some invincible psychopath with face perpetually obscured by shadows or some mask. Or at least so I thought. I was mostly right, with exception of the psychopath.

The promise of sexual gratification is real enough. Our heroes arrive at a hostel, that is essentially a wet dream come true. I actually chuckled during the “spa” scene because it reminded me of the “idealized male fantasy of a girls locker room” scene from Road Trip. It’s the one at the beginning of the movie where Tom Green starts his story with a vivid scene of a locker room full of topless girls taking showers together. That was essentially the spa/sauna scene from Hostel, only they did seriously.

As expected, soon people start disappearing, and we get the sense that things are about to go wrong. We also get a glimpse of a faceless torturer in rubber boots and apron. But here is where Eli Roth breaks away from the rote slasher routine and does something more interesting. It turns out that there is no faceless psychopath on the loose. Instead we find out that the Hostel itself is a twisted business operation that lures in tourists who then become unwilling victims for thrill seekers willing to pay a hefty fee to take a human life.

The chair in one of the torture rooms

What is even more disturbing, is that every single character the leading trio meets during this movie is either working for the hostel, or just another victim. There are no random encounters, or side plots in this movie. Everyone is connected.

So who does the killing in this movie? We already established there is no central unstoppable bad guy. Hostel employs a whole number of murderers and they are all oridinary, frail people like you and me. We meet one of them early in the movie on the train where he shows the heroes a picture of his young daughter. There is some nervous German guy, and over the top American asshole, and some Japanese business man in a suit (who btw turns out to be a movie maker Mike Takashi whose movies were apparently Eli Roth’s inspiration for Hostel). They are not monsters made of steel.

The German is visibly shaken, and seems to be having second thoughts. He drops his tools, he slips on the blood and etc.. The guy from the train is mild mannered, soft spoken and completely non threatening. The American is a complete ass, absolutely bored with his life and looking for a thrill ride. They are people you could meet on a street (or in a train). Anyone could be a patron of this questionable establishment.

This guys job is to cut up and burn the remains of the victims

And here is the kicker - didn’t we just pay to see a movie about people getting brutally tortured in imaginative, and always gory ways? What does this say about us? We might think that the torturers from the Hostel are sick and twisted, but in a way we actually enjoy watching them work. We are all morbidly fascinated by death and suffering. We always were - from gladiatorial combat, public executions, to internet snuff films. We are both revolted by and inexplicably drawn to this form of entertainment. This is why people slow down and gawk at the wrecked cars on the side of the road. This is why we have shock sites on the internet devoted entirely to displaying graphic pictures of mangled corpses. This is why we have films such as Hostel.

We may not like it, but the difference between a normal person, and a sick individual who would actually use the service of the Elite Hunting company is not that great. This is only reinforced by the last scene in the movie, where Paxton exacts a brutal and bloody revenge on one of the train guy in a public bathroom. He doesn’t do this in self defense. Hell, the person he attacks isn’t even the same person who tortured him. He was tortured by the German, while the train guy tortured Josh. And yet Paxton mutilates his victim same way he was mutilated himself, before he kills him. This is not even a revenge for Josh. This is a cold blooded, premeditated murder. Paxton could have simply burst in there, and beat the shit our of the guy or just stab him quickly. But he takes his time, and chooses the most painful and brutal way to do it. He becomes a torturer, and his actions are not all that different from those of his victim. And yet he is the normal guy we were identifying with this whole movie. He is one of us.

This is the message of this movie. Yes, I believe that despite the shallow facade and gratuitous violence this film has a message. Eli Roth cleverly uses the sex and gore as a mirror that lets us look inward at the dark corner of our soul that exists, no matter how hard we try to hide it. The ability, and the desire to inflict pain and suffering seems to be an integral part of the human condition, whether we want it or not. Most of us are perfectly content to satisfy those dark urges by watching violent movies, or playing violent video games. In most of them, the heinous acts committed by some designated bad guy who we can all hate, and yet at the same time gleefully gawk at the carnage he leaves in his wake. But then he gets defeated in the end, the good natured hero prevails and we can all feel better about ourselves. The external evil was banished, the good and normal guys we identify with won and it was all awesome to watch. Boom, catharsis, let’s go home having our belief in goodness of human nature reaffirmed.

hostel_hallway.jpg

Not in Hostel though. Here we are left with a very ambiguous ending. Initially we cheer when Paxton dispatches the train guy, but then we realize what has really transpired and we are left confused as to our own reaction. We can no longer externalize Paxton’s crime as something sick and abnormal. We cant condemn it because in a way we approve of what he did. But it was still torture and murder. It’s true that the motive was different but each of the killers in the movie had his own motive. Paxton’s motive was rage and need for revenge - but why would this make him any different than the other torturers? The truth here is that we are willing to accept this sort of behavior given a good enough excuse. Anyone can become a monster under appropriate circumstances: duty, revenge, fear and etc… This is human nature.

Or maybe I’m reading to much into this. Maybe this is a totally shallow, slasher flick with no deeper meaning. But then again, if you read Kafka on the superficial level you also end up with really dumb stories full of logical and factual errors that seem ludicrous until you figure out that the author is literally fucking with you. Interestingly enough, Kafka’s name is completely randomly dropped during some stoner conversation. Eli Roth is either very talented or very lucky to accidentally create a seemingly shallow movie that could be read on a deeper level.

I’m sure of one thing though - he doubtlessly gets no love from people of Slovakia whose country got portrayed as some remote backward hellhole controlled by mafia and overrun by gangs of “lost children” willing to kill for bubblegum and smokes.

Lisp: Parse and Aggregate a CSV File

Saturday, December 22nd, 2007

Yesterday I wrote about that little problem aggregating data in a big csv file. Just for shits and giggles, here is the lisp code to parse and aggregate a file like that. It assumes that we group the entries based on the first column, and aggregate the last. The file would look something like this:

something, stuff, poop, 20
something else, other stuff, pooper, 12
other stuff, stuff, poop, 55
something, abc, xx, 5

The script takes the name of the csv file to parse from the command line arguments. Here is the code:

;;; get split-sequence from http://www.cliki.net/SPLIT-SEQUENCE
(load "split-sequence.lisp")
(setq aggregate '()) ;; the association list to store results
 
(with-open-file (stream (first *args*)) ;; open the file specified on cli
    (do ((line (read-line stream nil) 	;;; initialize LINE with with read-line
               (read-line stream nil))) ;;; the increment step (result gets stored in LINE)
        ((null line)) 			;;; termination condition (read-line returns NIL on EOF)
 
	;;; split the read string on a comma using the split-sequence function
	(setq tmp (split-sequence:SPLIT-SEQUENCE #\, line ))
 
	(setq key (intern (first tmp))) 	;; our key
 
	;; convert the last value to an int
	(setq newval (parse-integer (first (last tmp)) :junk-allowed t))
 
	;; check if key is in the assoc list; if it's not, VAL will be NIL
	(setq val (cdr (assoc key aggregate)))
 
	(if val
	  (rplacd (assoc key aggregate) (+ newval val)) 	;; if exist update old entry
	   (setq aggregate (acons key newval aggregate))	;; else add a new entry
	)
    )
 
    (print aggregate)
)

Please feel free to pick it apart, and make suggestions. I do not claim that this is the best way to do things - I just hacked it up for fun. I was surprised that CLISP does not have a built in function to split a string on a delimiter. It seems such a fundamental feature, and almost every modern language has one. Instead of writing my own, I actually used this one.

This is especially odd considering the very complex with-open-file function which actually opens and closes the file, and handles error checking in the background. This a very simple and elegant way of handling I/O. Makes you wonder why a split string function didn’t make the cut. P

The output is not pretty but it works. It would take few more lines to format it the right way for import into excel but I got bored after that. SQL still wins on simplicity, and I’m pretty sure I could produce tighter and less verbose code in perl or python. But hey - I set out to make my life difficult by using lisp, and I did. This one actually made me hit the online manuals and documentation a bit to figure out how to do simple things the lisp way.

In defense of office suite databases

Friday, December 21st, 2007

Recently I asked you guys what was the point of office suite databases. Most people seemed to agree with me that they are practically useless - merely dumbed down, pseudo databases with bloated graphical interfaces. Jake made a very valid point that you don’t really need a full blown database for something as simple as indexing your CD collection. Today I found yet another reason why these things are useful.

A coworker came to me asking for help. A client sent him a “hueg” csv file with over 200k records and he didn’t know what do do with it. If you ever used Excel you know that you can only fit about 65k records on a sheet. I hear they removed this limitation in Excel 2007 but of course you have to use the OOXML format for this. The business world is not ready to switch to a new file format yet, so even people who do have 2007 installed, save in 2003 compatibility mode, with the record number restrictions in place.

This of course was not a big issue - I simply used the unix split command to dice the csv file into few smaller ones and then imported all of them as worksheets in a single excel document. Unfortunately, poor guy needed to run some analysis on this data - he needed subtotals by customerid, by item number, date and etc. Which meant that the safest bet would be to go back to the original file and somehow get the summaries out of it.

As we were talking, I was already writing a perl script to do this in my mind, and trying to figure out if I could it in Lisp. Yeah, I figured that the best way of de-rusting my Lisp skills is to make things difficult on myself by coding various day-to-day hacks in the language. The downside of coding up a custom script to do this was that I had to go back to my desk, and actually write it leaving the poor guy hanging, waiting for the data as I was having fun haxing in lisp.

And then it struck me - all this guy needed were 2 or 3 “group by” SQL queries. Naturally, Excel doesn’t do SQL and even if it did we were still having that pesky record limit issue to deal with. But MS Access does let you use SQL, and does not have silly limitations like that.

So I fired up Access, imported the CSV file as a table, created the queries he needed in the SQL mode, and then exported the results to Excel worksheets so that he could use them. The whole operation took me no more than 5 minutes, whereas writing and testing a perl script would probably take me at least 15-20. If I used Lisp it would probably be even longer since I’m not completely fluent in it.

So there you have it - why do we need these things? Because they can be very useful data manipulation tools. Need to do some custom analysis done on your data? Forget using funky Excel formulas and other crap like that. Simply load everything into Access and run SQL queries against it.

So I retract my previous statement. Office Suite database products are useful. You just can’t think of them as database engines. They are more like functional tools with database like capabilities.

So… Duke Nukem Forever?

Thursday, December 20th, 2007

Duke Nukem Forever is an iconic example of vaprware. In fact, it defines this term. Over ten years in making, and still nowhere near the completion. This is a sad lesson in how not to develop commercial software. Someone should probably write a book based on the project’s ability to delay release indefinitely due to internal and external influences. The game has been a joke for years now, and no one takes it seriously anymore. Except 3drealms of course.

You doubtlessly have seen the teaser they released yesterday. If you didn’t, here is the youtube vid:

What do you think? This doesn’t really even look all that great. Personally I don’t believe this game will ever see the light of the day but perhaps I’m wrong.

I know we just had a poll, but it has to be done:

DNF will be released:
View Results

A lot of us have fond memories of playing the original but we already have a generation of gamers who know Duke only by reputation. And not by the reputation as a kick-ass, no holds barred, campy romp but as the ultimate vaporware. Will the younger gamers who grew up playing serious, story driven FPS games like HL2 or Halo series will care about Nukem? Can they make this game fun enough to make up for the disastrous 10+ year development cycle and appease both the old guard with their annoying nostalgia, and the new audiences with their demanding tastes? Once they release it they can hardly blame bugs and inconsistencies on “rushing it into production”.

I think the smartest thing they could do would be to cut their losses now and just scrap the project. But I might be wrong.

Anti Virus Apps and Performance

Wednesday, December 19th, 2007

Please excuse me while I go on yet another pointless rant. But let’s start from the beggining.

My brother was complaining that his rig was getting slow, so I decided to check out his machine. Turns out he was running Windows XP and Norton Internet Security with just 512 MB of RAM. Ouch. While the OS could run on that memory by itself, I do not recommend trying to actually run a “modern” AV suite and also try to run applications on it. And by “modern” I mean recent release of Norton or McAfee which is what he had.

I have a rule about running Windows boxes - the only applications and services allowed to run in the background are the ones I’m actually using all the time, or which must be running. My personal pet-peeve are the preloaders. Adobe got so revoltingly bloated lately that it actually loads some sort of pre-fetching app on startup so it can cut town the time users spend waiting for the the splash screen to show up down to around like 3 hours or so. How many times do a day do people actually use Adobe? Two? Three? Why is that shit running there.

Same goes for Quicklime which insists on having an icon in the task bar, and yet still takes like 4 hours to load the player. I swear, I can watch a movie using VLC or MediaPlayer Classic before Quicktime player actually starts up.

These kinds of apps are the first to go. Usually I prune them out of registry using the brilliant sysinternals app Autoruns. A nice thing about this application is that it lets you suppress registry entries without actually deleting them. So you can un-check bunch stuff you are not sure about, then restart, see if anything broke and re-enable it if needed.

Printers, scanners and other devices also love to install crappy always-on monitoring apps. Unless you need these running all the time, I always recommend switching them off since they tend to be buggy and can literally render your system unstable. For example, if the software captures the button press events on your all-in-one scanner-fax-copier you start it by double clicking the desktop icon before scanning, and then shut it down afterwards. No need for this software to be eating up your resources while you casually browse the web or create yet another tantalizingly awful MySpace layout (or whatever is that you do in your spare time).

In fact, any time that you see something that has an icon in the Autoruns list and is not a core Windows service you should ask yourself: “does this shit need to be running?”, “does it need to be on all the time?” and of course “can I use it as an on demand (turn on when needed) application instead?” In most cases, the answers are no, no and yes.

This brings me back to the main topic of this rant: Antivirus software. Does it need to be running? If you are running a WinXP box as an Admin (and you probably do) then yes. If you are not running as an admin, then maybe. Malicious code often includes privilege escalation exploits so just the fact you are not running as admin does not mean you are safe. If you are always patched up to date, you are behind a good firewall, are careful online and you scan your machine for viruses daily you might be ok without an AV running in the background.

Does it need to be running all the time? For the most part, yes. On-access protection is the only sure way to catch malicious code as it is executing and block it before it manages to 0wn your system, install a rootkit and disable your AV. This is your immediate first line of defense and lets you thwart the infection right at the onset instead of waiting for the nightly scan that may or may not happen.

Of course this protection only works if get hit by a virus that can be recognized via a known signature, or by applying heuristics or recognizing behavioral pattern. So you are still defenseless against brand new threats. So I guess the question here is, do you want to be protected from the known threats or not at all. Some of us may get away running without on-access protection, but I would not recommend doing this to anyone who does not list computer security as one of their areas of interest.

Unfortunately, AV software literally KILLS your performance. When I was disabling statup items on my brother’s machine I purposefully skipped all the services, active processes and registry hacks set by Symantec. He was actually astonished by how much shit NIS installed on his system. How many services does Norton really need? How many processes need to be kept in memory for it to actually do it’s job? What are they trying to do? Slow down your machine so much that the rogue virus process will have to wait 3 hours to actually get some CPU time due to all the Norton processes hugging the resources all the time? It’s fucked up. And I’m not the only person who notices this.

Back in September 06 folks from The PC Spy did a little investigation as to what really slows down your system. Their results:

What Slows You Down?

And it seems to be getting worse. With every new version Norton and McAfee seem to be getting more bloated. First of all, who said that AV software needs eye candy graphics? Why does NIS 07 look completely different from NIS 06? Why did McAfee completely redesign the UI in Security Center 8.0? The 7.0 version had a relatively slim, and very intuitive interface. The 8.0 is a fucking mess. When it rolled out, people actually asked me if they could switch back to the old interface because the application became 10 times slower, and almost impossible to configure because of the convoluted controls.

It makes me wonder where do the resources are going. Maybe if these guys would take the money they spent on designing new interfaces, and instead concentrate on optimizing their code, and minimizing the memory footprint we would not have to deal with these monster apps eating our resources. It doesn’t really matter how these things look. AVG looks like crap but it is a great AV that I frequently install on low end machines. It works, and that’s all that matters.

Recently I installed Kaspersky Internet Security on couple of machines. I do not have a benchmark to back this up, but it actually felt much much leaner and faster than the recent releases of big N and big M. And this was their full blown AV + Software firewall suite.

So having established that most people need a good AV running in the background, and that most AV suites are resource hogs, which one would you recommend? Which one is your favorite, based on effectiveness and performance?

What is your favorite Antivirus?
View Results

Price really doesn’t matter at least to me at the moment. Whether I pay the annual fee of $70 to Norton or $80 to Kaspersky doesn’t really make much difference. I’d rather pay few bucks more to get a decent AV that doesn’t slow down my system if needed. Besides, if I wanted to deploy it at work free is usually not an option due to licensing restrictions. So let me know, which one is running on all of your windows boxes? Which one rocks your world. If I missed a good one, please feel free to add it in the comments.

Or perhaps you are one of those brave people who do not run AV software on their system at all? How is that working out for you?