476 karma · joined May 12, 2020
The programming language that has the least measured bug in practice is Clojure because it is duck typed and because it doesn't use OOP. Both static typing and OOP have a significant measurable negative effect on code correctness.
The number of characters and lines to access the members of namedtuple is significantly less than dataclass.
dataclass would have similar issues if st_dev was now defined as a string whereas namedtuple would not.
Whilst there maybe edge cases in using simpler constructs, in scripting languages we accept the edge cases as it pays off in 99.99% of cases to simply ignore them. If something goes wrong, you catch the exception "Ask for forgiveness not for permission" if you want to look up the concept.
It's like British tanks in WW2, your system is composed out of standard parts. Not necessary the best, but standard parts and that's what tends to be important.
Someone properly trained with something like Smalltalk will on average output 3x the amount of software as someone trained on something like Java.
There are big advantages to doing it.
It's generally better to do proper micro-services.
Type safety is the inferior way of doing it where you get hit with a double whammy of long compile times and extreme code verbosity.
https://docs.python.org/3/tutorial/
Use multiprocessing not multithreading due to the GIL.
Python optimization is generally at a higher level, you use a better algorithm to get a result faster, rather than you saved an unnecessary copy.
Know when to use Python async.
Python is slow but you can always move work over into the database or dedicated library like NumPy.
Use the faster Python interpreter PyPy, which does JIT.
Do a multiprocessing pipeline with your CPU bound work broken down into stages.
And not just you, it's a core part of cloud computing's monetization model.
Additionally, if anything goes wrong with your Digital Ocean account, Digital Ocean will not help you. So you are running a high risk.
No you aren't running tests because you will be locked in to aws and your cloud computing bills will eventually bankrupt you.
$60,000 per year in-house vs $1,200,000 per year aurora. No brainer really.