Posts Tagged ‘code’

The school of gaming for kids. The start…

Sunday, August 7th, 2011

This is just a quick post but it only scratches the surface of my interest in this subject. In a nutshell, I was never very good at maths at school. I liked what it did, just couldn’t really get my head around some of the deeper concepts. I got a C at O-level and then dropped out of A-Level maths in the first 2 weeks.

Then I became a proper multimedia developer back in 1994, making games, websites and the like. Maths was my friend but I did it in a very organic way. I worked out how to write my own physics engine for a pinball game by drawing lots of angles in countless sketch pads… and chatting through the problems with my friend Jop. I got there in the end. Have a go at the game here. Most ‘hardcore’ developers wouldn’t even attempt it. I’m still not sure if that makes me smart or stupid. It did make me proud though. I showed the ‘clever types’ what someone who barely passed their maths exam could do.

My mission is to inspire kids to see the beauty, the fun and more importantly, the simplicity of maths. Nobody took the time when I was at school. We all have an inspirational teacher from our past that got us to invest that little bit extra by injecting their own passion into their lessons. If they don’t exist, I’ll have to do it for them!

Earlier in the year I started a series of simple modules to show how cool maths can be by showing how games use snippets of maths. And something games developers do very well is cheat with maths. Sure there are complicated equations for gravity, but Mario doesn’t use any of them. He just uses simple addition to do all that jumping around. It’s surprisingly easy when you know how… and shows how, with a bit of confidence, you can bend the rules a bit and ‘do maths’ in a very creative way. It’s problem solving at it’s best and when you use something like Flash, you SEE the results.

I’ll post more when I actually get my arse into gear and present to a local school (I have one lined up). My recent job change has deflected my focus of late. But now I’m back on my mission.

In the meantime, just noticed Quest to Learn, a fantastic initiative in New York. An entire school based around gaming. There’s a great article about them here to give you a quick overview.

Watch this space…

The Buddha Function

Tuesday, August 17th, 2010
function contemplate(karma) {

  if (karma<uint.MAX_VALUE) {
    contemplate(karma+1);
    trace("Hello Buddha");
  }
}
contemplate(1);

Incidentally, as a matter of scientific rigor, I ran this function in Flash and unsurprisingly, I got an stack overflow error pretty quickly. After a little testing, it seems Flash loses its state of Karma after precisely 2729 iterations.

And even more curious, 27-29 was also the score in the 2009 Rugby Union match between Stade Francais and Bath that effectively ended their Heineken Cup hopes. Spooky.

Hello W**ld

Monday, December 8th, 2008

There is nothing more sacred to a coder than the phrase ‘Hello World’ (with the possible exception of ‘foo’ and ‘bar’ of course). It has become tradition that this phrase should be the first thing you see when you compile those very first lines of virgin code. It’s like mumbling ‘one-two, testing’ into a new microphone. It’s just what you do. ‘Hello World’ announces in a binary fanfare you have arrived, your right of passage complete.

Personally, I’ve always been creative. The first time I can remember being proud was for producing the epic “Viking ship versus giant octopus” aged four. I can even remember drawing every one of the suckers on the twisted triangles that passed for tentacles. At age six, I was sure I wanted to be a cartoonist. Cartoonists were creatives, creatives broke the rules and I liked that.

But I have a dirty secret. I like to code. I’ve always been a coder. The second time I can remember being proud was stood on tip-toes in front of Mrs. Rudge’s maths class at age eight, straining to hold aloft a dot-matrix list of squared numbers. I’d written it on my BBC Micro the evening before. I got a house point. Coding was easy. It had rules. Coders followed rules and I liked that.

I’ve had Creative Code Bipolar Disorder all my life. Left brain and right brain ebbing and flowing in perfect harmony. Except just occasionally, it happens. My brain fights. I can almost hear it, like in cartoons. And there is one phrase that makes it happen without fail… ‘Hello World’. My coder brain desperately wants to write it but my creative brain has NEVER let it happen. It’s my creative safety blanket reassuring me, reminding me I’m creative first, coder second.

I will never write it so long as my creative brain has a single synapse functioning. Never.

I use the phrase “hello there!” instead. It seems to do just fine.

And relax…

For what it’s worth… The first known instance of the usage of the words “hello” and “world” together in computer literature occurred earlier, in Kernighan’s 1972 Tutorial Introduction to the Language, with the following code:

main( ) {
  extrn a, b, c;
  putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';