Skip to main content

Breadcrumbs Collector

  • About author
  • Cookie Policy
  • Privacy Policy

Category: good practices

Modular monolith in Python

December 8, 2020December 7, 2020 Sebastian 3 Comments

Microservices are not the only way I remember when the microservices boom started. Truth to be told, it still echoes strongly to this day. You could see conferences agendas packed with talks about microservices, articles galore, finally books and frameworks. At some point, I was afraid to open my fridge. Everyone and their dog wanted […]

Read More

@staticmethod considered a code smell

May 1, 2020April 30, 2020 Sebastian 4 Comments

Python offers quite a few built-in decorators that can be used to give methods of classes certain superpowers. @property turning method into a read-only field-like attribute is a classic example. Or @classmethod – a method that receives a class as a first argument, not an instance. Fun fact, this kind of method is usually called […]

Read More

Encapsulation is your friend, also in Python

April 24, 2020April 26, 2020 Sebastian 1 Comment

What is encapsulation? Encapsulation is an act of deliberate limiting access to certain software components. The most common usage is to hide certain attributes of objects from other objects that use it. The most vivid example is the usage of so-called access modifiers, private and protected in languages that support it, for example, PHP: Running […]

Read More

Beware of chicken testing! (or mocks overuse)

April 17, 2020April 20, 2020 Sebastian Leave a comment

Need for mocking Dealing with problematic dependencies is an indispensable part of software testing. Often, we cannot or do not want to rely on 3rd party service/network communication/hard drive etc., especially in unit-tests. The reasons vary; external dependencies are usually slow, fallible and difficult to put into the expected state before the actual test. Consider […]

Read More

Stop naming your python modules “utils”

April 13, 2020April 12, 2020 Sebastian 8 Comments

Imagine the following situation: there is a software developer that is either adding new code or refactoring existing one by extracting a class/function. They have to place code somewhere, but it does not seem to fit anywhere. So what does a developer do? They create a new module – utils.py. Why utils is a terrible […]

Read More

Categories

  • python 30
  • dajsiepoznac2017 22
  • extjs-pathfinder 9
  • asyncio 7
  • software engineering 7
  • testing software 6
  • clean architecture 5
  • good practices 5
  • event sourcing 4
  • type annotations 3

Recent Posts

  • Modular monolith in Python
  • @staticmethod considered a code smell
  • How to implement a service layer in Django + Rest Framework
  • Encapsulation is your friend, also in Python
  • How to patch in Python?

RSS – Stay up to date

  • RSS - Posts
  • RSS - Comments

Categories

  • python 30
  • dajsiepoznac2017 22
  • extjs-pathfinder 9
  • asyncio 7
  • software engineering 7

Archives

  • December 2020
  • May 2020
  • April 2020
  • March 2020
  • October 2019
  • April 2019
  • August 2018
  • February 2018
  • January 2018
  • September 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • GitHub
  • LinkedIn
  • Twitter
sparkling Theme by Colorlib Powered by WordPress
This site uses cookies: Find out more.