Home
Sotiri Georgiou
Cancel

Descriptors in python

Descriptors are useful abstractions (when used well) to help keep your code DRY. A descriptor is essentially a class that implements the descriptor protocol, that is, a class that has the following...

Structuring your python project

Over the years, in the python community, you’ll find many different flavours for setting up a project. Some favoured the flat layout for its practicality and others favoured the src layout for its ...

Dynamic Programming - Top Down Method

Dynamic programming is an optimisation solution. To identify if we can use dynamic programming to solve a problem, we need to answer the following two questions: Can the problem be broken down ...

Clean code - Mixing levels of abstraction

Mixing levels of abstraction is typically harder to read and maintain. In this tutorial we’ll give some examples of functions which have mixed levels of abstraction and techniques we could use to c...

Doubly linked lists - Introduction

We now extend the singly-linked-list tutorial to explore a linked list where we have bidirectional traversal. This is known as a doubly linked list and it requires us to adapt our node instance to ...

Clean code - Pythonic naming conventions

Naming variables, functions and classes is one of the critical areas of clean code practices. We’ve all been in the situation where we are new to a codebase and have come across functions that are ...

Circular Linked Lists - Introduction

Circular linked lists are similar to singular linked lists, except the tail node now points back to the head node. This makes it slightly more trickier to traverse because we don’t ever reach a ter...

Bridge Pattern In Python

If you’ve ever been working on a python project and find yourself compiling a bunch of if statements, chances are theres a design problem somewhere in your code. As python is one of the most flexib...

Singly Linked Lists - Introduction

Linked lists are a linear data structure consisting of Nodes that hold both a data attribute and a next attribute (to which node it points to). The node class looks something like this: class Node...

Asyncio - Introduction

Aynchronous programming in python uses the async def and await syntax. Asynchronous programming in python is still a single threaded process but reduces IO bound blockages in your application t...