The [Challenge] Index
Moderator: General Moderators
Re: The [Challenge] Index
Hello,
According to me everyone should have to take challenge in life. If you take challenge then you get confidence in doing work and after that you will get success.
Thanks
Clive Rush
According to me everyone should have to take challenge in life. If you take challenge then you get confidence in doing work and after that you will get success.
Thanks
Clive Rush
- Grizzzzzzzzzz
- Forum Contributor
- Posts: 125
- Joined: Wed Sep 02, 2009 8:51 am
Re: The [Challenge] Index
Seriously? If you're not going to go for readability, efficiency or practicality, what is the value? Solving "arbitrary problems" in PHP is very nearly worthless; if it's not a web-based scenario, using PHP just provides a massive handicap.onion2k wrote:I don't really think that's a good idea. The point of coding challenges is to find interesting and inventive solutions to arbitrary problems - it's very likely those solutions won't necessarily be the best ones from a readability, efficiency or practical point of view.phu wrote:How about something practical?
Yeah, you can do all the fun string manipulation you want, reimplement A*, or tackle any other academic programming problem you can find on Wikipedia, but if you aren't learning anything with a practical web application, something more efficient than you might otherwise do, something more readable than the typical PHP way of doing it, you're not helping yourself or anyone else.
I guess if it's just an exercise in wasting time, that's your call, but it seems pretty inane to actively avoid doing anything useful.
And if you're afraid of people using your security-hole-ridden code... well, you can post a disclaimer and make it their problem. You could also make part of the exercise using good input sanitization practices. Besides, if you intend for people to post unreadable, inefficient and impractical code, you're already doing plenty of damage to anyone who might read it without understanding that the methods being used are just plain poor.
Re: The [Challenge] Index
Generally, the simplest solution is the correct one. I don't think it's a stretch to say that the simplest solution would also be the most readable, efficient or practical. Or at least close to it.phu wrote:Seriously? If you're not going to go for readability, efficiency or practicality, what is the value? Solving "arbitrary problems" in PHP is very nearly worthless;
PHP is only one level above C, which is only one level above ASM. So I wouldn't consider that a massive handicap. Visual basic on the other hand...phu wrote:if it's not a web-based scenario, using PHP just provides a massive handicap.
This is simply not true. Finding unique solutions to solving problems, without any constraints allows for very creative use of the language. Various different and creative methods for solving similar problems can be very educational for programmers who may not realize that X can even be done.phu wrote:Yeah, you can do all the fun string manipulation you want, reimplement A*, or tackle any other academic programming problem you can find on Wikipedia, but if you aren't learning anything with a practical web application, something more efficient than you might otherwise do, something more readable than the typical PHP way of doing it, you're not helping yourself or anyone else.
I don't believe we are "actively avoiding doing anything useful". You are welcome to post your own challenge meeting your criteria. We certainly won't stop you.phu wrote:I guess if it's just an exercise in wasting time, that's your call, but it seems pretty inane to actively avoid doing anything useful.
That is cynical.phu wrote:And if you're afraid of people using your security-hole-ridden code...
I don't remember seeing any unreadable, inefficient or impractical code being posted as a result of any challenges. I would argue that code which solves the intended problem is not impractical.phu wrote:well, you can post a disclaimer and make it their problem. You could also make part of the exercise using good input sanitization practices. Besides, if you intend for people to post unreadable, inefficient and impractical code, you're already doing plenty of damage to anyone who might read it without understanding that the methods being used are just plain poor.
I think you are viewing this from the perspective that the challenges need to be "taken more seriously". If this was the case, I would doubt anyone would participate, so good luck with that.
Re: The [Challenge] Index
That's a gross oversimplification. The simplest possible solution to a real-world problem will often miss edge cases and lack expandability. In any case, the simplicity of a solution has absolutely no direct correlation to its correctness.Benjamin wrote:Generally, the simplest solution is the correct one. I don't think it's a stretch to say that the simplest solution would also be the most readable, efficient or practical. Or at least close to it.
That's extremely misleading, and the assertion is (unfortunately) very much incorrect. PHP is implemented in C, yes; however, it does not expose nearly all of the constructs you'd have at your disposal were you writing C, nor does it come close to touching the power of other dynamic languages like Ruby and Python. Metaclasses, inner classes, closures, higher-order functions... these are things that can be exceptionally useful that don't (and aren't likely to ever) exist in PHP.Benjamin wrote:PHP is only one level above C, which is only one level above ASM. So I wouldn't consider that a massive handicap.
It's not nearly as useful as that in a general programming sense. PHP has its uses, but there are very good reasons you'll never see it in a serious computer science program. This is why I suggested relevant challenges: They're far more useful for people to whom PHP is programming as well as diverse programmers who are currently using PHP.Benjamin wrote:This is simply not true. Finding unique solutions to solving problems, without any constraints allows for very creative use of the language. Various different and creative methods for solving similar problems can be very educational for programmers who may not realize that X can even be done.
That's exactly what the post I was replying said should avoid being done. I did, in fact, post a challenge idea that I consider practical, interesting, and useful in the context of PHP web programming.Benjamin wrote:I don't believe we are "actively avoiding doing anything useful". You are welcome to post your own challenge meeting your criteria. We certainly won't stop you.
Once again... I was directly addressing the concerns of the poster I replied to. In his own words. I even made suggestions to avoid that situation; call it cynical if you want, but at least keep it in context, as it's also potentially helpful.Benjamin wrote:That is cynical.phu wrote:And if you're afraid of people using your security-hole-ridden code...
It hardly matters if the problem at hand doesn't address anything the language would reasonably be used for. Learning to implement something in PHP that you wouldn't use in that language does not necessarily help you implement it in any other language, where the available libraries and constructs are likely to be vastly different.Benjamin wrote:I don't remember seeing any unreadable, inefficient or impractical code being posted as a result of any challenges. I would argue that code which solves the intended problem is not impractical.
That is presumptuous (and, hey, a little bit cynical).Benjamin wrote:I think you are viewing this from the perspective that the challenges need to be "taken more seriously". If this was the case, I would doubt anyone would participate, so good luck with that.
My suggestion was meant to be taken at face value: A challenge in PHP could absolutely be a good thing, but is not nearly as helpful to the people doing it or the people reading about it if it's not oriented towards a problem that it'd be a rational choice for.
I stopped in asking for help... I kind of got it (which is to say I determined I couldn't do what I wanted to in PHP), so I hit a bunch of threads here to help other people out, and tried suggesting something to help the challenges improve their participants' practical skills (since that seems like a pretty reasonable objective given the nature of these forums).
Anyway, I'm not gonna harp on it any more. It's the difference between idle curiosity and active self-improvement.
Re: The [Challenge] Index
Create a post outlining the requirements and then post a link to it here. I think URL segments would be much more efficient than pattern matching, because arrays could be used in combination with isset, which is extremely fast.phu wrote:Implement regex-based URL routing: Given a URL, passed by the web server to your front controller, find the most efficient way to match said arbitrary URL against an arbitrarily large list of URL regex's, with an emphasis on avoiding the overhead of repeated preg_match (or similar) calls.
Re: The [Challenge] Index
I really wonder how you would deal with strict data types of varying values. That's part of the reason I suggested this in the first place.Benjamin wrote:Create a post outlining the requirements and then post a link to it here. I think URL segments would be much more efficient than pattern matching, because arrays could be used in combination with isset, which is extremely fast.
I have tried to better define it as requested:
viewtopic.php?f=1&t=115687
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: The [Challenge] Index
It would be nice to have a challenge every week or so: viewtopic.php?f=1&t=118794
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: The [Challenge] Index
It would be better to have a system of challenges.
You can paste the code, the system checks if it is right, then the user gains points
.
You can paste the code, the system checks if it is right, then the user gains points
Re: The [Challenge] Index
Facebook has a really good section for that - although it is quite tough. They use it for recruitment.
http://www.facebook.com/careers/puzzles.php
http://www.facebook.com/careers/puzzles.php
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: The [Challenge] Index
Reverse Engineering - Deconstruct obscured code.
Re: The [Challenge] Index
http://ai-contest.com/index.php
While I'm not suggesting to use this as a challenge I like the scheme of challenging - create an algorithm that plays against another algorithm
Definitely there should be a playback (video or something like this)
Playing against other members of the forum and winning the 1st prize is the biggest challenge ever
Now we have to think of games that could be used for such a challenge ...
While I'm not suggesting to use this as a challenge I like the scheme of challenging - create an algorithm that plays against another algorithm
Playing against other members of the forum and winning the 1st prize is the biggest challenge ever
Now we have to think of games that could be used for such a challenge ...
There are 10 types of people in this world, those who understand binary and those who don't
Re: The [Challenge] Index
I hope this falls within the remit of this board and forum topic.
It concerns finding a simple and tidy solution to problem that I'm trying to solve right now, but is very general and would prove useful to many in future.
To attempt this task you are likely to need knowledge of Ajax, javascript, php & maybe JQuery?
I need to create a form with ajax validation to accept an email address and password, pretty standard, BUT then once validation has been successful - reload a completely new page.
The problem I'm having is reloading the new page with a new URL. All code so far, keeps loading the new page where the form originally existed.
Target Audience - Ajax or JQuery experts?
It concerns finding a simple and tidy solution to problem that I'm trying to solve right now, but is very general and would prove useful to many in future.
To attempt this task you are likely to need knowledge of Ajax, javascript, php & maybe JQuery?
I need to create a form with ajax validation to accept an email address and password, pretty standard, BUT then once validation has been successful - reload a completely new page.
The problem I'm having is reloading the new page with a new URL. All code so far, keeps loading the new page where the form originally existed.
Target Audience - Ajax or JQuery experts?