infrastructure problems of our own

Fresh off of reading an excellent book about infrastructure, we got a nice reminder of what we take for granted!

Friday night, the lights in Nick’s room wouldn’t turn on. The circuit breaker had tripped and would immediately re-trip when we toggled it. We tried unplugging everything in Nick’s room to no avail. So we figured the problem was the circuit breaker itself and, being busy (this weekend we went to a total of five baseball games and one birthday party!) scheduled someone to come out on Monday to replace it. In the meantime, Nick slept in our room, which actually went surprisingly well given past experiences!

Monday, the electrician (from Klock Electric, would recommend!) came out, but replacing the breaker itself didn’t help. So he went through the room, and made sure everything was unplugged, then said sometimes this happens if there’s a short in the outlet instead. So he disassembled all the outlets in Nick’s room, but they all looked fine.

Eventually I remembered that there’s an outlet right on the outside of Nick’s room, and the electrician said that usually those are on an outside circuit, but he could check – if it was just punched through the wall they might beo n the same one. I stayed in Nick’s room to point to where the outlet on the inside was, and through the window he said the outside one was lined up with it. So he disassembled it, and I heard a yelp. I quickly asked if he was OK. Turns out: there were lizards inside the outlet that were causing the short! He took a picture to show the folks back at the office, removed the lizards, and everything was working again.

Monday night as we were putting the kids to bed the power went out. This seemed like an extraordinary coincidence, but that’s all it was – the whole neighborhood was out for a few hours. The kids handled it pretty well (they get very nervous when the power goes out!) and we read and played some board games by the light of my laptop with a blank Notepad open. The power came back around 9 PM, so we didn’t lose the stuff in the fridge, but our internet didn’t came back. I tried some stuff to fix it (rebooting the router a few times, going through the AT&T support steps) but nothing worked and it was time for bed.

In the morning, our internet still wasn’t working. As we were leaving for school, the garage door wouldn’t open! Luckily David remembered how to use the manual release so we opened it that way. I was pretty annoyed at the general brokenness of stuff in our house.

After we dropped off the kids, we came home, and David remembered that our garage door was actually just plugged into a GFCI outlet in the garage, and so hit the Reset button on it, and that fixed the problem! Then we came back inside and the AT&T router had decided to start working again.

So now everything is working and I would appreciate a few days before the next thing breaks!

How Infrastructure Works: Inside the Systems That Shape Our World review – excellent book!

How Infrastructure Works: Inside the Systems That Shape Our WorldHow Infrastructure Works: Inside the Systems That Shape Our World by Deb Chachra

My rating: 5 of 5 stars


I loved this book! I’ve always been interested in infrastructure in a “isn’t that neat!” sort of way, and in reading post apocalyptic books about what happens when infrastructure goes away. This book doesn’t have a lot of nuts-and-bolts information about different kinds of infrastructure (although there is some!), but it talks about about what makes something infrastructure, why we should care about it, and what we can do to make it better. If you’re at all interested in infrastructure and society, I can’t recommend this book enough!

