Month: September 2020

Dynamically determining AD Page Size

Question — is it possible to dynamically determine the maximum page size when communicating with AD via LDAP? Since the page size (1) changed between versions and (2) can be user-customized … a guess is sub-optimal.

Answer — yes. If only the default query policy is used, search at
CN=Default Query Policy,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,*domain naming context* (e.g.
CN=Default Query Policy,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=example,DC=com) with a filter like “(&(cn=*))”

Return the ldapAdminLimits attribute. Parse MaxPageSize out of the attribute:

lDAPAdminLimits (13): MaxValRange=1500; MaxReceiveBuffer=10485760; MaxDatagramRecv=4096; MaxPoolThreads=4; MaxResultSetSize=262144; MaxTempTableSize=10000; MaxQueryDuration=120; **MaxPageSize=1000**; MaxNotificationPerConn=5; MaxActiveQueries=20; MaxConnIdleTime=900; InitRecvTimeout=120; MaxConnections=5000;

To find all of the query policies, search at CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,*domain naming context* for (&(objectClass=queryPolicy)) … either research a lot about query policies and figure out how to determine which applies to your connection or take the lowest value and know you’re safe.

Minority Rule

‘Having more Reps than any other state’ does not mean “the population is equitably represented”. The number of people represented by those Representatives (or electoral college delegates, for that matter)? Each House member represents ~702k Californians. Each electoral delegate represents ~677k Californians.
Congressional apportionment isn’t fractional, so there’s over- and under- representation — the distribution just advantages different states. Rhode Island had just over a million people in the 2010 census but have two reps — each of those individuals represent some 500k Rhode Islanders. There are states that fair worse in the HoR — Montana had just under a million and have one rep.
Taking the American government as a whole — low-population density states are over-represented in the Senate and Electoral College — which also means they are over-represented in SCOTUS. Asserting “the majority have a chance to win one half of the Legislature … a chance to create an impasse where nothing gets done” isn’t the most functional form of government imaginable. I understand and appreciate the “minority rights” idea behind over-representation. And, obviously, those in the minority will view the situation differently. But there’s a difference between the minority having enough power to force compromises toward their position and minority rule with … well, seemingly “fuck you”. Or minority rule with a majority who are able to prevent legislative changes (leading to the prevalence of Executive Orders).

 

Number of people represented by each rep in the Senate:

This is where I’d know small populations are over-represented. Two senators regardless of population — a state with a hundred residents would have two senators. Obviously we don’t have a state with a hundred residents — but the least populous states are the ‘best deal for residents’ list — lowest number of people represented by each Senator

Size Rank State 2010 Population per Census Senators # Represented per Senator
52  Wyoming 563,626 2                                     281,813.0
50  Vermont 625,741 2                                     312,870.5
49  North Dakota 672,591 2                                     336,295.5
48  Alaska 710,231 2                                     355,115.5
47  South Dakota 814,180 2                                     407,090.0
46  Delaware 897,934 2                                     448,967.0
45  Montana 989,415 2                                     494,707.5
44  Rhode Island 1,052,567 2                                     526,283.5
43  New Hampshire 1,316,470 2                                     658,235.0
42  Maine 1,328,361 2                                     664,180.5

And the most populous sates are the ‘worst deal for residents’ list — highest number of people represented by  each Senator

Size Rank State 2010 Population per Census Senators # Represented per Senator
1  California 37,253,956 2                               18,626,978.0
2  Texas 25,145,561 2                               12,572,780.5
3  New York 19,378,102 2                                  9,689,051.0
4  Florida 18,801,310 2                                  9,400,655.0
5  Illinois 12,830,632 2                                  6,415,316.0
6  Pennsylvania 12,702,379 2                                  6,351,189.5
7  Ohio 11,536,504 2                                  5,768,252.0
8  Michigan 9,883,640 2                                  4,941,820.0
9  Georgia 9,687,653 2                                  4,843,826.5
10  North Carolina 9,535,483 2                                  4,767,741.5

 

Number of people represented by each rep in the House of Representatives:

But the apportionment in the House of Representatives isn’t as equitable as one might assume. It’s a different list of states under- and over- represented … but one rep from Rhode Island represents half a million people. One rep from Montana represents just short of a million people!

Best deal for residents — small number of people represented by each rep

Size Rank State 2010 Population per Census Reps # Represented per Rep
44  Rhode Island 1,052,567 2                             526,283.5
52  Wyoming 563,626 1                             563,626.0
39  Nebraska 1,826,341 3                             608,780.3
38  West Virginia 1,852,994 3                             617,664.7
50  Vermont 625,741 1                             625,741.0
43  New Hampshire 1,316,470 2                             658,235.0
24  South Carolina 4,625,364 7                             660,766.3
21  Minnesota 5,303,925 8                             662,990.6
42  Maine 1,328,361 2                             664,180.5
13  Washington 6,724,540 10                             672,454.0

