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.

Finding the best coding language for beginners

if-kids-in-third-grade-can-handle-coding-so-can-youThe title is a red herring. First, what do we mean by beginners? Second, I don’t think there is a “best” language, even if we could define who those beginners are. Here are some thoughts from the trenches, though.

I started a new job this fall teaching CS in grades 7-9, so I’ve covered a pretty wide spectrum of “beginners” with various backgrounds and levels of understanding CS. Here’s what I’ve done by grade:

7th grade — HTML, Scratch, LEGO Robotics (and a little 3D modelling using MinecraftEDU.
8th grade — HTML, GameMaker, a bit of Minecraft exploring, Small Basic.
9th grade — Blitz Basic, S2 Robots, App Inventor.

We’re trying to find the right combination of challenge and enjoyment, correct scaffolding, what works, what doesn’t…. It’s been quite a ride. Things that I thought would be a slam dunk because I’d done them before, like Scratch, were more challenging than I expected. Things that I thought my 8th graders would love, like GameMaker, weren’t loved. Small Basic, which I thought would be too confusing, went really well once we got into turtle graphics.

To be fair, I’ve had to learn an incredible amount of stuff. I’d never heard of Blitz Basic till I started here. Never dabbled in Small Basic and have never used the SR robots and the Propeller language. My lab is a dual boot environment, with a Mac platform and Boot Camp for Win7. It took a few weeks to get everything running smoothly technically. Which is all to say that I was teaching stuff that I was learning just ahead of the kids.

More conclusions in the next post…..

Javascript & JQuery

book coverReading this fabulous book by Jon Duckett. I’ve had a nodding acquaintance with JS just from doing some web design and dev. I decided it was time to formalize and solidify my understanding so I bought this book. If you’re a visual learner like me, you’ll probably get a lot out of this book. Some concepts I can get just from reading, looking at code, writing code, etc. But I’m finding that a well-designed visual approach really helps me understand things better. And since I’m a teacher, I’m always looking for ways that will help others get the concepts. This book is full of such examples.

It’s beautifully designed as well. Kind of a coffee table style. Lots of white space, large charts, color photos, etc. But it’s not just the design, though that certainly helps. The author takes the time to explain each concept carefully, with many commented examples. The scaffolding is also logical, as he introduces concepts clearly and then builds upon them.

Highly recommended.

Hard-earned lessons on hard fun

So I just finished teaching my Introduction to Robotics (IROB) course at the CTY camp in Baltimore. The students were rising 7th graders. For the last day, I asked the 14 students to write some advice to future students of this class. As I expected, their responses were fabulous. Here are some excerpts:

“Don’t feel down when you fail. It’s normal, it takes hard work to succeed. You feel awesome when you succeed. You’ll want to quit, but don’t. It’s worth the work.”

“In IROB, the classes aren’t just fun, they are HARD fun. If you learn to enjoy the hard parts as well as the fun parts, you will LOVE IROB. Do not get upset when you fail, learn from it. If a light sensor isn’t working check and see it is plugged in. As Thomas Edison said, ‘I didn’t fail. I found 10,000 ways it didn’t work.’ Don’t give up and do your best.”

“One important thing to remember is that Simple is always better. Also remembering that if you add a lot of things your robot will be less stable. I do think that it is fun to learn some lessons the hard way because you remember the lessons better.”

“IROB is a great course. However, I need to tell you few things to make it even better. First, learn the phrase ‘hard fun.’ You also need to learn to not get frustrated easily. If you are a type of person that gets frustrated easily, you may have a tough time.”

“If you like building with legos and Scratch without instructions, this will be twice the fun. For sumobots keep the center of gravity in the middle and low. For everything but dragbot and the mountain climber use at least 2 motors. Gear ratio is very important sometimes.”

“You have made a good decision to take IROB. The first few days are easy, but the rest is not difficult but frustrating. You will fail a lot, because getting a piece or program just so is extremely annoying. That makes getting it right all the more rewarding. Good luck, and build on.”

“During the course, it’s not completely difficult, but it’s not easy. Hard fun, one of Mr. Bob’s favorite terms, is true. But even if you find 10,000 ways that don’t work, not getting frustrated easily will help. Think of NAO, Stanley, Atlas, and Asimo. I guarantee the 1st versions all failed. As long as you don’t give up, the result is completely worth it.”

“In this course of IROB, you should take these next few statements very seriously. You must always make your robot stable, so it doesn’t fall over. You must program your robot exactly what you wanted it to do, step by step, because robots aren’t very bright. Finally, don’t get frustrated in this course if your robot doesn’t do what you want it to do right away. We have a saying in IROB: fail early and fail often.”

waving-robot-22623701“Always continue to improve your robot, but remember that simpler is always better. When designing your first robot, if it doesn’t work, keep trying before you come up with new ideas. Fix every problem one step at a time, so you can learn the causes of the problems and how to prevent them in the future. Most importantly, robotics is a perfect example of hard fun.”

“Within this course, building your own robots may be difficult, if not very difficult. Always make sure to never give up, as the solution to your problem may follow. Also, if you don’t contribute enough work and effort, a mediocre robot will inevitably follow. Also make sure to have hard fun, because it’s only three weeks. Make the best out of it!”

“IROB is a very fun class where you learn a lot about robots. You do a bunch of fun activities like sumobots and dragbots. In the last week you get to build a robot that does whatever you want, but remember to keep it as simple as possible.”

“I know sometimes, you feel like you want to rip your bot apart, LIMB from LIMB, but it’s okay. Things will get better, just because you failed doesn’t mean you can give up. Just keep swimmin’. Remember, it’s fun, but hard fun.”

“In IROB, you will encounter a lot of strenuous testing and failures. You will come close to fainting from exhaustion by thinking about how to fix or improve your bot. But there is so much fun also: the feeling of having accomplished something, the excitement of participating in competitions, the relaxation of watching a robot YouTube video for a break. But with persistence and hard work, you will enjoy IROB like no other class you’ve ever taken before. Just make sure you follow the rules.”