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!
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__
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
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
RuntimeError
1. Select the correct statement for the program running with GOMAXPROCS = 5:
A program cannot run simultaneously in more than five OS threads.
2. How in Go to get direct access to the memory cell?
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
go tool pprof
1. What algorithm is used in PHP for garbage collection?
Reference counting, tri-color marking.
2. What disappeared from PHP in the seventh version?
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?
Output Buffering.
1. The rwxrwS - t directory of access rights, the owner of alice, the users group. ACLs are not used. Choose the correct statement.
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?
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?
Specify the DNS server in the resolvers directive, put the name of the backend server into a variable.
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.
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