Finding the best coding language for beginners (revisited)

pythonProbably the most visited article on my site here is the original post on this topic. I wrote that about a year ago, and my conclusion was that Small Basic fit the bill best. It was written for beginners, had autocomplete, a syntax that made sense out of the box. Plus turtles!

However, I’m revising that assessment now. I still like Small Basic for all those reasons. But the introduction of two new approaches has made me rethink this (and what kind of teacher would I be if I wasn’t always willing reevaluate what I’m doing?). The two new gateways into coding that I’m using are Minecraft and the RaspberryPi. And I can do Python with both.

In some ways, Python isn’t as user-friendly as Small Basic. Indentation can bite you big-time, and while True loops don’t make sense to kids right away. But once you get those concepts at least manageable, and you get used to the syntax, the language itself makes a lot of sense to kids. Also, no curly braces! Plus it’s a language that kids can grow with. It’s a great beginner language, and it scales all the way up to professional. Sure, it’s not Java or C++, but there are jobs out there that require Python. And I have seen students move from Python turtles to Python Minecraft to programming sensors on the Raspberry Pi in Python.

And that’s a huge win. So, for now, I’ve got a new best coding language for beginners!

Mython Launch Success!

mython2Mython is the word I use for MinecraftPi. Today I launched it in my 2 8th grade classes, and I am super-pleased with the results. First, it all worked technically, which is always great! I did have one student who was experiencing some connection difficulties but I think that might have been one of the multiple login/profiles used incorrectly.

Second, kids seemed to enjoy it. By one of the quirks of this year’s schedule, my two classes are split exactly along gender lines. My boys class dove in enthusiastically and basically executed code as fast as I could feed it to them (on two screens). A few were extending the code by the end of our 45 minute class, adding in new blocks. My girls class probably outdid the boys in enthusiasm and made similar progress.

People helped each other find errors and troubleshoot, shrieks of delight filled the air when things worked, the opposite when it didn’t….

To place it in pedagogical perspective, this followed about 3 weeks of drag and drop coding in GameMaker and 2-3 days of introductory Python, using turtles. So this is their first introduction to text-based coding. We are going to spend the next several weeks doing Mython. Thanks again to David Whale and Martin O’Hanlon for their excellent book, Adventures in Minecraft, which is the inspiration for this.

#CSTA15

CJ40XdMUcAA263HSo many firsts last week — first time in Dallas, first time at the Computer Science Teachers Association conference, first time presenting at CSTA, first preso on Minecraft…. Lots of cool stuff to report!

My presentation was on Teaching Coding in the Middle School with Minecraft. You can see the preso in Google Presentation form right here. I have wanted to use the power of Minecraft as a bridge to learning coding for some time, so I spent this school year experimenting with different approaches. My preso is a summation of those, with the proviso that I had some very specific goals in mind, which would probably be different from yours. So YMMV, etc. Spoiler alert: I finally settled on the approach used in Adventures in Minecraft book by Martin O’Hanlon and David Whale. It uses Python, and it seemed to work great with my classes.

My Twitter feed blew up the night before, as word got out about my preso. Got to say it was very cool to get all that support, especially from the aforementioned Martin(@martinohanlon) and David(@whaleygeek).  The actual preso was well attended and it seemed to fill a need, as most people were aware of Minecraft and were interested in seeing what they could do with it in their classes. Keep in mind that this was a CS teachers’ conference, so we were looking at that very narrow strip of MC usage.

I got an invitation at the end of my session to present a pre-conference on Minecraft next summer in Denver at ISTE. Cool!

So what I enjoyed about my first CSTA:

  • being at nerd central — coding, cool machines, cool apps, and
  • cool people! Special shoutout to Dr Sarah Guthals(@sarahguthals) from LearntoMod who has a great product and is an awesome fellow traveler on this coding in Minecraft journey sarahme
  • meeting some people I only knew from reading them, like Alfred Thompson(@alfredtwo) and Mark Guzdial, and Laura Blankenship(@lblanken)

 

 

So what’s next? Definitely a determination to learn more Minecraft — modding, servers, coding cool stuff in Python…. and a determination to connect with other educators doing this or interested in doing it. Would also love to connect with some modders and learn more about that…. got to finish my Digital Youth course on learning to mod in Java, follow up on LearntoMod’s growing product, learn some more javascript…. oh, and get ready for school… learn more GameMaker, App Inventor, Small Basic…. got to go!

Notes from a Commodore fanboy

