Why every programmer should play NetHack

I have a place in my heart for an obscure text based game called NetHack. This game is an archetype roguelike game, and I’ve been playing it for over a year now. Not a year in actual game time (yes, I used to play WoW, a lot), but I’ve been into NetHack seriously for the past 6 months or so, and it still kicks my ass. However, I’ve managed to ascend (beat the game) twice, and I can even play it on my Motorola Q.

How has such a game captured my attention for so long and directly apply towards my career as a software developer? Let me enlighten you as to why I think you should play it, and why it still matters so much.

1. NetHack is HARD.

No, this isn’t really a reason to play the game. However, it is a testament to how NOT to make your software. The amount of frustration I’ve had to go through in order to ascend has been utterly ridiculous. Hell, when I first started playing the game, I didn’t even know there was an ending. I just played because I like to explore. A classic idiom in web development is “Don’t Make Me Think!” I had to do completely the opposite in order to get anywhere in NetHack. One has to remember what monsters do, not to put on that piece of armor because it might be cursed, not to drink from that fountain because snakes might pour out and kill me, and so on and so forth. Well, perhaps under the thousands of lines of C that compose NetHack, someone didn’t think about that, but I for damn well sure am not going to make sure whoever uses my program won’t have to think twice about performing actions.

2. After 20+ years of development, it still has a vibrant community of users.

This really should be the goal of any community online going forward, be it you’re creating a forum for users of your software to request features, or you’re making a wiki-based community, or any of the above. Where will your community be in 20 years? Will it have vibrant fan-made sites? Will it have a fleshed out wiki? How about a newsgroup? Or will it fizzle and be forgotten? The lesson here is that in order to make your community bloom you need to first plant the seeds. Dig in a bit and you’ll find that behind this game of ASCII characters and telnet terminals there lies a deep and invested group of users passionate about the game and willing to help others how to play. If it wasn’t for the community and the “spoilers” it offers, I’d probably still be wandering around the Dungeons of Doom aimlessly.

3. “The DevTeam thinks of everything.”

This is a classic motto of NetHack’s development team within the community. The level of complexity of the game is ridiculous. Allow me to elaborate on one specific monster, the cockatrice. This monster is one of the most feared in the game because it can turn you to stone. Ah, but here’s the rub: once slain, you can wield its corpse and stone foes. And this is where the DevTeam starts thinking. You picked it up with no gloves on? You turn to stone. Oops, you tripped down some stairs because you were carrying too much? Stoned. Hit the wrong key and now you’re eating it? Bam, stoned. The list goes on, and on and on. However, the point is clear: the people behind NetHack have really thought of every possible case, every possible scenario in the game, and there’s a consequence or action for it.

I tend to strive for this goal now when I’m coding. I’d be proud if my program was so robust, so tested, and so mature that it could be said that I thought of everything. And even then, that’s still a long shot, perhaps even impossible. In the short term, I find myself trying to think of every possible case that I can while I’m programming, and I hope someday I’ll be known to be able to really “think of everything.”

Not convinced yet? Check out these old articles from GameSpy about NetHack. And if you’ve played NetHack (and/or if you’re a coder), leave a comment and let me know what you think about how NetHack relates to your other 9 to 5 job. And for those of you concerned, there are several GUI versions of the game in the case that you’d rather look at pretty pictures instead of characters.

Continue reading » · Written on: 10-29-07 · 22 Comments »

