Two tasks for interviewing developers

    Before, I often had to interview people for various positions, most of them were application and database developers. This process is quite tedious, because Programmers are brave, creative, curious and purposeful people.
    There were all kinds of questions in my practice. In the article, I will single out three main types and tell you what I ended up with and why.

    Tricky Tasks


    You are standing on a steep mountain, the height of which is 100 meters. You have a rope 80 meters long. On a rock at an altitude of about 50 meters from the ground there is a ledge on which you can stand and gain a foothold. How to go down?

    There were people who already knew the answer, but pretended to be a deeply thoughtful person, and then, lo and behold! gave rise to a solution. Many honestly did not cope with the task. But it was still a kind of introductory task.

    Then I revised my eyes and refused such tasks. After all, the main thing for me was to find an intelligent programmer who would have to solve completely different problems in the future, namely, to program, and most of the time would not involve finding mega cool solutions, and if you suddenly need some kind of brainstorming, you can get together other colleagues and measure their ingenuity.

    Knowledge of technology


    The second type of questions I asked was related to knowledge of tools, mechanisms, technologies, for example:

    1. Tell us what encapsulation is.
    2. How in Java to make a function call from a dll library written in C ++.
    3. What are the disadvantages of MS SQL Server and MySQL? What is their fundamental difference?

    Over time, I refused these questions. In my opinion, not every programmer should know all this perfectly. Yes, encapsulation is an important OOP tool, but if a programmer wrote all his life without OOP, then what, is it bad now? He just did not need. But he can immediately write an effective string compression algorithm or some driver. I generally am silent about holivars between different DBMSs, you can always open documentation, forums, and read what and how. The same is about mechanisms, it is not necessary to know what is coming from and how, it is necessary to be able to “find a solution” to this issue. If you have never called a function from a dll, this is not a reason not to take you and does not characterize you as sensible or stupid. See how others do it and you will succeed.

    Practical tasks


    In the end, I had only specific tasks: here is the time for you, here is the toolkit, here is the task, you need to do it, and then we will discuss how you implemented it, why, what are the advantages of your decision, how quickly it works, what has not been done.

    In my opinion, this is the most correct way to verify a person, i.e. is he ready to cope with a practically useful task in close to real conditions. The task I gave everyone the same and already solved.

    Firstly, to watch how different people behave in the same conditions. Secondly, so that there are no complaints, they say, I did something for you there, you didn’t take me, and then you used my experience at home. For this, I showed a ready-made working application in which this function was already implemented. Everything is fair and transparent.

    And finally, if you are interested in trying your hand, as if you suddenly got to those very interviews, here are two tasks.

    First task

    There are two tables of Russian words_1 and words_2 with fields (word as VARCHAR, ref as INT), where word is a word, ref is a link (numeric code) to some other (not important) table, where all the definitions of these words are listed. In each table, all words are unique (without repetitions). In the first table there are some words that are not in the second, and vice versa, in the second table there are some words that are not in the first, but most of the words in both tables are the same. You need to get a single table with all the words and their corresponding links.

    Initial conditions / difficulties:

    1. for the same words, the links in different tables may be different, because dictionaries were downloaded from different places;
    2. the number of words in each table is hundreds of thousands, i.e. the forehead comparison algorithm does not work with everyone, because 100 thousand x 100 thousand will give at least 10 billion comparisons;
    3. if you are a database developer, then the task needs to be done in sql.

    Original tables:

    words_1
    lampshade - 1
    movie theater - 2
    airplane - 3
    people - 4

    words_2
    movie theater - 15
    music - 16
    airplane - 17

    Resulting table based on the first table:

    all_words_1
    lampshade - 1
    movie theater - 2
    music - 16
    airplane - 3
    people - 4

    Resulting table based on the second table:

    all_words_2
    lampshade - 1
    movie theater - 15
    music - 16
    plane - 17
    people - 4

    Second task

    There is a defs table with fields (def as TEXT, ref as INT), where def is the definition of the word, ref is the link (numeric code) to the word itself from some other table (it does not matter). It is necessary for each word from the dictionary to remove all partial duplication of definitions, leaving only the most complete non-repeating ones.

    Initial conditions / difficulties:

    1. definitions can be quite long, several thousand characters;
    2. the number of records in the table is several million, if somehow stupidly “on the forehead” to compare full-text records with each other, then the server will bend;
    3. if you are a database developer, then the task needs to be done in sql.

    Source table:

    refs
    animal with big ears - 1
    animal with big ears and a long nose - 1
    large animal with a long nose - 1
    small fluffy animal - 2
    small fluffy animal that gnaws nuts - 2

    (Note, 1 is an elephant, 2 - this is a squirrel.)

    Resulting table:

    clear_refs
    animal with big ears and a long nose - 1
    large animal with a long nose - 1
    small fluffy animal that gnaws nuts - 2

    Something like this. And remember, you have an hour or two of time, as a result, the interviewer wants to see first of all not the text of your program, but finished tables with the desired result.

    Also popular now: