X

Introducing Kids to Java Programming Using Minecraft

Guest Author









src="//cdn.app.compendium.com/uploads/user/e7c690e8-6ff9-102a-ac6d-e4aebca50425/f4a5b21d-66fa-4885-92bf-c4e81c06d916/Image/521551845495b02e1f67caac13d21911/minecraft_logo.png"
height="54" width="257">
Minecraft
is a wildly popular game among elementary and middle
schoolers. The game allows players to build constructions of
textured cubes in a 3D world.




My son has been playing the game for about a year, lets say addicted
to it. Last Fall he told me that the game is corrupted because the
JAR file snapshot has messed up the configuration. And that right
away rang a bell in me as a Java Evangelist at Oracle.



I learned from him that the game is written in Java, has a trial
version that runs as an applet in the browser, and downloaded as a
JAR file for desktop. The game is modular where the players travel
through a world and chunks are loaded and unloaded to keep the
memory footprint small. Something unique about the game is the
ability to modify the game from what it was originally designed for.
In Minecraft language, this is called as a "href="http://www.minecraftwiki.net/wiki/Mods">mod" - short for
modifications. For example, a mod can add new characters to the
game, change look-and-feel of the play field, or make it easy to
build new structures.



The game has a server and a client component. This allows the game
to be played in a single player mode where a player connects to a
server using a client and plays the game. Alternatively multiple
players, using different clients across platforms, can connect to a
server and play with each other collaboratively. Its very common to
have a server run with multiple mods. There are almost an infinite
number of mods someone could do to make Minecraft a more amusing
game to play. There is no official API to create these mods but
there are several third-party vendors that provide that capability;
Bukkit is one such API. The ability
to write mods and alter the game play gives players more control
over the game and gets them more excited.



My son expressed his desire to write a mod and so we started
exploring further. Then onwards, he started teaching me Minecraft
vocabulary and I taught him the Java programming concepts. Our
discussions in the car, on the dinner table, during the breakfast
preparation, and elsewhere changed to reflect that as well. He
already played with Scratch
and Greenfoot last
Summer and that was extremely helpful during this learning curve. We
set up a goal to build a mod during Christmas break. After
understanding the basic concepts and building a few mods, we decided
to share the knowledge with a broader set of Minecrafters. And
that's where the concept of doing a Minecraft Workshop was born.



My son came up with a list of his minecraft buddies and we announced
a date for the workshop. Everybody invited for the workshop
confirmed their presence right away. I found out that both the
invited kids and their parents were equally excited. One friend
could not attend because of a prior commitment and was extremely
disappointed. On the day of the workshop, some kids were eager to
come even before the formal start of the workshop.



The workshop was attended by 10 kids with age ranging from 10-14
years. Most of the kids had no programming experience, let alone
Java. However there was high Minecraft experience in the group with
some kids playing for about 2 years and up to 2 hours every day.
When given the topic of Minecraft, the small group would talk
excitedly about different aspects of the game, constantly using
hundreds of game-specific terms and phrases as if speaking a
different language. My goal was to leverage their passion and
introduce them to Java programming.










src=""
height="199" width="300">
src=""
height="200" width="300">



The challenge for me was to introduce programming to these kids
using analogies from the daily life. Using a car, features,
capabilities, types, and car dealers and correlating with class,
properties, methods, instances, and packages seem to work. Fruits
and different methods of peeling, eating, and planting was used to
introduce the concept of Interface in Java. I asked, “What can you
do with a watermelon?” the first answer was obvious, “you can eat
it.” The second one was a little less so, “You can chuck in a trash
can.” The response was greeted with scattered laughter. I used that
to explain the concept of Exceptions in Java.










src=""
height="300" width="199">
Short anecdotes and side-conversations kept
the livelihood of the group going throughout the five hour
programming session. There are almost an infinite number of
mods someone could do to make Minecraft a more amusing game
to play. But all these mods hold the same basic framework
that we set up for any future work on making game-specific
mods. By the end of the session, we had worked out an entire
framework for making a mod. A href="https://maven.java.net/content/groups/public/name/arungupta/bukkit/bukkit-plugin-archetype/">Maven
archetype to create a template href="http://plugins.bukkit.org/">Bukkit plugin
allowed the attendees to avoid writing boilerplate code. A
lower bar to get started and simplicity was the key for this
audience. The mod built in the workshop added a new
server-side command and printed a trivial message.



Although the goal of the workshop was to get an introduction
on programming and make a Minecraft mod, I believe the
attendees learned much more than that. I think the informal
set up helped them discover that programming can be fun and
useful to add to gaming experience. Programming is a vast
field and we barely scratched the surface. But most
importantly, the attendees had a good time and learned their
first lesson of Java programming to start off an interest in
it.






