Category Archives: programming

Minefaire 2016

Wow, what a weekend!

I was thrilled to attend Minefaire 2016 near Philadelphia, PA this weekend, where a Guiness world record of attendees met their favorite YouTubers, played games, did build battles, sampled VR wares, and even experienced how Minecraft can be used in education. I presented on using Python in Minecraft as an intro to text-based coding, based on the book Adventures in Minecraft by David Whale and Martin O’Hanlon.

Finally met Joel Levin, @MinecraftTeachr, one of my heroes
Finally met Joel Levin, @MinecraftTeachr, one of my heroes.

It was also a personal thrill to meet so many of my online friends and heroes for the first time! Hard to believe that six or seven years ago, this amazing game was just in its infancy in all its 8-bit blocky splendor, causing people to scratch their heads and predict that this would never take off!

 

 

Hal Abelson Keynote: MIT App Inventor Summit 2016

summit2016Every once in a while I read or hear something that literally makes me sit up and take notice. Hal’s keynote was one of those events. In a few brief moments, he sketched the development of the relationship between children and the computer. He was a participant and eyewitness from the late 60’s, a colleague of Seymour Papert’s, and a creator of some of the early incarnations of the Logo programming language.

Those of us in this field of computer science, especially those who teach it to children, owe a huge debt of gratitude to these pioneers. I also got to meet another giant in this field, Cynthia Solomon, another colleague of Papert and Marvin Minsky. What Hal did in 15 minutes was to trace the development of the connection between children and computers from the earliest days to the present. But it was no mere historical journey. He highlighted recent innovations, like the Internet of Things and physical computing, as well as mobile computing. Now the tools for creation in these areas are in the hands of young people, App Inventor being a very accessible drag and drop programming interface for mobile apps.


Young people of all ages now have in their pockets tools which they can use to shape the world in which they live. We saw one fabulous example of young girls in Moldova tracking water quality and then crowdsourcing the results. Present at the Summit were many young creators. I was particularly impressed with a group of 6 12-year-olds who created an app for autistic children, their parents, and their teachers. It was astonishing in its design and usability.

Hal not only traced the past, but laid out the present landscape of computing and children, and he pointed the way forward. We have truly entered into the next phase. It was such a thrill to be at MIT where so much of this started. I feel truly honored to be a part of this!

MIT App Inventor Summit 2016

app-inventorI’m here in Boston at the MIT Media Lab. First, how cool is that? I’ve read about this place for years, and to actually be here is a privilege.

Secondly, it’s ground zero for App Inventor folks: teachers, students, professors, developers, parents and kids…. the wide spectrum of attendees speaks to the almost universal appeal of App Inventor. If you’re not familiar with AI, well, it’s time to get started! It’s a drag and drop interface that enables anyone from coding newbies to accomplished devs to create mobile apps. It runs only on the Android platform right now, but there is a product in the works called Thunkable (no, I don’t know why) which will work with iOS.

The great thing is that it is a wonderful tool for teaching coding. And in spite of what some might say, it’s real coding. True, it’s not text, but it has a wide selection of components and tools that will allow you do to some very cool things. And then you can perhaps sell it on the Play Store.

But what really resonated with me was the keynote by Hal Abelson. And that deserves its own post!

Book Review: How to Code in Minecraft by Jim Christian

howtocodeinminecraft_coverThere’s a lot of stuff on the web and in print on how to code mods in Minecraft, most of which requires a fairly hefty investment of time in learning Java. And that right at the outset eliminates a lot of beginning coders. What we need are some entry points for beginning to intermediate coders, which most people who are hooked on Minecraft are. I’ve found Minecraft appeals to all ages, but particularly to the 8-12 age group.

Enter Jim Christian’s excellent book: How to Code in Minecraft. In 146 colorful, jam-packed with coding and Minecraft goodness pages, Jim has given the beginning and intermediate coder a multitude of entry points into doing more than just playing Minecraft, but actually coding it.  He lays out a steady progression of skills, starting with everyone’s favorite intro coding language, Scratch. He then moves to text-based coding with Python, which I’ve found in classes is a logical progression.  From there, he introduces the popular ComputerCraft mod, which uses the Lua language. Along the way, he shows the reader how to set up a free Minecraft server, how to set up and use various development environments, and points the reader  where to go after mastering the skills in this book.

