What is the Repository Pattern and How to Use it in Python?

The repository pattern is a design pattern that helps you separate business logic from data access code. It does so by providing a unified interface for interacting with different data sources, bringing the following advantages to your system: A practical example Let’s use Python and sqlmodel (PyPI) to demonstrate this pattern (code here): Note: In this implementation,… Continue reading What is the Repository Pattern and How to Use it in Python?

Exploring the Role of Static Methods in Python: A Functional Perspective

Introduction Python’s versatility in supporting different programming paradigms, including procedural, object-oriented, and functional programming, opens up a rich landscape for software design and development. Among these paradigms, the use of static methods in Python, particularly in an object-oriented context, has been a topic of debate. This article delves into the role and implications of static… Continue reading Exploring the Role of Static Methods in Python: A Functional Perspective

Why Start Your Programming Journey With Python?

Diving into Programming with Python I’ve spent years entertaining the thought of becoming a software developer, only to get overwhelmed by the vast array (pun intended) of programming languages to choose from. Which one should I choose, where do I begin? Java? JavaScript? C? C++? C#? Ruby? Django? Flask? Woah… wait a minute? Understanding Frameworks… Continue reading Why Start Your Programming Journey With Python?

Write more maintainable Python code, avoid these 15 code smells

This week we talk about code smells. 💡 Listen here: Also available on our YouTube channel: Code smells are characteristics in the code that might indicate deeper issues or potential problems. While they’re not necessarily bugs, they can be a sign of poor code quality or maintainability issues. 😱 We distilled 15 common smells ranging… Continue reading Write more maintainable Python code, avoid these 15 code smells

How the Flocking Rules Can Help You Refactor Your Code

In this new podcast episode we are excited to have Chris May back to delve deeper into the intricacies of refactoring. Watch here: Listen here: We talk about the significance of the Flocking Rules, a set of guidelines derived from “99 Bottles of OOP” by Sandi Metz and Katrina Owen.  These rules provide developers with… Continue reading How the Flocking Rules Can Help You Refactor Your Code

The Arbitrary (Keyword) Arguments (args and kwargs) don’t come “for free” in Python

Python allows you to use *args and **kwargs in function definitions to accept an arbitrary number of positional and keyword arguments, respectively. Here is a simple example: Different types of function arguments In the above example, the arbitrary_args function is defined to accept any number of positional and keyword arguments using the *args and **kwargs… Continue reading The Arbitrary (Keyword) Arguments (args and kwargs) don’t come “for free” in Python

The importance of refactoring regularly [podcast]

In this episode we talk with Chris May, Python developer and coach, about his background and passion for refactoring. Watch here: Or listen here: This turned into a beautiful love letter 💌 to refactoring and we think you should take notice, because adopting the mindset he teaches will improve your code. A lot! Enjoy and… Continue reading The importance of refactoring regularly [podcast]

A Case Study in Refactoring Python: Clean Code Is Often Faster

I have learned a lot over the past 2.5 years of my Python journey. What started out as a hobby during COVID-19 lock downs in 2020, has now become a major component of my professional workload. This article is designed to highlight the importance of the iterative process: write some code -> learn new stuff… Continue reading A Case Study in Refactoring Python: Clean Code Is Often Faster