Testified Documentation

Posted on 29 September 2024 in Articles • Tagged with programming, python, documentation, tests, specification, BDD, collaboration, cucumber • 5 min read

It's hard to sell a software product - whether it's a library, a program, or generally speaking, a system - if it doesn't come with a top-notch manual. And keeping such manual up-to-date is not easy too. Gojko Adzic's ideas of Living Documentation to the rescue, but unfortunately they are still far from being widely adopted.

In this post I propose a different way of making Living Documentation - by testifying its contents. Dive in to find out how!

Testified documentation diagram

Continue reading

Hexagonal architecture and Python - Part III: Persistence, Transactions, Exceptions and The Final Assembly

Posted on 31 December 2022 in Articles • Tagged with architecture, DDD, dependency injection, Django, hexagonal architecture, programming, python • 10 min read

Python logo in a hexagon with Roman III literal

Welcome to the third part of the article series, which cover principles of Hexagonal architecture, Dependency Injection, Domain-Driven Design and applies these all to Python and Django application design.


Continue reading

Hexagonal architecture and Python - Part II: Domain, Application Services, Ports and Adapters

Posted on 18 September 2022 in Articles • Tagged with architecture, DDD, dependency injection, hexagonal architecture, programming, python • 10 min read

Python logo in a hexagon with Roman II literal

Welcome to the second part of the article series, which cover principles of Hexagonal architecture, Dependency Injection, Domain-Driven Design and applies these all to Python and Django application design.


Continue reading

Good practices: Avoiding the use of test inputs in assertions

Posted on 10 November 2021 in Articles • Tagged with good practices, programming, python, testing, unit tests • 2 min read

Figure of eight know / https://freesvg.org/figure-of-eight-knot-vector-illustration / License: Public Domain

It might be very convenient to use the same fixtures in test setup and assertions. This practice though is not as good as it looks like at first glance.


Continue reading

Hexagonal architecture and Python - Part I: Dependency Injection and componential architecture

Posted on 30 October 2021 in Articles • Tagged with architecture, DDD, dependency injection, hexagonal architecture, programming, python • 8 min read

Python logo in a hexagon

Welcome to articles series which cover the principles of Hexagonal architecture, talks of Dependency Injection, and its usage in these to Python and Django application design.


Continue reading

Concrete Settings: a new way to manage configurations in Python projects

Posted on 11 July 2020 in Articles • Tagged with programming, library, python, concrete settings • 5 min read

After two years of developing a hobby project, I am proud to announce Concrete Settings - a new configuration management library for Python projects.

Concrete Settings was born as an effort to improve configuration handling in a huge decade-old Django application with exceedingly bloated settings.py. Remember that settings.py starts …


Continue reading

Blogging with Pelican

Posted on 25 April 2017 in Articles • Tagged with blogging, pelican, python • 2 min read

Pelican is a perfect blogging platform for programmers and computer geeks. My blog has been powered by Pelican for three years and it has been a pleasant experience. If you are looking forward to start a blog, or just thinking of changing a platform, why not give it a try?


Continue reading

The ultimate guide to Python decorators

Posted on 22 January 2017 in Articles • Tagged with Python, programming • 12 min read

Decorators are one of the most beautiful feature of Python programming language. They can make code easy-readable and maintainable. Nevertheless, their usage may seem tricky and mysterious in the beginning. This is a guide to the world of decorators. I hope that you will feel like a pro and have no questions left about them after exploring this article.


Continue reading

Python nightmares: Implicit this

Posted on 11 May 2015 in Articles • Tagged with Python, programming • 2 min read

I met a lot of Python beginners who complained about this keyword not implicitly available in class methods. After all, why pass self explicitly?


Continue reading

A micro Lisp interpreter experiment

Posted on 21 June 2014 in Articles • Tagged with Python, Lisp, programming • 4 min read

While reading the Binary trees chapter from Programming Interviews Exposed by John Mongan et al. I started thinking of alternative recursion examples which do not involve sorting, generating Fibonacci sequence, binary tree traversal and similar tasks. Lisp! Lisp is inseparable from recursion and Lisp interpreter would be a good case to demonstrate what recursion is and how it can be used efficiently. What would be a minimal simplified Lisp interpreter written in Python? Surprisingly, I managed to do it just in 6 lines of Python code! And this is not just because of Python being a wonderful language, but because of Lisp being such a beautiful and simple concept.


Continue reading