“World of C#-craft”: an achievement-based classroom?
May 17, 2011 6 Comments
In a previous post I already briefly hinted at this: wouldn’t it be cool to integrate popular pc-game mechanics in classroom labs?
What I am proposing in this post is another way of organizing practical program labs for an audience that isn’t necessarily 100% willing to become a good programmer. Teaching C# classes to undergraduates electronics-ict isn’t always easy:
- The crowd is pretty diverse: some have no programming knowledge at all, others have already written whole VB.NET apps, etc.
- They aren’t all interested in the programming aspect of the studies but perhaps are more in to the electronics-part. However in the end, they will need to be proficient in both electronics and ICT.
- They can’t see why toying around with console-based programs is, in my opinion, a necessary evil for first-time programmers.
However, in the end, all if these students have to become proficient programmers, whether they want to or not.
Having tried several approaches I don’t seem to be able to find an all-encompassing way to reach each and every last one of the students. I even tried to incorporate live voting and twitter integration in slides during lectures…an experiment with mixed results. Don’t get me wrong, I’m pretty sure I’m reaching above an average number of students, but still: I want all of them to love to program! I think I’d be a poorly ambitious teacher if my aim wasn’t to try and get a full classroom to become passionate about programming.
The idea that I propose here lingered for quiet sometime in the back of my head. Being a fanatic gamer myself I am always fascinated how simple game mechanics like achievements, quests, constant feedback of the player’s progress and leveling can make any ordinary game more fun and worthwhile to play. Somehow the act of earning things only a select few can reach is strangely addictive. So why not use these game mechanics in programming classes? Could a simple, yet fun and addictive achievement-system that constantly gives feedback to the student on his progress, enabling him to compare his results with others enable a teacher to reach more students? Could students become more motivated to do menial programming tasks (I dare anyone reading this to come up with fun programming tasks for the first few weeks, when the only thing a student knows is how to create variables and write stuff to the screen)? Of course, a small side note here: this system is primarily aimed for the gray zone of students who ‘might become passionate programmers’ but who usually, in classic classrooms, grow a mild hatred towards anything containing things like i++, public static overrive int, etc. Passionate students will enjoy this system as well, but they actually simply like to code, no matter the form they are learning new things…they might even think of this system as redundant.
This post is not about actually making an achievement-system that I propose. I’m merely trying to give the reader an idea of what I think might be an interesting way to organize a classroom and secondly I hope I can enable some people in actively pursuing this topic. I’m certain some of my ideas (that are far from original) can be as easily applied in any practical-oriented classroom in higher education systems.
So yes, this will be a braindump with, I hope, tiny little ideas that can grow in people’s mind. This won’t be a coherent, scientific rambling about how a classroom can be organized…I leave that to the educationists of the world. And perhaps, if I’m bored with the gazillion other programming ideas I have, I might someday write a follow-up where I actually show a real, useable application. Who knows.
Reality shouldn’t be broken: A bit of scientific backing
Braindump or not, let’s see where my ideas actually originated and show that other, smarter, people are also thinking about this concepts of using game mechanics in non-game activities.
Reading “Reality is Broken” by renowned game-designer Jane McGonical basically crystallized my thoughts on how it might be possible to make a programmers course more fun, while still being educational. McGonical basically explains why nowadays so many people play pc games, compared to 20 years ago. Her main reason being that, according to her, reality is broken. Reality isn’t able to give people the same sense of happiness as games can do. It is than explored what makes games so much fun and what game mechanics keep being used throughout the gaming industry. The second part of the book than describes how to use these proven game mechanics in everyday life.
The main idea of the book is centered around philosopher’s Bernard Suits definition of a game:
Playing a game is the voluntary attempt to overcome unnecessary obstacles.
People actually love to do hard work. Completing a difficult job in game gives a high sense of satisfaction. However in real life, our obstacles are sometimes unsolvable, whereas in game you usually know they are. Also, in real life we don’t choose when and what obstacles will come up. We could map Suits’ definition of gaming to students who are following an higher education, namely an education they have chosen to follow. Student have chosen for a certain education and choose to overcome the obstacles during the ‘game’, things like projects, exams, and trying not to fall asleep during class. So perhaps if we envisioned going to (higher) school as a game, we could break some eggs and reach students who are otherwise lost (i.e. the grey zone, mentioned earlier).
I emphasize on mapping this definition to the ‘game ‘ of higher education. I don’t think this mapping will work for basic education courses as these contains pupils that most of the time didn’t choose to be there and thus aren’t playing a voluntary game. In higher education we should go out from the idea that students follow each course because they are interested in it and have chosen to do so themselves (yeah, a great leap of faith here J ).
McGonical describes 4 elements that define a game, which is exactly the elements missing in most programming classes:
- It has a goal and thus creates a sense of purpose: better still, it has clearly defined, reachable goals. “Becoming a good programmer” is a goal, but a pretty vague one.to say the least. Programming classes should also contain clearly defined goals that aren’t too abstract for the student to apprehend. But equally important, these goals should be reachable for anyone, with only a small amount of extra effort. In other words, classes should be a succession of small goals that grow in complexity as the student grows.
- It has a feedback systems that for example can make promises to the player. The net result is then of course that the player is motivated to keep playing. Imagine a popup on the students desktop from time to time telling him to “Keep it up: you’ve already completed 50% of the tasks of this week”!
- Clearly defined rules which unleash the creativity of the player trying to solve a problem given a set of rules. This fosters the players strategic thinking as, the more he grows attached to the rules, he will be able to solve harder and harder problems. This of course is one of the main goals of a programming class: students using the rules, such as the language syntax or a given set of program requirements, to solve tasks. Getting the students to know and follow the rules is the hard part which, in my opinion, can only be thought with constant exercising, i.e. programming.
- Voluntary participation is the last element that constitutes a game, as opposed to any tasks you are given at the office. Games should be safe and fun, with no stress involved. Players can stop at any time what they are doing with no effect whatsoever on their lives. Making assignments for a programming class should be also like this. If the student doesn’t finish the task: no problem, we’re not taking away any marks. Yup, grades and marks should never be a motivator in any class. Unfortunately they usually are the most tangible goal for a student compared to “becoming a good programmer”. Students , having already chosen to follow the programming course, need to realize they can stop ‘playing’ any time they want, with no repercussion whatsoever. External motivators (comparison with other students, etc.) should keep the student from stopping, not the penalty of lowering grades.
We can imagine several scenarios where these elements can be incorporated in a lab to make it feel more ‘game-like’. However, as mentioned in an earlier blog, it is my impression that you need to go all the way or not at all. I think I speak for many if I say that ‘educational games’ are actually less fun and even more boring than plain old ‘educational programs’. These ‘educational games’ try too hard in being a game, but in the end always fail. So I think we should tackle the problem the other way and incorporate educational things (ugly words) in to game, not vice versa. My ultimate dream would be the creation of an immersive, playable world where students walk around in with their avatar , get quests and try to solve puzzles just like any modern only mass multiplayer game such as World of Warcraft (Wow). The quests in this case could be small programming assignments or things that need to be solved through programming . As Mcgonical explains, games like Wow have really mastered the game-mechanics that make a game so fun, addictive and interesting so why try to reinvent the wheel?
I want achievements!
Creating a variant to Wow might be a bit farfetched. However, there’s one key game mechanic in Wow, and as a matter of fact, in many other modern games, which I think can really liven up any boring or not-so-fun task: achievements.
In the excellent article by Phd. researcher and game designer Lucas Blair, titled “The Cake Is Not a Lie: How to Design Effective Achievements” (Part 1, Part 2) the author acknowledges that achievements can be used to make boring stuff more interesting:
Best practice: Reward players for boring tasks and give them feedback for interesting ones. Make achievements for interesting tasks attentional.
I believe that students can only get through the first year of programming if they practice, practice, practice. I can tell them a whole lot of stuff, point them to very interesting books and sites and even show them the source code of gazillion programs but in the end what the student primarily needs to do is get his or hers hands dirty. I try to activate the students by giving them lots of very small programming tasks, some obligatory others not. During the course the tasks then become larger as time progresses and the students have acquired new skills. Even though the tasks are not so hard , in the end they are still “boring tasks’ the student has to do in order to pass”. By rewarding the students with “in-game grades”, namely achievements, they might be triggered to solve more tasks and thus getting more hands-on experience without them being aware that they are actually learning new stuff of it.
Also explained in Blair’s article is how the players self-efficacy needs to be considered (i.e. “the individual’s perception about their own ability to produce a desired result for a specific task”). A common task of any lab is increasing the student’s self-efficacy and get them to become confident in solving any given problem. The student’s self-efficacy can be increased in several ways, in analogy to how these are done in games:
- Create achievements the players know they reach, given a small amount of ‘extra work’.
- See how well your peers are doing.
- Social persuasion by giving regular feedback on the player’ progress. For example, frequently showing a ‘keep coding, your almost there’-message on screen.
- Making the student feel good, have no stress, etc.
The peer-comparison aspect (point 3) is emphasized in part 2 of the article which is summarized to the following best practice:
Making earned achievements viewable to other players is a powerful incentive. To prevent players from being excluded because of their lack of experience, create achievements for players who take other players under their wing. Let players display a few achievements they are proud of to increase motivation and highlight their play style.
Wouldn’t it be nice if each student had their on ‘status page’ which shows all sorts of statistics (e.g. recently earned achievements, number of lines of code written, amount of errors) and be able to see how well the student performs compared to other through use of all kinds of graphs and ranking. Halo 3, as explained in “Reality is broken” by Jane McGonigal, is an extreme example of a ‘status page’ of a user’s achievements (example).
By the way , to feel the addictiveness of achievements (or better: to discover if you’re susceptible to it) try out this game which the author wrote to prove his point, found here.
So how can we make a programming course that implements an achievement system which makes a programming course fun and educational? We’ll drop the initial “World-ofC#-craft” dream for now and see what is feasible…because unfortunately I don’t have access to the Blizzard development team J
In my opinion there’s several ways to introduce achievements in a programming class, ranging from easy to develop up to , in my opinion, fairly complex stuff:
- An offline achievement system not integrated in the student’s programming environment (e.g. Visual Studio): the teacher basically awards/unlocks achievements during class and while correcting the student’s assignments. Students can then frequently check out their earned achievements.
- A semi-automatic achievement system that still is not integrated in the programming environment. This system should able to detect several typical achievements (e.g. amount of projects submitted, lines of code written) and awards these automatically. The student would need to upload his project to a dedicated service that would then parse the code-files and award achievements.
- A semi-automatic system that is integrated in the programming environment allowing to give real-time feedback of earn achievements. However, these achievements will still be of the type that is language-agnostic. The cool thing of this system is that students would ‘play’ the ‘game’ in one program, the code editor and see in real-time how they are doing compared to others.
- A full-blown, automated, language-gnostic system…or the holy grail as I might say. This system would be able to interpret ANYTHING the user does. So not only placing a breakpoint, but also interpret the code being written in order to award achievements.
The first two systems, though very straightforward to implement, have the drawback that they won’t be able to provide realtime feedback. This feedback is exactly what makes achievements works, the social persuasion and constant ‘reaching of a new (small) goal’ is what will motivate students to keep working. The third system could be ideal to motivate students to explore the power of the IDE they are using (I think I’m not exaggerating if most students, and a lot of developers also I’m afraid, don’t even use 10% of what Visual Studio (or any other big IDE for that matter) can do. A weakness of this type of ‘learning the IDE’-achievements system is that it’s not helping the student in developing the primary programming skills such as typical algorithm patterns, language constructs, keywords, etc.
The holy grail of course is a system that is able to interpret the actual code being written by the student. Such a language-gnostic system should be integrated in the IDE in such a way that any time the students writes a statement or performs a certain action (e.g. pause a program to debug) it should be able to give feedback to the user. The type of achievements and statistics that can then be gathered is quasi endless, ranging from typical numbers-based achievements (“create 100 objects”, “place 5 breakpoints”) to more complex achievements (“compete assignment x”, “write game-of-life”). Sadly, my knowledge of code parsing is quasi 0% making me the least qualified person to talk on the feasibility of a code-gnostic achievement system (some people whispered my to look at thet .NET CodeDom stuff and the Resharper API).
From a technical point of view, Visual Studio is ready for an itegrated achievement system. The Managed Extensibility Framework (MEF) gives programmers the power to customize about any aspect of Visual Studio, making it the prime target through which we can introduce the achievement system to the IDE. The achievement system can then be a client-server app. Any time an achievement is reached, the client notifies this to the server. This server keeps track of all the user’s progress and can also send feedback to the clients (e.g. “user x is the first one to achieve the “make 10 generic classes”, will you be the next one?’). The server could also introduce ‘world events’: short tasks that at some random time are given to all students in class. They can then choose to try and solve it or simply continue with their current tasks. The first three students to solve the world event puzzle could then receive extra achievements to brag about. The Visual Studio start page could also be customized: each time VS starts, the user can login to the system and immediately see his current progress, achievements and active quests, just like the Halo 3 Service Record mentioned earlier.
Visual Studio Ribbon Hero?
The interesting thing is that there actually already exist a Microsoft Office plugin that pretty much does what I’m partly trying to achieve, unfortunately not for Visual Studio. Ribbon Hero is a very sweet plugin for Office, written by the future-gazing people at Microsoft Office Labs. The concept is as follows: after installing the tool, a new button is shown on the Ribbons of Word, Excel, Powerpoint and OneNote. This button shows how many points you already achieved by performing certain typical actions inside the program.
By clicking the button you can review the achievements you already have and which ones you can earn, including a step-by-step learning guide for each achievement.
Playing Ribbon Hero is both addictive (the act of gathering achievements and the ability to brag about them on Facebook) and educational: I actually learned new features of Word and Excel using Ribbon Hero. It would be extremely cool if this plugin would be expanded to Visual Studio. Although “Visual Studio Ribbon Hero” would probably be targeted on using the Visual Studio IDE, and not so much the languages it supports, it would be a fun experience for students alike to learn and appreciate the Visual Studio environment.
Interestingly enough, there might be a VS Ribbon Hero sooner than expected. In a comment to the amazingly funny article “What if Visual Studio had achievements“, Jeff Sandquist wrote the following on January 26th 2011:
My team creates Channel 9 and Coding 4 Fun at Microsoft.
We’ve been talking about creating an add-in for Visual Studio for a little while that does bring achievements to the proiduct. We love that you all love the idea too, so we’re going to go make it happen.
We’ll follow up more with specifics and look forward to getting this up and running soon with your ideas.
Senior Director, Developer Relations
So let’s wait and see what the guys from channel9 can come up with. I’m pretty sure it will be way cooler than any of my tries . If one of you at channel9 is reading this: contact me if you want my advice J.
Although having the possibility to integrate achievements in my classroom would be a big achievement on itself, let’s dream even a bit harder. What if other pc-game mechanics could be integrated to create a total “World of C#-craft” environment (a propos, when visualizing the actual game environment the avatar could walk in, go for a matrix-like, 1337 hacking, grungy look…not a whimsical world of trees, elves and smiling unicorns J ) ?
What if students would be able to receive quests, I.e. programming-tasks. If they fulfill the quests they receive awards that unlocks certain aspects of Visual Studio allowing them to create better, more complex programs. Also, by finishing quests new achievements and quests are unlocked. Students can choose to ignore certain quests, but at some points they’ll be force to solve certain ones (so-called “Storyline quests”) in order to proceed to the next set of quests. This is akin to leveling: each new level will basically be a new group of quests concerning a certain programmatic topic or aspect of the IDE. For example: level 1 = basic usage of variables and operations; level 2= usage of methods, level 3= arrays, level 4= classes and objects, etc.
I could go on for ages on this (other ideas: integrate ability to work as a (raid)group to tackle harder problems using a TFS, restrict usage of certain ‘weapons’ (e.g. arrays, object initializers) depending on the quest, etc.) but for now, let’s see how an achievement based C# classroom can be build up and integrated in the existing labs. I’m all ears for ideas!