📜 ⬆️ ⬇️

Growing up on Python problems

Hi, Habr! My name is Dmitry Kliminsky, I work as a back-end developer in Avito. Today I want to share with you my impressions of our trip to the conference PyCon CZ 2017 , which was held in Prague. I have long wanted to know what topics are discussed by foreign colleagues, how they differ from the “our” agenda. And it became possible when I was sent to the Czech Republic as part of a small development team. Of course, it turned out that foreign colleagues are faced with the same tasks and questions. But here the angle of view of the speakers and the accents that they set up seemed interesting to me. Under the cut - short notes on interesting reports, features of the Czech conference and a few photos.



In Prague, all the same features of the Python language were discussed: asynchrony, GIL, testing, and, naturally, the difference between the 2nd and 3rd python. In my opinion, this is already a tradition: well, what PyCon, if we don’t discuss GIL, don’t dwell on the sidelines about the 2nd python, don’t make another bike for testing, and don’t boast how fast the asynchrony works? All this is an attribute of a typical Python conference, for experienced pythonists, this can all get bored, but apparently, without it, nowhere. I think that such topics are useful for any newcomer, and it’s good that these questions are constantly being raised. For example, a lively story from a professional about some fundamental concepts of the language will be much more useful for beginners than long book manuals.


')
Yes, there was a report with django, a lot of topics about testing, there was a lecture and master classes on the Internet of things, docker. In short, all current trends were included in the reports. Actually, that's why we love to attend conferences. My colleagues and I took small notes on the reports that we found interesting. Sharing

Pure Python for distributed computing


The author of this report is an ethical hacker. When introducing code into a foreign system, you cannot put libraries, but almost everywhere there is Python. I had to implement tools for password retrieval, dns resolving, port scanning on pure Python. The developer told how he shares the work load between processes. In short: queues are used to distribute between the cores of a single machine.

from multiprocessing import Process, Queue 

If you need to distribute the calculations between different computers, BaseManager is added. It all looked very entertaining on the screen and in the presentation. But, of course, it is obvious that in real life, if there are no obvious restrictions, it is better to use other means for distributed computing.

Micro Python with iron constraints


Another speaker talked about programming radio-controlled boats. It uses FreeRTOS multitasking real-time operating system and a very limited resource. Python is the main programming language, since it makes it easier to work with business logic and prototyping. To optimize the system, build the kernel, it uses scons, which allows you to manage the building of c-programs, including system things.

About naming


There was on PyConCz and a report about what the 2nd hardest thing in computer science is called naming. Author's recommendations:


About “mocking”


Another report is a story about the right approach. In addition to the well-known mock for testing, there are other, simpler operations (spy, stub, spies ...), which are more desirable to use in order for testing to be of high quality. It is important to choose the tools based on the understanding of what is being tested.

There was a report on the evolution of the Python language and its future. It is interesting to hear about this from experts who give a systematic, structural approach. I was pleased that there were several reports about the Internet of things and master classes on this topic. The needs of the market and how technology responds to them are becoming clear.

Differences


But there is one feature that, in my opinion, stood out in comparison with the Russian Python conferences. This is the moral component of programming. Did you wonder how many people you killed with your code? No, seriously, this is not a joke, the speaker cited examples when people died because of bugs. And we are talking not only about autopilot or life support systems, but for example, instant messengers. And how much CO emissions did your code bring to the atmosphere? Environmental protection is also a topic for a separate report. What does the first hacker attack in history teach us? And how do we train new Python beginners, and why bother to become a mentor at all? It is amazing how many ethical issues have been raised in the reports.

I got the impression that the features of the Python language, the library and the technology are not the most important, it is just a tool that you need to be able to use. The main thing is the responsibility of the programmer to other people and to the planet. Of course, not everyone will like such deviations from purely technical topics, but it may be worth considering that programming is not just writing letters in the editor, but an activity that changes our world.



Thanks to all readers for the attention to this post. I remind those who are interested in new trends in the development of Python, which very soon, from July 16 to July 17, in the Moscow region will be held PYCON RUSSIA 2017 .

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


All Articles