The Daily Parker

Politics, Weather, Photography, and the Dog

Ambassador Emanuel

The US Senate has confirmed former Chicago mayor Rahm Emanuel, who lives just a couple of blocks for me (for now), as the new US Ambassador to Japan:

The Senate voted 48-to-21 to confirm Emanuel, with the longtime political operator receiving support — as well as opposition — from Democrats and Republicans alike.

The vote came in the middle of the night after Democrats struck a deal with Republican Sen. Ted Cruz of Texas, who agreed to lift a hold he had placed on 32 of President Joe Biden’s nominees in exchange for allowing a vote next month on legislation related to a Russian gas pipeline on which Cruz has wanted to place sanctions. Given the late hour that the Senate concluded its business for the year, just 69 senators were present to confirm Emanuel.

Democratic Sens. Elizabeth Warren of Massachusetts, Edward Markey of Massachusetts and Jeff Merkley of Oregon voted against Emanuel while progressive independent Sen. Bernie Sanders of Vermont did not vote. Eight Republicans voted in favor of Emanuel: Sens. Roy Blunt of Missouri, Susan Collins of Maine, Chuck Grassley of Iowa, Bill Hagerty of Tennessee, Ben Sasse of Nebraska, Dan Sullivan of Alaska, John Thune of South Dakota and Todd Young of Indiana.

Enjoy Tokyo, Mr Ambassador. Hit me up for some tips about sushi spots.

And now for something completely indifferent

I will now take a break from my ongoing struggles to make Blazorise play nicely with Open ID authentication so I can read these:

And finally, WGN confirms we hit back-to-back record temperatures Wednesday and Thursday, both tied for 11th warmest December day in Chicago history.

New technology, new weirdness

I've mentioned that Inner Drive Technology will release a new version of Weather Now pretty soon. I've finished everything except the UI and migrating the data, in fact, so I may even finish in January.

I have an odd bug, though, so I'm posting here in addition to the posts I made on Stack Overflow and on the Blazorise GitHub project.

In short, Blazorise speeds up UI development by abstracting away a lot of the formatting and layout for a .NET Blazor app. Blazor, in turn, abstracts away most of the lower-level UI code that makes websites interactive and fast. It's a long way from the XML-XSLT page construction I used in the last Weather Now UI update back in 2007. (Yes, the UI turns 15 soon—but the app itself turned 22 on November 11th.)

Without going too deeply into the issue, let me sum up. The new version will allow users to log in and customize their experience. But it still needs to work for anonymous users, who will make up probably 95% of the users.

The new site will continue the left-side navigation pane for desktop views. To do that, I built a MasterLayout.razor page that looks like the demo code in the Blazorise documentation:

<Layout Sider="true">
	<LayoutSider>
		<LayoutSiderContent>
			<Bar Breakpoint="Breakpoint.Desktop" NavigationBreakpoint="Breakpoint.Tablet" ThemeContrast="ThemeContrast.Dark"
			     Mode="BarMode.VerticalPopout" CollapseMode="BarCollapseMode.Small">
				<BarToggler />
				<BarBrand>
					<BarItem>
						<BarLink To="">
							<BarIcon IconName="_customIcon" />
							Weather Now
						</BarLink>
					</BarItem>
				</BarBrand>
				<NavMenu />
			</Bar>
		</LayoutSiderContent>
	</LayoutSider>

	<Layout>
		<LayoutHeader Fixed="true">
			<Bar @bind-Visible="@_topbarVisible" Breakpoint="Breakpoint.Desktop" Background="Background.Primary" ThemeContrast="ThemeContrast.Light">
				<BarBrand>
					<BarItem>
						<BarLink To="">
							<BarIcon IconName="FontAwesomeIcons.CloudSun" />
							Weather Now
						</BarLink>
					</BarItem>
				</BarBrand>
				<BarMenu Class="justify-content-end">
					<BarEnd>
						<AuthorizeView>
							<Authorized>
								<BarItem>
									<Blazorise.Icon Name="FontAwesomeIcons.User" Visibility="Visibility.Visible" />
									Hi, @context?.User?.Identity?.Name
								</BarItem>
							</Authorized>
						</AuthorizeView>
						<BarItem>
							<LoginDisplay />
						</BarItem>
					</BarEnd>
				</BarMenu>
			</Bar>
		</LayoutHeader>

		<LayoutContent Padding="Padding.Is4.OnX">
			@Body
		</LayoutContent>

		<LayoutFooter Fixed="true" Padding="Padding.Is4.OnX">
			Copyright ©@DateTimeOffset.UtcNow.Year Inner Drive Technology.
		</LayoutFooter>
	</Layout>
