Every developer from time to time looking for work and passes interviews. Someone wants to try something new, get a better salary, or get into a company I've always dreamed of. This event did not bypass me.
Having visited many companies, I decided to share my observations on how the recruitment of specialists most often takes place, including a technical interview and just communication with potential colleagues. And after to offer their ideas for improving the generally accepted process.
To end up with the interview did not look to the applicant as: ')
The article will first of all be useful to anyone who is looking for work in the iOS development environment or in any way connected with the recruitment of IT specialists: conducts technical interviews or any other.
And welcome under cat.
Introduction
I want to note that I consider myself a man of result. Any actions, including self-education, should be aimed at achieving a specific goal or solving a specific task. When I had the opportunity to conduct an interview in my company, I always tried to ask something useful in practice, to understand how the applicant would behave in “hostilities”, what he would do to implement this or that module, or how he would fight a certain bug.
So, I was amazed that of more than a dozen quite large organizations I visited, with offices in the center, voluminous secretaries, curling and other attributes of a pathetic office, absolutely everyone only asks for a recipe.
Unrefined 100% theory without any connection with practice. No one asked how I ponder, approach the tasks, how I would catch non-standard departures, look for the causes of poor performance in the application and solve other everyday problems that the developer faces every day. Everyone was interested only in the difference between the ARC and the MRC, and the various dregs never once needed in life. For example: how the structure of the xib file differs from the structure of the storyboard file. It is the file. Such a useful thing. Every day I pick in xml.
This does not mean that I was sent everywhere and I came to whine on Habr. In most cases, everything was positive, except with a few exceptions. And if somewhere I came across a frank gap in knowledge, then for the next interview he was already successfully mastered. And sometimes even a simple conversation with future management did not compensate too well (in my opinion) for a technical interview.
This article could become an ordinary whining about the imperfections of the world, but I decided to make maximum use of it and make a list of questions on which one can realistically assess the real usefulness of a candidate, and not just the level of his theoretical knowledge. As for any topic of interest you can formulate a practical task.
Questions
Let me give you an example of questions that, in my opinion, reveal a bunch of developer skills better than just head on: "How does memory management work in iOS?". It is important not only to solve the problem straight off, but also to be able to find / come up with this solution if you do not know how to do it.
How would you make such a screen? What bottlenecks are there and how would you solve them?
Incoming information: There is a Product object, which consists of some general information, which is located in the header, and an array of Parameters. Each parameter is a string name and value fields. Value is the most common line, where each value is separated by a vertical bar from the other. For example: “VM 505 | BWM ZIGZAG 3 | SOLID REKT 101 ". Each value must be on a new line as in OEM Specifications.
Note: The dividing line between name and value comes to the first word. If the strip is made as a normal twist, and the value field as a label, then the strip will end at the longest word, and not at the first.
Level : middle and above.
Decision
The first is to hear the thoughts of the developer. Most people stick to this task and lose sight of many details.
In my opinion, the best option is to ask the designer to remake. If you solve the problem technically, then I would draw a line from the tail of one label to the tail of another. To the line just went for the label with value. Then we add an attribute with background color to the label. As a result, the background color will paint the view below it.
Another option is to sort the words by length and put the longest one up, and align the line by the beginning of the label value.
I am usually not a supporter of tasks in the style: "What is the problem in the code in the picture?", But too often misunderstandings arise in the principles of the timer and ranlups, which result in extremely unpleasant and subtle bugs.
The question can be reformulated into a problem: 'We need to make a repeatable timer, which is called every minute in the background. The accuracy accuracy of ticks is not important, rather a certain periodicity. How to do it?'
Level : junior and higher.
Decision
Nothing will happen. Runlup is not cocked, as they say. And there will be a small memory leak, but this is for gourmets.
If you need to make a timer in the background, then you should choose a stream with a running runner. Or use the ready-made solution for GCD.
Received task. You need to write an application, the color scheme of which is configured on the server. That is, the application receives a config which contains a set of colors, the degree of rounding of icons, and so on. How best to make such an application? What will we use? What will be the limitations of a particular solution?
Level : junior / middle and higher.
Pay attention: God forbid the candidate keep silent about UIAppearance. Just cc *** mi rags drive this, especially if it is the middle and beyond. Here you can ask about the base classes Obj-C as a small digression to the theory.
I note that the candidate does not have to tell in detail about the work of UIAppearance. He could never use it, but what it is to know.
Decision
Create a color scheme class and configure all UI elements via UIAppearance. For custom views, we also implement this protocol. There is a great article on this.
How to make the application can update itself without the participation of the AppStore? Add new screens and logic to them, for example. What are the limitations of such a solution? Which one is better for this? When can there be a real need for this mechanism?
Level : senior.
Decision
Tasks for senior go without a solution. Practice your experience, gentlemen.
There is an application with a table. In the process of scrolling lightly slow down periodically. Testers did not reveal any obvious patterns, but the problem occurs regularly. Here and there an unpleasant log occurs. How to catch him? What to pay attention to?
Level : middle and above.
Decision
The reason for inhibition may be:
Overloaded main thread.
Institutional cells in the process. If your table consists of more than one type of cells, then if there is no one in the queue necessary, it will first be created, it requires resources. Especially when unzipping from nib. At one time, even a libu wrote, which allows all the cells to be created in advance, so that there are no jumps during scrolling.
Everything related to drawing, counting heights and reusable resources. There is a terrific study that closes this item 100%.
Question by Realm. There is an application with the same chat (you can use any other example), where the table has some separators in the form of a date or any other variant. How is the most productive to make the division into sections? What are the options?
Level : middle and above.
Question on CoreData. There is an application with the same chat. Messages can come from the socket in one of the background threads. It is necessary that the incoming message be added to the table. How are we going to do? What are the options? What difficulties can you encounter?
Level : junior / middle and higher.
There is a screen, the filling of which depends on several requests to the server. That is, the content should be shown only when they are all executed. For example, the VKontakte page. Until the user info is loaded, messages from the wall, the first stream of photos, the progress indicator should turn. How are we going to build logic?
Level : junior and higher. Pay attention: I want especially to emphasize the need to understand the gcd groups and synchronize tasks in the Operation Queue. It would be great if the candidate still tells you what the difference is in this or that decision.
Decision
Dispatch group, synchronized operations.
There was a problem. A developer from a nearby team came running to you and asked for help: the application began to crash in the release, but at the same time it works normally in debug. How are we going to catch a mistake? What could it be?
Level : middle and above.
Note: it is important that the candidate is focused on the result. On the fact that the problem is corrected, and not on the search for the cause. First of all, a person should ask: “Okay, Google, and what, in fact, has changed since the moment when nothing else crashed?”, And only then begin the exciting debugging process.
Why it is so important: there are people of the process, but there is a result. The process developers simply spend the company's money, which is especially noticeable when fishing for non-trivial bugs. They (the developers) will enjoy their own competence, exposing a sea of ​​breakpoints, reading articles about crashes and compiler errors, plunging into the profiler headlong for the whole day, when it was enough just to remove the dubious piece of code. This does not mean that it is not necessary to use a profiler and breakpoints. Just need to understand the purpose for which it is done.
Decision
First you need to calculate the point of departure. Often the doubtful code lies on the surface, it is only necessary to narrow the search area. If debugging is required, then we set the whole module optimization + fast and check the departure (for Swift). With a probability of 90% is reproduced in the debug. Advanced debugging to describe it makes no sense. You can also try to do only the whole module optimization.
The application has a module that performs a large number of operations in a long cycle. At some point, a crash occurs, the application simply closes. Even when they left only one output line, the problem persists. The code for the example is given; in reality, the operation is much more complicated and richer, the departure is faster:
funcapplication(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { for index in0...1000000 { let string = NSString(format: "test + %d", index) print(string) } returntrue }
What could it be? How to cure it?
Level : middle and above.
Note: understanding the principles of memory management. At least in general. I would say that the situation from the question is extremely rare and the task is to be used only for very distorted signiers, all others need to know about the presence of retain / release / retain count and retain circle.
Decision
The point is autoreleasepool. It is treated by creating your own pool or using non-autoreleased objects.
A bit of classics. You run the wizard's Code Review, which writes a calendar class for your application, and you find the following piece of code:
Testers found a bug that the fluffs in the application come only on iOS 10, but not on iOS 9. How do we fix it? What could be the problem?
Another problem from the same series: the pushes come when you install the application directly on the device, but not from Testflight / Crashlytics / HockeyApp. How to live with it?
Pay attention: if the applicant cannot immediately answer what the specific problem is, then we can give him a laptop and suggest to find a solution. If several browsers are installed on the laptop at once, that's fine. Understand what search engine people prefer to look for, in Russian or English, how to formulate queries and so on.
Level : middle and above.
Decision
Perhaps notifications are sent only with a development certificate. More attention should be paid to how the applicant will seek a solution.
There is a one-dimensional string array, the data from which are output to the table. In this case, the array can change from somewhere outside. How to make the data in the table updated as the array changes? For example, if an object is added to an array, then a new row should appear in the table.
Level : junior and higher.
Decision
KVO . If you want a completely clean solution, you can still add some methods.
You make an authorization screen for Skype in the storyboard using autolayout. It happened. Everything is simple - a square logo, under it a text field and a button.
You are cool, you did everything, but here the designer declares that with landscape orientation the logo should be on the right, not on the top. How are we going to do?
You need to make a scrollView with two pictures of a certain size under each other and indents from the edge of the screen on all sides at 30px. Draw on a piece of paper which will be construins.
Note: Does the candidate understand how the content size for the scrollView is determined? And if you remember about the intsets, it's generally wonderful. Maybe it will offer to put the content scroll view on its entire size, without indents, and make the distance from the edges of the screen through margins. Level : junior and higher.
Questions are given as an example. If it will be interesting, I will make more.
UPD1: added solutions for most issues. If it is absent, then the task is easily googled or solved independently.
My message is the following - use practical tasks. If you do not find suitable, then make them yourself. You do not hire an encyclopedia, but a specialist who has to do business, and not just know everything. And even more so do not keep in mind what can be found in Google in seconds. The main thing is to understand what to look for.
As Mr. Sherlock Holmes said, only necessary tools should be in my attic.
Invisible evil
But dubious questions are not the only problem. There is another factor that can scare away even a successful candidate. It is disrespectful, arrogant or arrogant attitude. And I'm not talking about hr girls or important leaders. And about future colleagues.
In many places where I was interviewed, a technical interview takes place without the presence of an observer from hr or the manual. What is generally natural, why should a person who does not understand a word in terminology, lose an hour in a boring question-answer conversation?
But why? Many developers see interviewing as an opportunity to assert themselves. And the test of knowledge turns into the most ordinary miracle of the humiliation of the candidate, adding to the poor fellow stress, regardless of qualifications. Even if he successfully answers any questions. I have seen this kind of behavior in many places, both with my colleagues and during interviews, where I was interviewed.
On the subject of bathed noses there is a wonderful picture of xkcd:
But all this does not mean at all that only cranks are working on the development. Technical experts simply nobody teaches to negotiate, conduct interviews and build a respectful dialogue. And it is not uncommon for people to be simply closed, and sometimes even downtrodden. The management throws them into the embrasures with the words: "Check the level of this guy, he will suit us or not."
However, there are no standards, samples and requirements. Everyone conducts an interview to the best of their understanding and attitude with the complete absence of feedback. After all, who can give this feedback? Leadership / HR and candidates. The first ones do not participate in the process and cannot say anything, and the candidates certainly don’t care for it. If they were accepted, then all is well. If not, then the sense to continue to talk?
With all of these, I want to say both to companies and to each individual developer colleague: pay attention not only to how you conduct the interview, but also the manner in which you communicate with your subordinates and colleagues. Carcinogenic attitudes can manifest themselves not only to applicants. Ask someone to attend a couple of interviews and give you feedback. Ask the candidates themselves afterwards how everything went, whether it was uncomfortable or something else. It's like a Code Review, nothing shameful there. You will only become better as a specialist.
Respectful communication should be the standard in the technical field.
Conclusion
If this article changes the situation in at least one company, then my efforts were not in vain.
I tried to find the most useful questions. If there is a need for further replenishment of the list, then next time I will devote a separate publication to this.
It would be great if you share your questions and tasks that you give at the interview to check the specialists. After all, five minutes is enough for someone to understand the level, and someone marinates for an hour and a half each.
And, as they say, respect each other. Regardless of the depth of your knowledge of the material - this is not a reason to look down on others. Amen.