Tuesday 23 August 2011

Just a Quick Little Project

Last month was my girlfriend’s birthday, for which I bought her a dartboard—one of the classic ones made out of wood and sisal fibres. Let me tell you, the electric ones just are no match for them. I had one of them some years ago and was not happy at all. Half of the darts bounced off and often bent their plastic tips doing this. Sometimes they stuck but broke off at the tip. These tips had to be removed from the board with the help of pincers; and sometimes even this would not work and it remained in the board. So that would not do, and the classical board is indeed very much more convenient, in particular for laypeople like us. Not a single dart has bounced off this one so far.

I need not tell you the big disadvantage of the classical board, I guess. It is of course that you have to keep the score yourself. As we do not have a referee at our disposal (“one hundrrrrred and eeeiiiiiiighty”), and (despite the fact we are both are mathematicians, or maybe just because of it) not being inclined to much mental arithmetic, this turned out to be a real nuisance.

Now I have to confess a quirk of mine: Whenever I face I problem like that, I immediately conceive of some piece of software to do the job. It has become somewhat annoying lately, as for example I have trouble using artistic 3D software (like 3Ds, Maya, Blender, POV-Ray), because my inclination is to not construct a scene and render it, but rather to write scripts that build it automatically. You can see how that may be a hampering, at times outwardly idiotic approach.

Be that as it may, the idea of writing a little program to help us keep darts score seemed an enticing one, so, in short, I did.

There is no better language than Java if you want to get results quickly, possibly containing reasonably sophisticated graphics as well. Writing in Java has always felt to me like building things with Lego bricks—quick, reasonably versatile and completely safe.

The downside is that it is basically an interpreter language, which is a thing I dislike on general principles. I won’t go into more details here—if you are familiar with programming you know these things, and if not, it most likely would not be interesting. Anyway, I figured that writing this thing in C++ (without .NET or MFC, as I usually do), for example, would take too much time.

There is this TV series (or sitcom) called Big Bang Theory which I like a lot. In one episode of the second season the character Sheldon made a questionnaire containing a list of his best traits for his friends to grade. (If you think that makes no sense, you do not know the series!) The most whimsical item he cited was his alleged ability to write Java applets very well.

Now I have to confess a thing which might make me look very, very crazy and maybe pathetic as well. It is this: As this Sheldon is a physicist and a genius, it kind of incited my ambition to prove that I at least had that quality as well.

Emulating a fictitious character may seem weird and pathetic, but it is not entirely without honorable precedent—I guess I am stating this in self-defense. Bertrand Russell claimed that people made themselves unhappy by emulating prototypes they had no chance of attaining, and as an example claimed that even Alexander the Great had (probably) striven to emulate another one—Hercules, as Russell guessed. The guess was wrong, but it seems Alexander in fact tried to emulate Achilles, another probably fictitious (at least in the traditional form) figure.

So if Alexander was allowed to give himself to such crazy thoughts, why shouldn’t I as well? Well, quod licet Iovi, non licet bovi and all that, but still I use this notion to console myself.

So anyway, the thought of Sheldon goaded me on not to attack this problem, but try to do it as quickly as possible. Granted, I did not make it an applet but rather an application, but it did seem more fitting to the problem, and it could be easily made into an applet with little work. Anyway, I was really content with the time it took me; one evening to get a workable rough version of the software and another evening to polish it up. Most of the time was spent looking up details of specific Java standard classes I used.

After I was finished with this piece of software I though I might just as well put it into my blog for download. So if you have a non-electric dartboard and face the same difficulty as me feel free to use this program of mine. Just please keep in mind that it is a quick thing cobbled together in a couple of days. It could have a lot more options and gadgets. It is not the best that could be done, not even the best I could do, but I do not feel like devoting more time to it, so that’s all folks. If you find it useful for you, have fun! Below is a screenshot of the interface and a download link.

Darts software

download DartsCounter.jar

Run this pogram just like any other jar archive, most probably by just double clicking it. I found it needs a fairly recent version of Java installed, but that won’t be a problem, I expect.

Friday 5 August 2011

Irony Between Movies and Writing

This is merely an listing of some things I gathered over the years where the conversion of books into movies or related transitions produced effects that are incredibly ironic, even hilarious.

Forrest Gump

The movie Forrest Gump is based on a novel of the same name, written by one Winston Groom. It is nothing like the movie. In fact it is a bitter, biting satire and not cute in any sense. In the movie the character Forrest Gump is mentally handicapped, but nevertheless is lovable, successfull, charismatic and heroic, and when he messes up a situation it always works out well in the end.

