
our zit yeah so thanks everybody for sticking around this is actually going to be my favorite presenter of the day I think completely because she's my daughter so but she's going to be talking to us today about the programming language scratch and how it's for kids and maybe for other people too so McKenna so welcome to so welcome to scratch for kids by me McKenna Laverty so who am i anyway I'm McKenna Laverty and I'm an 11 year old sixth grader from Cumberland Rhode Island I've been using scratch since January 27th 2015 when my dad introduced me to it and I'm racing Meyer on scratch and how I started was I wanted to make minecraft mods' so my dad
asked someone what would be a good way to get started and they suggested scratch so a while later I was in my bedroom and I heard meowing noises coming from the coming from the living room so we didn't have any cats at the time we have two of them now and so eventually I walked out into the living room because what were these meowing noise is coming from and it turned out that it was my dad who was testing out scratch and so I started playing with it too and then the day after I signed up so what is scratch anyway well it's the programming it's a programming language but it's for kids just like me and
adults can use it too and the recommended age range is 8 to 16 but is really for anyone so it was created by MIT on March 5th 2007 you can find it at scratch.mit.edu and it's completely free to join and with 17 point 7 million members and nearly twenty one point six million projects and this little orange guy you see over here that's the scratch that's the scratch mascot who does not have an official name but he's just the scratch cat so the way the code is so the wave you code and scratch is blocked so they have a drag-and-drop KO style and there are a total of 145 of them as scratch 2.0 the
most recent version and you can even make custom blocks to do your own functions just like you'd find in any other code language except node blocks and the blocks can even snap together an interlock to create scripts so for example what this script would do is when the project first started so it would do this code inside the loop forever so it would move 15 pixels across the screen in whatever direction it was facing then turn to the right 10 degrees a thought bubble would appear above its head saying for 2 seconds it will play a popping noise and then reset its eyes and that would continue on forever so the community is a very big
part of scratch and so so one of the biggest parts of scratches communities that you can share projects and keep them hidden if you want to so because I mainly use scratch for art and I have a ton of different art projects most of them stay hidden but I could do whatever I want if I wanted to so you can also comment on projects and scratch has and scratch has a sensor to block out bad words although you can put them in projects that the project will very likely be deleted and so a way to gain reputation and scratch is my followers if your yeah if your projects are good people will follow you and so just
generally the more famous scratchers have more followers and there are even studios which are like little clubs I guess where you can add projects and where you can add projects and comment on studios and studios even have care traders and managers which are just people that can do more stuff with the studio like adding projects changing the name and changing its description so here are some types of typical scratch projects a lot of scratchers are animators and will often make funny animations all those scratchy animations really can be anything and the main reasons that a lot of people are interested in scratch is so they can make games and simple games are really easy in scratch but then you get to the
more complex stuff and it looks like it would take like weeks and weeks maybe even months to make some of the more complex stuff which I do have a really good example of a complicated scratch game I'll show you guys later so you can also refactor other projects also known as remix thing which gives you your own copy of someone else's project so you don't change the original and you can just do whatever you want with someone else's project and it doesn't even and their original doesn't even change it's just your version so people can also make music in scratch and using note blocks which are a special kind of blocks that will play a
certain note for a certain amount of time and another and another common type of project in scratch that kind of ties in with animations and music is m-80s which the scratch team really likes and basically what they are is one person will take a song and cut it into parts and other people will be able to take the parts and animate them so I so with a lot of you being programmers I bet you're going to be familiar with the hello world scripts we're hello world if you don't know it's usually the first scripts that program will the programmers will make when trying out a new language and this is how to do it in
scratch one flag clicks say hello world so my dad created this this wonderful man right over here and it took maybe 30 seconds two minutes and he's totally new so that just shows how easy it is to get started so here's some common types of scratch blocks the start project block a k1 flag click which one you click the green flag button in the scratch interface which I will also show you later anything that is under anything that is snapped to the underside of this block will run this is the move this is the move 10 this is the move certain amount of steps block you can specify the number or anything that has a little
white box like that you can specify so and the sprite put character in the project will just move a set amount of pixels across the stage you can also turn this right edge right and left and you can just say how many degrees you want it to turn and a lot of you are probably familiar with variables which is a way to store data inside code and is commonly used for keeping score in games and things like that so here are some more common scratch blocks there's the FL which you see over there you can snap things with this shape into there where if this happens then do something that you can put into here if
that does not happen then do something that you can put into here there is also a different version of this block that's just if-then no else so and then we have the sensing touching block which when the when the spray is touching a certain thing be it the mouse pointer or another sprite you can pick whatever you want from a drop-down list it'll do a certain thing because you can just put it right in here and this is the RNG or random number generator you can choose two numbers and the and the sprite will randomly pick a number between them so another part of scratch that you don't see very commonly but it's still pretty
cool is making a key which lets you turn objects and two input and output devices for your code can be bananas a drawing alphabet soup play-doh anything you want really and so it relies on a board oops sorry so er lies on a board alligator clips and a USB connector to connect to your computer and do the code so when I use to making Mickey it was at scratch day which brings us to the next slide scratch outreach so MIT hosts a scratch day every year in May usually it's on the 14th but this year is on 6 I already got tickets and they're going to be hundreds around the world not just not just one in Cambridge and so and you
and you can also run unofficial meetup group for scratch which are usually just for like learning how to code and beginners and things like that so and even schools are using it to teach their students how to code so now we get to the fun part who wants to see you scratch demo alright so this is the scratch front page I'm currently signed in and so whenever you log on to scratch this is what you see scratch mit.edu remember that so then when you hit this little create button up here it brings you to the scratch editor which I've already laid out a couple of blocks to show you which you can select them from
here which will usually be referred to as an API or application programmers interface used to show all the things you can do with code so we're always going to start with this block one flag click I don't mind it don't mind that just apparently I'm not signed in so so do you want to see how the script can move across the screen so what it does is you can drag the move ten steps over here so and I run the project click the green flag button and the sprite will move so and then I can also get it to turn which let's say we want it to do this twice so
when when you start up the project the cat will move across the screen and turn 15 degrees twice if you keep running it you can see them just gradually moving and spinning so here's another commonly used thing in scratches let's just get him to go back to his normal position I guess so another commonly used thing for beginner scratch projects is the say block where when you put this a little bubble will appear above the character's head saying something so what do we want the cat to say
so now when we run this project let's just or is it just get them to 0.92 degrees again so when we start this project he will move 10 steps rotate and say welcome to b-sides for 2 seconds and then you can also use effect block where the character can change color or do all these other things that you'll be able to experiment with on your own so now when I run it he'll change color after saying welcome to b-sides so see screen now and so then we can also get it to play sounds let's just see if so now if we put that on there he'll meow after all this let's just get them to meow and say welcome to B sides
at the same time that'll be fun so now another block that we can use is all these lovely control blocks where the first one we can get them to do something forever we're basically
never going to stop so so now what we can do is for Less obnoxiousness repeat the forever block with repeat ten which just lower this down for now he'll let me do that four times
so now let's get another one of these blocks in here the if ends block so and this brings us to our next block which we saw in an earlier slide the touching block so let's say if he's touching the mouse pointer he'll do this if he's not doing that he'll wait one second go to just get him to go to some random place so and let's throw an X zero throw a go to block in there so he resets his position at the start so now you can notice that he waits one second and then just kind of head bucks because he's a cat and cats head but why isn't this working
let's just get rid of the else for now and make this a regular if-then we're having some technical difficulties
so this has no health part and will only do this if it's doing a certain thing
what are you doing yeah I have to have not worked with FM's in a while so I can't remember how they work but now I remember I have to put a forever block in here which now I do not have to do it the very beginning of the project and instead it'll work forever I don't think he likes being touched so much
poke so now do you want to see an example of a really good complicated scratch project should I think it's actually the most famous scratch project of all time oh sorry just just I'm just I'm going to show you one more thing where so now we can use the pick random one to ten block where now you won't say hello for two seconds he'll probably say it for a bit longer so that's what you can do with the pick random block it'll pick a random number between whatever you want you can change it so now we get onto the complicated advanced stuff so this is a this is a scratch version of Minecraft and you can see the code is
extremely long and I could never do this in a million years would you put something under your nope so yeah this is just a crazy example of how complicated scratch can be and then there are even more scripts you can just go through the sprites and it's just so many things in here insane
so so yeah do we have any questions yeah I'd say the scratch community is pretty good in general so you can just kind of click around like you can click on people's projects and like I'm not actually going to post a comment on this guy's profile you can comment on things you can love and favorite projects yeah back in I think 2015 I built I built this pretty big game that was supposed to be like some sort of battle of my character and the coding is pretty impressive but I but I think that I think that the idea but I don't really like the whole idea of it anymore like I still like the idea
of a battle with your character but I think even though the coding was good it wasn't really well thought out but it was still probably the best thing that I've ever made on scratch so any other questions yeah I'm yeah I've tried to program with Python but I wasn't very interested in it so yeah that was around when I started scratch I guess so now I'll just make animations on scratch guy I don't know who the youngest person I know on scratch is the guy but I think that but I think licks be on the stage you could easily find on scratch effects and even some parents will use scratch like the paper Minecraft I showed you was done by
is done by a parent yes if we were to look at his profile so there so there are about 17 million scratchers and fifty-five thousand two hundred ninety seven of them follow him that's nine hundred and twenty two whole pages of followers and I only have a few over two hundred so yeah feel free to feel free to check me out on scratch if you want I'm Gracie Mayer and yeah I think that's pretty much all we have [Applause]