Mobile development is a special kitchen, and it has its own nuances. That is why interviews with candidates in the development department for iOS should take place with a certain bias. Today, we’ll tell you how Acronis mobile developers are hired, and what funny things happen at interviews when a job seeker thinks that it’s enough to remember a few clever words, and then “sort things out”.

Let's start with the fact that just two years ago, mobile development for iOS acquired its unique taste, and this is due to the emergence of such a language as Swift. A new and modern language with a good paradigm, as well as a very strong development team, was immediately appreciated by the most enterprising developers. But its main advantage lies in the fact that it is on Swift that Apple will bet, and this is confirmed by the statements of Tim Cook, made to them publicly. Therefore, conducting an interview with the specifics of knowledge Swift seems logical step.
However, not all companies in general ask questions about Swift during interviews. Before joining Acronis, I myself had interviews at various companies, and almost no one asked about Swift. It seemed to me very strange, since, obviously, mobile development is moving in this direction.
Perhaps the problem is that many developers of the past generation are sitting on Objective-C and do not want to move away from familiar paradigms. But this language is behind modern development methods, Apple does not develop it, and it is also characterized by the presence of a large number of outdated rules, such as sending messages to nil objects and a dynamic type system. They are difficult to take into account when writing code and debugging. With the transition to Swift, many difficulties would have been avoided.
A few words about Swift
Apple introduced this language in 2014 as a counterweight to Objective-C. The newcomer found several advantages at once. For example, Swift does not require two files, language security is perfectly implemented, unique work with generics, a well-developed data type model and method dispatch. This language can be called more readable due to simplified and convenient syntax.
In the development process at Swift, the presence of a special environment for experiments called the Playground, which will be discussed below at the interviews, will help a lot.
Finally, the new language is promising because the development speed is significantly higher than in Objective-C and C ++. It makes it easier to fix bugs and, in general, development on Swift is cheaper, more efficient and more promising than on Objective-C. Therefore, consciously looking for professionals who have the experience of "communication" in this language.
Developers and simulators
Of course, you can hire a university graduate or even an intern, having trained him in the course of internship. But if you are looking for an expert who already has experience, the discrepancy between the stated experience and real knowledge looks very strange. For example, the applicant claims that he “developed three years on Swift,” and at the same time does not know the basics of the language. Probably, this is due to the desire to get a high-paying job, because today the demand for iOS developers is quite high. To weed out such candidates, we conduct specially thought-out interviews in which “experts” have already come across who:
- write the code exactly on YouTube video examples;
- copy the code from GitHub without any changes;
- write to a friend in Telegram and ask how to solve an elementary problem;
- “Go to the toilet” or “urgently call” after the conditions of the task are announced.
The fact of lack of competence can be detected if you use writing code directly during the interview. In different companies, it is customary to ask questions with notes on a board, on a piece of paper, on a piece of paper, or just by ear. But in the end, the developer writes code on the computer, and why not see how he performs his immediate tasks live?
For example, our specialist takes a laptop and offers the applicant to start creating in the Playground - in the very special environment of the Swift language. In the Playground, you can simply run the code "as is" and look at the results of its work. This is convenient and saves time (after all, a maximum of 2 hours is allocated for a technical interview). Whereas in C ++ you need to create a project, save it somewhere, configure it, the Playground allows you to execute code without additional problems. Therefore, the Playground has proven itself as an interview tool, at least in Acronis.
Five laps ... interviews
To find out if the applicant can start working immediately after the interview, we ask the following five practical questions:
1. Differences between reference type and value type
Mobile iOS developers are well aware that there are different types of variables in the language. They are divided into two main types. Namely, some are transmitted by reference - the reference type (reference type), and others - by value - the value type (value type). In an interview, we ask what the difference is between a (struct) structure and a (class) class. The structure is the value type, and the class is the reference type. Alas, not everyone answers this question, and some of the candidates even wonder, “why such a strange question at the very beginning?”. But if you think about it, the question is not at all strange, especially if you plan to develop it on Swift.
During initialization and assignment, reference type instances begin to refer to the same area in memory and, as a result, divide the same value between themselves, and in the case of the value type, data is copied, and objects begin to refer to different memory areas, and they do not divide values between themselves. Strictly speaking, in the case of the value type, the principle of copy-on-write works. That is, until the attempt to change the value, instances of value type will refer to the same address, and the first change will cause copying. Obviously, the developer needs to understand this. Code can behave completely differently for classes and structures. But just knowing the differences is not enough. The second level of awareness is the difference in writing code. It turns out that writing in the Playground and demonstrating the differences in working with the reference type and value type is not so easy if you have not had programming experience in Swift. We have only 1 out of 3 candidates passing this test.
For the curious, the differences were well shown at the
WWDC conference, as well as discussed in detail in the
documentation and
blog .
2. What is Protocol Oriented Programming?
In programming, it is impossible to do without interfaces. Apple uses the term protocol in its languages. Protocols allow you to solve the problem of multiple inheritance. Protocol Oriented Programming Apple introduced to the public several years ago at the
WWDC conference with Swift, emphasizing their importance for the language. For example, an important indicator for using protocols is the fact that the language does not have a protected level of access to fields.
The implication is that polymorphism should be achieved using protocols, not inheritance. And although Protocol Oriented Programming is in fact more like marketing, in response to such a question, we expect the programmer to start talking about the features of the protocols and be able to create a protocol in the Playground. In essence, three lines are needed to describe a protocol. Alas, in mobile development, people often do not understand the purpose of the protocols, and even they cannot. And we are waiting for something simple, for example:
protocol Developer { func readManual() var name: String { get } }
In addition, there are the usual protocols, and there are generic protocols that work with associative types (Associated Type). And, in fact, are close to the templates (templates) in C ++. Generic protocols are abstract and specific things that are very rarely used in ordinary programming. They are needed for writing internal libraries (and this is what Apple itself is used for) or libraries where you need to use a high degree of abstraction. Well if the applicant knows about it.
Once a link and
two .
3. Work with memory
In iOS, its own memory management system, which uses reference counting. There are two approaches in Swift. This is a manual reference counting (Manual Reference Counting, MRC) and automatic reference counting (Automatic Reference Counting, ARC). Manual Reference Counting is used when working directly with memory, but usually ARC is used. In particular, it is important for the developer to understand the difference between strong links (strong) and weak links (weak). This is an important point for those languages where there is no garbage collector. Here is an
interesting letter on the subject of why the Garbage Collector is not used in Swift.
In fact, everything is not so difficult - you need to tell about the reference counter, that the object is deleted when the value of the counter reaches 0 (zero), and so on. But again, we need a person to set an example in the Playground. And here some of the applicants have a stupor. Even if a couple of phrases about strong and weak links were successfully learned, it becomes obvious at this stage if the person did not have normal Swift coding practice.
// var slimer: Ghost? = Ghost(name: "Slimer") // , weak var weakSlimer = slimer // , let strongSlimer = slimer // slimer = nil
4. Work with closures
In Java, C ++ has lambdas, Objective-C has blocks, many languages have their own constructions that correspond to the concept of closures in Swift. But job seekers often cannot explain how to handle closures, because you need to understand how to work with memory and the system of interconnections of internal and external variables. So, you need to know the standard data formats, memory management and other related points. If you create a closure in the code is not a special difficulty for the applicant:
let completionHanlder: () -> Void = { print("Success") }
That, for example, to say which type — value or reference — is a closure is already a rather complicated task. In fact, a closure is a reference type. And it is from here that the well-known constructs
[weak self] in .
let completionHanlder: () -> Void = { [weak self] in self?.close() }
To test the skills of applicants, we have prepared a template in the Playground. Below you can see an array that changes differently in the two streams. And you need to answer what effect it will create in the application. Understanding the process in this case reflects the ability to work with variables and transfer them between different objects.
//: Playground — noun: a place where people can play import Foundation import PlaygroundSupport let queue = DispatchQueue.global() var employees = ["Bill", "Bob", "Joe"] queue.async { let count = employees.count for index in 0 ..< count { print("\(employees[index])") Thread.sleep(forTimeInterval: 1) } } queue.async { Thread.sleep(forTimeInterval: 0.5) print("remove") employees.remove(at: 0) } PlaygroundPage.current.needsIndefiniteExecution = true
An example is taken
from here .
5. Write a simple application
Any developer should be able to run a project. We give for this a simple task - to develop an application for iOS, which simply shows the Acronis website. For a programmer who actually did something on Swift, such a task would take 10-15 minutes, which mostly go to setting and checking.
If this stage is passed, the task becomes more complicated, as it usually happens in life: “a product manager arrives who changes conditions and urgently needs some work.” After all, this is how the daily practice of any programmer is built. It is interesting to see how a person changes the code according to the new conditions. In our simple test task, we go through several iterations, for example:
- Add navigation in the app
- Choose between multiple sites
- Add architecture
- Write more abstract
Watching such work online, you can find out how a person uses documentation, GitHub and other resources.
Of course, this is not all the questions that are asked at the interview, but our candidates must cope, first of all, with the solution of these basic tasks.
Conclusion
Interactive interview allows you to see the real behavior of the developer, including his soft-skills and ability to communicate with managers. And not all experts who come to us pass even a part of the tests.
We
are open to cooperation and look forward to our team of talented developers.
If you want to work in Acronis mobile development, I recommend you practice with Swift programming.
In the meantime, we will prepare a series of posts about our experience of working with this programming language.
Subscribe to our blog to not miss anything.
Competition
The application whose
sources are stored on Github crashes on startup.
Task: you need to create a pull request with a correction for the cause of the crash.
The first to make this request with the correction of the error will receive a prize - Power Bank and one-year
Acronis True Image 2018 license with 1TB of cloud storage.