The Daily Parker

Politics, Weather, Photography, and the Dog

Weather Now update

I just released a couple of minor fixes to Weather Now. Build 8126 has slightly tidier top and nav bars, and I can configure the front page "latest weather" list on the fly. Previously the list lived in a static application config file that I could only change by redeploying the app.

Enjoy.

Word of the Day: Graupel

Graupel are snowflakes covered in rime ice. They're like big styrofoam snowflakes, and because they form in warmer air, they melt almost immediately on contact with anything solid. Yesterday the Chicago Tribune had a handy explainer on the back page, just in case people were curious what was hitting them on the head standing on "temporary" railway platforms this morning. (Fuck Bruce Rauner and his entire party.)

Sorry. I get a little grumpy when I wake up on May Day to mid-March weather. With graupel.

Clear, cool April morning

The clouds have moved off to the east, so it's a bit warmer and a lot sunnier than yesterday. I still have to wait for an automated build to run. For some reason (which I will have to track down after lunch), our CI builds have gone from 22 minutes to 37. Somewhere in the 90 kB of logs I'll find out why.

Meanwhile, happy Fox News On Trial Day:

Finally, I've started reading The Odyssey, so I applaud National Geographic's article this month on the history of the ancient world in which Homer set the poem.

Today is April Februaryth

As happens about every other year, we woke up this morning to barely-above-freezing temperatures and this crap on the ground:

After record warmth last week, April decided to balance the scales yesterday:

All of the snow will melt in the next 24 hours as tomorrow's forecast calls for 11°C and sun, going up to 22°C by Thursday, but not before we get "scattered rain and snow showers" all day with winds up to 45 km/h. But then it goes back down to 2°C by Saturday...because April.

And hey, a bug

Not five minutes after my last post, I discovered a completely borked feature, caused by a change to the way Azure.Data.Tables executes queries.

The Daily Temperatures feature stores data in the same table as the History feature. Each row represents a weather report, where the table partition key is the weather station identifier and the row key is the date and time of the report. So, for example, the first row of data for Chicago-O'Hare in the 2023 table has a partition key of KORD and a row key of 20230101-0051.

Climate records use a row key of "Climate-" and the date. So yesterday's climate data for Chicago-O'Hare has a partition key of KORD and a row key of "Climate-20230415". Easy to remember, and easy to construct queries.

To that end, the original (.NET 6) code looked like this:

var query = 
	from entity in table.CreateQuery<ClimateRecordTableServiceEntity>()
	where entity.PartitionKey == locationId
		&& string.Compare(entity.RowKey, lowerRowKey, StringComparison.InvariantCultureIgnoreCase) >= 0
		&& string.Compare(entity.RowKey, upperRowKey, StringComparison.InvariantCultureIgnoreCase) <= 0
	select entity;

When I upgraded to .NET 7, I naïvely just changed the first line, to this:

var query = 
	from entity in table.Query<ClimateRecordTableServiceEntity>()
	where entity.PartitionKey == locationId
		&& string.Compare(entity.RowKey, lowerRowKey, StringComparison.InvariantCultureIgnoreCase) >= 0
		&& string.Compare(entity.RowKey, upperRowKey, StringComparison.InvariantCultureIgnoreCase) <= 0
	select entity;

When confronted with a 30-day query, though, it spun off into the abyss and crashed the whole app.

The correct code looks like this:

var query = table.QueryAsync<ClimateRecordTableServiceEntity>(entity =>
	entity.PartitionKey == locationId
		&& string.Compare(entity.RowKey, lowerRowKey, StringComparison.InvariantCultureIgnoreCase) >= 0
		&& string.Compare(entity.RowKey, upperRowKey, StringComparison.InvariantCultureIgnoreCase) <= 0);

See, now the filter part of the query goes inside the method call. (There's an extra step in reading the async results back, too.)

So the effect of the naïve fix was to hit the table 30 times getting back the entire partition each time. Remember that all of the weather reports go into the table? So, yeah, the 2023 table already has something like 7.5 million rows, or about 2,500 in each partition. So it tried to read 75,000 rows just to bring back 30. Oopsi.

I'm deploying the fix now.

New Weather Now build

It took a few weeks at odd hours, but I have finally deployed the latest version of Weather Now (5.0.8507). I didn't update anything visual, but all the plumbing got a refresh. It's now running in .NET 7 (until November, when .NET 8 comes out), and I did a top-to-bottom review of its asynchronous code.

The app now runs noticeably faster, and I believe the corrections to the async bits will cure the nagging (but invisible) problem of thread exhaustion that happened from time to time.

Now I can start making some other fixes and adding some long-missing features. Really, I just needed to get back into the swing of it.

My domain name is 25 years old

On this day in 1998, I registered braverman.org, and just a few weeks later built the first draft of what became this blog. When I registered it, only about a million domain names existed, though 1998 turned out to be the year the Internet exploded worldwide. Just seven years earlier, only 100 .org names existed, so braverman.org may be one of the oldest .orgs out there. (For comparison, there are just about 350 million registered domain names today.)

Of course, the 25th anniversary of braverman.org hasn't yet become a global holiday, so a few other things happened in the last 24 hours:

  • The Democratic Party really wants US Senator Diane Feinstein (D-CA) to retire, as it has become painfully clear she can no longer perform her duties in the Senate, preventing us from confirming new judges. Seriously, ma'am, go.
  • We also want Justice Clarence Thomas (R) to go, especially after a new revelation that he sold property to the billionaire "friend" who has taken him on half-million-dollar vacations. Seriously, sir, go.
  • At least his colleagues on the Supreme Court all seem unimpressed with the "independent state legislature" bullshit espoused by some right-wing Republican state legislators.
  • New Republic's Timothy Noah thinks "remote work sucks," but (our hero writes from his open and airy home office just steps from his dog and refrigerator) not all of us do.
  • Paul Krugman explains how immigrants are saving America's economy.
  • The New York Times has a lot of good things to say about Chicago hosting next year's Democratic National Convention.
  • Your local, urban apiary might actually be hurting your neighborhood.

Finally, we have another gorgeous day in Chicago, a bit cooler than yesterday where I live thanks to delightful lake breeze, but still more like July than April. 

Record temperatures

Chicago hit 28.3°C yesterday afternoon, breaking the record of 27.7°C set in 1887 and tied in 1941:

The new high mark lasted for at least three hours Thursday and towered above typical temperatures for mid-April, weather service data showed.

Standard April 13 high marks average 15°C, with lows usually [just above freezing].

But despite summer warmth waiting in the wings, the beach-worthy weather is poised to soon go away, if only temporarily, as another system brings cooler weather to Chicago.

Despite the chilly change, warmth-loving Chicagoans have little to complain about this year. Temperatures were 2.1°C above normal throughout the winter months, another National Weather Service meteorologist told the Tribune last week.

I can't remember turning on the air conditioning this early before, at least not in Chicago. (I've spent time in Richmond, Va., and Houston, Texas before.)

It all goes away tomorrow night, though. Pity.