Here are some odds and ends I found interesting:
– Before Britain controlled India, people have estimated India’s share of the world’s economy was around 25 percent. After India gained its independence from Britain, it was down to 4 percent!! (pg 130) This is one of those times where I feel a little smug that the US has done a lot of bad things but at least we weren’t huge colonizers (with the notable exception of the Native Americans, obviously). In fact, Chachra points out that the 60 or so countries that celebrate their independence from British probably makes it the most widely observed secular holiday in the world!) (pg 136)
– Chachra points out that inspections and maintenance are important parts of infrastructure, but of course they’re not as exciting as building new stuff. (pg 174) I kind of relate to this – I used to be more excited about building new apps and projects and websites, but as I get older I’ve learned that keeping old things working can be just as satisfying!
– The colors of those little flags in the ground indicate what kind of pipe is underground: blue is potable water, green is sewage, red is electricity, orange is communication, yellow is natural gas, and hot pink is for “temporary markings” (pg 6)
– One of the dramatic changes as electricity became more widely available is the increased prevalence of light, which is something I hadn’t thought a lot about. In fact, New England today uses about a hundred times more light now than in 1888! (pg 26)
– Before the Civil War, trains in the North used “standard gauge” track (4 ft 8.5 in apart), while trains in the South used “broad gauge” track (5 ft apart). After the war, as trade increased, they decided to standardize on standard gauge track, and in 1886 all the broad gauge southern track was changed to standard gauge in a span of 36 hours! It took tens of thousands of workers pulling up rails and moving them slightly closer to each other! (pg 56)
– In Great Britain in the 1700s, navigators used the official time set by the Royal Observatory in Greenwich (which they needed to calculate longitude), but every place on land set their time independently based on when the sun was at the highest point in the sky. In 1840, railways started to use their own standardized time for train schedules and whatnot, which they kept track of by hand carrying chronometers on the trains. And 15 years later, the Royal Observatory started sending out the time by telegraph! (pg 68)
– Chachra talks about Dinorwig Power Station (commonly known as “Electric Mountain”), which is a hydroelectric power plant but also has pumped storage. Basically, it can store energy by pumping water to the top of a shift to a lake on top of a mountain, and it can harvest that energy by letting it fall back down to a lake on the bottom (and have it run through a turbine). It was built in the 1970s and can store 9.1 GWh of power! (pg 92)
– In the late 1990s, if lots of people in the UK were watching the same thing on TV, when that show or game ended many people would get up and plug in an electric kettle to make tea, which caused a spike in electricity usage! This was known as “TV pickup”, and operators at power plants could anticipate this and have more power ready as soon as the show ended. (pg 93)
– Chachra makes the point that she could go off the grid and have her own water supply, septic system, solar panels, etc. But this would mean she’d be responsible for operating and maintaining all of these, and in a real sense she would have less freedom in her life, not more. (pg 100)
– After recent hurricanes, more people in the US have died of carbon monoxide poisoning (from emergency generators) than from storm surges and flooding! (pg 102)
– Chachra points out that in the US we’re pretty good at providing “public goods” in the economic sense, meaning things that have a small marginal cost to add more people to (things like roads, water systems, and roads). But we’re pretty bad at things that have high social value but are not “public goods” in the economic sense, like food and housing. (pg 109)
– Chachra also mentions that as infrastructure systems such as water, sewage, gas, and electricity spread in the late 1800s and early 1900s, this reduced the burden especially on women, and it may not be a coincidence that this is when the women’s suffrage movements grew in parallel with these. (pg 114)
– People understood that widespread electricity availability was good for everyone, because it meant a lower risk of fires as well as less local pollution from burning things for light and heat. (pg 117)
– Solar storms are bad news – somehow I didn’t realize that a 1989 blackout in Quebec was caused by one! (pg 152)
– Locating buried infrastructure is tricky enough that there’s an International Utility Locate Rodeo! (pg 163)
– Chachra mentions the Austin boil-water notice in 2018 – I’m not sure I ever realized it was due to the heavy flooding that overwhelmed the treatment plant. (and apparently it was the first time Austin had a boil-water notice!) (pg 186)
– Our kids will hopefully live to see the twenty-second century, which is both obvious and mind-boggling to me. (pg 214)
– Heavy trucks (like 18-wheelers, etc.) are 1% of vehicles but contribute 25% of transportation emissions! Yikes. (pg 231)


View all my reviews

Ported mobile apps to .NET MAUI 8!

Check out Airport Guides and Baseball Odds for iOS and Android*!

I don’t remember exactly why I embarked on the project to upgrade my apps to use .NET 8 from .NET 6. It is true that .NET 6 is pretty old at this point, and I think Microsoft has dropped support for it, so…maybe that’s why? But I suspect .NET 6 can’t target newer versions of iOS/Android, and either Apple or Google is requiring that for app updates.

Anyway, after porting them from Xamarin.Forms to MAUI just over a year ago, my hope was that I was on the happy path and upgrading would be easy. There’s even a handy guide for upgrading from .NET 6 to 7 and from .NET 7 to 8!

