Thread: (Community Game) Round Robin for C++ [Round 01]

  1. #1
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108

    (Community Game) Round Robin for C++ [Round 01]

    Remember:

    This is a community game! Above all, it should be fun. Consider your options, figure out where your contribution would have the most effect, and please don't try cheating. We all know the intent of the rules; it shouldn't be necessary to go into a lot of detail, and circumventing that intent is only going to be a drain on the game.

    If you want to play in round two, drop a line in the other thread and let us know.

    If you have a good idea for the project for round two, again, drop a line in the other thread.




    Scoring:

    As we iterate over the contributor list, every valid insertion scores one point, every addition scores two points, and every correction scores three points.

    Perhaps we can get a moderator to update the scores on the first post every once in a while?




    Project:

    Develop an application to gather simple statistical data for a simple ASCII text document. (You may assume platform native newlines, standard punctuation, and that no words are hyphenated.)

    The application should process the input file's name as the first and only command line argument.

    The application should produce a sorted list of frequencies for every word found in the input.

    The application should produce the mean and mode of word lengths.

    The application should produce the shortest and longest words.




    Base Code:

    Code:
    int main
    (
        int argc
      , char ** argv
    )
    {
    }



    Rules:

    1) Standard conforming C++ only!

    2) One simple additions accounting for simple control constructs OR one insertion OR one correction per contributor turn. (Additional include directives do not count towards these options.)

    3) Contributors have 24 hours to take their turn; if a contributer misses their turn, they will be passed over until it would be their turn again.

    4) Let's keep a simple clean style for the sake of simplicity; newbies may want to play and they don't need some crazy style to complicate matters. (You don't have to my style as above though; it was just an example.)




    Contributors:

    EVOEx
    User Name
    VirtualAce
    msh
    glo
    Sipher
    Perspective
    laserlight
    Yarin
    whiteflags
    cpjust
    C_ntua
    phantomotap

    (If you don't want to contribute, try and drop a note saying that you don't want to play.)



    Round Two Preparation: http://cboard.cprogramming.com/gener...und-02%5D.html

    Soma
    Last edited by phantomotap; 04-17-2011 at 02:47 PM. Reason: none of your business

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Hmmm it's too bad. I didn't start the game yet because the rules needed work. Right now I'm not even clear what's going on. Are you only allowed to add on the bottom? If so, the "}" can't be there. If not, then there's no fun in the game: everybody can just add to their own places making their own thing work and block out everyone elses. What is a correction anyway? If I put "return 0;" above all other code, is that wrong? Not really, the program can still work, I just ruin everything else underneath that. It's quite important for the fun of the game, I think, you can only add to the bottom.

    Anyways, here's my bit:
    Code:
    int main
    (
        int argc
      , char ** argv
    )
    {
      if(argc != 2) {

  3. #3
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    I didn't start the game yet because the rules needed work.
    That's the problem. All great programmers do is "Iterative Design". If they claim anything else, they are trying to sell you something... probably "Rational Rose".

    Are you only allowed to add on the bottom?
    No. You can make a pure addition, or you can make an insertion.

    I guarantee you that this is part of why VirtualAce doesn't want to play. It is impossible, by definition, to play that way because a simple mistake, and it doesn't have to be logical or syntactical, will break the game over and over.

    Even without that, that rule has too many problems. Consider this, newbies will never be able to contribute because they will not even know if their additions are valid if they can't test compile the source. That's just the tip of the iceberg.

    I believe the scoring system, while more complex, satisfies the requirement well. However, I only just now noticed that I got the values copied in the wrong order. I'll see if some moderator will fix it for me. The additions, which comes second in the sentence, should have the score value of two and the insertions the value one.

    [Edit]
    I finally got the edit option to work and made some of the changes myself.
    [/Edit]

    Are you only allowed to add on the bottom? If so, the "}" can't be there.
    Why? I'd say that it should be obvious to any competent individual that a closing brace marks the end of a segment, and as above, without consistent state, newbies will not be able to play.

    If not, then there's no fun in the game: everybody can just add to their own places making their own thing work and block out everyone elses.
    This could be done with any number of rules in place. You can't prevent attempts at gaming the rules, circumventing the intent, or ruining everyone else's fun by throwing more and more rules at the game.

    If you spend more than two seconds thinking about the intent of the simpler rules I've proposed, the intent should be fairly obvious. If they are not, we can rewrite them next round, but throwing a wall of text at potential players is guaranteed to turn them off.

    What is a correction anyway?
    That should be obvious, and if it isn't, no number of rules will solve the problem. This is just like the above, no number of rules can quantify everything I can game.




    As for anyone else, whoever comes next, please use this code as the addition from EVOEx.

    Code:
    int main
    (
        int argc
      , char ** argv
    )
    {
        if(argc != 2)
        {
        }
    }
    Soma
    Last edited by phantomotap; 04-17-2011 at 02:48 PM. Reason: none of your business

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by EVOEx View Post
    Hmmm it's too bad. I didn't start the game yet because the rules needed work. Right now I'm not even clear what's going on.
    Not clear? You've been hijacked...

  5. #5
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Do we really need rounds? And, what will happen in each round?
    Devoted my life to programming...

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    How are you going to decide if a correction is valid? seems like an odd way to score points...



    edit: btw, I don't think i visit here often enough to be included in a round robin game. You'd end up waiting too long for me.
    Last edited by Perspective; 04-18-2011 at 01:11 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Round-Robin File
    By phybros in forum C Programming
    Replies: 2
    Last Post: 10-04-2009, 05:35 PM
  2. round-robin
    By 3pid in forum C++ Programming
    Replies: 1
    Last Post: 01-29-2009, 11:13 AM
  3. Round Robin Scheduling using c.
    By eclipt in forum C Programming
    Replies: 8
    Last Post: 12-28-2005, 04:58 PM
  4. round robin algorithm!
    By visham in forum C Programming
    Replies: 9
    Last Post: 10-13-2005, 03:14 AM
  5. Countout (Round Robin) Game
    By Hexxx in forum C Programming
    Replies: 12
    Last Post: 12-22-2003, 07:58 AM