Well, yes, cross-post
from the main blog ...
When I returned from Russia in the winter of 2006-2007, I first encountered innovation after 9/11, when at the airport of departure representatives of the American services look in advance at the passengers flying to the United States. This is not done everywhere, but in a number of countries with which there are relevant agreements. With Italy, such was obviously, and I just flew out of Rome.
In general, the aunt at the intermediate control (apparently still Italian) for a long time, with a perplexity, twisted my passport in her hands, asked stupid questions, and then transferred me to a representative of the American service. The girl immediately began to ask me about my route (itinerary). To which I reasonably replied that my route was on her computer and on my tickets. The girl stupidly continued to ask: "Sir, what's our itinerary?" I diligently answered in detail what was written on the tickets - Seattle-Atlanta-Rome. But this was clearly not what interested her, so she switched to rudeness: “Sir, do you speak English?” “Well, do YOU ​​speak Englsh? Look at the ticket, you see? The word "itinerary", and then Seattle-Atlanta-Rome. That's what the dictionary means by "itinerary." If you mean something else, explain what and I'll gladly answer. Just repeating the word "itinerary" does not help. "(For those who do not speak, translation," Do you speak English yourself? See, the ticket? On it the word itinerary, followed by Settle-Atlanta-Rome. That is the word itinerary means according to the dictionary. If you mean something else, explain that - then I will be able to answer. And repeating this word like a parrot will not help. "
In the end, I guessed that it was not the flight that was meant for the whole trip. I told her about the whole trip, what was the end of it. But I absolutely could not understand why it came to me? And only about a month later, at home, it dawned on me. For a month of vacation I never shaved my beard !!! And therefore, for these girls, I looked just like some kind of mojahed. I suspect that Orthodox priests and Hasidic Jews should experience the same inconvenience when traveling in civilian clothes.
')
And that is all that this ... th administration spent billions of dollars from 9/11 on the pretext of state security ??? !!! To cuddle up to bearded tourists ??? !!!
Actually, all this is a saying, and the tale is just beginning. Just laws in favor of national-state-and-just security are very often made with very good intentions, with which the road is paved, you know where. And the main reason is a lousy design, which I dare to illustrate with examples in programming languages.
So, the law that allowed this check at airports had the intention of something like:
if (Traveler.isTerrorist) {delay ...}
Everything is simple and clear, even for congressmen. Among which, by the way, there are no scientists, and I haven’t heard anything about programmers. And PM-Congressman writes such a law-spec, and punches his statement. And then it comes to programmers, in the case of laws, special services, which no one has taught to programmer design. And so he looks at this law-spec, and sees with horror:
class Traveler {... private: bool isTerrorist; ...}
That is, the field is not available. And it is impossible to change its scope, since it is part of the platform. Oops ...
What does a good programmer do in this case? Well, of course, to put a blow on PM's ears, to screw the tails of the authorities, to ensure that everyone understands that this cannot be implemented, something more reasonable is needed. Nobody says that the feature is not needed, just to define it in some other way, so that you can reasonably implement it. Is it logical Is logical.
And what the fucking programmer does? Hardworking rolls up their sleeves, he writes one hundred thousand lines of heuristics, in which not only the devil, but he himself constantly breaks his legs, and which end up at airports starting to molest bearded tourists.
You already understand what class of programmers our intelligence services belong to? Yes, yes, "ours", they all act in approximately the same way around the world, if at all.
By the way, they cannot even be blamed for this. If you followed my posts, then the modern security services on both sides of the ocean is a product of socialism, in which they looked after the organized mass and unified working class. The objects of their “protection” were like nails coming out of a single stamping press - the system of universal secondary education, which stamped brains in accordance with the requirements of propaganda and mass technology. In such a system, firstly, it is true that you can have such a field as public, printed in a passport, and secondly, the interchangeability of elements allowed you to tear off the square ears first, at the slightest suspicion, and then figure out whether they were square. Because replacing an element was cheaper than the risk of having a bad element in the system. Remember?
"There was no nail, the horseshoe was gone,
There was no horseshoe - the horse was lame,
The horse limped - the commander is killed,
The cavalry is defeated, the army is running.
The enemy enters the city, captive without sparing,
From the fact that the forge was not a nail. "?
Here are the security forces and engaged in the fact that the horseshoes were not bad nails. Moreover, the business is good, but with the gradual departure of socialism by the mass working class, organized workers, and more and more specialists who, contagious, are very expensive and very difficult to replace, become less and less. Socialist special services, in principle, had known about it before, for nothing, Beria was looking for specialists for the camps - only now they are becoming massive, and therefore the old approaches for society are getting worse and worse.
In a word, it is one thing if it is a nail in a horseshoe, worth a penny on a market day, and it is another thing if it is some kind of cylinder head in a Mercedes S-class engine with three embedded processors and a pair of expensive sensors.
If we make biological analogies, then to get rid of some classes of parasites in the human body, enough glasses of pumpkin seeds, which, being poisonous for these parasites, almost do not harm the person himself. If we are talking about bacterial infection, then we have to use antibiotics, from which even normal cells have not sweet. Moreover, the infections adapt to antibiotics, and each time some new, even stronger antibiotic is required, essentially poison, in order to act.
In medicine, it has already come to us that with infections and antibiotics we got into the “Race of the Red Queen”, and therefore it is much better if you can effectively use the much more selective immune system of the organism itself. Socialist special services are essentially an antibiotic, what they should evolve in the new conditions, much more should resemble the immune system. Although it should look like, it is not easy to say. In any case, it is impossible to say that they are not trying, but the road ahead is still fair, if their beard is embarrassing.
By the way, did you notice how smoothly Marxism essentially flows into the theory of corporate parasites?
However, we digress. After all, the conversation was about the design of laws. Let's take a look at these two pseudocode fragments:
class Queue {
void Add (Element elem) {
lock (queue) {
add item
}
}
int Length () {
lock (queue) {
recount length
}
}
}
Now compare with this:
class Queue {
void Add (Element elem) {
lock (queue) {
add item
Length = recount length
}
}
int Length = 0;
}
Will the first code work? Yes, it will be normal. But, first, it locks the lock on each request for the queue length. It can be said that in some languages ​​this is a very cheap operation, and that it is just a small and quite tolerable nuisance (stupid and unpleasant trifle) in the code. Unfortunately, careless attitude to trifles can lead to very unpleasant results. Imagine that you have two such queues, for example, for audio and video, and when added to each of them you need to check the length of the other. Then when you add to them from different threads (threads) you get a deadlock. So, for the first design, the programmer can legitimately get his ears. Unfortunately, for such a design of laws and their implementation, no one gets their ears, but would be worth it.
And now, after four pages, I finally got to what I actually wanted to say. Criticism of many laws adopted with good intentions, causes an angry reaction of their defenders. How??? Does he object to the DMCA ??? Oh! Oh! Pirate!!! How??? He is against the fact that recruits are caught at subway stations ??? Oh! Oh! Nepatriot !!! What??? How??? He does not like the SBA boorish letters ??? Is he for the illegal distribution of software ??? But why go so far to my recent post about the future business model of the video industry, there were characters instructively declaring that it was not good to grab and run. The fact that there was no “grabbing and running” in the article, and they pulled it out of the sleeve, of course, the guys were not at all embarrassed.
What all these idiotic screams ignore (I suspect that it is often quite deliberately) is the fact that laws have two ways to restrain certain actions. They can (1) prohibit something, but they can (2) cause inconvenience, nuisances. When laws are passed, they usually mean (1), they are created to prohibit something specific. (2) is usually obtained as a side effect as a result of poor design or poor implementation (or both of them). And (2) legislators wonder surprisingly rarely. And given that the design of laws is usually ugly, design and implementation bugs often create a lot of the second — nuisance.
Again, let me digress again. The funny thing is that the language in which the laws are written (jokingly called legalese) is designed precisely to be vague and ambiguous, in contrast to programming languages, designed precisely to ensure that everything is absolutely unambiguous. So some of the blame falls simply on the system itself, which by design uses ill-suited means. I can not share a joke about the opposing goals of engineering (in particular, are busy writing programs) and jurisprudence (receiving income from the inaudibility of laws):
The engineer died, and for some reason went to hell. Looked around, horror ... Smoke, soot, ugly working conditions, safety is not observed. Well, it’s a usual thing, he gave horns on the horns, rolled up his sleeves and began to put things in order ... After a couple of months, God calls the Devil on a “spinner” and asks: “Well, how are things going in your unit.” . You sent an engineer here to us, so he arranged everything here, air conditioners, filters, fresh air, sinners instead of cooling off in a frying pan, they are busy with useful things, everything is so cool! "" Hey, what does your engineer do there? This is in error. Let him go to heaven, he has nothing to do! ”“ I will not give it up! I need it myself! ”“ Yes, what about you? Do you think with whom you say ??? I'll sue! ”“ Well, where do you find a lawyer? ”
Example: DMCA and its DRM generation. The intention is wonderful - you can not steal works. If the host author requires a bribe for them, you have to pay it. The idea is generally correct. But the design of the law and its implementation ...
Let's say I'm not against DRM on specialized devices like the Xbox or DVD players there. Although about this, Sergey Solyanik has a separate opinion - he connects Windows Media Center, projecting TV and other media scrap in such tricky combinations that he often stops playing completely legitimately purchased DVDs. But I am a simple person, so I did not encounter such problems. But when DRM is planted on my computer (especially if it is done in the Sony style - like a rootkit virus from a music CD), then I am rightfully offended. And for a good reason. My computer is not a specialized media player. I use it for other purposes. And if, like one of my friends, DRM blocks my ability to edit my own photos and videos from the last vacation, then the possibilities to express my feelings within a literary language are very quickly exhausted. In addition, this dog spoils the speed of my computer, and I did not pay money for iron, so that anyone could use it. So, if the video industry starts paying me for the stolen performance of my computers, and for each inaccessible file with photos from my vacation, as much as she wants for each illegally copied drive, I would have thought. And so this is a nuisance in favor of an outside uncle.
By the way, even with this condition, I would not be very excited. Judge for yourself, DRM is essentially an electronic cop in your property. Today they put a cop in your computer, tomorrow in the cafeteria, where tomorrow? In the bedroom? I don't need a cop in the bedroom, unless it's my wife.
Returning to the programmer analogy, as a result, we trust to write law programs by definition to fucking programmers (lawyers) by definition to a fucking programming language (legalese), which results in (geniuses among readers probably guessed already) by definition fucking programs (laws) , with no possibility of choice.
If you do not like Vista, you have XP, Mac OS and Linux. If you do not like MS Office, you have Open Office. If you don't like C #, you have Java. If you don't like BizTalk and MSMQ, you have WebSphere. If you don't like the law, then you can't do anything about it. Moreover, laws are written in a language in which it is impossible to write without bugs and whose “programmers” would instantly be expelled from Microsoft, from IBM, and from Sun. And in OpenSource just in a friendly way they would have smacked the ears for such code.
Well, and how do you like it? In most cases, the goals that are pursued by the laws are correct. In many cases, their design and implementation is a nuisance, the price of which for society is comparable to the problems that this law was supposed to prevent, and often it is also not able to prevent them for the same reasons. This is the power of nuisance, and we should not forget about it when discussing the laws and their implementation, including when someone expresses doubt in the next well-willed wishing.