Sadly, no. Here is roughly what happened in chronological order:

  • At some point, I ignored the upgrade guide and used a hard coded version of Microsoft.Maui.Controls instead of the $(MauiVersion) that the upgrade guide from .NET 7 to 8 told me to do. I don’t know why I did this, but things broke in surprisingly weird ways.
  • Somehow ImplicitUsings stopped working so every single code file was broken and I had to add a bunch of using statements. Annoying but reasonably easy to fix once I figured out what was going on. (it helps that these apps are fairly small)
  • I got a bunch of errors about invalid paths for images – I tried removing some duplicate images that weren’t used but still had a few of these. I tried some of the suggestions in this GitHub issue and this documentation to no avail.
  • At some point I had the bright idea to create an entirely new .NET MAUI 8 app and look at what it was doing in its .csproj file. This gave me a pointer to adding <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> which helped with some problems.
  • Out of desperation, I started to delete the bin/ and obj/ directories after trying stuff instead of just doing a clean build, and frustratingly this helped with some problems. This meant that trying stuff out took even longer because I’d have to do this all the time 🙄

I got stuck here for a while and was feeling despair about all this. It seems like every few years I have to rewrite these dang apps to use the newest app framework (see a history here), and I don’t have a lot of free time or energy.

But taking a break gave me an idea about a new approach. I decided to:

  • Make a new .NET MAUI 8 project from a template
  • Ensure that it builds (it did!)
  • Add the handful of NuGets that I use
  • Ensure that it still builds (it did!!)
  • Instead of copying all my code into this new project, look carefully at the resulting .csproj and make my existing .csproj match as closely as possible

And this worked shockingly well! For what it’s worth, a lot of what I changed was getting rid of Compile, DependentUpon, and MauiXaml tags – I guess these are mostly implicit now?

I did hit a few more gotchas. One was this error when building Android:

1>C:\Users\greg\.nuget\packages\xamarin.build.download\0.11.0\buildTransitive\Xamarin.Build.Download.targets(60,4): error MSB4064: The “AndroidFixManifests” parameter is not supported by the “XamarinDownloadArchives” task loaded from assembly: Xamarin.Build.Download, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null from the path: C:\Users\greg\.nuget\packages\xamarin.build.download\0.11.4\buildTransitive\Xamarin.Build.Download.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.

1>C:\Users\greg\.nuget\packages\xamarin.build.download\0.11.0\buildTransitive\Xamarin.Build.Download.targets(52,3): error MSB4063: The “XamarinDownloadArchives” task could not be initialized with its input parameters.

This is one of the errors that deleting the bin/ and obj/ directories would usually fix. Later I upgraded this NuGet to 0.11.4 and I think that made this go away for good, as per this Stack Overflow post.

Another problem was Could not find workload 'ios' extended by workload 'maui-ios' in manifest 'microsoft.net.sdk.maui' which I could fix with the tips on this GitHub issue.

Once I got to the point of building the iOS app, I quickly discovered that the Mac Mini I had (from 2016) was too old to install the needed version of Xcode. I knew this day was coming eventually, as the Mac Mini predated the switch to ARM, and was also painfully slow, so I bought an Mac Mini M1 off of eBay. And it is so much faster than the old one! And it seems like some of the more annoying issues have gone away.

The last problem I ran into was that the app would crash on launch in some Admob ads code. The packages I had been using for Admob stuff dated back to the Xamarin days and I wasn’t sure if they were expected to work or what. And debugging that stuff is especially painful. I slowly convinced myself that spending a bit of money on the MtAdmob plugin for MAUI was worth it, and when I downloaded the free version and it worked on the first try I was sold. All told I spent more money than I had hoped, but the apps do all right and should pay for both of those purchases in six months or so.

So now my apps are fully up to date, and maybe I’ll spend a little time actually improving them instead of fighting with app frameworks! (although apparently Apple has a privacy manifest that I need to be using to make any updates past May 1st? sigh…)

* technically Airport Guides for Android isn’t live yet, but it hopefully will be in a day or so, and I’m writing this now to get some catharsis!

The Software Engineer’s Guidebook review – very wide and very shallow

The Software Engineer's Guidebook: Navigating senior, tech lead, and staff engineer positions at tech companies and startupsThe Software Engineer’s Guidebook: Navigating senior, tech lead, and staff engineer positions at tech companies and startups by Gergely Orosz

My rating: 3 of 5 stars

This book is several miles wide and an inch deep.

The most useful/interesting part for me was how other companies tend to work with promotions and titles and whatnot. Since I’ve only worked at two tech companies I have a real lack of perspective here, and Orosz walks through a lot of differences between small startups, mid-size companies, and the tech giants.

I could see this as being useful as a jumping-off point to learn more about insert topic here – the book really does cover a ton of stuff, and sometimes you just need to know the right phrases to search for to learn more.



View all my reviews