I've been following this thread with interest. To a certain point I think you're going about this in the wrong way. Programming is about problem solving, it's about syntax, that's the easy part. I good problem solver can use a book to lean the syntax to code a solved problem. Someone who aces a programming test because they have memorized a manual is non necessarily a good problem solver.
Try this on a candidate. Write an algorithm (not language specific code) to do the following: Players is a variable holding the number of players in a single elimination tournament. If you loose a match, you're out. The winner is determined when there is no one left to play. Output the value of Matches which is a variable containing the number of matches required in the tournament. On problem that is non-trivial will have multiple solutions, we want the most efficient. Resist the temptation to express the algorithm in PHP or any other programming language. The algorithm is like: 1. Input Players as the number of players in a single elimination tournament. ... ... X. Output Matches which is the number of matches required in a single elimination tournament containing N (Players) players Hire any candidates who come up with an elegant solution. Then teach them any syntactic structures they don't know. BTW, I personally think swapping the contents of two variables without a temporary variables proves nothing. It's a trick we learned if we studied assembly language. Tricks do not a good programmer make. When is the last time you used an XOR is a real program? Urb Dr. Urban A. LeJeune, President E-Government.com 800-204-9545 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
