Page 1 of 3

Challenge section

Posted: Mon Aug 24, 2009 4:57 am
by klevis miho
I think you should open a challenge section, where users will post exercises and other users will try to solve them. The challenges should be in three categories: beginner, intermediate, advanced.

Re: Challenge section

Posted: Mon Aug 24, 2009 5:39 am
by onion2k
I actually think this is a pretty good idea, but whether it needs a whole section of the forum to itself is questionable. Why not give it a try first by posting things in "PHP - Code" with the challenge as part of the subject line, like "[Challenge - Basic] Reversing a string" for example? If it's popular then we could make a new folder just for those threads.

Re: Challenge section

Posted: Mon Aug 24, 2009 6:50 am
by klevis miho
By section i mean a space, not a forum section :) .

I once took part on a c++ contest page where you wrote the code on a texfield and submited it.
It was an automatic system. Once you submited the code, after 5 seconds it displayed: good or wrong, and you would earn points.

It was a very challenging page :)

Re: Challenge section

Posted: Mon Aug 24, 2009 6:58 am
by jackpf
That sounds pretty cool imo. I'd be up for that :)

Re: Challenge section

Posted: Mon Aug 24, 2009 7:03 am
by klevis miho
So why don't you start a challenge right now? Maybe a beginner one, so i can participate too :D

Re: Challenge section

Posted: Mon Aug 24, 2009 7:33 am
by jackpf
Ok!!

There was a bit of this back when I was on phpfreaks.com.

There was a challenge made to create a rot_13 encryption function without using any PHP functions (constructs are OK). It's pretty easy...but it makes you think.

Anyway, here's the original function you have to mimic: http://uk.php.net/str_rot13. Remember, no predefined PHP functions!!!

I've already done this. If you want to cheat or check your version, mine is here: http://jackpf.co.uk/index.php?action=fo ... #Post:2232

Good luck! :D

Regards,
Jack.

Re: Challenge section

Posted: Mon Aug 24, 2009 7:33 am
by enid bala
Good Idea!

Re: Challenge section

Posted: Mon Aug 24, 2009 7:39 am
by klevis miho
Yeah but that challenge should be posted somewhere else :)

Re: Challenge section

Posted: Mon Aug 24, 2009 7:40 am
by enid bala
yeah right!

Re: Challenge section

Posted: Mon Aug 24, 2009 7:42 am
by jackpf
Well, there isn't a challenge section yet :P

Re: Challenge section

Posted: Mon Aug 24, 2009 7:45 am
by klevis miho
WE NEED A CHALLENGE SECTION :D

Re: Challenge section

Posted: Mon Aug 24, 2009 9:44 am
by onion2k
klevis miho wrote:I once took part on a c++ contest page where you wrote the code on a texfield and submited it.
It was an automatic system. Once you submited the code, after 5 seconds it displayed: good or wrong, and you would earn points.

It was a very challenging page :)
That would require evaluating user code on the server. That's not going to happen on here. It's a huge security risk with a language like PHP, even if you sandbox it properly. With C++ it's easier to lock down.

The idea of posting challenges in the PHP - Code folder is still valid though. I think you should do that.

Re: Challenge section

Posted: Mon Aug 24, 2009 9:55 am
by klevis miho
Can anyone begin a simple challenge?

Re: Challenge section

Posted: Mon Aug 24, 2009 10:04 am
by papa
jackpf wrote:Ok!!

There was a bit of this back when I was on phpfreaks.com.

There was a challenge made to create a rot_13 encryption function without using any PHP functions (constructs are OK). It's pretty easy...but it makes you think.

Anyway, here's the original function you have to mimic: http://uk.php.net/str_rot13. Remember, no predefined PHP functions!!!

I've already done this. If you want to cheat or check your version, mine is here: http://jackpf.co.uk/index.php?action=fo ... #Post:2232

Good luck! :D

Regards,
Jack.
You are using isset() :)

Re: Challenge section

Posted: Mon Aug 24, 2009 10:37 am
by klevis miho
I did a very simple one at PHP - Code. Have a look at it and give me feedbacks