JoC #19: Class methods vs instance methods

      If can keep your head when all about you are losing theirs it’s just possible
      you haven’t grasped the situation.
            — Jean Kerr

Today, we’ve got some background stuff to discuss. Not much happening in terms of new functionality to our project, but important (and, no doubt, incredibly interesting) conceptual information.

Why is there sometimes a classname before a method call and sometimes a variable?

I’m sure all of us have had sleepless nights where we’ve been lying awake pondering this question. Today, it shall be answered!

Download video

Even if you’re not that interested in discussion of underlying concepts, but just want to GET STUFF DONE — still, watch this video. You can only become a good programmer (and get stuff done) if you understand what you’re doing.

I really want you not only to copy what I’m showing you, but become able to invent and create your own programs. For this, it’s important to get the concepts.

So, hit start, sit back for a few minutes, and learn something!

Concepts discussed: internal method calls, external method calls, static methods, instance methods 

JoC #16: Adding a score counter

      Habe Mut, dich deines eigenen Verstandes zu bedienen.
            — Immanuel Kant

Welcome back after a little break in putting out new episodes.

I was at a conference for a week or so (Melbourne, other side of the world!), and then I had to get settled into my time zone again, but I’m back! I still feel a little jet-lagged, so if my voice sounds even more drab than usual in this episode – I blame the time zones.

This episode deals with an incredibly important concept: object interaction. (It could actually also have been titled “Object interaction – a second look”.) We started to look at object interaction a little bit in Episode #15, and now we’re really getting stuck in. We’re throwing around terms like “object references” and “constructors”.

Yes, we’re slowly cranking up to a more professional level here. So sit back, switch your brain on, and watch. And of course — as always — after watching: Fire up Greenfoot, and get coding yourself!

Download video

Oh, and one more thing: I am showing how to implement a score counter here, because several people have asked me how to do that. So if you have a question, or something you want explained: tell me in the comments, and I’ll try to fit it in in one of the future episodes.

Update: This episode shows how to use a ready-made counter object. If you are interested in making such a counter yourself, you can now look at Episode 26.

Concepts discussedobject interaction, constructor, field, local variable, assignment, external method call

Downloads:  trick-the-turtle-v4.zip

JoC #15: Object interaction (first encounter)

      The pure and simple truth is rarely pure and never simple.
            — Oscar Wilde

Today a long, and quite full episode. We encounter various very important concepts for the first time: local variables, class types and object interaction.

If you have questions left after watching this – don’t worry. We will look at all of this again in more detail in future episodes. And you can use the comments below to ask your questions (or make any other comments).

By the way, I just noticed I made a mistake. (Yes, that does happen!) There is a bug in the program that I’m writing in this episode. Can you spot it?

Download video

Concepts discussedvariable, field, local variable, assignment, class type, object interaction, external method call


JoC #4: Finally – some code!

    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!

Download video

Concepts discussedmethod call, parameter, method definition

Scenario download: trick-the-turtle-v1.zip    (save and unzip before opening)