Thread: Results - 4th contest, saturday, august 11

  1. #1
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490

    Results - 4th contest, saturday, august 11

    d00b's judging:

    ***************
    vasanth's entry
    ***************
    ================================================== ====
    Efficiency - 4
    Code was on bios time... code was well-written and no complicated algorithms were involved
    Elligance - 3
    Pretty average as for elligance, could have been more logical in order/structure... but I still liked it
    Portability - 2
    I'm sure the code could be made much more portable, I had a hard time getting it to compile, nuff' said about that
    Interface - 3
    Average interface, nothing special... fletch's was much better
    Alarmability - 4
    I liked the wailing... it was more creative than some of the others; good alarm

    ================================================== ====

    (4+3+2+3+4) = 16/5 = 3.2
    **************
    fletch's entry
    **************
    ================================================== ====
    Effeciency - 3

    For the most part his program was effecient, however
    the time formatting methods brought this score down
    because of the extra math and calculating that had
    to be done on displaying times
    ================================================== ====
    Elligance - 5

    Overall I feel his code was organized, logical, and
    well-commented... 'nuff said
    ================================================== ====
    Portability - 1

    I picked up right away that he decided to sacrifice
    portability for interface; his code is Windows-
    -dependant, I suppose it could be modified to work
    on other platforms, but as it stands now, no.
    ================================================== ====
    Interface - 5

    Of all the entries, his has the best interface!
    (at the cost of portability and effeciency)
    It's EASY TO USE, EASY TO READ, and worked
    flawlessly... I especially liked the formatted
    times! This was a big plus!
    ================================================== ====
    Alarmability - 4

    I really liked this alarm, the flashing took me by
    suprise It's not a 5, but still a good alarm
    ================================================== ====

    (3+5+1+5+4)/5 = 18/5 = 3.6

    *****************
    ClownPimp's entry
    *****************
    ================================================== ====
    Effeciency - 3

    His clock and alarm were simply time objects and he
    checked them every second to see if they were the same;
    this could have been better
    ================================================== ====
    Elligance - 3

    The code was a little hard to read at first, but
    I eventually made full sense of it, overall good
    ================================================== ====
    Portability - 5

    I got his code to work on 3 operating systems;
    Windows, Linux, OS/2... and I'm sure it would work
    on others... looks very standard
    ================================================== ====
    Interface - 1

    Having to set the alarm time and then the current
    time, including the date was a bit frustrating,
    it wasn't very nice looking or very easy to use
    ================================================== ====
    Alarmability - 2

    Pretty average alarm; it doesn't even tell you it's
    going off :/
    ================================================== ====

    (3+3+5+1+2)/5 = 14/5 = 2.8

    *************
    goose's entry
    *************
    ================================================== ====
    Effeciency - 4

    His program is small and threaded, I think his usage
    of sleep functions is well-done and managed; and
    both threads worked for me without having to change
    anything (other than #define)
    ================================================== ====
    Elligance - 3

    The program's small size helps keep the code easy to
    read... but some order was not logical
    ================================================== ====
    Portability - 4

    Like I said both threads worked, however I could not
    get this to compile on my OS/2 system
    ================================================== ====
    Interface - 3

    IMO a command-line argument for setting possibly
    multiple alarms is a hassle although it is nice that
    you actually can set multiple alarms
    ================================================== ====
    Alarmability - 3

    Another average alarm, although it does let you know
    when it is sounding and let's you terminate it
    ================================================== ====


    (4+3+4+3+3)/5 = 17/5 = 3.4

    ygfperson's judging:


    in alphabetical order

    ClownPimp:
    efficiency: 2. The methods he used to calculate time were a little excessive for their purposes.
    elegance: 2.5. There was a lot of redundancy. GetAlarmTime() and GetInitTime() are very similar, except for a string and a variable. ParseInput used many if statements where one statement in a loop could do the same thing. sscanf() could have also handled this. On the plus side the functions use logical names and everything's indented so it's readable.
    portability: 4. It compiles without problem. However, fflush(stdin) should not be used because it is non-standard and meant for output-streams only.
    interface: 1.5. Date and time have to be fed into it in an unusual fashion. You must set the computer clock every time you use the program. It only shows the current time every so often, or when the alarm goes off. The only obvious way to stop it was to ctrl-break out of it. I like the idea of using the \r command to update the time, though.
    alarmability: 2. It sends a repeating string of character beeps to stdout. On awindows machine this would play the chord sound (or whatever it's called) overand over again until the person being alarmed gets him/herself out of bed and ctrl-break's it. In linux beeps come out of the internal speaker. Unfortunately, due to the speed of modern CPUs the beeps all run together, producing a slight, barely noticable clicking noise (except for the last beep). A simple solution to this would be to slow down the beep frequency to a beep every quarter or half of a second.

    (2+2.5+4+1.5+2)/5 = 12/5 = 2.4

    fletch:
    efficiency: 3. No glaring problems. I didn't see the reason for using windows-specific commands, but they do the job well.
    elegance: 3. Everything is organized well. He encapsulates many functions to make everything clearer. The one thing I didn't like was including the "Console.cpp" through the preprocessor command #include. Anything other than header files should be linked together, not included and compiled as one file.
    Portability: 2. This program runs only on windows machines.
    interface: 4.5. This interface is pretty much idiotproof. It makes it obvious what should be done to set the time and alarm. My only problem with it is when a person is in a 40x25 text mode. The text on the program doesn't wrap, so the commands to set time and exit are obscured. (However, the chances of being in a 40x25 text mode are slim. To see it in dos, type "mode 40". To return to 80x25, type "mode 80")
    Alarmability: 4. While the alarm beeps are strung out in pretty much the same fashion as the other programs, under windows the beeps can't run together. I also liked the idea of flooding the screen display with red and white colors. That's definitely cymbals for the eyes.

    (3+3+2+4.5+4)/5 = 16.5/5 = 3.3

    goose:
    efficiency: 3. No glaring problems.
    elegance: 3. While int main() was used for most of the program, the program was short enough so that there wasn't a problem with readability. He also should have used stderr to output errors instead of stdout.
    portability: 4.5. The program was portable enough, except for a problem handling CTRL-C in linux.
    interface: 3. No great effort was made here, but it worked well enough.
    alarmability: 2. It sends a repeating string of character beeps to stdout. (see *ClownPimp*'s alarmability entry for details)
    (3+3+4.5+3+2) = 15.5/5 = 3.1

    vasanth:
    efficiency: 3.5. No glaring problems. The usage of the bios clock allows the compiler to show mili-seconds and micro-seconds as well as hour, minute, and seconds. (I should also mention that it worked even in a dosemu box inside linux).
    elegance: 1.5. Everything is modular, making it clear what each function does. But variable and function names make it hard to tell what they're used for. And the indenting scheme is badly done, imho. There are also large amounts of redundancy, particularly when using gotoxy() and printf() over and over.
    portability: 1. This program might work on other dos compilers besides turbo c, but it doesn't work on any modern compiler (gcc, VC++, Borland v5.5).
    Interface: 4.5. The interface here makes itself clear what's happening, and which buttons to push. My only problem with it is its usage of scanf(). If it receives a non-number string in one of the prompts, the program effectively stalls.
    Alarmability: 3.5. This program uses the bios speaker creatively to emit a screeching noise from the speaker. This could have been improved by allowing durations of large amounts of time, or by keeping the speaker on until the sleeper wakes up and slams his fist on the keyboard.

    (3.5+1.5+1+4.5+3.5)/5 = 14/5 = 2.8

    and now for scoring...

    clownpimp2.8 + 2.4)/2 = 2.6
    fletch3.6 + 3.3)/2 = 3.45
    goose: (3.1 + 3.4)/2 = 3.25
    vasanth: (3.2 + 2.8)/2 = 3

    congradulations, fletch!

    good luck next time, clownpimp, goose, and vasanth!

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    congrats all who entered
    hello, internet!

  3. #3
    *ClownPimp*
    Guest
    *sobs*

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Is someone going to be kind and sticky this for a few days....

    [edit]opps, forget to say well done to all those that entered. And congrats to fletch.

    What happened to the other judges, btw?
    Last edited by Hammer; 08-11-2002 at 02:08 PM.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    Jun 2002
    Posts
    267
    Hmmrph, why didn't you judge klinner??

  6. #6
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by d00b
    Hmmrph, why didn't you judge klinner??
    you didn't really expect him to did you?
    hello, internet!

  7. #7
    Green Member Cshot's Avatar
    Join Date
    Jun 2002
    Posts
    892
    Congrats all.

    Hmmrph, why didn't you judge klinner
    He would've mistyped the scores
    Try not.
    Do or do not.
    There is no try.

    - Master Yoda

  8. #8
    goose
    Guest
    Congradulations fletch, and thank you judges for taking the time to do this.

    This was my first attempt at writing a program in pure C. Out of curiosity, what was the compiler that was used for OS/2 testing? I have OS/2 on floppies somewhere, and I suppose I could put that on an old system to test if I enter another contest.

    Also, this is for my own benefit for future entries, did any of the judges have any suggestions as to how I could have made my code more efficient (ie: get +1 more in your opinions)? I noticed that ygfperson noted "no glaring problems". What should I have done differently in your opinion; as when either posix or win32 threads are available, at least in my testing, it only retrieves and updates the time very second.

    Or was it just that you would have preferred to see it do more, and still do those additional things with the same efficiency?

    Thanks again for taking the time for this.

  9. #9
    Registered User fletch's Avatar
    Join Date
    Jul 2002
    Posts
    176
    Thanks d00b and ygfperson for judging. And thank you ygfperson for running the whole thing.
    Anything other than header files should be linked together, not included and compiled as one file.
    What exactly does that mean? How and why should I do it?

    I noticed that Vasanth used bios calls for accessing time and sound (via Borland's bios.h). I didn't think that Windows allowed direct bios calls...or does it?

    Goose, I like your use of threads. You've definitely piqued my interest...now I've gotta do some reading to figure out what you did

    Oh, yeah...Congratulations ygfperson on achieving the highly prized 'mod status.' Use your powers for good, not evil

    fletch
    "Logic is the art of going wrong with confidence."
    Morris Kline

  10. #10
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Anything other than header files should be linked together, not included and compiled as one file.
    --------------------------------------------------------------------------------

    What exactly does that mean? How and why should I do it?
    You used a #include to include a source file into your program. The correct method is to have header files containing function prototypes etc, and a source files containing the actual code. You then #include only the header file where necessary, compiling the sources seperately and then linking them together at the end.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  11. #11
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    Originally posted by goose
    Congradulations fletch, and thank you judges for taking the time to do this.

    This was my first attempt at writing a program in pure C. Out of curiosity, what was the compiler that was used for OS/2 testing?
    i don't have an os/2 system, and neither does d00b, i think. when checking for portibility we use common sense and test the software across as many operating systems as we have access to.
    I have OS/2 on floppies somewhere, and I suppose I could put that on an old system to test if I enter another contest.

    Also, this is for my own benefit for future entries, did any of the judges have any suggestions as to how I could have made my code more efficient (ie: get +1 more in your opinions)?
    to be perfectly honest i don't grade efficiency highly. maybe i should start grading from a 5 down instead of a 3. in any case, the efficiency score focuses on the things that went wrong rather than what went right. when i say no glaring faults, i mean that the program doesn't have any efficiency problems with it.

    What happened to the other judges, btw?
    d00b was the only one who gave me his scores in time (or at all).

    thanks for your effort, d00b.

  12. #12
    Registered User
    Join Date
    Jun 2002
    Posts
    267
    Originally posted by goose
    This was my first attempt at writing a program in pure C. Out of curiosity, what was the compiler that was used for OS/2 testing? I have OS/2 on floppies somewhere, and I suppose I could put that on an old system to test if I enter another contest.
    I actually gave it to a coder from work so he could tell me what he thought... when I saw him after lunch he just said something like, "I dunno what it's for, but it worked on OS/2"; I'll ask him what he used

  13. #13
    vasanth
    Guest
    WOW! this was a good contest with good competetion... Well next time my codeing will be better(I hope so).. ANy way congrats Fletch... Your code was neat


    / noticed that Vasanth used bios calls for accessing time and sound (via Borland's bios.h). I didn't think that Windows allowed direct bios calls...or does it? /



    Well windows allows it.. It allows direct Bios call in a virtual way....

  14. #14
    vasanth
    Guest
    Well some of the entry did not compile on my compiler(old old compiler) can some one please post the exe's here so that every one can have a look.. (please...............)

  15. #15
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by vasanth
    Well some of the entry did not compile on my compiler(old old compiler) can some one please post the exe's here so that every one can have a look.. (please...............)
    Why not just get yourself a better compiler.....
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with file
    By nevrax in forum C Programming
    Replies: 12
    Last Post: 04-23-2007, 06:18 PM
  2. Results of March Monthly Contest
    By PJYelton in forum Contests Board
    Replies: 23
    Last Post: 04-17-2005, 09:46 AM
  3. Obfuscated Code Contest: The Results
    By Stack Overflow in forum Contests Board
    Replies: 29
    Last Post: 02-18-2005, 05:39 PM
  4. re:c++.prog.newbie on CPP board
    By edwardtisdale in forum C Programming
    Replies: 13
    Last Post: 04-30-2004, 12:35 AM
  5. resources with dev-c++
    By lambs4 in forum Windows Programming
    Replies: 0
    Last Post: 04-13-2003, 06:06 AM