Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site

Entries by Rob (3094)

Saturday
Aug022008

Last Choir Standing. Fight!

There is something rather surreal about listening to number one son playing Soul Calibur IV over a background of number one wife watching "Last Choir Standing" on TV.

Friday
Aug012008

The X-Files Movie - I really wanted to believe

Just got back from the X-Files movie. I was expecting lights in the sky, backlit gray aliens and lines like "You're dealing with powers beyond your comprehension". What I got was a somewhat grisly movie with a sub-1950s horror story plot and a whole boat load of angst.

Much has been made of the way that the film breaks away from the original X-Files staples of global conspiracy, alien invasion and strange goings on from "out there". Unfortunately it seems to also have jettisoned original plotlines and anything particularly engaging about Mulder and Sculley, who spent a lot of time grappling with "issues" and pulling unhappy expressions.

If you are a fan of the TV show and the earlier movie I can't particularly recommend it. If you have never seen the X-Files before I don't think you will particularly enjoy it either.

Friday
Aug012008

Fantastic Fun with Fantastic Contraptions

Simon just sent me this link:

http://fantasticcontraption.com/

It is a puzzle game very like the Physics Illustrator in the Tablet PC Power Toys but with directed challenges. Great lunchtime fun.

Thursday
Jul312008

Casting?

I'm writing some new teaching material at the moment. It is going roughly half as fast as I expected, which is about right in my experience.

Anyhoo, I'm doing casting, where you tell the compiler to convert from one type to another by putting the type in front:

int i, j;

float factor = (float) i / j;

I have to cast i to floating point in the sum, otherwise I get an integer division and no fractional part.

In other words, in the above code if the value of i is 1 and the value of j is 2 I want the value of factor (1/2) to be 0.5 (floating point division) rather than 0 (integer division). I get this result by casting i to float in the sum. C# uses floating point division with floating point operands, and everything comes out OK.

This is a standard computing thing, most languages provide support for casting. And I started to wonder why it is called casting? Popular wisdom seems to be that it is related to casting things in a foundry, where you pour liquid metal into a mould of a particular shape. The shape of the mould determines the result of the cast. So by casting you can change one thing into another.

However, I've thought of another way to look at it. You can think of casting as making a movie. You take an actor (Christian Bale) and cast him as a character (Batman). For the duration of the film the character will behave in terms of the role they have been cast into. This even works when we consider stupid casts. In C# you can't do things like cast a string into an integer. In films you can't do things like cast Christian Bale as City Hall. I quite like this way of looking things, but one thing does worry me. Maybe this is the original meaning, and it has taken me years to figure it out.....

Wednesday
Jul302008

Kung Fu Panda Kicks Ass

Went to see a kids film tonight. We went to the new Vue cinema at the top of Princes Quay in Hull. They use digital projectors and the picture was wonderful.  The film itself wasn't half bad either. I'd heard good things about it and they were all right.

There is a kind of production line for these kind of computer generated films at the moment, and many of them are are kind of "sub-Pixar, straight to DVD" kind of affairs. However, Kung Fu Panda is definitely a cut above any of these, mostly down to the great voicing by Jack Black amongst others. Nice story, some wonderful set pieces and generally lush images make this a film worth getting to see.

I was pleased to find that Vue was nice and busy when we came out of the film. It is a nice place to go to the movies and I hope it does well. In fact we are planning to see the X-Files movie at Vue on Friday...