Understanding Exponential Growth

Using the data from https://covidtracking.com/data/national/cases: in the most recent seven day span (10-16 November), 1,056,346 people in the US have been infected with this coronavirus. The total number of cases yesterday was 11,047,064. That means 9.562% of the *total cases* in the US were new cases in the past week.

 

This is how exponential growth works — and why you heard a lot about ‘flattening the curve’ earlier in the year. If you put a penny on the first square of a chess board, double it and put two pennies on the second square, double it and put four pennies on the third square, and continue in that fashion … mathematically, you have 2^n pennies on each square, where n is the numeric sequence of the square, 0-63. On the last square in the first row, square #7, there are 2^7 pennies — 128 pennies, or a buck and twenty eight cents. Not a lot. And the end of the second row, you have 2^15 pennies — 32,768 pennies. That’s $327.68 — over three hundred bucks. A lot more than a buck, but not a huge amount of money. But you’re up to 2^23 at the end of the third row — 8,388,608 pennies or $83,886.08. Eighty three grand is a lot of money. By the time you get to the mid-point on the board, the end of the fourth row, you have 2^31 pennies on a square. 2,147,483,648 pennies for $21,474,836.48 — over twenty million dollars. A lot of money, but it’s possible. The second half of the chessboard is where exponential growth becomes unsustainable. The end of the fifth row is 2^39 — 549,755,813,888 pennies. The end of the sixth row is 2^47 — 140,737,488,355,328 pennies. The end of the seventh row is 2^55 —  On the final square, you have 2^63 … 9,223,372,036,854,775,808 pennies for $92,233,720,368,547,758.08 … 92 quadrillion dollars. If the going price of Earth is only five quadrillion dollars, you’re putting a marker for the entire solar system (and then some) on that last square.

And that ignores the accumulating total — while you have 92 quadrillion dollars on the final square, you have another 92 quadrillion dollars on the entire rest of the board. Now, obviously, we are not doubling our rate of infections every day. But we’re entering “second half of the board” territory just the same.

Discourse acme.sh Script Failure

I had a hellacious time updating the certificate on my Dockerized Discourse server — the acme.sh script doesn’t have a slash delimiter between the hostname and the ./well-known folder within the URI. Which means the request fails. Repeatedly.

 

[Sat Oct 10 00:01:09 UTC 2020] _post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/7784162898/nr42-g'
[Sat Oct 10 00:01:09 UTC 2020] _CURL='curl -L --silent --dump-header /shared/letsencrypt/http.header -g '
[Sat Oct 10 00:01:10 UTC 2020] _ret='0'
[Sat Oct 10 00:01:10 UTC 2020] code='200'
[Sat Oct 10 00:01:10 UTC 2020] trigger validation code: 200
[Sat Oct 10 00:01:10 UTC 2020] sleep 2 secs to verify
[Sat Oct 10 00:01:12 UTC 2020] checking
[Sat Oct 10 00:01:12 UTC 2020] url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/7784162898/nr42-g'
[Sat Oct 10 00:01:12 UTC 2020] payload
[Sat Oct 10 00:01:12 UTC 2020] POST
[Sat Oct 10 00:01:12 UTC 2020] _post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/7784162898/nr42-g'
[Sat Oct 10 00:01:12 UTC 2020] _CURL='curl -L --silent --dump-header /shared/letsencrypt/http.header -g '
[Sat Oct 10 00:01:13 UTC 2020] _ret='0'
[Sat Oct 10 00:01:13 UTC 2020] code='200'
[Sat Oct 10 00:01:13 UTC 2020] discourse.example.com:Verify error:Fetching https://discourse.example.com.well-known/acme-challenge/XY02T_40TL92IADByQ45JMj4JzC2qJCatVd2odJMAlU: Invalid host in redirect target
[Sat Oct 10 00:01:13 UTC 2020] pid
[Sat Oct 10 00:01:13 UTC 2020] No need to restore nginx, skip.

 

Turns out that’s my bad config — I’ve got a reverse proxy in front of Discourse, and we don’t use the clear text http site. The reverse proxy just bounces you over to the https site. Two problems — one, I failed to put the trailing slash after my redirect, s http://discourse.example.com/.well-known/blah is being redirected to https://discourse.example.com.well-known/blah

<VirtualHost 10.1.2.3:80>
ServerName discourse.example.com
ServerAlias discourse

Redirect 301 / https://discourse.example.com

</VirtualHost>

 

That’s easy enough to fix — add the trailing slash I should have had anyway. But the subsequent problem is that the bootstrap nginx config that is used to serve up the validation page only listens on port 80. So I cannot redirect the clear-text traffic over to the SSL site. I have to reverse proxy the clear text site as well (at least whenever the certificate needs to be renewed).

ProxyPass / https://discourse.example.com/
ProxyPassReverse / https://discourse.example.com/

Voila, a web server with an updated certificate.

New Teams Features for Developers

Two new features announced that might be of interest to developers — the first one might provide a mechanism to move (well, copy) content between Teams spaces. You can read channel messages from a Teams space, analyze it, then use this new API to mirror the content into a new Teams space.

