New answers tagged

1 vote

Better way to type casting an object from one custom class to another

If "being convertible to class A" is a requirement for class B, then the function is serving a purpose. If you don't want to declare it for seemingly no reason, perhaps A and B can also be ...
Kilian Foth's user avatar
3 votes

Is this architecture overkill? What is a good way to architect this software?

If you just call your functions "Algorithm" and "Calculate" then it's hard to make a judgement about the structure of your code. Should Calculate1 through 5 be separate functions? ...
Ewan's user avatar
  • 74.7k
5 votes
Accepted

Is this architecture overkill? What is a good way to architect this software?

Your new approach isn't inherently wrong. However, there are a few things I would like to question here: Currently, the Algorithm.calculate function in your example contains almost no generic, astro-...
Doc Brown's user avatar
  • 206k
0 votes

Python API - store data in SQL AND NoSql

First of all, thank you very much for the detailed answer! Based on your answer (Phill) and if I understood it correctly, NoSql would make sense in my this case. My thought process was as follows: the ...
flo's user avatar
  • 1
3 votes

Python API - store data in SQL AND NoSql

I would like to be able to store and retrieve sensor data as time-efficiently as possible. Are you sure? "As efficiently as possible" could lead to all sorts of overengineered schemes. Or ...
pjc50's user avatar
  • 13.2k
3 votes

Python API - store data in SQL AND NoSql

The first question you should ask before deciding how to store any Data is: How are you going to retrieve this Data? If you need to be able to query your data quickly by specific elements or ...
Phill  W.'s user avatar
  • 12.2k
3 votes
Accepted

How to test integration with an infinite generator

Removing the message and time limit from production code involves reorienting your view of this integration test. Ideally the test should connect to the Kafka queue that the System Under Test is ...
Greg Burghardt's user avatar
0 votes

How to structure a modular MITM proxy with python

Import Python modules dynamically import importlib module = importlib.import_module('my_package.my_module') my_class = getattr(module, 'MyClass') my_instance = my_class() The time and location to ...
Basilevs's user avatar
  • 1,568

Top 50 recent answers are included