Worst deal for residents — high number of people represented by each rep:

Size Rank State 2010 Population per Census Reps # Represented per Rep
45  Montana 989,415 1                           989,415.00
46  Delaware 897,934 1                           897,934.00
47  South Dakota 814,180 1                           814,180.00
40  Idaho 1,567,582 2                           783,791.00
27  Oregon 3,831,074 5                           766,214.80
31  Iowa 3,046,355 4                           761,588.75
25  Louisiana 4,533,372 6                           755,562.00
28  Oklahoma 3,751,351 5                           750,270.20
18  Missouri 5,988,927 8                           748,615.88
32  Mississippi 2,967,297 4                           741,824.25

 

Electoral College:

The combination of which yields the over and under representation in the Electoral College (and the reason I think the National Popular Vote Interstate Compact is such a good idea).

Best deal:

Size Rank State 2010 Population per Census Electoral Delegates # Represented per Delegate
52  Wyoming 563,626 3 187,875
51  District of Columbia 601,723 3 200,574
50  Vermont 625,741 3 208,580
49  North Dakota 672,591 3 224,197
48  Alaska 710,231 3 236,744
44  Rhode Island 1,052,567 4 263,142
47  South Dakota 814,180 3 271,393
46  Delaware 897,934 3 299,311
43  New Hampshire 1,316,470 4 329,118
45  Montana 989,415 3 329,805

And the worst deal

Size Rank State 2010 Population per Census Electoral Delegates # Represented per Delegate
1  California 37,253,956 55 677,345
3  New York 19,378,102 29 668,210
2  Texas 25,145,561 38 661,725
4  Florida 18,801,310 29 648,321
5  Illinois 12,830,632 20 641,532
7  Ohio 11,536,504 18 640,917
10  North Carolina 9,535,483 15 635,699
6  Pennsylvania 12,702,379 20 635,119
11  New Jersey 8,791,894 14 627,992
8  Michigan 9,883,640 16 617,728

Divide by Zero Error

None of which speak to the almost five million people who are unrepresented in the Legislature. Or the just short of one million people who aren’t even represented in the Electoral College.

Size Rank State 2010 Population per Census Reps # Represented per Rep Senators # Represented per Senator Electoral Delegates # Represented per Delegate
29  Puerto Rico 3,725,789 0 #DIV/0! 0 #DIV/0! 0 #DIV/0!
51  District of Columbia 601,723 0 #DIV/0! 0 #DIV/0! 3 200,574
53  Guam 159,358 0 #DIV/0! 0 #DIV/0! 0 #DIV/0!
54  U.S. Virgin Islands 106,405 0 #DIV/0! 0 #DIV/0! 0 #DIV/0!
56  Northern Mariana Islands 53,883 0 #DIV/0! 0 #DIV/0! 0 #DIV/0!
55  American Samoa 55,519 0 #DIV/0! 0 #DIV/0! 0 #DIV/0!

 

And the spreadsheet, in case it’s useful to someone else.

On Rioting

A friend issued a challenge to substantiate the position that protesting police brutality isn’t justified. I was on a debate team in 1992, and there was a similar debate topic the Autumn after the Rodney King verdict / LA Riots. I won by convincing people that the LA rioting wasn’t justified. But I also won by advocating *other* rioting … which I doubt was what the debate sponsor meant when assigning the sides as “The rioting that occurred in LA following the Rodney King verdict was (not) justified”. And my position was not something the other debater was prepared to rebut. Instead of the easily defensible position that disruptive protests are correlated with change and change is obviously needed (which he was well prepared to rebut), the other debater had to defend destroying the property, businesses, and persons of uninvolved parties.
 
My argument at the time, which generally holds today, is that general rioting is understandably cathartic — ironic because I suspect the police brutality we’ve witnessed has been cathartic for the officers involved. The system is corrupt; burn it down! But understandable is not the same as justified or right. In 1992, some half of the damage was incurred by Korean-American businesspersons in a particular section of LA. Some half a billion dollars! People fob off property damage because “insurance covers it”. Being reimbursed for damaged property does not erase the harm. People are still physically hurt. There’s time rebuilding, lost business. Insurance rates are calculated to ensure profits for the insurance company. Increased risk means increased premiums. Property underwriters, in 2020, are rethinking their risk calculations because civil unrest had been fairly uncommon in the US. But it’s becoming more common and something they need to price into policies. Increased expense is a widespread, long-term damage that erodes the viability of small businesses.
 
