And an armed insurrection in the US would do different? Further, as pointed out above, anything popular enough to become a huge deal would have an awful lot of military members supporting it. The fancy gear would find it's way into the hands of both sides.
Is there anything like this in the enterprise space? Many of our customers want authentication against their internal Active Directory or other single sign-on solution. It would be nice if there was a company that exported an api, and did all the work of connecting up the various types of auth, so that we can focus on our own product rather than redo integration work that has probably been done by many other companies already, probably even for the customer's other services.
There's a pretty big market for this/enterprise level identity management in general. At least in Germany, companies usually prefer inhous/more control over hosted solutions though (especially in the light of the last 1+ year). SAP IdM is the big dog here (it's somewhat messy though since SAP bought the technology and it shows that it's somewhat of a hodgepodge imo) and the only one I've worked with. I'm sure all the big ERP companies provide this in some way.
Not really the API you're looking for but I thought it was worth mentioning.
I'll tell you what I tell my team: it's barely more verbose, and the readability is up for extremely serious debate (I mean, everyone understands nested for loops, but the nested list comprehension thing is wierd... why is something that appears way way before the innermost "for" the same as something in that for loop's declaration?)
It may also be less efficient. When I'm shown numbers that the difference between the comprehension and the for loops are (in each specfic instance, or in aggregate for the program in question) is above statistical noise AND it's a significant factor in overall runtime (I won't ever worry about a millisecond when the runtime is 1s), then I'll gladly say: put them in.
Until then, just use the loops. Use of really strange language features that are surprising, not exactly idiomatic (this argument is common for this case) and not shown to be of actual benefit, are detrimental in a polyglot environment.
When I see a list comprehension I can see with a single glance what it's doing. Not so with the 4 line for loop. Comprehensions aren't a strange language feature in Python either...it's one of the central features of Python.
Don't use something until it's proven to yield a great benefit is a very conservative approach. That may be appropriate in some cases, but I'm very glad that I am not in such a team since that would be incredibly frustrating. I much prefer an approach where you go with the choice that's most likely the better one, even if it's not 100% proven better or not a big difference.
I'm talking strictly about multi "for" comprehensions. They just are too confusing to me and most of the people I've worked with ever. But we also use lots (most) python features fully, just that one has been the source of dozens of bugs in this one codebase, not to mention others I've worked on with other people. It is a shitty non-intuitive syntax.
Nested for loops, flatten(), various itertools functions and chained generator expressions all suffice, and I have yet to see them provide measurable slowdown to actual code compared to good algorithms and decent factoring. Like I said, I'll even use multi-for comprehensions if there is a measurable difference over nested for-loops.
Also, I think you are intentionally misrepresenting what I said - when I said don't use "weird stuff" I explicitly excluded idiomatic language things. That includes (for python) single for comprehensions. The multi-for comprehension is something I rarely come across in the wild despite it's long time existence in python - it's a weird one.
I think you are trying to justify your strange preferences after the fact. How exactly were there bugs caused by nested for loops that you encountered? It's not like if you mess up the order it will actually run without throwing an exception. Nested list comprehensions are idiomatic python. It's really strange that you don't let your team use them because you are afraid of them.
I mean, single level comprehension is good. Nested list comprehension is OK only in most trivial cases. In my opinion, if I see how a person uses list comprehension, I can tell, what kind of person this is.
There are people who, for example, do this
return all([some_predicate_fn(x) for x in lst])
instead of this
for x in lst:
if not some_predicate_fn(x):
and can live with themselves somehow.
Or there are people, who refuse to acknowledge the existence of anything besides Python 3.x and when forced to write in 2.x use list comprehension instead of iterator comprehension.
Thing is, the validity of using nested list comprehension depends not on the amount of for loops you have, but on the thing you want to do with the item. If it's just selection, then it might be ok. If you want to apply some kind of function to it, then it's most probably the case of trying to be too clever.
If you think two loops is not a "simple case" of a list comprehension as Google suggests to use them for, perhaps you shouldn't be doing code reviews. It sounds like your team would be held down by your weak grasp of the language.
In : a = 
In : a.append(a)
In : a
In : a
In : a
In : a
In : a
In : a.append(a)
In : a
Out: [[...], [...]]
In : a is a
In : id(a)
In : id(a)
Not defending google. Actually just slightly ranting on a tangent... Google today is not google 5 years ago. There are different employees, different managers, etc. To say that google (an entity with a single agency, as if it was a single person) "hustled" us by going through these changes is just not an accurate statement .
> Why would middle management changes affect their culture and principles significantly?
Because middle management acts as a filter on upper management's view of operations, and a filter between upper management and the people actually doing the work when it comes to directions going the other way. The effect Bruce Webster calls "thermocline of truth"  is one significant manifestation of this.
One thing this solves is the pronunciation of odd spellings of names, and to an extent, names that are foreign to the recipient (e.g. to an anglophone many eastern European and Asian names don't have an immediately decipherable pronunciation from spelling).
However, one of the problems it doesn't help with, is that different languages and language families have sounds that are not used in other languages. This means people will still get your name wrong, because they don't necessarily know how to make those sounds, nor do they even know how to hear the subtle distinctions - e.g. the classic r/l confusion, or my own inability to get tones right when trying to learn mandarin words/phrases.
I guess what I'm saying is I don't think anyone should expect this to suddenly make everyone pronounce their name perfectly all of a sudden.
People with such names might adapt them to be pronounceable (I do: my name has an English vowel which doesn't exist in German, and I introduce myself with a German approximation when I'm speaking German). But even the pronounceable version might not have an obvious correspondence with the written name. For example Nguyen might be happy being called [wɪn] rather than [ŋʷĩəŋ], but many English speakers will say something like ['guyɪn].
So as I read this comment at my favorite coffee place, a UPS truck is blocking 2 parking spaces. It's been parked there about 5 minutes, and several cars stopped, thinking it was leaving soon, messing up traffic on the road before driving away because it was taking too long. That's lost business and serious inconvenience for other people. As I type this the guy has left, but the package he took in was small enough for a drone to deliver.
Now a different truck has pulled up and double parked across the road, with the driver taking a document tube into the office building across the street.
I wish this example was contrived, but I just watched it happen.
Several drivers were inconvenienced (an ongoing situation at the moment, and I've had to listen to the sound of the idling engines, which are definitely louder than the cars passing by. Drones on the other hand would have zipped in and out, without disrupting the traffic or making me listen to idling truck engines for several minutes in a row.
It's not only about just-in-time delivery for ME, it also reduces a bunch of secondary hassles.
It's even worse than that... I live in Illinois, a state where there are not statewide quotas... however:
The cities have the ability to add extra licensure requirements, so quotas can and do exist at the city level. Further, there are strange rules about entry to taverns - for example age of entry need not be legal drinking age which differ by city. There are also city or even smaller administrative district rule over what can be sold, pricing rules (e.g. near the college campus there is a rule about the minimum price of a drink special that doesn't apply to a lot of other parts of town) and so on.
Regarding the age of entry, I recently walked past a bar in Chicago with a posted minimum age of 23. This struck me as odd (and somewhat offensive). I did a few searches, but had trouble locating any relevant information. Do you happen to know if the legislation provides insight into this sort of practice?
I know of quite a few places in Chicago with a mid-20's minimum age. To my knowledge it has nothing to do with any legal requirements but is based on the idea that slightly older people are less rowdy/better able to handle their drinks.
When I was 21/22 I rarely had a problem getting passed the bouncers in places with the higher age limits because "you don't look like you're going to do anything stupid"
Legality aside, because I don't doubt it is legal, something about the deliberate act of posting an age makes me deeply uncomfortable.
What I don't quite understand is they can turn away anyone for any [non-protected] reason already. What could be the thought process behind posting this? Especially when the establishment is unlikely to enforce it, as you noted.
As an establishment, feel free to turn away a large, intoxicated group. Similarly, it is your right and responsibility to avoid over-serving. And furthermore, you may choose to establish whatever ambiance you choose through your decor, music, lighting, and even pricing. Between these things, you can maintain the atmosphere and attract the customer base you desire.
I think it just makes things easier. Sure people over 25 are still capable of causing problems, but I’d bet they are much less likely to be trouble and much more likely to politely leave when told they are.
It also makes things much easier at the door. If a group of college kids decide to show up one night it’s much easier to say “can’t let you in, too young [and I don’t make the rules]” than “won’t let you in, I don’t want to have to kick you out.” It lets the bouncer deflect the decision and appeal to an authority that’s not in the conversation.
I don't think there is any prohibition on age discrimination for public accommodations. Title II of the Civil Rights Act forbids discrimination on the basis of race, color, religion or national origin and Title II of the Americans with Disabilities Act covers discrimination on the basis of disabilities, but there doesn't seem to be anything preventing public accommodations from discriminating based on age. The Age Discrimination in Employment Act, which is what prohibits employers from discriminating based on age, doesn't contain anything about public accommodations.
I like to phrase this as "style doesn't matter, consistent style does".
It's important to have consistent style, because once a programmer internalizes the local style - some types of bugs become transparent: the upon understanding what something is supposed to be doing, the style provides visual cues to the flows and a certain predictability in the code. When something is wrong it looks wrong.
Yes, indeed. I think consistency within one file is a good rule of thumb.
As an aside, are there any editors that could automagically infer formatting rules (to use for indenting, folding, etc.) upon opening a file? I'm using vim but I think I'd be willing to switch for such a feature.