Commodore_64_BoxI’m going to reveal my vintageness AND my fanboyishness all in one post! Man, I loved Commodore stuff back in the day. My first computer was the 64, and I get all warm and fuzzy thinking about that 40 character monitor, the 1541 disk drive, Commodore BASIC…

I then upgraded to a C128 cause it had an 80 character monitor (whoa!) plus CP/M, which had WordStar! That’s what I’m talking about! I vividly remember typing in lines and lines of code from Commodore Magazine and getting all googly eyed. I was fascinated with assembly language and subscribed to a magazine called the Transactor, which was chock full of articles about hex code, memory addresses. I pored over listings  as if they were long lost hieroglyphics which I was trying to decipher. Truth be told, I wasn’t really very good at it, but man I loved trying.

Just for fun, recently, I found an online archive of Transactor magazines, picked out one from 87 which looked familiar and started re-reading it. That familiar love of code and tech flooded back. You have to know that at the time, I was teaching English and history, not computer science, so …. Imagine my surprise when I read a letter to the editor from 1987 from me! Asking for advice on a programming environment that someone from the magazine had written and I had gotten on disk (5 1/4″).  I felt like I had gotten caught in a space/time continuum.

And here I am today, teaching computer science and following my love of code. So funny to see how far back this went in my life!

Coding in Minecraft redux

aim.bookI’ve spent a good part of this quarter in my 8th grade classes trying out some ways to code in Minecraft, as you know if you’ve been following this blog.  See below for various attempts and approaches. I’ve looked at command blocks, LearntoMod, ComputerCraft (using Lua), ScriptCraft (using Javascript), Youth Digital’s Modding in Minecraft (using Java(!))…. They’ve all got features to recommend them, and I’m sure any of them would be awesome in the right situation. I’m not making any blanket thumbs-ups or thumbs-downs.

But here’s what worked best in my class —- something I got from the book Adventures in Minecraft by Martin O’Hanlon and David Whale.  It’s an amalgam of Python, Minecraft, the Bukkit server, and Raspberry Pi. This odd little mutt suited my purposes really well. I call it Mython.

Technical details — you can get a folder with everything you need here, which includes the Bukkit server and the Minecraft/Python API. You’ll need to run Python 2.x (so far), Minecraft 1.6.4, and the current version of Bukkit. Others have ported it to other servers (Forge and CanaryMod), Python 3.x, and more recent versions of Minecraft. I just wanted something that would run with minimal hacking on my part, as time was running out in the quarter.

I had to do some monkeying around with accounts and permissions on my lab computers, and the results required more logins than I was happy with, but that can be fixed for next year. The important thing is that I was able to achieve my goal of introducing a text-based programming environment that was accessible to my 8th graders and did some fun and cool stuff in Minecraft. Mission accomplished!

Students were able to build magic bridges, instant houses, and “draw” in luscious Minecraft 3D with turtles! And if you know me, you know I’m a big turtle fan.

Not only that, but the authors were incredibly helpful in answering questions that I posted on their forum. So yeah, you can say I’m a fan. Can’t wait to fine tune it for next year!

I asked the students how they liked it compared to the other approaches, and someone said, “It’s about 4000 times better!” Good enough for me!

 

ComputerCraft or LearntoMod?

creeperI spent some block periods (90 minutes) with my 8th graders, introducing Lua in ComputerCraft. I learned a lot my first period, as in what not to do: don’t let the students roam free and then expect them to bear down and do coding in the computer in Lua. Lesson learned.

The next class I made a flat world, set up each student with a computer next to a sign with his/her name, and used a disallow block to limit the building. Voila. I really should have anticipated that issue but didn’t. So students got into their computers, I showed them the intricacies of the command line, the terminal, the lua editor …. all those DOS-like things that they have never seen in their lives. Yes, the editor is clunky and colorless, and the pixellation of the characters is Minecrafty. Once we got through that we did some HelloWorld, some HelloUser, and even a GuessTheNumber game. So we learned variables, IO, random math, and if statements. Nice!

However, one of my students asked me what it all had to do with Minecraft. Very fair question. Answer: nothing really, but we’re just starting and tomorrow we’ll start with turtles. They know turtles because we went to Turtle Island, a wonderful world/mod made my Michael Harvey.

But that student’s question really started me thinking (btw, thanks, Ben!). We could do almost all of that in Small Basic, which has a much better editor, Intellisense, and turtles (though those turtles are not 3D). So I’ve also had some students dabble in LearntoMod, and that learning takes place in a familiar Minecraft world, and you learn to mod stuff that you use all the time in Minecraft: weapons, tools, zombies, creepers, etc.

