Easy Money

I won 10p yesterday. I had a bet in a lecture that:

i=0;

j = ++i;

- would set j to 1. (it does, because the increment is done before the assignment). Someone didn't agree, a bet was made. Sample code was written and executed. And I won. I didn't keep the money. I handed it back with a magnanimous "Get yourself a drink on me" which shows how out of touch I am...

I went into today's C# lecture with hopes for similar financial gain, but it was not to be. I think the word may be out that I am some kind of hustler. I really like teaching the first year course. Every year we seem to get a great batch of students who ask sensible questions and enjoy learning how to program. It is rather nice at the moment because we are looking at things where there are no "right" answers, just ones which fit the context better than others. So we can debate these issues. Great fun.