How to mock python imports

What happen if you want to write a unit test for a module without having installed the libraries used by the module ?

Using relative numbers in vim to improve vertical motion

How to improve the vertical motion speed in vim using relative numbers.

Creational design patterns: Abstract factory

What is the abstract factory design pattern ? Why should I care about this ? How to implement it in Python.

From Python to Go: Using generators in golang

How to write a generator in Go. Comparison with Python.

From Python to Go: Using decorators in golang

How to write a decorator in Go. Comparison with Python.

Decorator pattern

What is the decorator pattern ? Why should I care about this ? How to implement it in Python. How to implement it in Go.

Anti-pattern in python

In this post I am going to explain one anti-pattern in python: how to use badly a function with default parameter. Later on I will show how to fix this anti-pattern.

How to control the access to the class' attributes in Python

The explanations of private, protected and public attributes in Python. When to use single underscore(_) and when to use double underscore(__)

Closures in Python

In this post I will explain what is closure in Python and how to use it.

Abstract base class and Socrates' approach

How write a pure virtual function in Python.