Hmm. So Monday I’m going to try a little LearntoMod with those classes, and we’ll see what happens. I have my suspicions, but I’ve been wrong before.

Kinect for Small Basic

kinectI’m drowning in coolness right now. If this works as advertised, it’s going to be a busy summer, what with learning more coding with Minecraft/Lua, Python/Pygame, and now this!

I already do Small Basic in my 8th grade class and have blogged about it here. Love turtles, intellisense, the logic of the language…. makes it a fabulous first texting language. Now if you add Kinect capabilities, look out.

I did note that “some” of the capabilities available in Visual Studio are not available in the SB version. Can’t find any list of what is missing just yet, and I’m hoping it’s not something critical.

I’m upgrading my school laptop early next week to Win 8.1, so I’ll have to wait till then to do some serious hacking, but woohoo.

Minecraft Coding

minecraftI’ve spent a good part of my spring break investigating coding in Minecraft. Actually, I’ve been looking at all kinds of avenues to do this over the past several months. Why? Because Minecraft is an amazingly awesome piece of software,  kids love it,  and it can be a fantastic gateway to learning coding.

There are so many approaches, however. I’m not the only one who noticed the above, and there are a raft of avenues out there touting their awesomeness for teaching coding through Minecraft. I’ve looked at many of them, and there is no One Way to do it. So much depends on the age and experience of the kids you’re teaching, what you feel comfortable with, etc. I’m doing it in my 8th grade classes, as a bridge between GameMaker and Small Basic. So kind of a first introduction to text-based programming. Or as I call it: Taking the Training Wheels Off.

After looking at modding in Java, writing plugins in Java, some Snap and Javascript, I think I’ve found what’s going to work for me in my situation. The Computercraft mod uses the Lua scripting language, and Lua is just simple enough that I think it’s workable for an intro to text-based coding. Shameless plug — I’ll be presenting on Teaching Programming in the Middle School Using Minecraft at the CSTA conference in Dallas this July.

Stay tuned for more.

Teenage Mutant Ninja Turtle Graphics

squarePinwheelIn my last post, I wrote about my decision to go with Small Basic as the best introduction to text-based coding in my classes. We make the jump in 8th grade CS, after having spent a month or so with GameMaker.

As I explained to my students, it was now time to take the training wheels off. We started with your basic TextWindow stuff: Hello World, getting user’s name and saying hello, calculating the user’s age in dog years, a simple savings calculator, a tip calculator. We slogged through my examples and students picked up some of the basics — variables, if statements, math calculation. All well and good. Not exciting but a good start.

After 2-3 days of that, I introduced the GraphicsWindow. We did shapes, fills, lines, background colors. Interest rose, as they could see the results of their code and the added benefits of color. The other day I introduced the Turtle… and BOOM! Knowledge and enthusiasm explosion.

I introduced FOR loops (with some trepidation, since I’ve found it’s a tricky concept for most middle schoolers). I casually demoed making some cool art with FOR loops. EVERYONE wanted to know how I did it. Showed them the simple code and challenged them to change it up, make it more colorful, experiment with different angles and movements. I had already introduced GetRandomColor, and kids went crazy. Some wanted to have a Turtle Art Exhibit.

Next up… making the art interactive. But I feel even more convinced that Small Basic is the right choice.

And the winner is…

sb_logo… so far: Small Basic. Here’s why:

  • English-like commands
  • Intellisense
  • Auto-complete
  • Turtles!
  • Limited # of objects
  • Can be a path to Visual Studio (has a “graduate” feature to VB)
  • It makes sense to me

I admit to being a bit skeptical before trying it. I didn’t like the dot notation and thought kids would get confused by it. I didn’t like the length of some of the commands (like GraphicsWindow.GetRandomColor!). And frankly, I was prejudiced against it because it was a Microsoft product.

So I devoted some hours to poring over tutorials, learning some basic coding, making my own game, learning keyboard controls, etc. Once I got immersed in it (“down the rabbit hole”), I started to love it. Now I have had some experience with Visual Basic years ago, and perhaps that’s what made it make sense to me.

Tried it with my 8th graders, and they caught on to the basics pretty quickly. Intellisense was a HUGE plus, as was autocomplete. And turtles, FTW!

Is it perfect? No. You could easily make a case for Python or Processing. And I haven’t eliminated them from the possibilities. But for now, I’m liking what I’m seeing.