The novel’s Forrest Gump is painfully mentally handicapped and produces absurd catastrophes continuously that make the reader cringe. It is not harmless fun, it is embarrassing most of the time. Despite this he has adventures that far exceed those in the movie, including a stint as a professional wrestler, and being shot into space by NASA. Expect a lot of bawdy humor!

As far as I could see the movie’s purpose was to put the character Forrest Gump into as many historic situations and footage as possible, using the best available technology of editing and special effects. Gump with Lennon, Gump with Kennedy etc. etc.

If you think that is a mighty original idea (as I did when I saw Forrest Gump for the first time), it really is not. Woody Allen’s “mockumentary” movie Zelig (made in 1983, eleven years before Forrest Gump) used the same idea and the same techniques to put Allen’s character, Leonard Zelig, into the 30s. And that is a truly brilliant, multilayer movie, among the best Woody Allen ever did. Highly recommended!

In short, the only thing the novel and the movie have in common is the title. And this fact can be highlighted perfectly with the help of a single sentence, which I find delightfully ironic. In fact, I believe the film’s makers were clearly aware that their project was not, strictly speaking, a film version of the book, and decided to place this hint on purpose.

The movie’s most famous tag line, as you know, is this:

Life is like a box of chocolates—you never know what you’re gonna get.

Whereas the novel’s very first sentence reads:

Life is not a box of chocoloates.

Leonard Nimoy

The ironic fact here is that renowned actor and TV personality Leonard Nimoy really became typecast as Star Trek’s Mister Spock. In 1977 he wrote an autobiography which he titled I Am Not Spock. If that is not ironic, I don’t know what is.

It seems that Star Trek fans (I am told they are divided into trekkies and trekkers, depending on the level of seriousness of their devotion) took offence of the title of that autobiography, which must have made Nimoy bang his head against the wall a bit.

Anyway, in 1995 he wrote a second part of his autobiography, whose title was—guess what?— I am Spock.

Cowboys and Aliens

This new movie, whose title basically describes its plot, is based on a graphic novel (as most movies seem to be these days). I have not seen the movie yet, and I don’t want to comment much on it, only the fact that it is not a comedy. And that is very ironic because, in the 80s, the idea of cowboys fighting alien beings, for renowned cartoonist Gary Larson (see also this one of my articles) clearly was a joke:

Cowboys and Aliens

(By the way: I did not upload this image, I just link to a version I found via Google. Therefore the copyright infringement is not mine. Just wanted to make that clear.)

In fact the Wikipedia page for the movie claims that the graphic novel was based on the cartoon, but does not back this claim with a quote. I do not believe it. There would have been no point for the novel’s artists to make a serious work from a single, humorous picture. I think it is just coincidence. But how ironic that a sarcastic joke could reappear as serious science-fiction action suspense movie.

Greek Man Looking for Greek Woman

This one might interest you least of all the examples I gave, but I just find it delightful. It is a novel by Swiss author and playwright Friedrich Dürrenmatt, written in German. Its original title was Grieche sucht Griechin which is less unwieldy than the literal translation I gave above, thanks to the distinction of the sexes in the German language.

It is a strange, ironic novel that is rather light-hearted compared to the other works of Dürrenmatt (especially his theatric plays). It deals with a Greek man, a conservative, shy, lowly accountant called Arnolph Archilochos, who is fed up with remaining a virgin and therefore puts up a newspaper advert looking for a woman to marry. A Greek woman. He finds one and they enter a relationship. What he does not realise is that she works as a prostitute, one of the expensive kind. Soon Archilochos’ affairs begin to prosper, he gets money and promotions and honors, because all the people in positions of authority had been lovers and customers of his fiancée, and they take him under their wings out of gratitude. In the end of the novel he finds out about her past and has a breakdown, gets violent and drives away her and the guests of their wedding.

An unhappy ending, in short, but there is never any other kind with Dürrenmatt. Nevertheless he sarcastically wrote an epilogue to the novel titled “ending for lending libraries”, which added a stupid, shallow and very contrived happy ending. It seems he wanted to lampoon people who only read books for uplifting endings (and rented these books from libraries). Clearly it was only a joke.

The novel was made into a German movie in 1966 (black and white, starring then famous actor Heinz Rühmann). Guess, which ending they picked?