Moderator: General Moderators
1. Non initialization of variables
2. No proper indentation
3. No proper spacing between expressions
[this is bad: for($i=0;$i<mysql_num_rows($result);$i++);
this is good: for ($i = 0; $i < mysql_num_rows($result); $++)]
4. No proper summarization of the purpose of a function or a member function in a class
5. Not mentioning the inputs and ouputs for any function
6. No proper opening and clocks of if blocks and while loops
7. Inconsistent naming of files
8. Inconsistent naming of functions [get_memberId() or getMemberId(),,,only one of these should be followed all through out the code]
9. Not using proper regular expressions to validate inputs
10. Not working out the logic before trying to implement any functionality
11. Inability to identify reusable components
12. Inability to model real world objects as classes
13. Providing proper public, protected and private access to member variables and member functions
14. Not providing accessor and mutators for getting and setting member variables.
15. Mutators, setters without Boolean return
16. Not using backticks in query
17. Not proper usage of joins in query
18. Not doing most of the processing work in the SQL query itself
19. Not checking for a resource before using a result from query
20. Not using isset() and empty() at appropriate places
21. Using GLOBALS
22. Using addslashes instead of mysql_real_escape_string()
23. Functions having more than 25 lines
24. Non usage of foreign keys
25. Non usage of indexes
26. Non usage of views at appropriate places (this cannot be blamed a lot since it's introduced from mysql 5)
27. Inability to aggregate relevant functions into classes or putting them in the same file as groups
28. Passing db connectivity information at every page instead of using a DB class
29. Using root user for mysql queries
30. Inability to use grant and revokes for mysql users
and many more....
3. No proper spacing between expressions
[this is bad: for($i=0;$i<mysql_num_rows($result);$i++);
this is good: for ($i = 0; $i < mysql_num_rows($result); $i++)]
$intTotalRows = mysql_num_rows($result);
for ($i = 0; $i < $intTotalRows; $i++) {
3. No proper spacing between expressions
[this is bad: for($i=0;$i<mysql_num_rows($result);$i++);
this is good: for ($i = 0; $i < mysql_num_rows($result); $++)]
if ($toBe || $notToBe) echo 'That is the question'; Pre-Employment Assessment Test: Online Skill and Assessment Testing
Our assessment products give you the information you need to make more effective hires in an easy to administer, easy to interpret format, so you can focus on the decisions, not the paperwork.
Download our comprehensive Assessment Test Catalog that includes:
* More than 600 assessments
* Assessment types such as Skills, Knowledge, Personality, and more
* Job types such as Administration, Call Center, Finance, Health, IT, and more
Hire Successful Employees
Experts estimate the cost of a bad hiring decision at 20% to 200% of a year's salary. With stakes this high, it's no wonder more and more companies are integrating Brainbench assessments (for example, skill tests) into their hiring processes.
For example, our assessment products help you:
* Raise sales performance 10% or more
* Reduce turnover by 20% or more
* Cut your time to hire 50% or more and with less cost
* Improve the quality of your hiring interviews
onion2k wrote:3. No proper spacing between expressions
[this is bad: for($i=0;$i<mysql_num_rows($result);$i++);
this is good: for ($i = 0; $i < mysql_num_rows($result); $i++)]
Even ignoring the fact you've called a variable $i which is completely meaningless, they're both very bad. mysql_num_rows() will be called on each iteration of the loop .. if there's 1000 records in $result then mysql_num_rows will be called 1000 times.$intTotalRows = mysql_num_rows($result);
for ($i = 0; $i < $intTotalRows; $i++) {
timvw wrote:- I'd ask them about general concepts: semaphore, mutex, recursion, ...
- Give them a couple of problems ask them which language/environment they'd choose. Pay attention to the motivation of their choices...
To test their deep knowlegde of php let them solve this brainteaser.
I certainly would agree with the concepts questions, I've found some of the good junior / mid-level coders I've worked with have a pretty good graps of syntax and baasic concepts but have a limited structured/literal thought process and don't think to use things like recursion. Or at least attempt to use it and can't get their head around it. A test that is purely code will not necessarily prove their grasp of concepts especially in the time that I'll have to adminster the test.timvw wrote:- I'd ask them about general concepts: semaphore, mutex, recursion, ...
- Give them a couple of problems ask them which language/environment they'd choose. Pay attention to the motivation of their choices...
Ooh that'd be a mean test in interview conditions.timvw wrote:To test their deep knowlegde of php let them solve this brainteaser.
Users browsing this forum: No registered users and 1 guest