Programming language guessing game

December 9, 2008 – 12:18 pm Tags: , ,

Some of you asked me about the “quiz” thing that showed up in one of the screenshots in my NetBeans review… Well, here it is:

During that weekend when I was trying out NetBeans, I wrote a small Zend Framework + Doctrine application which attempts to guess a programming language the user is thinking of, based on a set of questions the user needs to answer.

I have now set up the game, so go ahead and try the Awesome Programming Language Guessing Script. Yeah I wanted to give it a fun name =)

Let me know what you think, and if it’s actually getting any answers right or not - it’s using some relatively simple logic based on which questions have been answered what for which language etc., so I don’t know how it’ll perform when more than a few people answer the stuff. So if you’re a statistical math guru, feel free to suggest an algorithm for the game ;)

I might release the source code for the game sometime, as a demonstration of using ZF, Doctrine and unit testing and such.

Edit: the source code is now available here. Checkout/export the latest tag for the latest functioning code. Note that the code is still in development =)

Share this:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • E-mail this story to a friend!
  • LinkedIn
  • Pownce
  • Reddit
  • StumbleUpon
  • Technorati

RSS feed Subscribe to my RSS feed

  1. 7 Responses to “Programming language guessing game”

  2. Surprise, it guessed PHP :P

    If you want to know whether it gets the right answers or not, can’t you use the replies to the question “Is it ?” :P

    Anyway, even better than the name is the logo xD

    By Vincent on Dec 9, 2008

  3. I couldn’t make it guess PHP :(

    I tried several times and the game guessed C and C++ all the time :S

    By Tix'z on Dec 9, 2008

  4. it didn’t guess clean nor javascript :P

    By Harro on Dec 9, 2008

  5. Thanks Vincent, I put all my elite photoshop skills into the logo :P

    It should be able to guess the language as long as it knows the language beforehand and no one inputs incorrect answers to the questions… =)

    I have reloaded the original database, since apparently someone thought it would be funny to input stupid questions. FYI, it logs IP addresses, and I’m going to blacklist any addresses that I see popping up with questions like “does it have a p*nis” or whatever.

    By Jani Hartikainen on Dec 9, 2008

  6. If you follow this url: http://epic.codeutopia.net/quiz/end it shows a exception stack trace.

    By alvaro on Dec 18, 2008

  7. Thanks for pointing it out alvaro. Though the end will (should) work correctly if you work your way through the quiz like you’re supposed to ;)

    By Jani Hartikainen on Dec 18, 2008

  1. 1 Trackback(s)

  2. Dec 11, 2008: Thoughts on unit testing and application design | CodeUtopia

Post a Comment