"Fun", "Easy", "Quick", "Awesome", "Short", and "Intuitive"
described attendees' one word summary of building and running their
first Hello World application using NetBeans.



All the instructions followed in the workshop, including a lot more
pictures, are available at href="http://java4kids.java.net/minecraft-workshop/mar2013/index.html">java4kids.java.net/minecraft-workshop.



For me, it was quite a humbling and learning experience. I've
delivered multiple workshops all around the world but mostly to
professional developers. I realized how the instructions need to be
completely spelled out in order for the attendees of this age to
make progress. Something as simple as "Hit Enter after entering the
command", yes, that is required. Anyway I plan this to be the first
of many more workshops aimed to introduce the world of Java
programming to school students.



One of the lessons learned during the workshop was to simplify the
installation experience. All the kids had JDK and NetBeans set up
already, pretty straight forward. However I wonder why Maven insists
on JAVA_HOME variable instead of figuring it out. I need to
investigate how to seamlessly install JDK, NetBeans, and Maven in a
platform independent way. This will allow to focus more on building
the actual mod rather than the multi-step installations.



src=""
height="333" width="500">



This workshop was not possible without mentoring support from Allen
Dutra and other parents. A huge shout out to my family who helped
validate and calibrate my strategy for the audience. My nephews
feedback from the lab is incorporated into this blog. Thanks to
Oracle for sponsoring the snacks!



Thank you @notch for using
Java to build the game! You've provided a great platform for young
kids to learn Java and truly enabled Make The Future Java ...


Join the discussion