22 Responses to “Why every programmer should play NetHack”

  1. Venkman wrote:

    “Well, perhaps under the thousands of lines of C that compose NetHack, someone didn’t think about that, but I for damn well sure am not going to make sure whoever uses my program won’t have to think twice about performing actions.”

    ‘don’t make me think’ is a good motto. But, as happens with everything, it has its limits and its applications. Gaming walks on both sides of those limits. While e.g. a straight shump does need to be simple and quick, and not make the player think, not all games work like that. Some of them are intentionally made to make you think, ponder, plan… In fact they’re exactly about that. Graphical or textual adventures, puzzles, strategy… What fun would be NetHack if all those decisions (’should I risk it with this ring?’) were solved for you? It actually *is* a reason to play the game.

    October 29th, 2007 at 3:48 am
  2. Simon G. wrote:

    Hmm.. Interesting article. I originally was going to make some joke about how programmers shouldn’t play nethack, ‘cos you’ll be coding away, and spot a “&” or something out of the corner of your eye, and have a heart attack (demon! eek!)

    However, I don’t follow the first point, which is basically “I’ve been playing nethack for a year, it’s hard. I love it. Don’t make it hard.”

    So - you’re saying that if you want people to LOVE your software, you should make it damn hard to use? :)
    –Simon

    October 29th, 2007 at 4:45 am
  3. Lollard wrote:

    All that and the telnet version of nethack uses vim style movement!

    October 29th, 2007 at 5:10 am
  4. DoctorNick wrote:

    Simon G: About #1, my point is that sometimes, NetHack can be a little too hard, so difficult that its learning curve may scare away users. For the number of times I’ve YASD’d (just check the stats page), I sometimes wonder why i’m still playing.

    October 29th, 2007 at 8:46 am
  5. HostBarracks.com wrote:

    That picture above makes it look like pacman.

    October 29th, 2007 at 9:26 am
  6. Dennis Schipper wrote:

    There is a learning curve with Nethack? I though the whole thing was just a curve :)

    October 29th, 2007 at 10:07 am
  7. Don Norman wrote:

    “Don’t Make Me Think!” - Fine, don’t think. You should think even less. Like not even enough to blog. That’s the problem with your kind is you think just enough to let your brain ramble online about how much you don’t like to think.

    Fortunately, a timeless classic game and the efforts of people whose feet you’re not fit to lick will not be long sullied by the impertinance of yet another troll.

    October 29th, 2007 at 10:38 am
  8. Don Norman wrote:

    What an asshole, doesn’t even know how to enable autobreaks in his comments or post instructions to use paragraph and break tags anywhere near the comment box.

    October 29th, 2007 at 10:39 am
  9. DoctorNick wrote:

    Ahh, first blog post and I’m attracting trolls. Is this a bad omen?

    October 29th, 2007 at 11:04 am
  10. Craig DeForest wrote:

    Remember — the annual One True International Nethack Tournament begins on midnight (PST) the night of Hallowe’en! The master craftsmen at devnull.net have cooked up a pretty cool challenge level this year, so log in and hack away!

    October 29th, 2007 at 12:49 pm
  11. Craig DeForest wrote:

    The nethack tourney is at http://nethack.devnull.net — sorry for the twin posts, I thought the “link” field would actually include a marked link…

    October 29th, 2007 at 12:50 pm
  12. DoctorNick wrote:

    Heh, I’ll allow that spam through :) And I’ve updated that field to hopefully not confuse anyone else.

    October 29th, 2007 at 12:57 pm
  13. Tet wrote:

    I’m not entirely sure about the relevance to programming, but 20 years on and I’m still playing Moria (or Angband as it’s now become), another roguelike game, albeit one that’s much larger than NetHack (which at the time I started playing Moria, was just called Hack).

    October 29th, 2007 at 1:21 pm
  14. Why every programmer should play NetHack - Litany Against Fear wrote:

    [...] randyzhang wrote an interesting post today onHere’s a quick excerpt [...]

    October 29th, 2007 at 1:56 pm
  15. Mike Polinske wrote:

    I haven’t played Nethack for years but I’m glad to see it is still thriving. I’ll have to give Vulture’s Eye a try. I especially like the “randomness” of Nethack. Every time you play it the dungeon is different.

    October 29th, 2007 at 10:20 pm
  16. meneame.net wrote:

    Nethack, el juego…

    Nethack (www.nethack.org/common/index.html) es un veterano juego (1996), originalmente pensado para ser jugando en la consola de comandos (versiones GUI nethack.wikia.com/wiki/Graphical_user_interface), que ha aguantado el empuje de los modernos juegos…

    October 30th, 2007 at 7:18 am
  17. Rachel Elizabeth Dillon wrote:

    I’m a technical writer; the primary benefit of NetHack towards my career has been forcing me to become at least semi-literate in C. More generally, though, it pushed me to really _master_ something; much of what I did to be successful at NetHack was learn a large set of rules and then how to apply those rules to situations that I couldn’t predict in advance. I think that’s applicable to programming particularly, but also to life in general. Of course, there might be more productive ways to pick up that skill, but NetHack is so fun! :)
    If you’re interested in seeing how roguelikes can “not make you think,” you might look at some of the games that have been developed since NetHack was entrenched. I haven’t played that many; right now, my favorite complex interface is that of Dungeon Crawl Stone Soup (you can play it online at crawl.akrasiac.org via telnet). My favorite simple interface is that of DoomRL (doom.chaosforge.org). Much like “real software” was much clunkier twenty years ago, roguelike interfaces have matured.

    On the other hand, the complexity of the game is much of what drives its user community. Not the clunkiness, really, but the fact that it is hard to win — if it were easy, who would bother hanging around and playing it for years? (In fact, one of the problems on the leading edge of NetHack players is that the game has gotten too easy for them. This may be hard to believe if you haven’t spent much time with the game, but it’s true. People routinely win five to ten games in a row.) If you want a user community to spring up around something, you don’t need to make a wiki or a newsgroup or, God forbid, a web forum. You need to make something worth communing about.

    October 30th, 2007 at 7:27 am
  18. Mark wrote:

    “You need to make something worth communing about.”

    OMFG! You make my head asplode!!!!111
    :P

    October 30th, 2007 at 7:22 pm
  19. Evil Boss Code Monkey wrote:

    Joe? Is that you?

    How do you know so much about NetHack?

    No wonder your project is late! You’re fired!

    October 31st, 2007 at 5:03 pm
  20. warpedvisions.org » Blog Archive » Nethack, a must for developers wrote:

    [...] 2nd, 2007 in Links A few good reasons why every developer should play nethack. I’d like to add that every developer should take a look at the code, as it’s a great [...]

    November 2nd, 2007 at 2:33 pm
  21. Chris wrote:

    Nethack rocks!

    December 7th, 2007 at 7:16 pm
  22. ryan wrote:

    Which version did you get to work on your Q?

    May 8th, 2008 at 3:34 pm

Leave a Reply