[0] https://pyapi-server.readthedocs.io
32,006 karma · joined July 21, 2008
[0] https://pyapi-server.readthedocs.io
> A single talented carpenter with an energetic but otherwise totally unskilled
> helper can accomplish more in a shift than two talented carpenters together.
> If you don't have someone to run to the truck for nails, hold shit, move
> ladders, etc. productivity suffers because your talent is wasting time on
> menial tasks.
But you are mistaken -- each of us (the software engineers) already has numerous helpers who fit this description perfectly. The only difference is that we don't call them "apprentices" -- we call them compilers, interpreters, build tools and the like. Probably the only term that is commonly used on both types of helpers is "git".Joking aside -- if you find yourself and your team spending too much time on menial tasks, you need to focus more on automating them. Of course, how much can be automated depends on how much hardware is involved in your work; as long as we're in software world, pretty much anything can be automated.
Edit: On an unrelated note, TIL that the sign used on telephone keys is also not #, but ⌗ -- a.k.a. the "Viewdata square" [0].
[0] https://en.wikipedia.org/wiki/Viewdata#Keypad_symbols:_the_s...
Python is strongly typed, but it does not mandate static type analysis -- unlike most other typed languages, where it is mandatory at compilation time. But if you choose to use it, there are tools which will run it for you at any point in time (mypy being the reference implementation). You don't even have to write any special annotations for that: the checker will try to infer the type when possible, or use Any when it isn't.
The crucial thing to understand is that Python is still dynamic at runtime -- there are no checks that an argument is of the correct type defined for the corresponding parameter. So your program can fail the static analysis but correctly run in practice, unlike most other statically checked languages.
Another effect of the above, which is often overlooked, is that many developers tie themselves into knots to get the type annotations right on unit tests. This is completely missing the point, as unit tests and static typing are at completely cross purposes: while static analysis evaluates, as the name implies, the code in its static state, the unit tests only make sense when they are executed, i.e. at runtime.
So the practical rule of thumb, learned from practice, is:
1. Regularly run the static analysis on your application (and library) code, adding any necessary annotations, to weed out various problems that might arise from mismatched types.
2. Write thorough unit tests -- ideally with plenty of property tests with tools like hypothesis [0] -- and run them regularly.
In other words: In Hertford, Hereford and Hampshire, hurricanes hardly ever happen.
Just because you can't connect to the Internet from your car doesn't mean that the car is not being tracked. Pretty much all cars built since 2016 or so have built-in infrastructure to collect various telemetry and send it to the manufacturer; prior to that there were dongles that were installed by various parties (automotive clubs, insurance companies, fleet owners...).
Most manufacturers also offer (or are working on offering) that data to third parties, although in most jurisdictions it requires the vehicle driver/owner to explicitly agree to it. In any case this whole area is still in its infancy, and we can expect to see more standardisation and wide use of that data in the coming years.
Source: worked in that industry until recently.
The main problem with Poetry is that it still does not support PEP 621. [0]
[0] https://en.wikipedia.org/wiki/Ski_jumping_techniques#V-style
My memory says that it was first implemented in IE 5.5, which was released in 2000. Wikipedia says [0] that it first appeared in IE 5.0 but with a different syntax.
[0] https://twitter.com/mathiasverraes/status/632260618599403520
I respect Itamar even more after realising that he has invented the time machine... :o
Wouldn't he still need a passport to get on this first flight anyway?
A lobster is a tree that reduces to a caterpillar when pruning all leaves.
[0] https://networkx.org/documentation/latest/reference/generate...The truth is, they don't really have a choice. The Conservatives and their financial backers have been taking full advantage of the electoral system in the UK, which is how they reached 56% of seats in the House of Commons by winning only 43.6% of the vote.
In fact, inheritance has nothing to do with reusability (or flexibility): it's point is to provide typing hierarchy, so the code can follow the Liskov substitution principle.
In "traditional" Python, which is dynamically typed and never statically analysed, there were no built-in controls over what is being passed at runtime, so the only real purpose for inheritance was to reuse code. This changeds with the introduction of typing annotations -- while the runtime is still fully dynamic, you can use mypy and other static analysis tools to minimise type-related errors before deploying.
In fact, Python has a great way to both support composition and support interfaces without requiring inheritance: a combination of typing.Protocol and mixins.
This is a false dichotomy, as OpenAPI and JSON Schema are complementary: as of version 3.1, OpenAPI use JSON Schema to describe request and response payload content (prior to that version it was almost compatible).
They describe different things: OpenAPI describes the request-response API model, while JSON Schema can be used to specify contents of any JSON-encoded data -- for example in streaming messages or document databases.
There is also AsyncAPI, which is designed to document and specify the event-based API, for example in a system using Apache Kafka or a similar queue to communicate.