Film Music by Alfred Schnittke

August 15, 2004
1 comment Music

schn.gif Have you ever heard of the film Story of an Unknown Actor or at least the soundtrack called Film Music?

I heard one of the songs on the radio the other day. Despite never having heard it before I fell for it immediately. Quickly I scribbled down the name and went immediately to Amazon.co.uk and IMDB.com to look for it. Sadly they're out of stock on Amazon.co.uk and Amazon.com and having Googled a bit for it I suspect now that I won't be able to buy a copy online. One source said the album is out of print, meaning they're not producing any more.

Thus, if you have a copy, are you willing to sell it to me somehow?

Classic Movie Scripts

August 12, 2004
1 comment Film

Classic Movie Scripts is a site that hosts a long lists of, unsurprisingly: movie scripts. The list isn't very long but keep it in mind, it might grow. I was happy to find the script to Annie Hall by Woody Allen. One of my favourite films of all times. This is taken from Annie Halle:


                       ALVY 
       Tsch, I know.  A relationship, I think, 
       is-is like a shark, you know?  It has 
       to constantly move forward or it dies. 
               (He sighs) 
       And I think what we got on our hands 
               (Clearing his throat) 
       is a dead shark.

Psychiatric med student Michelle's story

August 8, 2004
1 comment Misc. links

Michelle the medical student I don't know why but I felt very compelled to just read one comic after the other. Can't tell if this Michelle actually exists in reality but I'll imagine so anyway. She tells the story of her unexpected work experience at a psychiatric ward as a third-year medical student.

Don't miss this. It's cute and positively inspiring.

Pretty print SQL script

August 6, 2004
6 comments Python

In my latest work stuff I have a custom debugger module that prints the SQL statements used to stdout. To make the debug output more readable I whipped together this quick script that pretty prints SQL statements with hopefully correct case and indentation. It converts something ugly like this:


select * from foo order by bar;

into this:


SELECT
  *
FROM
  foo
ORDER BY bar;

Try with your own SQL statements

Truncated! Read the rest by clicking the link below.

Integer division in programming languages

August 4, 2004
20 comments Python

I have a degree in mathematics and computer science, but still I don't know why different programming languages evaluate Integer/Integer differently. On any calculator if you divide one integer with another you get a decimal number (of course not if the numerator is a factor of the denominator).

Python for example returns a integer number:


>>> print 3/10
0
>>> print 3/10.0
0.3

Perl on the other hand returns a decimal number:


print 3/10;  print "\n";
print 3/10.0;
...gives...
0.3
0.3

PostgreSQL is like Python:


database=# SELECT 3/10 AS quotient1, 3/10.0 As quotient2;
quotient1 |       quotient2
-----------+------------------------
        0 | 0.30000000000000000000

And good old MS Excel gives:


=3/10  <=> 0.3

Why is it so?

Overcomplicated password requirements on Oystercard.com

August 2, 2004
1 comment Web development

Oystercard for those who don't know is the modern ticketing system used in London. It's a "swipe" card you can use on buses and the underground.

Anyway, I registered on their website today and it starts like any other registration form with the desired username and password. When I submitted the first form it gave me an error message shown in this picture

Truncated! Read the rest by clicking the link below.

Make your own 3-D pictures

July 31, 2004
0 comments Misc. links

Make your own 3-D pictures All you need is a photo and Photoshop. Obviously you need a pair of 3-D glasses. Where do you get hold of a pair? Well, next time a pair is included in a popular science magazine or something, I'll buy the magazine just to get the glasses.

Anyway, this NASA JPL article explains how to do the Photoshop bit. It doesn't look very hard to do. First I just need to get a pair of glasses.

Date plus years or months or weeks

July 28, 2004
6 comments Python

I'm envisioning a input form which asks initially for a date on a calendar. The next question is duration, or how long from that date. The input for this must be clever. So now I've put together a little script that adds numerically what someone enters in English.

The "problem" is what do you do when you add "1 month" when incrementing the month number is not enough? This program does like this: 2004-08-31 + 1 month = 2004-09-30.

Please have a try of my little program and let me know what you think