Hello!
Briefly about yourself. I am a mathematician by education, but a programmer by profession. In the field of development since 2006. Although, since I began to study programming at school, I began to write my first programs and games at school (approximately, since 2003). It so happened that I had to learn and work in several languages. If you do not take into account the university lectures on C, C ++, Basic, Pascal and Fortran, then I really worked with Delphi (more than 6 years), PHP (more than 5 years), Embedded (Atmel + PIC about 2.5 years) and the latest Python + time is a bit of Scala. Of course, without the database, too, can not do.
Who is this article for? For everyone who, like me, wanted (or wants) to find for himself a decent well-paid job with an interesting project, a cool team and all sorts of buns. And also for those who wish to raise their level of knowledge and skill.
How did this article come about? After 3 weeks of interviews, searches, studies, sleepless nights (often scrolled through my head possible turns of events, answer choices, etc.) I received quite a lot of suggestions. The first two had to be rejected because the deadline for a decision was over, and I was waiting for proposals from other offices. As a result, I accepted a specific day for myself to decide and waited for the results of current and completed interviews. To be honest, my choice was rather complicated, since the options between which I chose were generally very attractive. In general, I decided to prioritize the direction of development, not the conditions and the project. Even after the decision was made (and the proposals), others continued to come (but for me it was already unimportant).
Before each interview, I rather thoroughly prepared + read out those places, the answers to questions on which I either did not know, or did not remember, or did not figure it out to the end.
I appreciated the questions that could really show my understanding (or misunderstanding) of some fundamental concepts. Unfortunately, such questions could be counted on the fingers of both hands.
In the end, I decided that it was worth collecting all this experience and sharing it with others.
Of course, these questions do not exhaust the knowledge that every experienced developer should have. It seems to me that some things in practice are very rarely used to constantly ask about them. Moreover, probably I will not be mistaken if I say that 90 +% of questions just googling for 10-30 seconds.
I combined some questions into one - to save time and space.
Also at the end of the article I will give links that seemed to me the most interesting.
The first question in most interviews is "What is SOLID?" Honestly, I never could remember the full decoding of this abbreviation, so I either explained it in my own words or asked the other person to suggest at least English names, and then I can decipher. At first, it seemed to me that the interlocutor would understand and accept such an answer option, but for some reason, in two cases, the guys decided that I did not know the answer to this question (I wouldn’t like to comment further on this (hand)). Personally, I once confused Dependency Injection with Dependency Inversion.
The second typical question: "What is REST?" and then after "What is Restfull?" or "What are the main conditions here."
You can find your answer. Personally, I prefer this option .
What is HTTP? What are his methods?
Which HTTP methods are idempotent and which ones are not?
I liked one question about HTTP, which I have never encountered in practice, so I did not know. Let you have a fairly large list of URL pages (for example, audio or video) that need to be downloaded to disk. But for each of them you need to check whether there is enough space on the computer for these files. How to use HTTP (what methods)?
The correct answer is the HEAD method (read about it). Personally, I gave an answer, about which the interlocutor did not even hear (or forgot) and a quick search showed that I was also right (as an option). I have indicated that I will use the GET method, but in order not to download the entire file I will indicate the Range parameter with the minimum step. Although this will only work if the server sends a non-zero Accept-Ranges parameter in the response. I am writing this to the fact that this question only shows whether I worked with such a task or not. A second search will give a comprehensive answer.
What is the difference between authentication and authorization? To be honest, I immediately asked a rhetorical question: "why did you miss another identification?". By this, I carefully tried to make my interlocutor understand that I was aware of these issues.
What is the difference between HTTP and HTTPS?
What is CSRF-token?
What data formats do you know besides JSON, XML?
There are too many of them, so I will not be limited to a specific list.
What is SOAP?
Stupid question. I do not like these. Why ask what is used once in never, or is it definitely not on my project?
What design patterns do you know?
Google to help you;)
At one of the low-level development interviews, they asked a lot about algorithms.
In general, it is desirable to at least understand approximately what O-large is when assessing the complexity of algorithms. It is also probably desirable to know the basic algorithms: simple search, binary search, sorting, quick sorting, working with trees (bypassing in width and depth). An acquaintance advised me to read the wonderful book "Grokayem Algorithms. Aditya Bhargava". I did not think that it is possible to explain so complex and simple things so beautifully and simply. Read in one breath (honestly)! I strongly recommend to anyone who, like me, does not consider himself an algorithmist. Just no words!
What is PEP8? How do you feel about him?
What programming patterns do you know and how can you implement them?
What are the options for implementing the Singleton pattern on python?
I also advise you to understand the shortcomings of the implementation through the decorator (especially for testing). The most elegant and versatile way, of course, is through metaclasses.
Decorators.
I think it will be useful to read and understand:
How are public, private, static methods implemented in python?
What are Metaclasses?
I advise you to fully read this or that .
They did not ask, but I advise you to read about the fundamental differences between the 2nd and 3rd versions (at least 2.7 and 3.4).
What is new ()? And how is it different from init ()? In what sequence are they performed?
What programs do you know to check the code style? What are the pros and cons of them?
Personally, I worked with pylint, pychecker, but I named three main ones: pychecker, pylint, pyflakes, because before that I read about them =) By the way, here’s a new issue that tells in detail about tools for analyzing Python code .
How do you test the code? What is mocking?
Personally, I use tox, unittest, nose, or watch what Travis says. About mock better google.
Regarding the tests, I liked the following questions:
What data structures do you know in Python? Which ones are mutable / immutable?
Personally, I now know that there are quite a lot of them. In addition to the typical (dict, list, set, tuple), be sure to read about frozen_set, default_dict, ordered_dict (for new versions is no longer relevant) and what else will be in the office. dock (yes, start with it).
How does the hash table (dictionary) work? What are collisions and how to deal with them?
I think that for high positions it makes sense to know.
Where will the search be faster, and where will the search and why: dict, list, set, tuple?
How are the values of arguments passed to a function or method?
What is a generator? How is it different from the iterator?
There are shorter articles, but I liked this one . There are a lot of things that cannot be fully disclosed in short responses to stackoverflow.
What is list / dict comprehension?
I cannot formulate a specific question, so I advise you to read about introspection (using dir (), dir , hasattr (), getattr ()), name mangling.
What is the difference between single (_) and double (__) underscores?
The comprehensive answer is here .
What is GIL? What are his problems?
What is MRO? What is the difference between MRO2 and MR3 (diamond problem)?
Start google and you will understand everything yourself.
What is and how does old-style differ from new-style classes?
What do you know about threading. Threading vs Multiprocessing?
I advise you to read and try it yourself - http://effbot.org/zone/thread-synchronization.htm . The article is a little old, but it gives a good understanding.
Did you work with asyncio? What is its feature?
I recommend reading the articles about asynchronous Python and feeling it yourself.
What is garbage collector (gc)? What are its pros and cons?
I think everything that is needed for an answer is described here .
Why do you need Celery?
What is async / await, what are they for and how to use them?
There is a function:
def f(sum, l=[]): l.append(sum) print(l)
What will be displayed on the screen:
l = [1] f(10) // [10] f(10) // [10, 10] f(10, l) // [1, 10] f(10) // [10, 10, 10] print(l) // [1, 10]
To my surprise, the questions on this topic seemed to me too simple (just like for school), except for literally 2-3.
Unfortunately, I remembered a few questions, because my previous experience in developing software and working with databases was important for my interlocutor (this, I think, is very clever).
Surprisingly, only in one of a dozen interviews I was asked to write code. Probably because everyone else wanted to check the code after the theoretical part. And since the interviews lasted at least an hour (the longest is three hours!), And all the questions were not asked, the guys just physically had no time to check the code.
In addition to practice, I will not advise anything else.
For educational purposes, the following articles are worth reading:
Advice to anyone who really wants to achieve mastery - do not be lazy to repeat the code in the console (whether it is a python, a database or other things). DO NOT copy, namely repeat. Of course, it means a new material, not one that you have been blindly writing for a long time.
In fact, there were 3-4 times more questions. Something is forgotten. But I did bring the most important ones.
You probably noticed that there were practically no questions on the front. This is because we either did not have time to get to them, or there were so few of them that I forgot them.
By the way, here is a good matrix of competencies in various areas in IT. If you get the opportunity to conduct an interview, I advise you to at least understand what you need to ask and what level, and not to row everyone under the same bar (as is often the case now), too many different areas have accumulated. Personally, I don’t understand why to require a senior front-end to have a good understanding of the database, or a senior back-end to have a deep understanding of the browser engine, or the interaction of the Event loop with the renderer of the browser, or the tester - the ability to find the shortest path in a measured way. graph, etc. I hope, looking at this matrix, you understand what I mean.
I sincerely wish success to all who decide to consolidate for themselves and demonstrate to others their knowledge in order to get a good interesting offer!
UPD:
Here you can practice your interviews, if 4to - pramp.com. Thank you non_smile for the link.
Source: https://habr.com/ru/post/439576/