Tomer Gabel's annoying spot on the 'net RSS 2.0
# Sunday, July 15, 2007

hot-fuzz-2007-11 Let's start off with Hot Fuzz. This movie, from the creators of Shaun of the Dead, is an action-comedy about an overachieving London cop who, in order not to make his contemporaries in the police force look bad, is sent to a backwater little English village. While the worst crime in the village appears to be serving alcohol to minors, a series of "accidents" lead Sgt. Angel to dig deeper into the unlikely inhabitants of the village until he finds out what really goes on. Combining hilarious action and outrageous comedy (not to mention goofy references to classic action films), this is going to be one of my favorites for a long time yet.

505331~Shrek-3-Posters

After an amusing but unspectacular sequel, Shrek returns in what I expected would be a "the quest for more money" kind of movie. Despite (or maybe because of) my ridiculously low expectations I actually enjoyed Shrek the Third quite a bit. It's not a brilliant movie by any means, but it has a much better signal-to-noise ratio than the second one in my opinion, and my companions and I laughed our asses off throughout the production. Bottom line? If you're looking for a fun way to spend a couple of hours, it works very well.

transformers_movie_poster_optimus_primeIt's hard to explain just how low my expectations of Transformers were. To me, it's a classic "well how can it not suck?" kind of movie, along with Resident Evil and Bloodrayne (both of which sucked, in case you were wondering). And I'm not even a fan of the TV series, so I had every reason to expect a terrible movie.
Well, it actually wasn't. The first half is surprisingly funny (not "ha-ha" kind-of funny, I mean "laugh out loud" funny), and the second half is non-stop, kick-ass action. This movie is definitely going to become high-definition reference material when it comes out on Blu-Ray or whatever, and the intentionally simpleminded plot works very well indeed. Biggest surprise of the year - recommended!

Sunday, July 15, 2007 11:55:06 AM (Jerusalem Standard Time, UTC+02:00)  #    -
Movies
# Tuesday, July 10, 2007

And they're getting better at it:

captchas_suck

I mean, what the hell? That looks like a goddamned phi (φ) in italics! I couldn't even figure it out, it took a coworker to figure out that it's supposed to be "cp"...

Tuesday, July 10, 2007 4:38:19 PM (Jerusalem Standard Time, UTC+02:00)  #    -
Personal
# Monday, July 9, 2007

I've been working with Rhino Mocks for a couple of days now and I'm duly impressed. Aside from being generally useful, the Rhino Mocks syntax is mostly natural and some very clever design hacks are used to make it work the way you'd expect it to. (In case you don't know what mocking frameworks are, the subject has been tackled ad nauseam. Just take your pick.)

There is one caveat that is not immediately visible in the Record-Playback syntax, though:

internal interface IFoo
{
    int Bar();
}
[Test]
[ExpectedException( typeof( InvalidOperationException ),
    "Type 'System.Object' doesn't match the return type " +
"'System.Int32' for method 'IFoo.Bar();'" )] public void TestRecordSyntax_ReturnTypeMismatchBehavior() {
MockRepository mocks = new MockRepository(); IFoo mock = mocks.CreateMock<IFoo>(); using ( mocks.Record() ) Expect.Call( mock.Bar() ).Return( new object() ); }

This simple test merely returns an incorrectly typed return value for the IFoo.Bar method, so with the ExpectedException in place you'd expect it to succeed, but you're in for a surprise:

[failure] RecordPlaybackTests.TestSetup.ConsistentReturnTypeMismatchBehavior
TestCase 'RecordPlaybackTests.TestSetup.ConsistentReturnTypeMismatchBehavior'
failed: Exception of type 'MbUnit.Core.Exceptions.ExceptionExpectedMessageMismatchException' was thrown. Expected exception message: "Type 'System.Object' doesn't match the return type 'System.Int32' for method 'IFoo.Bar();'", got "Previous method 'IFoo.Bar();' require a return value or an exception to throw.".

To understand this, consider the following flow:

  1. A method call expectation is set (by calling mock.Bar())
  2. Attempting to set a wrong return type results in the expected exception being thrown from Rhino Mocks. This happens before the Return constraint is set
  3. Because using calls IDisposable.Dispose in the finally block, the mocks.Record object calls mocks.ReplayAll()
  4. ReplayAll asserts because a required expectation (return value) is not yet set, masking the expected exception!

