Sunday, April 03, 2011

Learning Programming Using WoW

Ian Lamont sent me the following:

Thought you might be interested in an MIT class project: Developing a basic computer science curriculum around Lua scripting in WoW. We published it earlier this month at the following location:

http://www.ilamont.com/2012/02/teaching-computer-science-through-wow.html

Now, I'm a software dev by trade, so this was pretty interesting. Games have traditionally been a path into programming, and WoW does have some interesting features for aspiring devs.

One thing about WoW is that it is an "information-rich" environment. There's all sorts of API calls you can make to get information about different parts of the game world. Then you can easily change things, and make the same calls and get different data.

In the link above, this is illustrated with simple calls like "IsOutdoors()". You can move your character in and out of buildings to get different results.

That's something which is actually somewhat hard to set up from scratch at the beginner level. You have to set up a datasource, and then connect to it, then learn how to query it and interpret the results.

As well, it's easy to move into simple, useful mods in WoW. Sometimes it seems like it is pretty hard to make a simple app these days. Making a small mod is a lower bar.

On the other hand, WoW does have one huge philosophical negative as an environment to learn to program in. Programming is more than just processing data and displaying it. The other half of programming is automation. Not just slicing and dicing information, but "doing" multiple actions.

And here WoW goes to great lengths to prevent the user-programmer from being able to automate actions. You'd have to make clear the idea of what is theoretically possible to automate, like moving your character in a pattern, but is prevented by the game company.

Either way, it's an interesting idea. Learning to program can be challenging at first, because it often seems like there's this entire framework that needs to be set up before you can accomplish anything. But in WoW, that framework already exists and has useful data. And mods and the mod community provides a ready path for the new programmer to make small apps that may even be useful to other people.

But in the long run, I wonder how a programmer who doesn't grasp the concept of automation is going to fare.

6 comments:

  1. I'm not totally convinced by the lack of automation aspect.

    If we look at a lot of web apps, mobile apps, mash-ups etc. they are very much about representation of existing data in new and useful ways.

    Also accept that "industrial" coding requires automation to "actually do" something... but there is a growing set of apps that don't conform to that paradigm.

    ReplyDelete
  2. Thanks, Rohan, for the comments. Your point about automation is well taken -- that's a roadblock that aspiring programmers would encounter if they wanted to continue use WoW for more advanced projects. While in some cases it could inspire some interesting workarounds or creative scripting in WoW, the automation limitations could also be a cue to look at Lua in other environments or try another language or framework, while porting over knowledge of variables, if statements, and other basic concepts learned in the WoW curriculum.

    ReplyDelete
  3. @Purrfect, I subscribe to the theory that education should be fairly broad, even if you don't end up using all of it. Knowing all the options helps you formulate better solutions, even if you are limited to a subset of the options.

    For example, take pointers and recursion. A lot of programmers don't use those often in day-to-day work (at least explicitly, in the case of pointers) but they're still important concepts to understand.

    ReplyDelete
  4. I found the concept very interesting.

    A couple of years ago, a local liberal arts college used the construction language in Neverwinter Nights for a summer programming class. Of course, it's a much richer language, but the idea --taking a popular game and using it to teach programming-- is similar.

    ReplyDelete
  5. I love that "Routes" uses a classical programming problem (Traveling Salesman) as the basis for a great addon.

    ReplyDelete
  6. Far cry from the days of MUDs and learning lpc.

    ReplyDelete