📜 ⬆️ ⬇️

Python, PHP, Golang, and DevOps knowledge tests: AvitoQuiz quiz analysis on Highload

The Highload ++ 2017 conference died down, and it was cool - as always. We are reviewing the reports, we are using the experience that our colleagues have shared with us, and we are pleased to recall the various activities that took place outside the reports area.


At our booth, for example, it was possible to take a test for the knowledge of one of the programming languages ​​(Python, Go, PHP) or a test for DevOps and get a colorful themed T-shirt. Today we want to offer you to once again plunge into the atmosphere of the conference and analyze the answers to the most Highload-tasks from our test. Or maybe you can solve them without looking under the spoiler?


Enjoy!



Top 3 questions on topics


Python


1. How to get the order of the base classes, in which the search will be made for the desired method during the execution of the program?


cls.get_bases() 

 cls.__mro__ 

 cls.__bro__ 

   

Right answer
 cls.__mro__ 


2. How to import an obj object from the my_module module, if it is not specified in the my_module.__all__ sequence?


   

 from my_module import * 

 import my_module; obj = my_module.obj 

 from my_module import obj 

Right answer
 from my_module import obj 


3. Python 2, what will return z [x == y]?


 x = x[0] = [0] y = y[0] = [1] z = {(2-1, ): 'equal', (1-1, ): 'not equal'} 

 equal 

 not equal 

 RuntimeError 

 KeyError 

Right answer
 RuntimeError 


Golang


1. Select the correct statement for the program running with GOMAXPROCS = 5:


  1. The program can not create more than five threads OS.
  2. The amount of gorutin per stream cannot exceed five.
  3. A program cannot run simultaneously in more than five OS threads.
  4. The program reserves five OS threads for exclusive execution.

Right answer
A program cannot run simultaneously in more than five OS threads.

2. How in Go to get direct access to the memory cell?


  1. Pointers in Go are always dereferenced when used, direct memory access is not possible.
  2. Use the package unsafe.
  3. Use the built-in readMemory () function.
  4. Access is possible only in a special system gorutin.

Right answer
Use the package unsafe.

3. Which team is useful for finding bottlenecks in the program?


 go tool pprof 

 go vet 

 go tool objdump 

 go profile 

Right answer
 go tool pprof 



Php


1. What algorithm is used in PHP for garbage collection?


  1. Baker's algorithm.
  2. Naive mark and sweep.
  3. Balanced binary trees.
  4. Reference counting, tri-color marking.

Right answer
Reference counting, tri-color marking.

2. What disappeared from PHP in the seventh version?


  1. Internal array pointers.
  2. Support for variables in variables inside the global.
  3. ParseError class exceptions.
  4. The list () function.

Right answer
Support for variables in variables inside the global.

3. Who will save if you need to write the HTTP header after the first echo call in the code?


  1. Output Buffering.
  2. ACL.
  3. Spl.
  4. Opcode Cache.

Right answer
Output Buffering.

Devops


1. The rwxrwS - t directory of access rights, the owner of alice, the users group. ACLs are not used. Choose the correct statement.


  1. If the root user creates a file in this directory, then this file has its owner and group as root.
  2. A bob user who is not in the users group cannot view the contents of files in this directory, but can view the contents of the directory itself.
  3. The alice user can delete from this directory a file owned by the root user.
  4. The user charlie, a member of the users group, can create a new file in this directory, but cannot delete from it the file created by the alice user.

Correct option
The alice user can delete from this directory a file owned by the root user.

2. What are physical addresses used in the Ethernet protocol for?


  1. To exchange data with devices on other networks.
  2. In order to distinguish frames (2 network layer) and packets (3 network layer).
  3. To determine the order of data transfer in the collision domain.
  4. In order for devices on the same network to communicate.

Right answer
In order for devices on the same network to communicate.

3. What needs to be done in order for nginx to re-resolve the name of the backend server to IP using DNS?


  1. Specify the DNS server in the resolvers directive, put the name of the backend server into a variable.
  2. Specify the DNS server in the directive resolvers, make the name of the backend server in the upstream.
  3. Render the name of the backend server to upstream, add the resolve_dynamic directive to the upstream.
  4. Specify the DNS server in the resolvers directive, then nginx will automatically re-resolve the names of the backend servers.

Correct option
Specify the DNS server in the resolvers directive, put the name of the backend server into a variable.

Top members


The results were as follows. The test began to take 273 people. Some did not finish it (it is impossible to say that they didn’t let them finish - an interesting report, self-doubt or weak connection). The maximum number of points that could be scored in all four areas - 60.



Well, here are the top 5 real heroes. Guys, you know - you are the coolest.


  1. Svyatoslav Dumchenko - 39 points
  2. Vyacheslav Zlodeev - 37 points
  3. Vladimir Protasov - 24 points
  4. Svetlana Shagalina - 24 points
  5. Ilya Lebedev - 22 points

Here are the t-shirts that got the top 50 in each direction:



Did you manage to solve problems without looking under the spoiler? Write in the comments.
And, of course, until the next meeting!


')

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


All Articles