Live as if you were to die tomorrow. Learn as if you were to live forever.
— Mahatma Gandhi
A short episode today to show you how you can easily customise the look of your scenario.
Concepts discussed: Changing images
Live as if you were to die tomorrow. Learn as if you were to live forever.
— Mahatma Gandhi
A short episode today to show you how you can easily customise the look of your scenario.
Concepts discussed: Changing images
You must be the change you wish to see in the world.
— Mahatma Gandhi
After a few days’ pause, here’s another video. And it’s time for a teacher commentary again.
We’ve crammed in quite a bit of material over the last few episodes, and the question now is: Firstly, how do we keep motivation up? But more importantly, do the students actually understand what’s going on?
Some hints and tips what to look out for…
Times are bad. Children no longer obey their parents, and everyone is writing a book.
— Marcus Tullius Cicero
And now we’re getting to the point where you can actually control the turtle and play your game.
You can download the scenario source (as it is at the end of this episode) below. If you do: unzip first, and then open.
Concepts discussed: Keyboard control, code completion, String type
Scenario download: trick-the-turtle-v3.zip
Satisfaction lies in the effort, not in the attainment; full effort is full victory.
— Mahatma Gandhi
Things are start to heat up in our scenario: Snakes are chasing Trick (the turtle) over the plane. (That’s, of course, ‘plane’ as in ‘flat bit of ground’, not as in ‘flying thing’).
Concepts discussed: Hmm, don’t know. Creating yet another class. Copy-and-paste coding – is that a concept?
Always code as if the guy who ends up maintaining your code will
be a violent psychopath who knows where you live.
— John F. Woods
Here it is: The Joy of Code, Episode 8.
This time: housekeeping. No new functionality, but good coding practice. Enjoy.
Below is a version of the scenario to download as it is so far (at the end of this episode). If you haven’t been coding along with the previous episodes, but want to start here, use this version.
Concepts discussed: defining methods, code quality
Scenario download: trick-the-turtle-v2.zip
The person who knows HOW will always have a job, but the person
who knows WHY will always be his/her boss.
— Anonymous
Trying a different presentation style for a change (in an attempt to speed things up a bit), today we’ll do a quick run through first, followed by some explanation.
And what we’re doing is giving our turtle something to eat. Have a look.
Concepts discussed: creating a new class, if statement, collision detection, saving the world (yes, really.)
The solution of every problem is another problem.
— Goethe
Setting off on our path to create a little computer game, today we look into random behaviour. Random events are, of course, very important for games. If everything were entirely predictable, many games would be boring.
So, sit back and watch to see how we get Trick the Turtle to stagger around randomly.
And now do it yourself!
Concepts discussed: if statement, random numbers, Greenfoot API documentation
‘When I use a word,’ Humpty Dumpty said, in rather a scornful tone,
‘it means just what I choose it to mean — neither more nor less.’
‘The question is,’ said Alice, ‘whether you can make words mean so
many different things.’
‘The question is,’ said Humpty Dumpty, ‘which is to be master — that’s all.’
— Lewis Carroll, Through The Looking Glass
Welcome back to the teachers out there. Here are a few remarks about Episodes 4 and 5 of the Joy of Code series.
If you have any questions or comments, let me know in the comments section here on the blog, and I will respond to them in the next episode of the teacher commentary.
The sooner you fall behind, the more time you’ll have to catch up.
— (unknown)
Continuing straight on from the last episode, we now make the turtle turn at the edge of the world.
Concepts discussed: method return value, boolean, if statement
Nothing to download – we continue with the scenario from last time.
Good things, when short, are twice as good.
— Gracián
Yes, finally we’re getting into some coding!
Download the brand-new trick-the-turtle scenario (below), watch today’s episode, and then have a go yourself!
Concepts discussed: method call, parameter, method definition
Scenario download: trick-the-turtle-v1.zip (save and unzip before opening)