I’m asking myself a question about clean architecture. Let’s imagine a small api that allow us to create and get a user using that type of archi. This app has two endpoints and store the data in a database. Let’s say that we have a db model that look like class User: id: int firstname: ..
I would like to prepare a code consistent with good programming practices, which will initialize an object A that requires an additional action from object B and clean up after object A is not used anymore. Let’s say I’ve SensorBench class, which is class helping to maintain a couple of sensors. class SensorBench: def __init__( ..
(For background: I’ve played with different languages over the last 20-ish years – Java, C++, PHP, Python and some other bits so I have a basic understanding of the topic – but ultimately I’m an infrastructure guy, so I’ll be transparent that I’m absolutely not a real programmer.) I’ve been looking to deepen my understanding ..
Let’s say we have a component class like this: class Component: def operation(self) -> str: return f"Performing operation" def another_operation(self) -> str: return f"Performing another operation" We then have a child of component that overrides both of its methods: class ChildComponent(Component): def operation(self) -> str: return f"Performing operation differently" def another_operation(self) -> str: return f"Performing ..
In data science projects you have often a chain of sub-projects, which accomplish their tasks independently, e.g.: Get Data: Fetch data with a web crawler, get other data from a database and other from an API. Save all data in a NoSQL database. Transform Data: Normalize and preprocess the data in different ways for different ..