Learn To Program with Minecraft
by Craig Richardson
No Starch Press
Americans are lousy at learning foreign languages, but if you can’t pass French maybe a computer language is more your speed. It’s the key to most any technology job you or your kids might apply for, and here’s a great introductory book for the young programmer or the older computer hobbyist. Python is a straight forward scripting language that underlies many computer games and industrial applications. It’s a lot like “C” but without the pointers and if you don’t know pointers, you’ve never crashed a computer by pressing “F7” *. Minecraft is a popular game that emphasizes building your own worlds; it’s a wildly successful and based on Python, just like this book. The aim here is to bring along the neophyte programmer to level of useful competence; and if you’re a veteran will spin you up on the language quickly. Coding concepts like conditional statements, arrays, looping and subroutines are all thoroughly and clearly discussed along with sample code examples. It’s a truism you can’t learn code without writing it; and the resources you’ll need to support this book’s course are either free, or modestly priced. Minecraft has a stripped-down free version you can use with, but a full license is less than the cost of this book.
Your inner Barbie might scream: “But math is hard” but it’s not, not in this world anyway. While you CAN program things like Runge – Kutta Differential Equation solvers you can also make cool castles and teleporting weapons. While this book spans elemental concepts from variable assignment to the more challenging Object Inheritance concept of “Classes;” the steps are small and incremental. For example the chapter on Functions “Functions Give You Superpowers” might be a bit hyperbolic, but it IS true. In this chapter you take a rather blocky tree from an earlier exercise and build your own forest. About 8 exercises give you forest and practice in documenting with comments, “refactoring” a program, and applying the “while” loop. OK, I almost never write while loops; the reasons are long and complicated and boil down to “I can never get them to work like I think they should” but here they are, clearly explained and implemented. If you get this far, next week you might have a killer app tearing up the iStore charts somewhere. Author Richardson is positive and thorough; occasionally he lapses in the silly but always ends up presenting solid learning methods. And here’s the most import learning method: do the home work. Do even the simplest looking assignments and you can be though this book in a few days, and have a pretty decent forest to go play in.
* – In many compilers “F7” is the command for “Compile and run.” If you have made an error in using pointers, and it’s VERY easy, your code will likely go off and damage the memory stack, thus freezing your machine. Pulling the power cord is the only way to recover…