Help me help a designer learn to program
May 24, 2011 7:28 AM   Subscribe

What language / framework should a beginning coder use for a text-based game that will eventually be ported to twitter?

I'm helping a friend prototype a single-player text-based game that'll eventually be played through twitter. He's a brilliant designer with limited coding experience, and he'd like to use this project to catch up on programming.

The prototype can run on any platform with a simple terminal interface (or simulated terminal, like a refreshing or ajax-based web page). The final game will use the twitter API to converse with players. It would be nice to be able to reuse code and experience between the two versions.

If I were coding it myself, I'd use CodeIgniter, since I'm familiar with PHP and MVC and all that stuff, and I'm sure I could find PHP libraries to talk to twitter. But PHP is an awful language, and even though I like CodeIgniter, I think it adds a lot of conceptual overhead and just plain busywork that would make it a pain for a beginner to use.

Right now I'm considering python on the command line for the prototype, and some python-based app framework (any suggestions?) for the final. I don't actually know python, but hopefully I can keep a few steps ahead of my student!

Another possibility would be javascript, which seems to have turned into a pretty nice language. Is there a nice library that would simulate a conversational text interface on a web page? Also, I don't know whether javascript is taken seriously as a server language - are there web app frameworks built around it?

I'll probably recommend Coda as the (OSX) editor, since it's pretty friendly.

Any other suggestions?
posted by moonmilk to Computers & Internet (12 answers total) 5 users marked this as a favorite
Python is a good choice and its ecosystem will offer lots of support for your project. JavaScript would work fine as well, though you'll have less support. If you do go for JavaScript, check out Node.js.
posted by chrchr at 7:37 AM on May 24, 2011 [1 favorite]

Another possibility would be javascript

Javascript runs in the browser, not the server. It's definitely going to come in handy if your game has a web front-end, but if your game is going to have some central organization or shared state, you still need a backend component.
posted by Dr Dracator at 7:39 AM on May 24, 2011

Javascript runs in the browser, not the server.

Server-side JavaScript is a real thing now, and Node.js (mentioned by chrchr) is a JavaScript project meant to run on the server. It's probably what I would choose myself for a project like this, but only because it's a new shiny thing that I'm looking for an excuse to learn.
posted by flipper at 7:56 AM on May 24, 2011

If your goal is to help a designer learn to code, I'd suggest the JavaScript/node.js route. Everything the designer learns from the backend will also be relatively applicable to any future front-end work. It's a great language (that is unfortunately bound to a horrible API in the browser environment, i.e. the DOM) that s/he's likely to run across many times in the future as a designer.
posted by Mr C at 8:28 AM on May 24, 2011

Any comments on Komodo vs Coda as an editor/IDE for Python?
posted by moonmilk at 8:57 AM on May 24, 2011

Yardbird is a Django based IRC bot. Django is more typically used as a CMS framework, but its here used to route and respond to IRC messages instead of HTTP requests. It could be adapted, but the tricky part would be getting it to speak to twitter rather than IRC.
posted by pwnguin at 9:22 AM on May 24, 2011

I was going to suggest ruby, you have some nice tutorials on the web and support for hooking into twitter. I find the source code easier to read than javascript, I've not really got any experience with Python, so can't comment on how that compares. I'm coming from a C/C++ Perl background, so others may have better suggestions for designers learning to program.
posted by Z303 at 9:26 AM on May 24, 2011

Both the Python and Javascript paths would work nicely. Python's going to have more and more complete, libraries. In my opinion it is also going to be faster to learn for a beginner.

Here's a link to a discussion of lightweight MVC frameworks for Python: stackoverflow

If it were me, I'd probably use Pylons for something like this.

For an ORM, there's hardly anything better available in the world than SQLAlchemy, but it might be a little much for a beginner. Still, good habits start early, and hand-crafting your own SQL is a bad habit, along with annoying.
posted by Invoke at 9:54 AM on May 24, 2011

Tornado is a good framework for Python web applications.
posted by aparrish at 9:56 AM on May 24, 2011

Thanks for your answers!

We started in on Python, and it's working out well even though I'm learning it at the same time -- perhaps it's better that way.
posted by moonmilk at 1:53 PM on May 24, 2011

Sounds like you're set, just wanted to add that your designer friend may find Processing interesting, especially if future projects are heavy on graphics or animation.
posted by orangejenny at 7:10 PM on May 24, 2011

Following up orangejenny's processing suggestion, Vormplus are just coming to the end of their processing month, which had been a good tutorial.
posted by Z303 at 7:37 AM on May 28, 2011

« Older Getting a celebrity to help our nonprofit?   |   Can I eat it? (I did.) Breakfast of expired ham... Newer »
This thread is closed to new comments.