The point of the article is to parse AND validate input AT THE BOUNDARY between the outside world and your program, rather than a bunch of ad-hoc validations at various points after the suspect data has entered the castle walls and has already been (at least partially) processed (thus making the program state harder to reason about). By enforcing your invariants at the border, you ensure that all data entering your system always conforms to your expectations, just like a strong type system ensures that invalid states are not representable. A schema is basically a type system for your raw data.
Great to see this article, I totally agreed with the view that rejecting any invalid case by designing the right data structure.
Unfortunately, it is hard to achieve it in practice and people even don't realize this, JSON Object is a good example, Human are incline expecting the duplicated key is not allowed in JSON, but it happens.
For this goal, I think the Protobuf is good way to eliminate the possible invalid data for data transportation.
Suddenly my whole life made sense, I understood that there are well-known and documented reasons for why I am the way I am, and that I'm not alone in my experiences.
Yep. Most likely to try and catch Chinese spies or other countries like India, Iran, Russia, and others as they continue to go after dissidents abroad.
Or to track US activists and resell the information to the US government, in exchange for data on other five-eyes citizens or access to other surveillance systems (US ones are obviously the best, from a military standpoint).
More like "or (insert country that shouldn't be doing something according to its own laws) to (do something against its own laws) for the purposes of (someone's profit)".
Sure and that applies (at least) to the EU (and friends), US, UK, China, Russia, Japan, South Korea, Singapore, Australia, New Zealand, Saudi Arabia, Israel, Turkey, India, etc.
Let me think - could it be the one country with a complicated situation where most of the security-services apparatus is nominally allied but actually supporting forces opposed to the US (talibans etc), with a sclerotic political system defaulting to military dictatorship every other decade; or the long-standing allied democracies (plural) with a well-documented history of structural cooperation in matters of espionage and surveillance, particularly at the IT level...? Which of the two would the US government rather let run surveillance on US citizens? Mmmh, I wonder!
I also immediately thought of jslinux but it's actually not the same thing: it's not Linux compiled to wasm running directly in the browser, it is a hardware emulator in JS and Linux (and a few other OSs actually) running on the emulator.