Jim doesn’t leave out teaching basic programming principles, like variables, functions, loops, and events. But it’s so much fun along the way that it’s an excellent example of what I call “stealth learning”. Sure, you could give kids lessons on those topics, but they’ll be way more engaged if they’re setting traps, setting off fireworks, and creating their own in-game games! Instructions are clear with an abundance of colorful illustrations. Jim also leaves blank pages for notes at the end of each chapter, as well as suggestions for expanding the student’s knowledge with fun challenges and projects.

If you’re looking for a solid, comprehensive introduction to coding in Minecraft for your class, club, after-school program, or for that Minecraftaholic in your family, you’d be hard pressed to do better than this book. My only complaint is that it’s not yet available on Amazon in the US!

How to Code in Minecraft — Jim Christian ISBN 1-78106-519-5

Hacking the HackPack

minecraft-pythonAs promised, here’s the skinny on my current Mython approach. I can’t really claim credit for most of it, as I’m using the Adventures in Minecraft book by Whaley and O’Hanlon, as well as some great starter code by Ben Davies, @ncscomputing, and others in GB.

I have three “hackpacks”, which are packets of sample programs that I print and distribute to students. They basically copy the code and run it. After they complete all those successfully, they then use a “reverse hackpack”, which consists of coding challenges based on the programs they just finished. Most have some minor changes required, but all are extensions and applications of the code they did. When they can successfully do that, I sign off on each challenge. I usually ask them to explain something in the code to be sure that there is understanding of what the code is doing.

There are a few spots that I actually “teach” to the whole class, though I try to limit it to 10 minutes maximum. One of those spots is the while True loop in Python, and the other is for loops. Everything else is addressed individually or in small groups as needed (“just in time” learning).

So far I’ve been very pleased with the level of engagement, effort, and learning. It’s the first iteration, so I’m fine-tuning as I go, of course!

Wearing Different HATs

If you’re a Raspberry Pi fan, you already got the joke. If not, well…… a HAT for a Raspberry Pi is Hardware Attached to Top. Get it? OK, it’s geeky humor…

skywriterAnyway, I just got three brand-new HATs to play with: the Pimoroni Skywriter HAT, the Piano HAT, and an LCD touchscreen (Pi-size). I’ve only had the chance to play a bit with the Skywriter, which has near-field 3D gesture detection (think I got that right), and I’m dying to get that X-Wing built in Minecraft and then fly it by hand gestures above the HAT. I spent about an hour, getting the Skywriter library, trying to use some code (here’s the project: http://robotsandphysicalcomputing.blogspot.com/2016/01/guesture-controlled-minecraft-x-wing.html), finding it needs an extra Minecraft Pi library called minecraftstuff, figuring out where the minecraft api on the Jessie distro is…. so I’m still grounded. However, we’ll be taking off next week for sure!

Pimoroni-Piano-Raspberry-Pi-HAT-1The Piano HAT allows you to “play” the piano on your Pi. The really cool thing is that you can do all kinds of music with it, but you can also code the keys to do anything else you want — make weird noises, turn lights on and off, turn motors on and off…. Can’t wait to play with that one!

And the LCD screen frees you from a monitor and keyboard for your Pi. I personally find it just too tiny for my eyeballs, but I can see it working with an embedded Pi doing all kinds of cool things — retro gaming, a DJ system….

Did I mention I’m also diving into using Sonic Pi (live music coding) in Minecraft? The Sonic Pi api includes some Minecraft stuff (written in Ruby), so you can lay down some beats with Sonic Pi, then build stuff as you move around in Minecraft, synchronized together! It’s just too cool for words.

So I’m getting ready for next year’s classes when we move much of my curriculum over to the Raspberry Pi. Look out!

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!