This is in fact how I first encountered this behavior, however there are several scenarios where this can happen. One example: setting up a return value that throws an exception on construction, possibly due to invalid arguments, causes the same behavior thereby masking the true cause of the error.

An alternative syntax suggested by Ayende (author of Rhino Mocks) is:

    With.Mocks( delegate
                {
                    Expect.Call( mock.Bar() ).Return( new object() );
                } ); 

Aside from the esthetical aspect (i.e. butt-ugly), this syntax introduces a minor issue: you cannot Edit-and-Continue methods with anonymous delegates. This may not be a big deal for test code but it's worth noting.

All in all I don't consider this a big issue, but it can bite and should therefore be understood and documented. This post will be reflected in the Rhino Mocks wiki shortly and will hopefully save someone a little grief in the future...

Monday, July 9, 2007 7:53:40 AM (Jerusalem Standard Time, UTC+02:00)  #    -
Development
# Sunday, July 1, 2007

Quick download link (v1.2)

I wanted to simple way to download an entire PicasaWeb album. Right-click and save simply will not do, installing the Picasa application is completely out of the question (I use FastStone, in case you were wondering) and I couldn't find any easy way of doing this, so I whipped up a quick and dirty application. It's pretty self-explanatory, really:

picasawebdownloader

Download the application (source included) here.

I also used the chance to give #Develop a serious whirl, and I can honestly say that it's damn impressive; in several hours of use the only real qualms I've had with it are the non-configurable keyboard bindings (at least I couldn't find any configuration menu for this; it wouldn't be an issue if the default bindings weren't slightly different from what I'm used to) and the lack of immediate/watch debug windows. The dialog editor is full-featured and the environment seems to be quite responsive and robust. I really am impressed.

Update (20-Aug-2007): Version 1.1 is now downloadable. I've added support for AuthKeys (as per skolima's request) so you should now be able to download private albums as well (assuming you have the appropriate key). Also added a compiled binary to the archive, doh!

