>> kolling: good afternoon. thank you forcoming and thank you for having me here. my name is michael kolling, i work at the universityof kent in canterbury, england, in the southeast corner of england. pretty much opposite ofchannel tunnel so we can--can look over to france from there. and i've only--i've onlyarrived here in the us last night so i'm still out of my time zone, but i think this--thistime isn't too bad. i, if--if it hits me in
programming language for 3d printing, the middle of my talk and i suddenly get tired,i'll just drag on to the end. i want to talk to you today about the topic, that's on thescreen there already, "teaching kids to code." so i want to talk a bit about what we do to--toteach programming to kids. in this case, happens to be java and that was maybe one of the thingsto talk about it as well, but that's a good
or a bad thing. i will spend my time doing--doingmostly software demo. so i--i--i will show you a system called greenfoot that we--thatwe use for teaching and first of all, i give you an introduction, you know, the typicalfew slides with the background and then i do the demo and then i sort of skip all that.and i do mostly demo and i sprinkle the--what i would have said in the introduction somewherein the middle and maybe that's a little more interesting to see. the thing about softwaredemos is they are--you've probably seen many of them and there are very different kindsof demos and i have recently seen a magic trick that reminded me a lot of the way howmany software demos are and i thought i'll--i want to show you today just to--you'll--you'llunderstand what i mean. the trick is a very
classic trick, classic magic show. it's thecut the rope trick. so, you probably have all seen that at some stage. you have a standardbit of rope and i'm going to cut it in half and then i put a knot in it and then i'lldo my magic and then the knot is gone and it's all in one piece again. so that--that--that's,you know, fairly standard bit of magic. so here's my bit of rope, i'm going to cut itnow, has anyone got a pair of scissors on them? well, if--if you don't, it doesn't matterbecause i'm well prepared i've got one that i made earlier. here, so i've cut it alreadyand i'm going to put my knot in it now which i'm not sure i'll be good at. but, well, itdoesn't matter because i got one that i prepared earlier. and now i'm going to make this knotdisappear. so i'm--just count to three and
then it will go away and we have one bit ofrope again--one, two--well, it doesn't matter because i've got one that i prepared earlier,and here we are and that is pretty much how many software demos are going that i've seenat many conferences and then at the end, you wonder, you know, what--what--what you'vejust seen. so i--i hope that i--that i'm not going to do this and--but really show youeverything from--from start to finish so that you get an impression of what this systemreally is. so, the system itself is called greenfoot. greenfoot is a system--it's essentiallya programming environment that we have built for, explicitly for teaching programming toyoung beginners. we had another system before--well, it's still around, we built another environmentfor teaching. previously, it was called bluej.
that was aimed essentially at entry leveluniversity students. so we--we had talked for--for some years already in the contextof bluej about teaching programming to beginners. and in our mind, that was always first semesteruniversity. but the truth is that first semester university now is not the first contact ofkids with programming anymore. and we thought if we are--if we are--we've said for a longtime that we want to do, you know, teach programming in a sort of padagogicly valuable way and--andgood way right from the start. and the start is just not entry level university anymore.the start in fact and--where we lose them already is at school level. so, we thoughtthat if we're serious about, you know, doing it--doing it in a--in a good way from thebeginning, we really have to go a bit lower
than that. and there's one big, big differencebetween teaching at university level and teaching at school level, and that is if you teachat a university which--it's my--my day job, you have a much easier time because you havea captive audience. you know, they can't run away. they--they--they have made a choiceto be there and i'm--what i'm inclined to say they want to be there, that's not alwaysliterally true but in some sense of the--of the word it is. you know, they--no one forcedthem to be there, well, maybe their parents did, but by and large, you know, they areinterested. whereas if you are one of the school teachers, you know, the poor peoplehaving to stand there with 15 year olds, 80% of the students before you even start talkinghave already decided that they are not interested.
and so that is one of the main differencesis that a lot of--of what i am going to show you is about generating motivation, of being--being--beingsort of fun, being--being engaging so to draw them in. so what we are trying to do hereis two things at the same time, we're trying to teach them something valuable but at thesame time, we're trying to do something that they actually want to do, to draw them in.i'll just go ahead and show you some things and then i'll give you a bit more backgroundlater. so what i've got here on my screen at the moment is greenfoot and i'm just openinganother project here. so here for example, i have an existing greenfoot scenario we callthem, a scenario is essentially one--one project. where i have here on my right, a representationof the classes that are involved in this project
and here are what we call--what we call theworld. so i have already written some classes here, so these are java classes that i implemented,and the first thing we typically do is not to write code but to start interacting withclasses. so when i have a class here, i can click on it and i get a pop-up menu with afew operations and one is to instantiate this class so i can create a new outlet here, ofthis class interactively. and when i do this, i can place my object into the world. andwhen i have an object in the world, i can click on the object and i can see all thepublic methods of this object and i can now interactively invoke this--these methods.so i can tell this wombat for example, to move. a wombat by the way is an australiananimal. i don't know whether you've seen it,
a funny looking, you know, looks somethinglike this, you know, [indistinct] my drawing abilities. so i can now interactively invokethese methods, i can tell it to move, i can tell it to turn left, i can make it move again.i can also invoke methods with parameters. for example here, i've got a set directionmethods--method and i can type in some constant and--and then it will move in the direction.i can have method results. so for example here, [indistinct] move method checks whetherthe wombat can forward at the moment. so if i invoke this, hit returns true and if i movehim here to the edge of the screen and then ask, "can you move forward now?" it says,"false." so what--what's happening here--well and--another one thing i should show you maybe,i can crate more of them. so i can create
now as many wombats as i want. so what ishappening here is that i can introduce valuable concepts of--of objects orientation in a veryconcrete way. so i can talk about the relationship of classes to objects, you know, that in class,from a class, you can create many objects, i can later get to the relationship to thesource code as well. i can--i can essentially tell the story that we can communicate withobjects by invoking their method--their methods. so every object has a set of operations thatyou can perform on them, i can talk about parameters and return values and so i can,first of all, introduce the fundamental concepts of object orientation before i have to talkabout where the curly brackets go into semi colon [indistinct]. so it's a--it's a, sortof top-down pedagogical approach, where we
don't start with all the little, you know,tedious detail, but we start with the big picture. i can then click the x button whichmakes them all go forward at the moment, every actor class, so greenfoot gives you a frameworkthat consists of a world and multiple actors. every actor, by definition here, has an xmethod and if i click the act button, that act method of every actor in the world getscalled. and so if i click the run button, run is just a loop around act, so if i dothis they all just run around. i can then put leaves into the world and if i put someof those in and i put some wombats around, if they run around they go, oops, they goaround and eat the leaves. and i can then look at them and say, "okay. how many leaveshave you eaten?" and i can, you know, so i
can discuss in this context the concepts of--ofstate, you know, that there's different objects and they have a different state and one hasso many leaves and--and i can interrogate them about this. i have here an example thati may use at the beginning of--of teaching. so typically, i--i said just--in my remarkabout--about demonstrations, i said i wouldn't hide anything. so i'll just show you brieflyhow to really start from scratch because here i've got an example already where i preparedsomething which is the normal way a teacher would start teaching but just for--for you,i'll--i'll also show you how it works to create a scenario from scratch although in a teachingsituation; that wouldn't be the first thing i would be doing, you know, in a teachingsituation, that comes a little later. so i'm
creating here a new--i don't know if--i selectedopen instead new. that won't work--so i want to create a new scenario, and i can closethis one. so this is what i get when i create a scenario from scratch, i always have theworld in the [indistinct] classes, they are part of the green--greenfoot framework andthen i can create a subclass of the world and i call it, let's see, i've got some backgroundshere. got a [indistinct] of bricks so i just call it wall, i'll make a brick wall. andso in addition to the typical, you know, name of a class that the java class has alwayshave. in greenfoot, there's also an image associated with every class you create. andif now i create this and compile it, there's my world. and if i open the source code, itgets the skeleton automatically and there's
no path in there. this is where the interestingthing, this is the side--size and the resolution. so let's say i want a one pixel resolutionand i make it 400 by 200, oops, 202. well its good enough as well. so here's my--wellthat's a bit big. and then i can create a subclass of an actor. and let's say i createa bug and you see here, it's a library of images. you can select any of the images thatcome bundled with the statement or--here with the browse button, you can use any image thatyou have anywhere in your file systems. so for students, that means that very quicklythey, you know, have pictures of their teachers running around and getting eaten by monstersand that--that goes always really quickly. so i can see some of it here. there are some,you know, that's a good enough image. so,
once i compile this i can immediately instantiatea bug and put it in here because the default skeleton that every new class gets is syntacticlycorrect so it compiles even though there's no real code here. and then i can do thingssuch as set location. i've got a set location method; i also have a get x and a get y methodand of course, if i use x and y as it is then it doesn't change anything. but if i now adda little bit to my current x location--x coordinate and--and use that as my new location, if iput my bug in here again and now it crawls across the screen. so very, very quickly bywriting essentially two lines of code, one here and one in the world, i can get any magicgraphics onscreen. and that is very important, that is just the--the--the motivator, youknow, that we use to draw kids in this, to
get graphics and animation and then interactionvery quickly on the screen. i can now add something like, set location--set rotationis what i meant to write. and get the current rotation plus a little bit, and if i softchange the location and the rotation at the same time that is rolling across the screen.so it gets--it's--it's fairly easy to get an animation on screen. in a teaching situationas i said, typically you would prepare little bit and--and preparing means that you canchoose essentially the level of, of abstraction you want to expose to your students. so this--thisis an example that might be typical example as the very first thing that you do with students.this is one example that i've used a number of times with 14-15 year olds, where i'vegot a crab and you can start by telling them
about classes and objects and we can instantiatethe crab, and if i click run, nothing happens. and then we open the source code and checkwhy nothing happens and of course there's--because there's no code in here and then i can justwrite move, and if i write move in to this and instantiate it again, it moves acrossthe screen. and then i can write things such as turn five--five degrees, and if i do this,it runs in a circle. and the move and turn methods that i've just shown come from theanimal class which means as a teacher, by providing super classes of the classes wherethe students actually work, you can decide essentially the api, the complexity of theapi you want to give them. and so if on the day i think they are not ready to--to discussparameters then i'll write my method as i've
done with the move where it just moves atconstant a bit forward. i could have done the same with the turn of course, to justturn a constant angle or if i want to discuss parameters then i--i write my turn methodso that i can discuss what a parameter is. so this gives the teacher a good level ofcontrol over what--what level of complexity you want to expose. and for students writingthis stuff, then fairly quickly there's a question, "okay. what are the--what are themethods i've got available?" and we can look at the animal class and by default, here thisone opens in documentation view, you can switch the editor here between the source code andthe documentation. and if i prepare that, as a teacher, i just switch it to the documentationso that is this is what it will show me by
default. and i can see i've got here my moveand turn method and there are some other ones to check whether i'm at the edge of the worldand--where i can eat something. so i can now write code quite easily where i write if atworld edge then i turn something and that means now if i--if i run this now, i've gothere, oops, i've got the wrong class selected--that means that this will now run around and turnaround when it hits. and then again of course, one of the nice thing is--nice things is thatonce you've written that you can have many objects and can have them running around.and then you can create new classes. so i can say i want a new animal, oops, didn'tmean to do that--new sub class is what i meant to do. we can put in a worm and i've got apicture prepared already and if i compile
this, i can put these worms into the worldand the crabs then like to eat worms and so at the moment when they run over them, nothinghappens at all but then i can write code here that says, "if can see worm" so i can specifya class here that i'm looking for and if i can see an object of that then i want to eatit. and if i do this now and i have a number of worms here and i put a crab in, it's eatingthe worms. and fairly easily, you can also put sound in. and so if i then--then do--there'sa play sound method and i have a couple of sound files prepared here. and if know thename of the sound file, it is very easy to just play it. so, we can do that again, putmy worms here, put a crab in and... [pause]>> kolling: ...okay, he might get enough.
it's not very loud; it's a fairly soft soundbut still. and--and, oh, one last thing i should show you, we can keep our control fairlyeasily. i can ask the environment whether a key is being pressed and every key has aname so i can just ask for the left arrow key is pressed then...[pause] >> kolling: ...hold the right one if the leftone, let's say, i want to turn something a bit to the left and otherwise, a bit to theright. and that's--that's--for beginners this--these are sort of the nice discussions, you know,if you've shown them that you can turn and then you point out, "well they always turnright," you know, how do you make them turn left and then they quite quickly get the idea,you know, negative numbers and then i, usually
when i do this in a teaching situation, ifirst get them to, get the crab to turn randomly, sort of every--with a 10% chance or so itshould turn a bit, you know? and then we get a random number and if it's okay if you havea number, how can we now express the 10% chance and you can get into nice discussions aboutsome programming. but in this example here now--what have i done?[pause] >> kolling: i don't remember the names ofmy methods. that's what i've done. well, i can show you how to look this up. the greenfootapi itself is a total of five classes. so we--we tried very hard to keep it as smallas possible. so there are only these five classes, that is all there is and we can--ican print them on--on three normal pages of
paper and the method is called "is key down"not "key down." so, you see this is an integrated environment where documentation is linkedin. you can get fairly easily to the documentation of the class and so now if i have the craband i can run around, i can now control this with my keys and can make it run around. andyou can see--this very quickly gets into sort of game-like scenario. so what we typicallydo, when i do sessions, sort of one day sessions, is i--i often do sessions with school classes,just single day sessions where we take sort of 15-year olds that have never programmedbefore to write a game within a day. and so the next thing is we add some--some otherlobsters of something there that then chase the crabs which is fairly easy because thecode is almost identical to the crab. so you
can do that very--very easily and then youcan--have to run away from the lobsters and try to get all the--all the worms before thelobsters get you and all that. what they typically do is they--they very quickly come with theirown ideas. so i have my sort of prepared story line to build this game and at the end, justabout--i--i always have them working in pairs, it works very well if there's two of themtogether discussing it. almost every pair is doing something different and that is oneof the really strong stories here of--of using sort of graphical animations and games isthey--they come with their own ideas, they immediately get their own ideas. you knowif you, as a very first exercise, get them to print out the fibonacci sequence or somethinglike this, they might get there and that's--that's
the end of the story then, you know? it doesn'tlend itself to suddenly come up at, "oh. i could also do this other sequence," you know?that just doesn't happen at that age. with--with game like scenarios, you immediately get thereaction that they have things they want to do, that they want to add. and that is verypowerful because that changes ownership, it's suddenly not--not your program anymore, it'stheirs and that's--it's a very powerful thing. what they all discover very quickly is thatyou can just change the image. so just by, you know, setting the image here to somethingand then you can, i don't know, look through there, make it an elephant and suddenly withoutchanging any code at all, you have an elephant running around. and of course that doesn'tchange anything, programmatically at all,
it's just a different image but suddenly theyhave killer sheep going around eating babies. and--and suddenly they get really excited,you know? it's a very small thing, it is--technically it doesn't really add anything but suddenly,because they see they can do things, you know, and also things that you haven't told them,they get very much into this. the code you write, because it's in java, of course itcan become as sophisticated as you like. it's not only games. we--we often use games assort of an early example but here it's--it's just a simulation. so this is an ant simulationthere--sorry--two anthills here and there's ants running around and there's food sourcesand the--the behavior of the ants is actually very primitive, they just run around randomlyuntil they happen to run into some food and
when they find some food, they run back tothe anthill and they leave drops of pheromones, that's this whitish clouds here, you see there.and if they smell some pheromones, they just turn away from the anthill and go on the directionand that's all. and so, if you have enough of them you get this path forming behaviorand there's no explicit code there to--to form these paths. this is emergent behaviorthat comes just out of, you know, the grouping. so what greenfoot does is it gives you very--avery easy entrance to getting graphics on screen and to make them move. and so everyprogram that has as its output two dimensional graphics is very, very easy to do. so gameis--and one obvious answer but simulations is another class of programs that works verywell. and as you've seen, we don't have to
write any graphics code, you know? and wheni just did this--you actually--when you--when you program in greenfoot, you--you programonly the logical state of the object. so you just set its x coordinate or its y or itsrotation or its image and the graphical animation is automatically done by the environment.so there's--there's no graphics code to write. so that is educationally really--real nicebecause that allows you to talk about the important programming principles and not aboutdetails of--of producing graphics. for teaching in schools, this is--this is really somethingthat at the moment is very hard to do. programming in schools is, in the uk, probably worse thanin the us. in the uk, there is a really dismal situation where there is almost no real computingleft in the compulsory curriculum in--in schools
at all. in the us, i don't know the details;my impression is that it's a little better on average but also not everywhere. in--theonly compulsory computing subject in the uk, in high schools, is called ict. that's informationand communication technology, and what they do there is essentially learning to use office,you know? they teach them excel and they teach them powerpoint and the--the closest theycome to programming is to write some macros in excel. so they make 14-year olds do tax--incometax calculations in excel. and then they--they are surprised why they're bored, you know?the--it's called ict but colloquially, the school kids all call it computing. they thinkthat that is computing. in fact they think that is computer science. and they come outof it knowing for sure that they hate computer
science. and--and they're well within theirrights to hate it because it is awful, it's just not computer science but they don't knowthat, you know? it's--they--so a bit later, in the, sort of towards the end of their highschool, in a part that's in england it's called a levels, they can--they can choose subjectsand one of the subjects they can choose is computing where they do a bit of real programming.and a survey has just shown that the reason why so very few students choose that is theexperience with the ict course because they have seen that computing is boring. therewas a survey about attitudes to--to it and computing recently and that has shown thatthere is a real serious image problem. computing is seen as boring, not intellectually challenging.there is a stereotype of, you know, these
geeks with thick glasses sitting in basementswith a [indistinct] next to the computer screen never talking to anyone. and large groupsof kids get turned off before they ever find out what programming really is, you know?and programming in a--in any interesting sense, isn't represented for most kids in the schoolcurriculum at all. and so what we are trying to do is to open a way how programming canbe brought back into school. and the problem of course is--one problem is that, you know,in modern programming systems, it's become more complicated than it was in days whenthere was basic of, pascal even. you know that was a smaller entry hurdle. now, there'sa lot more infrastructure and teachers in fact aren't well educated to do this and oftenhave trouble doing this. so we want to bring
tools back that make it as easy to get startedas it was with basic 20 years ago. but then again, you know, when we started printingout a triangle of asterisk on the screen, it was really exciting. now that doesn't reallyexcite kids anymore today. so we tried to do something that--that looks a little moreinteresting but is as easy to--to get into in your first few steps. i think teachingoffice automation tools to 14-year-olds that boarder some child, now, that is--at thatage, they should--they should be creative, they should do things, they should inventstuff, they should build things, you know, they should have their ideas and make themhappen and that is, you know, what we need to bring back. most people i know who workin computer science have started--you know,
got in through programming because programmingwas exciting. and so i think programming is a good way to get an interest in computerscience. most of the examples i've shown you so far were these essentially bird's eye viewsof a world of actors that run around. it doesn't have to be like this. there are other thingsyou can do. i'll just very briefly show you some examples. so here's a lift simulation,for example. so that's a side on view where, you know, you have six floors and lifts goingup and down and how you can then, you know, right lift control algorithms or somethinglike this or another example is just nothing really very meaningful at all, just somethingto look at. it's just a net of dots hand [indistinct] if i grab one of those, i can drag them around.now--and so, you can just--in examples like
these, the nice thing is that you can reallyconcentrate on the logic of the movement and don't really have to write the graphics code.there are some applications--because this is not really--not a toy language, this is--becausethis is full java, you can make it as complicated as you like and there are uses of this--ofgreenfoot in universities as well. i've got a colleague who is using greenfoot and agentmodeling calls for writing where they develop essentially ai algorithms for behavior ofagents because, you know, you can--you can put any algorithm in there that you want andthe reason he's using this is just because he's not interested in doing the graphicsand you get the graphics for free essentially here. you can then just concentrate on thelogic and the greenfoot environment just does
the graphic animation for you. another colleagueof mine at the moment is working on developing examples were the topic matter is chemistrywhere you have, you know, reactions of molecules on screen where you don't learn only aboutprogramming but you learn something about chemistry as well. so that's another possiblelevel of learning where you can actually teach something about the subject matter for whichthen you can manipulate through code as well. what have we got here? and when we have theanimated graphics and we have keyboard control then very quickly, of course, we have game-likescenarios. so here, i have to land this bomb. okay, that wasn't--i have to land that very,very carefully. i'll try once more. so you have to come down very slowly. okay, i'llgive it one last try. i have to concentrate
on landing. okay, you can try after this talkand see if you can do any better. when you actually get it done, there's a flag comingup which is, of course--a great student of mine wrote that who is obviously danish that'swhy it's this flag. but the reason i brought this up is just to show you the sort of possibilityhow you can do--i now that blew up as well--how you can do testing with this. because youcan instantiate, manually instantiate any class and you can manually call any method,you can do very nice, very quick testing. so as soon as you finish writing one method,now you can instantiate it and you can run it and you can see what happens and debuggingis almost implicit. because a lot of the behaviors is visual, you immediately see if it goeswrong. and so in this case, for example, i've
got my explosion here, which i can put intothe road and then it does a bang but the one thing i've done is i've written it so thatwhen the explosion touches anything, that thing explodes. so if i put any objects inhere, let's say the flag, let's say i put some flags in here and then i put an explosionsomewhere on one side, i get this chain reaction and i can just try this out. and this chainreaction isn't explicitly programmed it's just the behavior of the explosion, and thecode for that is actually quite simple. this is--this is the code that does it, you know.when the explosion acts it just goes bigger and smaller and then disappears but here itjust says, you know, every time that an act--it gets the--instead of indirect of overlappingobjects, you know, that's a get interacting
objects and then now there's a field so ican essentially filter here to a certain class and i'll say without having a filter it meansi take any object that comes along. and then i just go through them and i say if that objectis not itself an explosion then i just put an explosion where that object was and removethe object and that's it, you know, and that--you get this now. so you can--this interactiongives you a lot possibility of trying things out very, very quickly. so if you're a studentdeveloping something or if you're not a student either because i do that a lot and, actually,it's quite good fun once you get started, you can't--you don't have to complete a wholescenario before you see the first effects. you know, you write one method and you putit in and you look at it, you know. that--it
goes--there is no test drivers to write orno complete application. once you have a partial thing going, that partial thing will go. thequality of the animation you can achieve is good enough to actually look--so here, forexample, there's a--there's a sort of--you can--there's a lot of--this is actually the--usinggreenfoot by example where i've seen most software we use actually happening and youmight have noticed that that's the same explosion as i just had in previous one. there is alot of possibility to just take classes from existing things and put them over. so here,this is just the standard asteroids. so you see that there is a--you know, the animationcertainly is good enough that this looks like something you can play. and so students canachieve something there that they can actually
show around. that is, we wanted to achievethe same sort of quality of code that you can do with all those flash games that arenow on websites. and from a motivational point of view, showing it to others then is veryimportant, it's very powerful. so one thing we have done here is we've got an export possibility.we can export part of--as an application which is essentially just a writing and executabledot file or we ca make a webpage out of it. and let's say i put that on my desktop andexport it and then it writes me a webpage with an applet on it. and here i have then--thisis what it generated. and so if i open this, i get this is on a web browser and there ismy game and i can play it here. and so, of course, you know, from perspective of learningto program that doesn't really add very much
but as a--as a motivator, that changes a lot.the program--the problem with this generating a web page, of course, is you still need aweb server somewhere to make it public. if you do this, you know, you have it now ina web browser on your own machine but you still can't send the url to your grandmother.so to solve that problem, we are just at the moment working on building a web server, apublic web server where anyone can just put their stuff up there. so if i here do my exportand there's a publish functionality and that's at the moment still experimental. actually,i should reset this and then put that bit together so that i get a--get an image becauseif i do the export, i have my screen image here and i can use this as my icon for mygame and then i can give it a title. and if
i put my username and password in and exportthis, this now builds the same thing, the applet and the webpage, but it puts it ona public web server which we have--which i hope is up at the moment because there's peopleworking on it right now. so if i go there, this is now really live on the web and hereis a page, which i should reload because i had that up earlier. so, okay, i was--i justdidn't--i didn't look at my dialogue. i reloaded it because i noticed it isn't here becauseif it's recently added it should be the first one here. that is ruined. that is ruined.let's try that again. yes, that's one--that's essentially the same thing that i put on thereearlier. so there is already another version of this--of this scenario on there. okay.now it said complete, so if i go back to that
page and i reload this, there should be nowour version on here. so this is the one we just put on here. so this is--we think aboutthis as something like youtube for games, for programming games. and so the idea is,first of all, that through this thing there's a strong motivational thing because, of course,it has all the--all the sort of standard, you know, social interaction stuff that theyhave nowadays with writings and leaving comments and all that kind of thing. and people canreally show around their work. and we have sort of the hope that through this peoplemight get interested in this through actually playing the games so we'll have some gameson--so, featured games at the top that are actually sort of very nice looking and thenlinks that show people what this all could
look like and how they, you know, [indistinct]it in greenfoot and change it. >> [indistinct]>> kolling: that asteroid thing? >> yes.>> kolling: that's the arrow keys and the space bar. turn your sound down.>> i already have. >> kolling: okay. so here the very thing ishould maybe--i'm--i don't really want to show you a lot more but may be as a last thingjust to give you one other idea. one other nice thing you can do, of course, is if youget live data somewhere. so here, for example, if i click act it goes out to some weatherserver and gets actually real time weather data. and so there's a--there's a whole numberof things you can quite easily do. and there's
a question, of course, whether or not, youknow, java is the best language to use for something like this. there are--well, it'sa blessing and a curse at the--at the same time, you know. java clearly imposes a lowerbound to how young the kids can be doing this. now, i've used greenfoot with my own daughterwho is eight--well, it started when she--she's 10 now--and that works with, sort of, sittingwith her one on one and helping her out, you know. i have to help her a lot with the syntax,you know, just the question of forgetting brackets and things like this. at that age,it is really still a big hurdle. so it's clear that at that age for a classroom situationthat wouldn't work. that's too young. for a sort of one-on-one situation it works. butit was also interesting that all the problems
with syntax she got the concepts really, reallyeasily and really quickly. so with a different language you could probably go lower downin age. we use this mostly sort of with kids 14 and upwards but then, of course, thereis the good thing because java is a--you know, it's not a toy language it's a full languagewhere everything you want to do is supported. there is really no limit about how sophisticatedyou can make it and you can do really interesting stuff at scales, you know, because there is--it'sreally just the standard java compiler. so you get all the benefits of having real languagein there rather than a toy language but it's trade-off. what we are trying to achieve here is to createa situation where the first contact with programming can become really engaging and interesting,you know, where we have--so the two goals
in mind, we want to draw them into programming,we want to show them that this is something that you can enjoy, that can be--that canbe, you know, good and satisfying and at the same time what we don't say openly is we actuallywant to teach them good programming principles. so we want to discuss things such as classesand objects and separation of concepts and the visualization of the classes and the objectis important so that they can see, you know, that there are separate objects and they interactand they can references to another end like communicate by evoking each other's methodsand permit a passing and all the--all the important concepts and object under programmingget automatically discussed. the other thing that we are trying to do is we are tryingto see the kids and the teachers both as target
groups. you know, teachers in--at school levelare often overwhelmed with the complexity and they don't really know how to teach welleither. so what we're trying with greenfoot is to give a very clear guidance about, youknow, what the concepts are that you should be discussing because we tried to expose themexplicitly in interface, you know, there are classes, there are objects, there are methodsand all the things we think you should talk about, you know, are explicitly there in yourface, so that that gives a structure about what you--what you should cover. we're gettingcloser to the end of the time so i think i'll stop here and just leave another few minutesfor questions in case there are questions but i'll stop my talking here--at that point.i think you were first.
>> yes. what do you think of--i don't knowif this is--don't know--what do you think of flash index as a teaching tool for writinggames like this for kids? >> kolling: i think from a--from a languagepoint of view, you know, from a teaching point of view java is nicer than flash. i'd ratherteach java because it represents some of the concepts that are important to me much nicerthan flash does. from an--just performance of the technology, flash is clearly winningat the moment, you know. the--one of--well, if you compare performance and startup time,for example, between applets and flash, of course, applets really has some catch up todo. luckily at the moment, the story we are hearing out of sun is that they're workingon this, you know, improving them, sort of
use experience for using applets and thatwould be nice. there still is--applets are still a pinpoint where, you know, you getdifferent arrows and different browsers and all the--you know, you all know some of theproblems. so from a technology point of view, flash actually works better at the moment,from a pedagogical point of view java is my clear preference. there was a question thereas well and josh, i don't know. do you want to go to the microphone?>> mine is really so i'll ask when my brother comes up. so, how many lines of code, roughlyspeaking, in the asteroid's program? >> kolling: that's about 200 lines of code.so that is something--the asteroids program that is something that a total beginner canachieve after two or three months or so. so
it's not very far out there. as a teacher,i can write that in an hour and a half also, you know. so that is--that's the other thing,as a--as a teacher, the scale and complexity of supplying these examples is manageable,you know, for--in acceptable preparation time and students, after a reasonable time of study,can get there. the teachers can write that is important because often the way you startteaching, the early examples is sort of a fill in the blanks exercise. you might givethem the asteroids scenario almost done by the rocket doesn't move, you know, and thenthe early examples can be too--could be to just, you know, do the rocket movement andeverything else is already there. yes? >> i have a few questions. let's see, startwith--could you go back to the crab worlds?
do you still have that? so i want to makesure students try this very quickly and i could download it and try it myself but ijust like to know, what happens if try to eat a worm and there's no worm there?>> kolling: it--well, we can look at the--this is--so if i do this, you know, say, if i--ifi do this here, which means it would eat a worm at every step, right?>> yes. >> kolling: right?>> yes. >> kolling: and i compile this. i put my crabin its elephant costume in here, nothing happens at all. and the real odds, of course, is whateverthe implementer of the animal class has written there is what will happen.>> okay.
>> kolling: what i happen to have writtenhere is that i just ignore the fact. so here in my each method, whereas my implementationof my eat method is here, i just see whether there is an object at, you know, offset zero-zerofrom where i am, which means there is another object of the given class of the worm classat my location and if there isn't i just don't do anything.>> so actually i--what i was really wondering is there an exception mechanism visible tothe user? >> kolling: it could be. so if i now decideto throw an exception here... >> yes.>> kolling: ...or if i call one of the api methods that throws an exception, that isvisible. so, you know, if i do this now. if
i don't ignore this now but i actually triedto remove now, i would expect this to give me an exception and if i do this immediatelythis stuff pops up here. >> okay.>> kolling: and i get my exception. >> so, my other questions are at a higherlevel. so you can save applications in random as applets, very cool. can you run greenfootitself as an applet? >> kolling: no, currently we can't.>> have you thought about it? >> kolling: we thought about it. it is technicallynot easy and we decided at some stage that it's not worth the trouble. i mean, it--thatit's sort of more trouble than it's worth. part of that is that greenfoot runs internallytwo virtual machines, one to run the user
code, essentially, and one to run the environmentitself and there is communication going on. and all that actually doing that in an applet,you run into all sorts of problems with the security and so there would be so much fiddlingnecessary to make that work that i think--and i don't see a strong enough benefit to actuallyjustify that. so downloading it, running it locally is--was--our judgment is it's probablythe preference for most people anyway so that i don't think it's a--as a cost-benefit payoffi don't think it comes out. >> okay. fair enough. the thing i was wonderingabout--so this is--you're starting off introducing kids to programming for the first time andit's an object-oriented language, which is--isn't how i'm going to program, so i'm just wonderingyou have enough data of what happens--how
do they deal when they encounter a procedurallanguage for the first time? are they puzzled? >> kolling: we have data from that not fromgreenfoot and school age kids but we have done--there is data that was done at a universitylevel where something like 5 to 10 years ago there was, in the computing education community,a big discussion about object orientation, how to teach object orientation and when toteach object orientation and whether it should be taught first. and many people have heardprobably about the problem of the paradigm shift going from a procedural to an object-orientedlanguage. there are studies that there is really--there really is a problem that way,you know, going from a--from a procedural to an object-oriented language. and so, studiesshow that the other way around, there doesn't
seem to be this problem, you know. going toprocedural language from an object-oriented one seems to be a lot easier than the otherway around. so, we haven't done any studies where people started at school age but i don'texpect that to be a real problem. >> okay. thanks a lot.>> so i guess the questions i wanted to ask was the first one i see you doing a lot ofthings involving sub-classing actors but it seems like you just set up the backgroundwith an image and the size and the granulation and that's all you're doing with it. is therekind of any functionality, say, to change the background?>> kolling: yes. yes. that can all be done programmatically as well. so the backgroundcan change, the image of the--well, if i--if
i open the end scenario again and just showyou quickly the--it's maybe clearer to see here with the actors but the same is truefor the world. so here, for example, the pheromones here are actors as well and the image of thepheromone is not loaded from an image file but drawn dynamically at run time so thatit actually just draws a circle with a certain size and [indistinct] and the image dynamicallychanges, you know. so the image of an actor has an image but that can be loaded eitherfrom a file or you can draw it programmatically. and, for example, the count here is also anactor, you know. there is--the some that are here is the counter and that is just a transparentimage where i'm writing some text onto a transparent bit of image and that updates itself automatically.>> okay, so...
>> kolling: so--and you can do the same tothe background of the world. >> okay, let's see. what kinds of requirementsare there to run this? like, you obviously need a compiler which means having the jdk.>> kolling: yes, it requires jdk, java5 or later.>> okay. >> kolling: okay. we have--sorry, we are runningout of time. so, last question or is that...? >> i just want to ask, would you--this allseem like they are running into or are also working on [indistinct].>> kolling: yes, the question was whether we're also working on material lesson plansto go with this and the answer is yes. that is, in fact at the moment, that is our mainfocus. the software at the moment is at a
stage where it's working unstable and it'sall well and we are extending a little bit but the--that is, in fact, the main thingthat is needed next. they are--it's a little bit already there, not very much but we areworking on this at the moment and there will be more available very soon. okay, we areout of time. thank you for coming.