3 ms·
I thought this too before my current python project. It doesn't even use type hints and has no tests. When I look at something I don't know what it is, what i
by tcfhgj 3y ago
I thought this too before my current python project.
It doesn't even use type hints and has no tests.
When I look at something I don't know what it is, what it does, and have to debug there (mentally or actually) to even know what's happening. If I change something, a few runtime errors pop up right at the start. Others take 30 minutes.
- ReflectedImage 3y agoThis may shock you but there is effort involved in learning how to use Python effectively.
- tcfhgj 3y agoWhat has this to do with my comment?
- ReflectedImage 3y ago"Others take 30 minutes" If you knew what you were doing with Python, you wouldn't have this problem. Obvious solutions include unit tests and pickle.
- tcfhgj 3y agoUnit tests wouldn't help with that, because it doesn't cover the interaction of all the classes when they pass data on to each other; and they would probably take me months; I would need integration tests, for which I first need to understand how the code works together
- ReflectedImage 3y ago"all the classes" Write simpler code, let go of the complex Java class hierarchies. No one can understand them, it's hard to reasonable them and they are mostly a mess. The point of Python duck typing is you do more by writing less code.
- tcfhgj 3y agoData flows through functions as well... Or between classes that are injected , no hierarchies required; Anyways I can't make wishes about how the code was written