|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
RE: This should make things interesting
Well, thanks a lot. Just eliminate a part of the challenge, why don't you?
Anyhow. very messy way of doing it.. yuck yuck. no scalability there whatsoever, very "patched" code.. where do you initialize $mazes? it'll spew out notices.. (sorry to be so condescending, but showing competition code is not exactly a very sporty thing to do). |
|
#2
|
|||
|
|||
|
RE: This should make things interesting
why would you post this?
|
|
#3
|
|||
|
|||
|
This should make things interesting
|
|
#4
|
|||
|
|||
|
RE: This should make things interesting
CmdrDats: On the contrary, it shows no error messages regarding $mazes. I am interested in why you consider this code 'patchy','yucky' and 'unscalable'.
lostzen: why should it be a bad thing to share code during a competition. My primary goal in developing for these competitions is to increase my knowledge of php, and general CS abilities. If my post inspired one more person to participate, and or garnered commentary on itself, who has lost anything? |
|
#5
|
|||
|
|||
|
RE: This should make things interesting
I understand your point, I just think it would be better to post solutions (even partial solutions) after the contest has ended. Then we could look at each others code and coment on it.
I think people learn best by trial and error. If they try and come up with their own solution first I believe that they will learn a lot more than how to cut and paste. Just my opinion |
|
#6
|
|||
|
|||
|
RE: This should make things interesting
hmm, interesting. Got your php setup to show all E_NOTICES as well?
Well. If you looked, you would see a switch (ord($variable)) and case 33: . That's just way unstable imho, what happens if suddenly the definition changes? no foresight... Can't remember the rest.. Also, sharing code isn't a big deal if no one else copy & pastes it. the challenge is "file-format" to a degree.. posting a function that reads it is a kindof anticlimax doncha' think? |
|
#7
|
|||
|
|||
|
RE: This should make things interesting
Cmd: Not to be a troll or anything, but i doubt the ASCII definition of a newline is gonna change anytime soon ;). One thing i noticed is that he didnt take into account the possibilty of a user using win32 style text files ie. rn. Matt: should we worry about this, or will all the test files that get sent to our scripts be using the just a newline? Also, a note for the next contest... lets work with some binary files, these text files are getting boring. Maybe like some sort of simple database dbm style index file or something... that would be inetersting.
p.s. if anyone is interested, i managed to get the code before it was removed, so i could send it to you. I timed it and it was slower than the code i had originally written to parse the file. |
|
#8
|
|||
|
|||
|
RE: This should make things interesting
heh, but say you want to handle another character as a newline instead of newline (ie. "!")? I just tend to think "scalable and flexible", ie: the style of newline (rn, n or r) should be handled automatically in a well written function..
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > This should make things interesting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|