</Layout>

The issue is that when a logged-in user views a page, they see the part within the <LayoutSider> tag, which includes the navigation menu. When an anonymous user hits the page, they don't see anything in that area.

The culprit turns out to be the <Bar Mode=""> attribute. If that attribute is present with any value at all, the behavior occurs. Without that value, the behavior does not occur.

One more data point: the Program.cs startup code contains this bit:

builder.Services.AddRazorPages(options =>
{
	options.Conventions.AllowAnonymousToFolder("/");
	options.Conventions.AllowAnonymousToPage("/Index");
	options.Conventions.AllowAnonymousToFolder("/_content");
	options.Conventions.AllowAnonymousToFolder("/Pages");
	options.Conventions.AllowAnonymousToFolder("/Shared");
});

That code lets anonymous users see any content in the app that doesn't specifically require being logged in or authorized.

Anyway, I hope someone in the 'verse sees one of these posts and knows what has gone wrong. (If you do, please comment on the Stack Overflow post so we both get reputation points.)

Backlog

I just started Sprint 52 in my day job, after working right up to the last possible minute yesterday to (unsuccessfully) finish one more story before ending Sprint 51. Then I went to a 3-hour movie that you absolutely must see.

Consequently a few things have backed up over at Inner Drive Technology World Headquarters.

Before I get into that, take a look at this:

That 17.1°C reading at IDTWHQ comes in a shade lower than the official reading at O'Hare of 17.8°, which ties the record high maximum set in 1971. The forecast says it'll hang out here for a few hours before gale-force winds drive the temperature down to more seasonal levels overnight. I've even opened a few windows.

So what else is new?

So what really is new?

But Sprint 52 at my office, that's incredibly new, and I must go back to it.

It only took three years

When I got home from our Messiah performance yesterday, my car ended up here:

If you don't have International System conversion factors ready to hand, just know that one statute mile is 1,609.344 meters. So right before I got to my garage last night, my car hit 10,000 miles exactly. And how about that average fuel economy? For the luddites, 2.2 L/100 km is about 105 MPG.

If you recall, I bought the car just shy of 3 years ago. So in three years, I've driven about 10,000 miles and filled up the car 12 times with about 350 liters (93 gallons) of fuel for just over $240. That works out to an operating cost of 2.9¢ per kilometer (4.6¢ per mile). Not bad.

Oh, and I also got this shortly after walking in (and walking out and walking back in and feeding her):

Not a bad way to end Messiah week.

Evening reading

Messages for you, sir:

I will now go hug my dog, who set a record yesterday for staying home alone (8 hours, 20 minutes) without watering my carpets.

Anniversaries

Just two of note. First, on this day 21 years ago, Al Gore conceded the 2000 election to George W Bush. Good thing that made almost no difference at all in world events.

Another anniversary is the one that happens every January 1st to works of art created a certain point in the past. A whole bunch of books, films, and musical compositions pass into the public domain as their copyrights expire, including:

  • The Sun Also Rises and Winnie-the-Pooh, both published in 1926;
  • The works of Louis Armstrong and Jim Morrison, who died in 1971 (except in the U.S.); and
  • All musical recordings made before January 1, 1923.

Have fun adapting!

Messiah weekend

Pity Cassie, who had to stay home alone yesterday for about 8 hours and will have to do the same today. She trusts that I will eventually come home, though, meaning she just crossed her paws and waited for me.

While she slept in various positions on the couch, I sang Händel's Messiah for the first time in nearly two years. It's great to be back on stage. And here we go again...

Regular blog posts resume tomorrow.

Spot the warm front

My outdoor thermometer has alerted me to an unusual temperature swing:

Yes, that's a 4°C rise in one hour. At least it's stopped raining. But there is a tornado warning about 100 km from here, so there's a lot of energy in the air right now.

Meanwhile, indoors, my fireplace caused a spike in CO2:

Don't worry, 2,000 ppm won't hurt me. But I did get an alert about it.

Tragedy and farce

We're all set to perform Handel's Messiah tomorrow and Sunday, which got noticed by both the local news service and local TV station. Otherwise, the week just keeps getting odder:

And to cap all that off, the National Weather Service has announced a Hazardous Weather Outlook for tonight that includes...tornados? I hope the weather gets better before our performance.