|
|
#1 (permalink) |
|
Banned
Join Date: May 2006
Posts: 2,053
Reputation: 14
|
Well I've been thinking of ways to get this section livened up and decided to throw a few challenges your way
![]() The idea is I throw a programming problem/challenge at you guys and you get 1 week (need more?) to post your solutions in whatever language you like. Once everyone has submitted there program they will each be reviewed and marked on various things (not quite worked out the scoring yet, bare with me on that). The winner's code will be put on display in a "Hall Of Fame" sticky for the world to see ![]() So yeah, first challenge will be semi-simple, not too hard, not too easy, so here go's: (Please if you think this is too difficult tell me and I will change it) Challenge #1: The Chat Your challenge is to simulate a chat between 2 chatroom users (it can look like msn, irc.. anything like that). It has to look like the words are being typed onto the screen 1 at a time. The chat must be at least 10 lines long. Extra points for adding some color/graphics and humor ![]() An example output would be something like: Code:
* j0hnny (john@irc-6B140240.ip-pool.nefkom.net) has joined #chat <j0hnny> sup guys <sexygurl123> hi <j0hnny> wanna cyb0r? <sexygurl123> sure <j0hnny> oooh ahhh yeah thats good <sexygurl123> oh ya harder faster <j0hnny> k im done If you guy's don't like the idea please say so, so I don't have to work out how I'm gonna be scoring this thing ![]() Good Luck! (Remember, you have 1 week, if you think that is not enough PLEASE SAY SO NOW!) EDIT: Also, If you have a better way to make the same challenge better/easier/harder then just post it and we'll see about making changes, this 1st challenge is more of a concept challenge so all of your ideas WILL be taken into account in the Coding Challenge #2, so if you want this thing to kick off please contribute your idea's now. EDIT 2: Here's what I got so far, hopefully it will inspire people to have a go ^^ Code:
#include <stdio.h>
#include <unistd.h>
int main (void) {
char *ptr = "Hello, World";
for (int i = 0; *(ptr + i); i++) {
putchar(*(ptr+i));
fflush(stdout);
usleep(500000);
}
putchar('\n');
}
This a bit difficult for the first ever challenge? Last edited by TwitcH; 02-26-2007 at 03:43 PM. |
|
|
|
|
#2 (permalink) |
|
SuperKenshin's Servent
Join Date: Nov 2006
Posts: 1,028
Reputation: 32
|
Aha!
People do listen to me! ![]() Anyways, I'll post (not edit) the answer to challenge #1 later on today. ![]() Thanks man, hopefully this should inspire n00bs in researching ![]() If anyone needs help with this, PM me for my eMail, and I'll give you some tips. Very odd... EDIT: I thought I had it easy but my code keeps on getting errors...hmm... Give me till tomorrow, I'll be home from work at 4: 30, should be done by 6. This post was 20% info, and 80% bump I don't think enough people have seen this thread. Last edited by AtomSlap; 02-26-2007 at 10:46 PM. Reason: -=Doublepost=- |
|
|
|
|
#3 (permalink) |
|
Dante’s Inferno
|
=O
Do we upload the executable file and post the link here, post the source code, or do we post a screenshot? EDIT: Good idea btw. ![]() EDIT 2: Oh, and does this have to be cross-platform? EDIT 3: Sorry about all the edits ... I have a question though, can it be in a scripting language, like JavaScript?
Last edited by naruto1327; 02-27-2007 at 01:46 AM. Reason: Questions :P |
|
|
|
|
#5 (permalink) |
|
Orc's Breathmint
Join Date: Jul 2006
Posts: 103
Reputation: 10
|
My submission
![]() Thank you naruto1327 for telling me about this! http://thebar.ej.am/misc/onrpg.html A real conversation I had with my friend about his over 80 year old French teacher... ![]() --- how many can we submit? if more than one, I wanna try this in java, php, javascript, c#, and w/e else I can think of xD! Last edited by XceeD; 02-27-2007 at 01:46 AM. Reason: looks better on html |
|
|
|
|
#6 (permalink) | |
|
Crumbly, but Good
|
Quote:
__________________
|
|
|
|
|
|
#7 (permalink) | ||
|
Banned
Join Date: May 2006
Posts: 2,053
Reputation: 14
|
Quote:
And as for posting executables, I'm not too sure on that, I would prefer you post the source code with instructions on compiling, but I'm sure people could be trusted here to post executables, just don't hold me responsible if you get rooted ^^ XceeD, nice code by the way ^^ And all of you remember, if you have any idea's on how scoring is going to work please post them, I dont know if I should be scoring based on the source code or the compiled product. Anyways, keep it up guy's, you got till 12am Sunday GMT. Quote:
2: Nope, my example code up there is linux, best thing I can think of is comment the code well so people can see what is going on if they dont have the OS to compile it on. 3: Of course. Like I said, any language. Just make sure it's impressive. ;] Last edited by TwitcH; 02-27-2007 at 05:47 AM. Reason: -=Doublepost=- |
||
|
|
|
|
#8 (permalink) |
|
Link's Dirty Sock
Join Date: Feb 2007
Posts: 45
Reputation: 10
|
I'm in
.2 questions: - 1 program or a server-side and client-side program? - Is a multi-user chat okay? As for scoring. Use rates from 1 to 10. Give 8 objectives. 2 other points can be gotten through adding extras. so for example: - Handling server disconnects - 1 point - 10 lines of chat - 1 point - custom names ( not predefined ones ) - 1 point - user list - 1 point - 100% bug free - 1 point - chat is shown as if it's typed - 1 point - something else - 1 point - something else - 1 point - cool extra feature - 1 point - cool extra feature - 1 point cool extra features would for example be adding fonts/colours or smileys. The possibility to store a text file detailing the entire conversation etc. |
|
|
|
|
#9 (permalink) |
|
Staff Admin
|
Wait so can you just use a timer to slowly type out each letter and have it look like it pushed enter or am I thinking incorrect? Like did I read it wrong.
__________________
![]() ![]() Moderator since Aug 2004. I am a guy. Email me at lothia@gmail.com FFXI Tsukisa: 60pld/30War (retired) The OnRPG War |
|
|
|
|
#10 (permalink) | |
|
Link's Dirty Sock
Join Date: Feb 2007
Posts: 45
Reputation: 10
|
Quote:
Send a complete message and then have a timer type it out. Send every letter as soon as they are typed and when enter is pressed you go to a new chat line. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|