Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

games played with Perl

by benrwebb (Scribe)
on May 11, 2005 at 15:30 UTC ( #456033=perlquestion: print w/replies, xml ) Need Help??

benrwebb has asked for the wisdom of the Perl Monks concerning the following question:

At my day job I am on a team with several programmers. Only a few of them have any real Perl experience, but because of history, inertia and corporate rules, Perl is our language of choice for our activities. I'm looking for something fun that I can get these guys doing that will sharpen their perl skills. If it was java, I would start a RoboCode tournement. Are there any games that get people programming in Perl? I did some simple googling and didn't see anything, so I though I would ask here. Any thoughts? Obfuscation contests don't count, I'm trying to get these guys to write solid, readable code! Thanks.

Replies are listed 'Best First'.
Re: games played with Perl
by ww (Archbishop) on May 11, 2005 at 15:46 UTC
    Your objection to obfu contests noted, but turning obfus into clear code might be a decent learning experience.

    Another approach: take a look at some of the SOPW here, and present a selected few to teammates as challenge, with apporpriate recognition/award to best solutions...

Re: games played with Perl
by zentara (Archbishop) on May 11, 2005 at 16:26 UTC
    You could try ztk-babel client server game with chat . It is not OO, (but should be). I wrote it to play with sockets and Tk. It has some valuable techniques, like using the nice Net::EasyTCP module, and integrating it with Tk. (The code works well, but can be hard to figure out at first, because of the depth and complexity of the current attempt at the same thing, is using the same hashes, but making them OO, separating the players, and network stuff into separte namespaces.

    It would be fun for them. It is a scrabble clone for 4 players over a network or LAN.. (Actually I made it to work like Scrabble, but became aware of the copyright I made it so a random board is created for each game, and diagonal words count.

    For something simpler, look at PONG with TkZinc

      hey thanks :) I didn't know such a thing like tkzinc existed :)
Re: games played with Perl
by shemp (Deacon) on May 11, 2005 at 18:54 UTC
    A prisoners dilema-type game would be a rather straightforward game to code, where perhaps you would build the main game, and define an API that the other programmers would need to write players for.

    I very much like your concept, it should be interesting. I just recently heard of RoboCode which sounds very interesting, but alas, i have never coded java.

      You've got the right idea, but what is "Prisoner's Dilema?" I'm not familiar with that one.

      I've tossed around the idea of doing RoShamBo (rock-scissors-paper) or TicTacToe, but those have been my best ideas so far.
        Prisoners dilema is a game theorey game where basically 2 players choose either to cooperate or fend for themselves. This could be expanded to rounds of play. The game itself would be as simple as rock paper scissors (which is a good idea!)

        Heres a link to an more detailed explanation: Prisoners dilema

Re: games played with Perl
by tphyahoo (Vicar) on May 11, 2005 at 16:11 UTC
    Hit the search engines with

    perl golf

    perl kata

      Hit the search engines with perl golf He said no obfuscations!!!
        But "perl golf" ne "obfuscation". Although golfing code often turns out to be obfuscated, it is not obfuscation that is the main aim of the game: more precisely it is not an aim of the game at all, only a side effect of it.
Re: games played with Perl
by Anonymous Monk on May 11, 2005 at 17:15 UTC
    Run a perl style contest.

    Pick a coding task, and have a panel of judges rank them on their documentation, code clarity, program structure, and overall performance of thier code (ie. does it do the task assigned, and no more? Does it do it correctly for all cases? Is it testable? Was it tested at all? Did the documentation include the test cases? Is the documentation easy to maintain (eg. literate programming techniques, where the documentation is embeded with the code)?

    In short, run a contest on what you want to test: their ability to write "solid, readable code". Use the entries as a talking point for developing better coding style and practices within your department. A lot of the points of style are subjective; but that's entirely the point. You want your developers to understand what kind of code that you expect them to write: giving them examples of what you do and don't like will help much more than saying "just do it, and do it 'right'!"

    Just my $0.02

Re: games played with Perl
by Rudif (Hermit) on May 11, 2005 at 21:23 UTC

    Looking for fun and profit?

    Show them how to use Test::More and its cousins.

    Let them build up something useful for your daily work - maybe a toolkit or a library of reausable modules - working in TDD style.


Re: games played with Perl
by scmason (Monk) on May 11, 2005 at 18:49 UTC
    How about the game of Go? Every year there are several contests to see who can program the best Go playing agent. (Go is not as solvable as Chess, so it can be a real challenge to even make it work, let long play well)

    Perhaps instead of competing against each other, they can work together to creat an entry to one of the contests. This would not only help their Perl skills, but help build team relationships.

      Most of the guys building the engines are profficient at the game. The biggest problem with the game is the sheer number of moves that are possible that makes it extremely hard to solve the best move for any given situation. Also the game requiers considerable skill even though it has a limited ruleset.
Re: games played with Perl
by eyepopslikeamosquito (Archbishop) on May 13, 2005 at 11:58 UTC

    You could reuse some old quizzes from MJD's Perl Quiz of the Week.

    When I come across an interesting problem at work, I sometimes give my workmates a quiz, asking how they would solve it.

Re: games played with Perl
by djohnston (Monk) on May 12, 2005 at 23:23 UTC
    Have them each write a template parser (the rite of passage for Perl programmers), then post them on Cpan (insert evil laugh here).
Re: games played with Perl
by Xenograg (Scribe) on May 12, 2005 at 23:24 UTC
    I suggest trying to bring programming into something that the users already find fun. Does the group have a shared hobby or interest? Leverage it. Building bots to play against is only the tip of the iceberg.

    ::whispers:: RPGs.... :)

    --- The harder I work, the luckier I get.
Re: games played with Perl
by NiJo (Friar) on May 12, 2005 at 17:26 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://456033]
Approved by gellyfish
Front-paged by Tanktalus
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2023-11-30 08:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found