Update (11-Sep-2008): Version 1.2 is available for download, and includes the following improvements:

  • The tool now works for PicasaWeb albums from any valid top-level domain (this means that albums hosted at www.picasaweb.ru will be properly handled.
  • Existing files will not be overwritten; instead I've taken a cue from common browsers and am now adding a counter suffix to the filename. If an album has two pictures with the name example.jpg, you can now expect to find two files named example.jpg and example (2).jpg in your directory. This behavior is also applied if you already have such a file in your directory prior to running the tool - any feedback as to whether or not this is desirable will be appreciated!
  • Authentication keys may now include dashes (thanks, Jakob).

Sunday, July 1, 2007 2:28:06 AM (Jerusalem Standard Time, UTC+02:00)  #    -
Development | Software
# Sunday, June 17, 2007

PICT0715 It's official: I'm leaving Monfort Software Engineering, my workplace and second home for the last two years. I'm leaving with mixed feeling because I consider Monfort to be one of the finest places I'll ever find on both a technical and personal level, but it's time for me to move on.

I have several promising alternatives and will be settling on a new job by the end of the month; until that time I'm still open to offers (and will consider relocation if the offer is enticing). You can find up-to-date CV and contact information here or through the navigation menu on the right.

Sunday, June 17, 2007 11:43:32 PM (Jerusalem Standard Time, UTC+02:00)  #    -
Personal
# Sunday, June 10, 2007

My brother was going on and on about a coding challenge he found as part of the "Lisp as an Alternative to Java" study (the challenge instructions are outlined here, and you can find the sample dictionary and input data by following the study link); eventually I agreed to give it a try.

Spoiler alert: Do not read on if you want to take on this challenge!

Although I had to stop in the middle because I had company, the initial (hacked-together, very inefficient and completely uncommented C# 2.0 code) version took me 1 hour and 20 minutes. While technically correct this version performed abysmally, but it served as a good basis for further optimizations; a second, optimized version took another 30 minutes and with another 20 or so minutes to clean it up, the final version took a grand total of 2 hours and 20 minutes. Total length is 193 lines of code (including comments and white-space), which you can find here.

The crux of the solution is a very simple tree structure to hold the word dictionary. Each node has a 10-entry branch table, each entry representing a phone digit; a node can have an arbitrary number of leaves, each leaf representing a dictionary word. This allows for a very simple (and hopefully efficient) inner search loop:

  • Use successive digits as indices for traversal into the tree;
  • When a node with leaves is encountered, the leaves (dictionary words) are added to the potential result set. The rest of the input is then recursively encoded;
  • If no leaves are encountered for the entire input set, a digit is added to the encoded string and the rest of the input is again encoded. A boolean flag is passed along with the recursion to make sure two consecutive digits are never encoded.

This is basically a prefix tree (or trie). With the provided dictionary and input sets, runtime on my 1.7GHz Pentium M-equipped laptop is approximately three seconds. I haven't properly profiled the application for CPU and memory utilization because, frankly, it's good enough. There's also a lot of leeway for optimizations: the current tree implementation is woefully inefficient, as tree traversal can result in additional memory pressure.

Sunday, June 10, 2007 12:57:22 AM (Jerusalem Standard Time, UTC+02:00)  #    -
Development
# Saturday, June 9, 2007

Starts out a little confusing, but really a lot of fun. Thumbs up!

Also in other news, Jamie Zawinski is hella funny.

Saturday, June 9, 2007 1:03:41 AM (Jerusalem Standard Time, UTC+02:00)  #    -
Movies
# Monday, June 4, 2007

Oh man, this had me laughing my ass off. Badly.

The "random link every now and then" corner is brought to you by lack of caffeine.
Oh, and thanks for the link, Mickey.

Monday, June 4, 2007 12:56:31 AM (Jerusalem Standard Time, UTC+02:00)  #    -
Gaming
# Saturday, June 2, 2007

I mentioned before that Havoc, the guy who gave me a ride to the Netherlands, is the main organizer of Outline; he also invited me to come, and since I was still in the Netherlands at that time I took him up on his offer.

100_1325 100_1326
The two partyplace buildings (source)

The party was held at the magnificent "Recreatie Te Boomsgoed" camping ground in the border town of Braamt, and the partyplace comprised two small buildings, one being the Atari hall and the other the bar/PC/smoking/compo room. The surrounding area is beautiful country-side (as you can see from the photos above...) and afforded a very relaxed atmosphere.

Outline is a small party and therefore focuses mostly on socializing (although there were quite a few productions!). Because this was only my second international demoparty - not to mention relatively small, Dutch-based and Atari-oriented at that - I didn't really know anyone beforehand, and it was a real treat getting to know the Atari scene. I've never so much as seen a Falcon before, and some of the stuff I was shown simply blew me away!

16726
Announcement for the Kick Off 2 championship, organized by kRadD. (slengpung)

The only warning of what's to come was the sign above; Saturday afternoon a guy walks in the front door of the Atari hall, announces "the abomination is here" and proceeds to setup an Amiga A1200 on one of the tables. Despite the (abundant) cries of dismay, in short order another Amiga (an A2000) was set up next to the first and the training bouts started. I was never a big fan of Kick Off 2, or any football game for that matter; my thirst for sports games is amply quenched by Speedball 2: Brutal Deluxe, but (as is often the case) reason was ignored and football prevailed. That being said, the yells of "scheiße Amiga" were the source of constant entertainment.

The competition entries were actually surprisingly numerous; of interest to me were, among others:

  • The aptly named PC demo from Limp Ninja
  • Inque's 64k called Dahlia
  • A really cool flOw-clone called wriGLe by Psycho Hacking Force
  • Wamma's Atari VCS demo (!) called Gehirn
  • A really strange music-video devoted to jumpstyle: Springen by No-release
  • Some Vectrex demos were also shown, but I can't find a link to them anywhere...

100_1360 
Playing Gauntlet II on a Falcon (source)

In the midst of all the mayhem I found a French guy with a tower-modified Atari Falcon (and whose name I unfortunately can't recall) who offered me a two-player game of Gauntlet II. I think we spent the better part of 3 hours playing the old classic, which hasn't lost any of its charm over the years; we managed to reach level 60 or so before we had to stop due to competitions, changes to the power configuration as people started leaving etc.

The only two things "wrong" with the partyplace were the lack of Internet connection (which could also be considered an advantage, depending on how you look at it) and the separation into two halls. I'm not talking about the segregation of the party into "Atari" and "non-Atari" halls, but simply the fact that with around 80 (I think?) participants the party felt a little smaller when they were divided into two rooms. Can't fault anyone for that as the rest of the facilities were awesome, but after quite a few parties I do actually think that the "one hall for everything" approach has a lot of merits.

img_0879
Good people, good atmosphere (source)

Amazingly, not long after Outline ended the main organizer Havoc ran into troubles (of the real-world kind), which he described in this pouet.net forum post; the contents bother me to no end and as I haven't been able to contact Havoc since, I can only assume from his posts that he's getting better. If you're a pouet.net member, do leave a "get-well" for him on that thread, I'm sure he'll appreciate it.

Saturday, June 2, 2007 1:53:22 PM (Jerusalem Standard Time, UTC+02:00)  #    -
Demos
# Friday, May 25, 2007

To cut to the chase, Spiderman 3 was... part great, part awful. On the one hand, amazing cinematography and special effects, on the other hand a soulless script, misguided patriotism on the part of the director (this scene in particular reminded me of Raymond Chen's classic saying, "I bet somebody got a really nice bonus for that feature").

There is so much going for this movie that I couldn't help but attribute most of its shortcomings to a surprisingly shallow screenplay; my theory is that Sam Raimi's background as a B-Movie director ("in the trenches" is the term I'd use), while affording him impressive technical innovation and brilliant tongue-in-cheek humour, does not lend as well to his screenwriting abilities. The first two Spiderman movies were written by professional writers, and with Raimi's superb(not to mention distinctive) style of visual gloss the combination is very effective. For some reason the Raimi brothers took it upon themselves to write the script for the third movie, and it suffers accordingly.

Overt patriotism (which was much more subtle and agreeable in the first two movies) is very awkward for a superhero that is, in many ways, the antithesis of his contemporary who swears to uphold "truce, justice and the American way;" this reflects in the acting, and outlines how artificial those scenes were. The same goes for most love- or romance-related scenes which also felt forced and superficial. Tobey Maguire, who seemed in the first movie so appropriately docile and nerdy, on the second suitably vulnerable, now seems a little out of his element; in his defense, the over-the-top dialogue and violent mood-swings called for in the script would probably make any actor falter. A lot of the script just doesn't work.

Sandman is, and please remember that I have not actually read the comics, an utterly uninteresting character. It seems like a subplot, and one that doesn't make sense at that (it was never obvious to me why he fights against Spiderman); Thomas Haden Church plays, in this case, a very lethargic character that has - whether due to bad scripting or bad acting - very little depth. This would be a good opportunity to oppose a conundrum (minor spoiler ahead): at least once during the movie a fake news broadcast is shown, in which the anchorman provides commentary on the proceedings in real time. The anchorman provides the audience at home with the particular details of the combatants, and names them accordingly (Spiderman, Sandman, Venom). As my friend Yoav puts it, "who gets to decide these names anyhow?" (link in Hebrew)

On the plus side, James Franco actually seemed to learn to act, or maybe lack of any significant screen time in the first two movies never let his talent show. His dialogue is, ironically, quite sensible, and he carries it off very well indeed. A cameo appearance by the legendary chin is utterly hilarious, the music is great and the cinematography - as I previously alluded to - is simply fantastic. I'm not in the business, but I wouldn't at all be surprised to find out that Raimi has invented any number of new camera techniques in the course of filming Spiderman 3 alone. The special effects are brilliant and there is non-stop action - most of which is really good.

In conclusion, to reiterate the first sentence in this article: Spiderman 3 is not a bad movie, nor is it great (that title is reserved to the first movie in that particular series). I just wish Sam Raimi would stick to what he's (very) good at and leave the screenplay in the hands of people better suited to the task.

Lastly, it's worth noting that I saw this movie in Pathé Tuschinski in Amsterdam, which is undoubtedly the single most impressive cinema I've ever been to; it is a very large building, reportedly built in 1921 in the Art Deco style, and much more impressive on the inside than on the outside. Theater 1 is huge, spacious and comfortable, with an astounding number of chairs and two (!) levels of balconies. Audio and video quality was excellent - possibly the best I've ever experienced, and the lobby alone is worth the price of admission which, excluding discounts or sales, is €9-10 - quite pricey.

Friday, May 25, 2007 11:56:54 PM (Jerusalem Standard Time, UTC+02:00)  #    -
Movies
Me!
Send mail to the author(s) Be afraid.
Archive
<July 2007>
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234
All Content © 2024, Tomer Gabel
Based on the Business theme for dasBlog created by Christoph De Baene (delarou)