Coders Strike Back Post-mortem

Posted on Thu, 12 Jul 2018 in Other • Tagged with python, c++

The latest couple of months I've spent around 40 hours at weekends and in evenings trying to write a bot that is able to finish the track of Coders Strike Back faster than opponents. During this time I'd made quite a lot of mistakes before I got into the Legendary league. This is a post-mortem for that project.


Continue reading

4 Articles about Python Internals

Posted on Thu, 29 Mar 2018 in Python • Tagged with python, python internals, cpython

Maybe, knowing Python internals is not a thing you should know to be a good Python developer. However, if you want to improve your code it becomes more important. If you know it works under the hood, you write a code with less stupid mistakes and architecture issues.


Continue reading

Computer Science Distilled

Posted on Wed, 28 Feb 2018 in Reviews • Tagged with books

Are you looking for a simple thin Computer Science book? Maybe, Computer Science Distilled is for you. Unfortunately only if you have no plans to code for living. In this case, it is a good introduction to computer science world. If you are professional developer or CS student, skip this book.


Continue reading

Tuple[Callable, Any, ...]

Posted on Mon, 29 Jan 2018 in Python • Tagged with typing, mypy, python

Type hints could help you a lot with a big Python project. However, they sometimes require code refactoring. I wrote about it last year in this article, but I have found a good example for this only now.


Continue reading

How to add type hints into Python 2.7 project

Posted on Mon, 11 Dec 2017 in Python • Tagged with typing, mypy, python

Many times I wrote that type hints in Python help to work with big or moderate projects. However, if you decide to add them to your project, you have to check your project regularly using CI. And this kind of checks is not easy to implement. This article is my story about obstacles in this process.

I'm trying to add type hints to our project for a while. And now I have a bunch of methods how to do it more efficiently, fast, and painless. I spend many days trying to find them. Now I want to share my experience.


Continue reading

9 Useful Articles about Asyncio

Posted on Fri, 20 Oct 2017 in Python • Tagged with python

asyncio is a useful library. However, it is not so easy to understand how to work with it. Documentation isn't enough. We need more examples. We need more explanations. The last couple of weekends I spent experimenting with this library. After that, I add some interesting articles into my Pocket. Here are some of them.


Continue reading

Python project integrity requires extra efforts

Posted on Fri, 06 Oct 2017 in Python • Tagged with python

Python is a very flexible programming language. Its dynamic nature allows programmers to code elegant solutions that almost impossible to make with other more strict languages, for example, Java. However, you have to pay for everything. While Python code base grows, it requires more and more efforts to keep project integrity. Without these extra efforts, the project will fall apart.


Continue reading

Hash function for function in Python

Posted on Mon, 11 Sep 2017 in Python • Tagged with python, cpython

A couple of weeks ago one of my colleagues ask if Python function is possible to use as a key in dicts? Yes, it is. So, every function has a hash. But how is it calculated? Based on function name? Based on function byte code? Actually, it calculates by transforming a pointer to a function object. However, it is not so easy to find it in the CPython code.


Continue reading

Success in Programming Book Review

Posted on Sun, 13 Aug 2017 in Reviews • Tagged with branding, book, industry

Personal branding isn't a thing that is discussed much in a programming world. Actually, I know very few guys who have strong personal brands and only two guys who can explain what personal branding is for software developers. One of them is Frederic Harper with his book “Success in Programming.”


Continue reading

Data Structures and Algorithms in Java (2nd Edition) Review

Posted on Fri, 23 Jun 2017 in Reviews • Tagged with java, lafore, algorithms

For me, the main advantage of "Data Structures and Algorithms in Java" is the language author uses to describe algorithms. He doesn't use overcomplicated academic language with tons of math. No. Robert uses plain English and tries to give an as simple explanation of an algorithm as possible.


Continue reading