Comments ( 51 )
  • Joe Sciallo Friday, March 22, 2013

    Thanks Arun, great post. My son is a Minecraft addict, and I've been looking for a way to also get him hooked on programming. I think you've really hit on a great idea here.

    Joe


  • guest Friday, March 22, 2013

    Great blog post Arun! My little brother has been obsessed with Minecraft ever since I showed him it 2 years ago and he recently started to attempt a mod without my knowing and was very surprised when I asked him what he was doing in a Java IDE and to find out that I knew how it worked.

    Am very tempted to try my hand at a workshop since I also have younger cousins who are very interested in Minecraft too, thanks for the slides!

    I hope this is yet another avenue for getting children interested in programming!


  • guest Monday, March 25, 2013

    Indeed game programming teaches you a lot. It's something one should do, when starting programming, by combining, physics, maths with programming concepts like arrays, linked list, Game programming provides entertaining, yet challenging exercise.


  • Tugdual Grall Monday, March 25, 2013

    This is the way my son(s) are starting to learn how to develop, small plugins, packaging.. Really a great thing to do


  • Fadi El-Eter (itoctopus) Monday, March 25, 2013

    The new generation, in general, is much more technical than our generation (Generation X). When talking to my cousins (who are less than 12), I noticed that they now use technical terms. Such as: the program crashed, there is a bug somewhere in this system, it is not stable, infinite loop, cookies!

    These terms are exclusively used by programmers in my generation, which is very interesting. The technology is changing everyone - and I think that most - if not all - of the new newest generations will be able to write some code. I think it's time to make coding mandatory in schools!


  • guest Tuesday, March 26, 2013

    I like minecraft


  • Marc Teufel Monday, April 1, 2013

    Fantastic Idea ! I plan to do exactly the same for my kids and the friends of my kids, Aron can I re-use your material?


  • Arun Gupta Tuesday, April 2, 2013

    Marc,

    Feel free to reuse the material with credits.


  • Tony Svedlund Wednesday, April 3, 2013

    Very cool! My son is 8 and love Minecraft. I'm thinking of doing something similar. How old is your son?


  • Arun Gupta Wednesday, April 3, 2013

    Tony,

    My son is 10-years old.


  • guest Wednesday, April 10, 2013

    ★★★★★★★★

    SWEET! I just got a free Minecraft card code at http://minecraftget.com/

    ★★★★★★★★


  • guest Sunday, April 14, 2013

    Can you say "Minecraft Summer Camp?". As the non-programmer dad of a 10 year old who'd like to learn Java so he can 'mod' this gives me great hope and encouragement. Anyone out there in Marin County?


  • Viggo Friday, April 19, 2013

    Hi Arun! I have planned to do something similar for a while,and find your workshop as a great start.Is it possible that I reuse it, translate it into Norwegian, and upload the l10n version of it to java4kids.java.net so anyone else from Norway can use it as well?


  • guest Friday, April 19, 2013

    Thanks Arun, This is an awesome idea. Are you planning more workshops? If so, when and where. My kids are very interested in attending this.


  • ross Sunday, April 21, 2013

    weve been looking for just this for our 9 and 10 year old sons!

    sadly, my wife and i have no programming skills.....

    we'd drive just about anywhere in the bay area to enroll our kids in a

    workshop like this!

    please let us know of any such events!


  • guest Monday, April 22, 2013

    Viggo,

    Please go ahead with the translation and upload to java4ids.java.net.

    Ross,

    Do you want to work out logistics of such a workshop in the south bay ? I'll be happy to deliver it :)


  • Guy Roberts Monday, May 6, 2013

    Perfect. I'll look at your notes for building a mod. My background is also in Java and I've got a bunch of 12 year old boys here who are mad about Minecraft.

    Thanks.


  • sumdumguy Tuesday, May 7, 2013

    Neat! I'm going to have to try this with my childrens.


  • guest Tuesday, May 21, 2013

    awesome idea!!!


  • guest 123 Saturday, June 1, 2013

    I love minecraft so much


  • guest 123 Saturday, June 1, 2013

    minecraft is a hero


  • Edgar Silva Tuesday, June 4, 2013

    Arun,

    Nice post, I will digg that with my nephew soon :D he is totally crazy about this squared game :D


  • Kristoffer Thursday, June 6, 2013

    This seems like the perfect approach to get my 10-year-old brother and his friends interested in programming, something I believe they would recieve great benefit from both in school and in future life. I'm already really impressed with their skills in Minecraft, and I think they would appreciate modding the game.

    Viggo: I'm Norwegian too, and would love to have a look at your translation! I'm not much of a programmer, so any help is greatly appreciated :D


  • Steve Jenkinson Friday, June 7, 2013

    As a teacher I am looking to teach programming with the wider focus of programming in the UK curriculum. Found this article by pure chance and look forward to getting stuck in and producing some interesting lessons based around the concepts.

    Would it be possible to make use of your workshop and develop it form some computer Science lessons?


  • guest Tuesday, June 11, 2013

    Is there a workshop planned near Cambridge in 2013 as my nephew would be interested.


  • guest Thursday, June 13, 2013

    Hi Arun,

    We live in Boston but travel to my sis' in Pt.Reyes often. If you do a workshop, pls let me know! I will also try to do the tutorial myself, but haven't programmed for a while!


  • aRandomPersonOnTheInternet Friday, June 14, 2013

    Wow! Me being a 12 year old addict of Minecraft, I am very exited to hear the news. I have been looking for a way to learn java without prior knowledge of programing for a very long time.


  • Arun Gupta Sunday, June 16, 2013

    Steve, Absolutely, please feel free to use it for computer science lessons.

    I'm based in San Francisco Bay Area and no workshops are planned near Cambridge at this time.


  • guest Monday, June 17, 2013

    Great.If you are thinking to learn java online then i want to suggest you a place where you can join free online java course. It is totally free. The course is spread over 128 lectures in 21 sections with practice problems in sections intended to enhance your practical knowledge of concepts learnt throughout the section.


  • Paul Sullivan Thursday, June 20, 2013

    Hi Arun,

    I just stumbled across your blog and haven't yet had a chance to review any of the linked information. However, I wanted to quickly say that it's great to hear what you've done with these childrens enthusiasm for playing this simple yet compelling application.

    I say simple because that's what most adults say when they see the graphics; "the graphics are so pixelated, like games in the 80's. I could make something better than that. I don't get it." Which I reply "no..you don't get it". And that's just it, most parents are missing the point. This game has a short learning curve to allow children, of almost any age, to master its functionality. Yet, because of its sandlot design, it provides rich almost endless capabilities. The kids don't give a hoot about the pixelated graphics. It's about content, functionality and ability to create.

    I also, intentionally, said application as apposed to game because it can be more about building content than playing a game. The creative content these children come up with is absolutely incredible; towers, castles, ships, caves, you name it, they've probably built it as well as blown it up (which can be fun too ;-).

    Minecraft is to our children what sandlot and Legos were to us. Let's harness this for good!!

    I would like to do something similar here. My son and daughter love creating and collaborating online with Minecraft. They're teaching themselves how to install mods and packages as well as navigate Linux (our preferred gaming platform for the simple sake that it's free and open source). I, too, would like to see them learn how to program these mods and texture packages. When time permits, I plan to read the link data for ideas for directing them toward learning to program. Any encouragement or ideas are greatly appreciated!


  • Paul Sullivan Friday, June 21, 2013

    I gave the wrong email with my yesterday comment. Please use PSullivan40@gmail.com.


  • guest Monday, June 24, 2013

    I would love to sign my son up for the next workshop. He loves Minecraft and Scratch. Great idea!


  • tdr Tuesday, June 25, 2013

    My kids recently discovered minecraft and my 9 year old is a real addict! Not sure yet if I'm glad or sad about that. :-) This morning he told me set up a minecraft server, but I admit my eyes glaze over when they starting talking minecraft.

    I'm a java programmer, too (eclipse-oriented). Clearly there is a demand for minecraft/java workshops for kids! I'm going to look through the content in your java4kids link. Maybe I could come up with something similar for my kids and their schools.

    Two thumbs up to your post!


  • guest Tuesday, June 25, 2013

    ★★★★★★★★

    SWEET! I just got a free Minecraft card code at http://minecraftget.com/

    ★★★★★★★★


  • guest Friday, June 28, 2013

    This is an amazing idea for a camp! My son would freak :) If you are in the Pt Reyes or Marin County area of California, my son is 10 and we'd sign him up in an instant. Please let me know, and thank you so much!!


  • Manish Vohal Monday, July 1, 2013

    This is a marvelous post on a true world application! If only we were taught in this intuitive way ... Great Work. Keep it up!!


  • lucy Wednesday, July 17, 2013

    Thanks! As a former software engineer, I have been trying to figure out what language and how to transfer some knowledge to our local homeschoolers.

    I think this is it! Thanks! There seems to be enough detail in the lessons that I won't have to reinvent the wheel.


  • Arun Gupta Wednesday, July 17, 2013

    Thanks for all the encouraging comments so far!

    My son has built a set of tutorials to show how to create Minecraft mods. They are available at:

    https://java4kids.java.net/minecraft-workshop/aug2013/readme.html

    More will be added in the next few days.

    The first few videos are about the game play. I recommend subscribing to the channel and get notifications as the videos are added.


  • guest Thursday, July 18, 2013

    Need confirmation of registration for August 1 workshop JAVA4Kids


  • Angela Montesa Thursday, July 18, 2013

    Hi Arun,

    I am planning to have a similar mini workshop with my son this saturday and I could not find someone or an instructor that can do it. Help... Any recommendations? Please email me back/

    Angela


  • guest Wednesday, July 31, 2013

    Time to upgrade my Minecraft to premium freeminecraftgiftcodes{dot}net :D


  • guest Wednesday, August 7, 2013

    Arun:

    Any chance you would do one more of these this summer? My 12 yr old son and 10yr old would love to do it. We are in the bay area! As a former Sun and Oracle MySQL er I know how tough it is to do this and work full time. You should charge a fee to offset your time and maybe stick in your kids college fund!!! Let me know if you are planning anything. I would make a voluntary contribution to the arum Gupta college fund!

    Cheerio

    Vic Cloutier


  • guest Friday, August 9, 2013

    SWEET! I just got a free Minecraft card code at http://minecraftget.com/

    ★★★★★★★★


  • Arun Gupta Tuesday, August 13, 2013

    Vic,

    Do you want to organize something like this in the Bay Area ? My son and I will be happy to deliver it :)


  • guest Sunday, August 18, 2013

    Hi Arun,

    Pls let us know when the next workshop/classes for "Introducing Kids to Java Programming Using Minecraft" is.

    My son is 9, crazy about Minecraft and would love to learn more about programming. Any idea where to go to sign in?

    My email is lorenapaliska@gmail.com. Thank you so much for all the info!


  • guest Tuesday, August 20, 2013

    Please let me know of future minecraft camps - My son is 13 and would love to attend. He is very competent in minecraft and has started making you tube videos to demonstrate building techniques and now wants to create a mod. Thanks! Mama doesn't know Java


  • Petro Sunday, August 25, 2013

    Nice, thanks for sharing!


  • guest Wednesday, August 28, 2013

    I know this is a long shot, but I live in Berlin Germany, and am looking for a contact here that can do a minecraft Java class for kids in Berlin, in English? My son would love to attend one. Any Oracle offices here in Berlin?

    Best,

    Laura Pedretti


  • Curt Kramer Saturday, August 31, 2013

    Arun, thanks for sharing your story. I'm a Java developer and my 9 year old son loves to play Minecraft and wants to build his own mods. So we've been exploring how to program additional features (mods). Your workshop is perfect!


  • guest Tuesday, September 3, 2013

    My children lately found minecraft and my 9 season old is a actual addict! Not sure yet if I'm grateful or sad about that. :-) Today he informed me set up a minecraft server, but I confess my sight glaze over when they beginning discussing minecraft.


  • Vic Cloutier Tuesday, September 17, 2013

    Anup, do you want to meet in the next week and I can come to Redwood Shores and see about planning a Minecraft camp after Java One. Use my work email at Dell.

    vic


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.