E
E
enchikiben2011-12-15 14:55:54
PHP
enchikiben, 2011-12-15 14:55:54

Running a test task?

Good afternoon!
Passing the interview, I completed the test task, I was refused without explanation. Dear users, I ask for things help, look and constructively comment on what I did wrong. And then my soul hurts, am I really that bad ...
Task
WEB Developer in PHP
"Purchasing in an online store"
Task: It is
necessary to develop an Internet store. The site must allow:

  1. Browse products by category
  2. Form a shopping cart
  3. Edit cart: change quantity, remove or add items
  4. Make an order
  5. Log in with administrator rights
  6. Administrator can:
    1. Create\delete\edit product groups
    2. Create\delete\edit products
    3. view orders


Requirements:
  1. The site must use a relational database;
  2. All files with site logic must be placed in the inc folder
  3. There is 1 index.php file at the root of the site, which, depending on the request parameters, displays this or that content. Index.php generates the design of the site, is responsible for authorization and initializes work with the database;
  4. There should be no repetition of code;

Wishes:
  1. Object-oriented approach;
  2. Valid XHTML layout;
  3. CSS styles;
  4. Validation of user-entered values ​​on the client and server;
  5. Separation of logic and layout;
  6. Using JavaScript and AJAX technology.

Based on the results of the work performed, you must provide:
  1. Site source codes;
  2. Data for authorization with administrator rights;
  3. A link to a website posted on the Internet or a Denwer or AppServer archive configured on port 81 (a link like localhost :81/shop)

Criteria for evaluating the task:
First of all, the result is evaluated: the functionality and convenience of the site. This is followed by the study of the database, queries and source codes of the program. Each completed wish adds points to the final grade. Accuracy in the design and documentation of the code, the use of programming templates and any other "chips" bring you extra points.
source here
and posted work.enchikiben.ru
Thank you.

Answer the question

In order to leave comments, you need to log in

15 answer(s)
S
sankir, 2011-12-15
@sankir

Of course, I can be wrong or not know something about the usual ways to check candidates, but IMHO you just wrote an Internet store for free to someone.

T
TheHorse, 2011-12-15
@TheHorse

I read superficially. A bunch of small formatting bugs, sometimes a little strange name of functions and variables.
But you obviously got the job done. I was pleased with the inner join, although I do not like normalized relational ones ... Protection against SQL-inject is made. In general, everything is fine.
Conclusion: those who interviewed you are assholes, infa 99%. But it seems like another collision could be for using other people's sources.

V
Vas3K, 2011-12-15
@Vas3K

I remember a few years ago I was also approached, let's call him Gennady, who "recruited cool freelancers in a new cool studio" and, apparently, in order for me to prove my "coolness", sent a task (more like a real TK), according to which it was necessary to implement a full-fledged a real estate guide with all the functionality, in the letter attaching a link to a half-gigabyte dump of either CSV or SQL databases. Moreover, I had to write it immediately and in 12 hours, every 3 hours reporting to him personally on the work done.
When Gennady was refused, he was very offended, calling me all sorts of words, such as “incompetent”, “lazy”, “missing his chance”, etc. on which we said goodbye.
Just forget it and never again get fooled by “test tasks” of more than 100 lines, and even more so, including the development of a finished product. In a couple of years, you will tell your descendants the same way :) Do you
want to test my skill as a programmer? 100-200 lines of a good assignment is enough for this.
Want to just look at the quality of my code and my skills as a designer of large systems? Welcome to my github, where there are a couple of my projects, or ask to "sketch on a piece of paper" something else.
For some reason, at any interview in any large company, they ask either to throw in the simplest implementation, or they give them a small piece to write at home, and all these Gennady rogues are immediately given an “Online store” or “Real Estate Directory” with full functionality.

S
skvot, 2011-12-15
@skvot

It is quite similar to the standard scammer.
I glanced at the code - comments in the style of "captain of evidence" do not need to be used. "The use of comments should make up for your failure in the code" (c) Robert Martin, clean code.
// клас ядра
class Core {

// получаем категории
$this->categories = Categories::get_categories();

S
Sergey Beresnev, 2011-12-15
@sectus

I explain. This test task perfectly showed your competence.
Knowledge of OOP at PHP4 level; there is no knowledge about prepared queries, moreover, the use of some obsolete library even for PHP4, which uses mysql_escape_string for escaping; lack of knowledge about patterns (design patterns); there is no knowledge of what "Valid XHTML layout" is; lack of knowledge about modern frameworks (this follows from the previous paragraphs); could not separate the presentation and the logic of work (directly in the request templates); ignorance of phpDoc or something similar. Most likely, you don’t know how tests are written, you don’t know how to work in a version control system, etc. If I'm wrong about something, please point it out.
If the office is large, then it is somewhat strange to think that this is not a test task, but a specific task that will be used somewhere.

I
igolovin, 2011-12-15
@igolovin

It also seems to me that you were divorced, and you made a store for free. Your solution is simple - sell it to someone :)

S
Sergey Beresnev, 2011-12-15
@sectus

To be honest, some nonsense is written there.

I
int03e, 2011-12-15
@int03e

I do not rummage in php, but:
1. Comments in Russian - wtf? There are unreadable bugs in gvim
2. As I understand it, third-party development is used to work with the database? Maybe it was worth writing everything yourself, otherwise it would have been easier to take Yii or something like that ))

M
markoffko, 2011-12-15
@markoffko

Yes, there is no MVC (!). Joke. Pretty good for a test case. Most likely, the company needed a more skillful programmer. Lots of weird constructions like !isset($_POST['name_categori']) || empty($_POST['name_categori']).
If it's not a secret, how much money did they promise?

W
WildZero, 2011-12-15
@WildZero

Did you happen to have an interview in Perm? I just stumbled across something like this about 2 years ago.

R
rakot, 2011-12-15
@rakot

Looked at the code.
For a test task, more than good, I join everyone, you just got thrown.
If you need code criticism:
1. $core = new Core( $db ); It's bad practice to shove everything into the constructor. More aesthetic Core( $db )->run();
2. sizeof, very unusual for calculating the size of an array, use count.
3. The cart is written terribly, a solid mixture of layout, PHP and SQL. SQL in views is very bad form.
4. Constantly drag the $db variable by the tail (pass it to the constructor), you need to get rid of this.
5. var $db; are we still in PHP4?
I can still find fault with the code, but I don’t see the point, the shortcomings are small. Anyone who does not allow these shortcomings would send a company far and wide with such a voluminous test task.

D
Dmitry, 2011-12-16
@Tomasina

maybe it's worth calling this office publicly so that other Permians are aware of it?

E
Evgeny Elizarov, 2011-12-16
@KorP

I didn’t get into the code, it’s not worth it in the morning :)
But the store looked:
1. why can I add a product to the cart without specifying the quantity? (well, you can add it, but then why is there an empty value in the basket and it is not able to calculate the amount.
) … sorry, what did you do with it? this is great :)
1
...
21321

S
sankir, 2011-12-16
@sankir

Hmm, and the store is changing gradually.
I can still find fault: where is my order history? Why can't I see the status of the order, and is it saved at all? Maybe he's going nowhere. You do not have a mandatory registration, but at least give me an order number and the ability to view the order by number, at least a list of goods and status, without contact information.

C
CKOPOBAPKuH, 2011-12-25
@CKOPOBAPKuH

The comments scold that it is not MVC, that OOP is bad, there are no prepared queries and the site design is bad. All this is true, but:
In this task, obviously, it is assumed that a person must be a good designer, layout designer and programmer at the same time. At the same time, it will take several days to make all this functionality with well-maintained code, division into layers, with normal OOP.
Send, in general, in the ass of such employers.
And after that, listen to advice about the code. Advice, by the way, in itself is correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question