The Daily Parker

Politics, Weather, Photography, and the Dog

Weather Now 5 soft launch

After 15 months of on-and-off work, I'm finally ready to show off Weather Now v5.0, currently in development.

I started building the API and UI projects on top of the core and automation features around Thanksgiving, spending about 45 hours over the past 5 weeks on it. Overall, I've worked about 200 hours to get it to this point, starting with an empty Visual Studio solution file and an empty Microsoft Azure subscription.

Since about 99% of what you can't see already exists, I don't expect it will take me another 15 months to build the stuff you can see. In fact, I only have 21 more JIRA cases (out of 187 so far) to bring it to production. Adding an existing v4 feature to v5 just requires creating the Blazor page, API method, and glue code, which shouldn't take more than 2-3 hours per item, including testing.

Check in frequently. I push updates a few times a week at this point, so you should see pretty rapid changes until I launch the production release (I hope) before the end of March.

First deployment of 2022

All of my apps run on servers that use UTC. As it's now 00:40 UTC, that means the code I just pushed to a dev server will start running on January 1st UTC, which is in fact why I waited until after 6pm to push the code up to DevOps.

It looks like Chicago will get about 150 mm of snow tomorrow during the day, giving me plenty of time to continue my four-day weekend of coding. If I can get a couple of things out of my backlog and onto my dev environment before Sunday night, I may just release the link to what I'm doing so Daily Parker loyalists can start playing with it.

As always, watch this space.

And happy new year!

Productive Sunday

Even though Cassie really wants to go outside right now, I'm going to make her wait another 10 minutes while I push some code and wait for the continuous integration build to run. She doesn't understand that I need to run with productivity when I have it. The closest she gets to understanding that is running with balls when she has them.

OK, pushing 10 commits. Run, you clever CI, and remember...

Hours and hours for a one-line fix

Last week I posted a bug report on an app I'm developing. I couldn't figure out why a nav bar only appeared for logged-in users. Almost 7½ hours of debugging  over a 10-day stretch later, and I figured it out.

It turns out that the default AddAuthorization service provider options blocked a request somewhere, so removing it allowed all the page components to load, even while keeping the authentication-required bits hidden.

builder.Services.AddAuthorization(options =>
{
	// By default, all incoming requests will be authorized according to the default policy
	//options.FallbackPolicy = options.DefaultPolicy; // Commenting this out fixed it
});

That's the fun part of debugging: it's always the last thing you try.

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.

Coding on a winter afternoon

I've finally resumed progress on a major update to Weather Now. I finished everything except the user interface way back in April, but between summer, Cassie, and everything else, I paused.

At least, until last week, when something clicked in my head, and I started writing again. As my dad would say, I broke the code's back.

It turns out, the APIs really work well, and I'm getting used to .NET Blazor, so I'm actually getting things done. The only downside applies to Cassie, who will probably only get 90 minutes of walks today instead of the two hours or so she got on summer Saturdays.

Lunchtime links

We've just completed Sprint 50 at my day job, which included upgrading our codebase to .NET 6 and adding a much-desired feature to our administration tools. Plus, we wrote code to analyze 500,000 emails from a public dataset for stress testing one of our product's features. Not bad for a six-day sprint.

The sun is out, and while I don't hear a lot of birds singing, I do see a lot of squirrels gathering walnuts from the tree across the street. It's also an unseasonably warm 7°C at Inner Drive Technology World Headquarters, going up to 10°C today and 12°C by Thursday. So Cassie and I will head to the dog park in just a few minutes.

First, though, just a couple things of note:

And with that, Cassie has some running around to do.

Productive day so far

Having a day off with no real responsibilities gives me the space to take care of some niggling projects I've put off for a while. First, I finished updating a document for the Apollo Chorus that lists every sit and stand cue and every score marking for our Messiah performances. That took about 8 hours altogether.

I also updated my main NuGet packages to .NET 6. As a nice bonus, because of a quirk in how .NET assemblies get versioned, today's release is version 4.2.8000. (I kept the previous release active just in case someone needs it for an existing .NET 5 project.)

Oh, and I've got a pot of stew going that should finish in about an hour. I made a lot of it. I hope it freezes all right. Good thing I have tons of Mason jars. It looked like this at 3½ hours:

Short-term license agreements

Today is the 50th anniversary of DB Cooper jumping out of a hijacked airplane into the wilds of Washington State. It's also the day I will try to get a Covid-19 booster shot, since I have nothing scheduled for tomorrow that I'd have to cancel if I wind up sleeping all day while my immune system tries to beat the crap out of some spike proteins in my arm.

Meanwhile, for reasons passing understanding (at least if you have a good grasp of economics), President Biden's approval ratings have declined even though last week had fewer new unemployment claims than any week in my lifetime. (He's still more popular than the last guy, though.)

In other news:

Any moment now, my third DevOps build in the last hour will complete. I've had to run all three builds with full tests because I don't always write perfect code the first time. But this is exactly why I have a DevOps build pipeline with lots of tests.