📜 ⬆️ ⬇️

"Correct" test task for the applicant-programmer

Being engaged in the selection of candidates for a programmer’s job, I encountered a problem - to select a good test task. The goal is to see whether the programmer is in front of me or a person who knows the framework / language / technology well. Let me explain - a programmer is a person who can solve a non-trivial problem. Making a website blog, even e-commerce is now a trivial problem, any junior is capable of it. Natural-born programmer thinks differently.

under the cut sample test


')
It sounds like this:

Please develop a function / class for "mixing" sentences.

Symbol | is a word separator. For example:

"{Please | Simply} make this {amazing | cool | simple} test sentence {change {quickly | instantly} randomly | change every time}."

The output should be:

Please make this cool test offer change every time.
or
Just make this amazing test sentence change instantly randomly.

I will say right away that I have seen enough a lot, right up to the hardcode array of all possible options with the choice of one random, so the task worked. However, "advanced" comrades find a solution on the Internet and copy-paste. There is no benefit from this to anyone. If someone once performed an interesting non-trivial task - I will be very grateful. (either in komenty or in the LAN).

Source: https://habr.com/ru/post/87754/


All Articles