Monday, February 13, 2012

SOFT6008 Class 07

Students worked away on the various exercises.

Some students need to take a look at the New Orleans example again and really understand it before attempting the various exercises involving random images. Don't forget the discussion we had about randomness. Some students have unwittingly written code that has stacked the dice or deck. Those kinds of things could have gotten you shot in the wild west, if they'd had JavaScript :-)

There is a lot of interesting variety in the code being written to complete the euro change exercise. It's really worth thinking about the logic before writing the code. I've see a lot of code that is more complex than it needs to be. There is no need for nested loops. And if you think about it, what's the maximum number of 50c coins you will display. The solutions involving mod and integer division are clever, but brave.

Beware of intelligent quotes when copying and pasting. They have different ASCII values from regular double quotes and will break your code.

No comments: