Learn a Language By Playing a Game
Learn a Language By Playing a Game
Can gamification help you learn a programming language? Let's hope it's at least easier than Dark Souls.
Join the DZone community and get the full member experience.Join For Free
[Latest Guide] Ship faster because you know more, not because you are rushing. Get actionable insights from 7 million commits and 85,000+ software engineers, to increase your team's velocity. Brought to you in partnership with GitPrime.
A month ago in a galaxy no-so-far-away (ok, it was the same galaxy), I wrote a piece on leveraging the power of koans to help make the learning experience in technology more accessible.
Today, I bring to you a slightly different way to tackle the "learning problem", this time vis a vis the power of gamification.
Doubtlessly, most of you are now familiar with the concept of "gamification"; that is, the application of gaming elements to a situation that is not itself a game, per se. By bringing the concepts of competition, leaderboards, scoring, and even representing the knowledge-bulding tasks as games themselves, the oft-chore like goal of learning something new is made much more accessible with the added benefit of maintaining and even increasing the level of motivation to continue the learning process.
I recently stumbled across a site that is meant to both expand current programming knowledge as well as teach not just new languages, but to sharpen, hone, and grow those concepts that are fundamental to computer sceince (graph theory or pathfinding, anyone?).
So What Is It Already?
The site is Codingame.com.
Founded in 2012 in Montpellier, France, Codingame puts forth mini-games that incorporate our favorite comic book heroes and big-name action stars, like Batman and the Terminator.
However, instead of using your keyboard or mouse to control a character and accomplish a goa, the controller is replaced with lines of code. You are tasks with a programming goal in a language of your choice, such as finding the lowest value in a given input array. The tasks only get harder from there, with multiple levels of difficulty.
At the heart of the learning is the idea that designing and implementing algorithms is perhaps the best way to learn how to code and become a better developer, something I daresay many computer scientists would agree with. I certainly do.
What's This Site Like?
For a brief comparison, consider the Google Code Jam contests and the types of problems they dole out. The tasks that are put out by Codingame are often in the same vein!
(Side note: For those of you who have never heard of Google's Code Jam, go check it out in the link above. It is a yearly contest where you can win cash for solving challenging programming problems. Problems from previous years' contests are also available for you to try!)
Ok, back to the games!
So, as you implement the solution to the task presented to you, when you actually run the code against test cases, you can see the results translated into the game in question, e.g. you might have to make the Terminator's motorcycle make several jumps across a broken bridge. It's actually pretty cool to see the test cases played out in a visual fashion, and drives home the importance of automated tests.
To make things even more targeted, the list of games available also shows the games' respective levels of difficulty in addition to the type of concept you will be tackling and incorporating.
In addition to the games, there are sections for code golf, optimization challenges, and even a community-driven puzzles portion.
There are also leaderboards to help gauge your progress and ranking, complete with achievements to unlock.
Recently added was the ability to program AI bots to challenge other AI bots — cool!
I strongly recommend checking out this site, even just for a quick bit of fun, though I will warn you now: Solving just one more puzzle or pushing for that last achievement might have you coming back for more.
As always, happy learning!
Opinions expressed by DZone contributors are their own.