Just short of 14% of the LAPD were classified as Asian American in 1990. The force was over 60% white. The officers who assaulted King were 100% white. The jury included ten whites (one bi-racial male, one Latino, and one Asian American). That’s more than 75% white and not quite 8% Asian American. How are the people whose businesses were destroyed in a position to remedy either the proximal or distal problems fomenting the riots? Larry Tarvin is white; Reginald Denny is white. Beyond the misfortune of sharing a common (and very broad) ancestry, how are these men representative of racist policing practices? Of a judicial system that tells police officers that it’s OK to beat someone? But they’ve been terribly injured just the same.
 
War used to involve a lot of generalized destruction. There’s a reason governments were generally housed in the center of their territory. The king is safe because you need to march through a hundred miles of peasants to reach him. And the king doesn’t really concern himself with a bunch of dead peasants. With the advent of air-delivered ordinance, the methods of war have changed. Attacks can be targeted to military and government installations to reduce collateral damage. Rioting can similarly be adapted to reduce collateral damage. To some degree, I’ve seen more targeted destruction this year. CHAZ in Portland, burning police cruisers, torching the police station in Minneapolis, attacks on federal buildings when Trump started deploying his DHS army to attack on protesters? I cannot mount an argument against those actions. Technically, it’s illegal. But I despair as Democrats politic in good faith whilst Republicans undermine the Democratic system to ensure victory … same here. If one side decides to descend into lawlessness … the “we go high” approach has not historically worked, and I have no reason to expect it to work in the future. But there’s still a lot of collateral damage. The rioting is frequently mis-targeted, and this renders the protests less effective. Will looting my clothing store spur me to your cause? No! This is one lesson from the American invasion and occupation of Iraq — you can turn people against you by maiming their uncle and destroying their business.
 
 
Changing the criterion from “is rioting justified” to “is protesting justified” … a few months ago, a friend asked why Kaepernick had to make such a spectacle. I find the a priori assumption that *he* made a spectacle of it flawed, but accepting the premise and asking the more general question “why do these protesters need to inconvenience *me* in order to make their point?” … well, were you aware of their point before they slightly inconvenienced you? How inconvenienced were you *really*? OK, had to listen to Trump be a jackass about it … but that was more on Trump & co that Kaepernick. How inconvenienced do you think being harassed by the police is? Or killed!?! So you are objecting to an action that was incredibly effective at communicating a message in a way that barely inconvenienced you. WHY??
 
I’ll grant that encountering a peaceful protest is more inconveniencing than seeing (or hearing about) someone kneeling along the sideline of a sporting event. You needed to get back to work and traffic was a mess. You were late to an appointment because you had to make your way through protesters downtown. Still, it’s a trivial thing that happens rarely (OK, maybe not rarely if you’re making your way home from work through a protest … but still, not a huge deal in the grand scheme of things).
 
The only objection (apart from denying there’s a problem, which is rather absurd) I could see to the peaceful protests is that the most effective approach would be run for office. Become the city council and demand police reforms from your position with authority over policing. It’s not a viable approach, though — it’s expensive to run for office, and not everyone has the time and resources to devote to that endeavor. Far better to ensure local government officials know this is what constituents demand from them. Write letters, call the offices, protest — make sure you are seen and heard.

They grow up so fast

Anya keeps telling me that chickens grow up so fast … which is both true and so funny coming from the Anya who also seems to grow up really fast. The little balls of fluff are half feathers now, and getting bigger (and more chicken-like) every day. We had our first escape yesterday. I’d clipped a mesh over the top of the brooder when they first started fluttering. But one of the dark-feathered birds was roosting on top of the chicken toaster and pushed her way out of the cover. Now we’ve got more clips, and it seems to be secure.

And they love going outside to play. We’ve had a few really busy days and haven’t been able to take them out. Tomorrow looks a little cool, but the weekend and the first few days next week look like perfect chicken playing weather.

Chalk Tightrope Race

Anya’s online school includes physical education — they provide ideas for games we can play, and we we tweak the idea. Last week, they wanted us to stand on one foot and play catch with a ball. That turned into a cross between volleyball and tennis. The activity this week was to draw a few chalk figures (circle, triangle, line, zig-zag) and pretend those are a tightrope. Anya turned it into a race — you start by running along the long line, leaping to the triangle, following it and then leaping to the circle, running along the circle, jumping to the next circle and running along it, then leaping over to a short line that gets you to the zig-zag. There was a lot of running into each other (especially when she added the “go either direction around the shape” rule), and it was really hard to win if you didn’t want to run over the tiny person. Which makes it one of Anya’s favorite games.

Not a golf shot, but …

I should know better than to apply logical thought to Trump’s blathering, but … the scenario of a golfer choking is that they miss an easy shot under pressure, right? Like the ball is three foot away from the hole, the golfer has a putter in hand, a reasonable stance, and the club is aimed to hit the ball in the general direction of the hole. Aaaand then they hit it a little hard, or a little soft, or have a little spin that throws off the shot. The Kenosha cop? In golf terms, that’s trying the three foot shot with a 9mm instead of the putter.