Importing third-party platform messages to Microsoft Teams is now available in beta

These new capabilities give you the ability to import channel messages into a new team, specify the message sender and timestamp and link to files. These capabilities are built with scale in mind. At a high level, the import process consists of the following:
• Create a team with a back-in-time timestamp
• Create a channel with a back-in-time timestamp
• Import external back-in-time dated messages
• Complete the team and channel migration process
• Add team members
https://developer.microsoft.com/en-us/microsoft-365/blogs/importing-3rd-party-platform-messages-to-microsoft-teams-is-now-available-in-beta/

Teams Meeting Scheduling Link Template

With the new Teams Meeting Scheduling Link Template, developers can embed a meeting link generator directly into their scheduling platform–providing an easy way for users to create Teams meeting links and share them directly with participants.
https://developer.microsoft.com/en-us/microsoft-teams/meeting-scheduling

 

Short Story Outline

Movie/story idea — All of the crazy conspiracy theories Trump parrots are actually true. The deep state looking to undermine him. The conspiracy to steal the election, twice. The QAnon idea that Democrats are secret pedophiles or cannibals or whatever looking to take over the country and Trump has been ordained by God himself to save us. Except, unlike mainstream stories where good triumphs over evil … the bad guys win and the savior lives out his life in exile.

Center-Right

I keep seeing that this is a “center right” country, but the election results we’re seeing make me question this analysis. I see ‘center right’ as an average without a standard deviation. If it’s 70 degrees every day, the average temp is 70. If it’s 100 degrees half of the year and 40 the other half, the average temp both places is moderate; but that average hides the two different realities. It’s the standard deviation that shows you how representative an average *is*.
 
If there were a low standard deviation on center-right, then the Democratic party’s would make sense — you’re pretty close to their moderate position, so earning your vote is possible. If there’s a high standard deviation, there’s no appealing to “the other side” — you’re task is to energize people on “your side”, get them enthusiastic about voting, get them engaged in getting their friends out voting.

Bloomberg’s Millions

I wonder if the lesson from Mike Bloomberg’s 2020 election investments might be “dumping money into advertisements has limited benefit”. A hundred million dollars to fund groups driving people to polls. Or free public transport rides on election day. Or groups helping people navigate voter registration (possibly including fees and transportation to where-ever non-driver photo IDs are issued). Maybe those would have been more productive ways to blow a hundred mil.

Pre-Hatched Ideas

I’ve got two working story-lines to end the reality-TV-presidency. Trump steps down next week, Barr pushes through a bunch of cases against him and he’s found innocent (or guilty and Pence pardons him). Lacks pizazz. Also doesn’t sort the state charges — my memory is that SCOTUS has held there’s no double jeopardy because you’ve violated the federal law *and* the completely separate (even if it’s the same thing) state law.
 
The one I like better – Trump kicks off a I didn’t really lose tour / airing of grievances across the country, culminating in oversea visits to the troops. While visiting Incirlik, he defects and stays in Turkey. Plot twist — all of the QAnon folks follow him and shore up Erdoğan’s support in the 2023 election. But the same QAnon folks get Trump into the National Assembly, and he wins the 2028 general election to replace Erdoğan.

Using Process Monitor To Troubleshoot Applications

SysInternals used to produce a suite of tools for working with Microsoft Windows systems — the company appears to have been acquired by Microsoft, and the tools continue to be developed. I used PSKill and PSExec to automate a lot of system administration tasks. ProcessMonitor is like truss/strace for Windows. Unlike the HFS standard, Windows files end up all over the place (plus info is stashed in the registry). Sometimes applications or services fall over for no reason. Process monitor reports out

When you open procmon, you can build filters to exclude uninteresting operations — there’s a default set of exclusions (no need to log out what procmon is doing!)

Adding exclusions for specific process names can eliminate a lot of I/O — I was looking to troubleshoot a problem on a Domain Controller that had nothing to do with AD specifically, so excluding activity by lsass.exe significantly reduced the amount of data being logged. If I’m using a browser to troubleshoot the problem, I’ll exclude the firefox.exe or chrome.exe binary too.

From the filter screen, click “OK” to begin grabbing data. The easiest thing I’ve found to do is stop capturing data when the program opens (use ctrl-a followed by ctrl-x to clear the already logged stuff). Stage whatever you want to log, use ctrl-e to start capturing. Perform the actions you want to log, return to procmon and use ctrl-e to stop again.

You’ll see reads (and writes) against the registry, including the specific keys. Network operations. File reads and writes. In the “Result” and “Detail” column, you can determine if the operation was successful. There are a lot of expected not found failures — I see these in truss/strace logs too, programs try a bunch of different things and one of them needs to work.

I’ve had programs using a specific, undocumented file for a critical operation — like the service would fail to start because the file didn’t exist. And seeing the path and file open failure allowed me to create that needed file and run my service. I’ve wanted to find out where a program stashes data, and procmon makes that easy to identify.