476 karma · joined May 12, 2020 (6y ago) · 570 submissions
comment 4y ago · link · parent
Set up an exchange for 1000 tokens to $1000 dollars.
Set an online identity verification service for issuing a token.
Not all tokens will be exchanged back to real money, which means you have money for the online identity verification service and associated bank fees.
comment 4y ago · link · parent
Basically you write a ton of 3k line scripts, have them talk to each other a message queue like RabbitMQ and have a SQL Server e.g. PostgreSQL server do all the heavy lifting for you.
You can't do any program like that but 80% of programs that are written in businesses can be done like that. Typical CRUD stuff.
And you can develop it at 3x times the speed then if it was done in a more traditional language like Java/C# etc..
Python is a powerful language if you use it for the right use cases.
comment 4y ago · link · parent
comment 4y ago · link · parent
If you have introduced static typing, you then have to start doing refactoring and verifying correctness. "heavily-typed mono repos which is a breeze to operate on" I highly doubt such a thing exists, more likely you are used to a certain level of bad code and don't understand it can be better.
comment 4y ago · link · parent
What you get with typing and interfaces is that all the code has an interface. Small sections of code have a large badly-defined interface.
The main reason people are using typing in Python is to support large Monorepos. Because everything is typed in them, all the code in the repository depends on all the other code in a spaghete dependency graph.
This results in the following issues:
* Small code changes lead to hour long unit test runs since most of the unit tests need to be rerun for every change.
* It's impossible to update the Python version since all the Python code needs to be updated at the same time.
* Long check-in times for changes running MyPy over 100k lines of code.
* Maintainability issues since code can't be updated without knock on effects all over the codebase.
Okay, so what are the benefits of using types in Python:
* On average MyPy type checking will catch 1 bug per developer per year, which wouldn't of being caught normally.
* It makes people who previously coded in statically typed languages feel more familar with the code.
Basically, if you look at the Pros vs Cons, you should ditch the typing checking. It's a net negative to the codebase.
comment 4y ago · link · parent
Ahh so if a method on an object dynamically adds in the quack() method at runtime, does the object spontaneously change type?
comment 4y ago · link · parent
If at some point you decide the way one of those sub-libraries works is wrong, could be done better, etc. then you can write a new sub-library that just provides the same public interface.
One of the reasons why Python is so successful is it's usage of dynamic typing. Obviously, if you lose static typing some else needs to take it's place, in Python's case, stronger encapulation.
comment 4y ago · link · parent
"Having to dig through reams of source code to figure out what attributes I can use, or what *kwargs a function takes."
Figuring out the attributes and what kwargs a function takes is the role of your intelligent IDE and docstrings. You think you need to static typing for this since you haven't spent the time to learn how Python does these things.
Duck typing says, duck doesn't have a type, not even Duck, anything that quacks is a duck even a 115 ton truck.