alekfed

a

Python

Experience: 6 years

For me, Python is a natural choice in cases when the problem in question doesn’t have strict performance requirements or if there is some well-established library in Python ecosystem that can be used for the problem solving.

Web Frameworks

Of all the Python web frameworks I worked with three:

ORM and Databases

In Python I usually work with databases using ORM ( SQLAlchemy or Django ), although sometimes SQLAlchemy Core can be enough. Raw SQL queries are certainly indispensable for optimizing performance in the face of growing service loads, however, if the service is really experiencing these kinds of problems, perhaps it’s time to rethink the choice of Python as the service implementation language?..

Before the release of SQLAlchemy 1.4 , which officially added support for asyncio via asyncpg and aiomysql, it was also interesting to experiment with libraries that benefit from asyncio, like Tortoise , GINO or databases . They’re not so relevant now though.

GraphQL

This piece of Facebook’s engineering art gained considerable popularity over the last few years, so I couldn’t stand aside, especially in the light of solving the perennial problem of back-end/front-end interfaces coordination.

Despite the obvious dominance of JavaScript in this area, there are some good GraphQL-libraries in the Python ecosystem as well:

The biggest problem with all these libraries was the lack of some mechanism that caches DB queries and automatically compiles them into a batch query. ( DataLoader ). To some extent, this idea was implemented for both Ariadne and Graphene (perhaps, Raspberry can handle it finally?), but conjugation of these solutions with database queries is still not a very pleasant experience, especially in the face of constantly changing GraphQL schemas.

Code Quality

I try to use typing all the time and to control types with static analyzers like mypy and Pyright (by the way, the latter is very good as LSP server - more snappier than palantir’s one for sure).

Of the linters, I mostly use flake8 . Recently I used pylint as well but I dropped it at some point. Black and yapf didn’t find much support in my past teams, so I’m not used to using them.

And, since, in my opinion, tests are a mandatory element of CI, pytest is my man!😄 (by the way, qutebrowser by the same guy is 🔥 as well)

(Data) Science & Machine Learning

Python ecosystem has a lot of excellent scientific libraries which had come in handy while I did some research works in graduate school. I often used pandas to analyze devices that I developed (later, it also turned out that pandas does quite well with Keras, which I used to experiment with UAV control systems).

Since I had a traditional control systems engineering training at university, naturally, MATLAB was my first language for control system development. However, at some point I noticed how well everything works out with pandas and decided to switch to Python for control systems as well. The python-control library covered my needs quite well.

Later, while working on UAV control systems, I had the idea to make an adaptive controller based on Reinforcement Learning, so I started to fiddle with Keras . Unfortunately, it turned out that neural networks isn’t very suitable technology for such a task (for more details, see the control systems ).

Other ML work was done while working on an e-commerce platform. This time it was decided to use Pytorch because, despite its enourmous size, torchvision fit well to the task at hand, and the presence of the necessary pre-trained models was clearly a plus. The result was positive, but project was frozen at some point.


Illustration

I didn’t expect a kind of spanish inquisition!

It took me longer to create this illustration than everything else! (not taken together though) Initially, I wanted to create some kind of a collage in the spirit of Terry Gilliam’s applicative animations with references to the incomparable Holy Grail and The Life of Brian and a bunch of libraries that I happened to use:

Python version 1

Python version 1

But I didn’t like the result. More precisely, I didn’t like how it looked in the general context. So, in the end, I decided that I need something completely different !😅



email icon telegram icon github icon