Archive: June, 2022

Different approach for birthday week

posted by Jeff | Wednesday, June 29, 2022, 7:39 PM | comments: 0

I have historically preferred to make the week of my birthday a, well, week-long thing. It was slightly muted last year, but non-existent the year before. This year, I've decided mostly that I need to delay it. We're doing a cruise in a few weeks, and cruising is of course contingent on not having Covid. So mostly I'm going to be doing nothing, kind of a self-imposed quarantine. Diana had her second booster since she's over 50, and Simon had his first, so even relative to the newer omicron variants, they're less likely to get it, though no one is really 100% able to avoid it.

It's an annoying situation, because immunity is presumably waning to some degree, and the bivalent boosters won't be here until the fall. This particular cruise is important because it is an inaugural sailing, and those don't come around very often.

But I did get a pedicure yesterday, so that's a good start. Might work on something else this weekend, we'll see.


The end to the myth

posted by Jeff | Tuesday, June 28, 2022, 2:00 PM | comments: 0

I've been trying to process the last week, which has been a pretty bad week for American history. Despite the reemergence of racism and blatant fascism, I generally held on to the fact that the courts did in fact hold up the Constitution as intended. This week, while the lower courts continue to act as expected, the highest court took a turn for the worse, arbitrarily deciding that states get to make up their own rules when it's convenient.

But this brings up the larger specter of the reality that we are not self-governed by the majority. Our democratic system is deeply flawed. Most Americans believe the government does not belong in your body or your bedroom. Most believe that the ridiculously broad interpretation of the Second Amendment is incorrect. And we now have a court where a third of it was appointed by presidents who did not win a majority vote. Democracy feels like a myth. As it is, "We the people" has never, at any point in our history included "all the people," and now it excludes quite literally half of them.

What do you do with this? I used to write a lot about my struggle with the obvious flaws in our society, but largely stopped because I don't believe that energy results in any meaningful change. Of course, I vote and I donate frequently to the organizations that continue to promote human rights, but is it enough? I'm tired of a vocal minority setting policy. The oppression, discrimination and marginalization of people is not academic to me. These people are my friends, family, coworkers and community.

I think we're about to see a level of activism not seen since the 60's, but in order for it to make any difference, white, middle class, hetero Americans need to engage. Our basic civic engagement and understanding of how government works is not just inadequate, it's barely recognizable.

The shit's at a breaking point, and the moral imperatives are clearer than ever. The United States now ranks among the lowest of democracies in terms of civil rights, low in healthcare outcomes despite the highest per capita spending, poor education outcomes, high per capita gun violence... we're not really winning much of anything. American exceptionalism is a myth.


Stop and be sick

posted by Jeff | Monday, June 20, 2022, 3:22 PM | comments: 0

I've been going at my hobbies pretty relentlessly lately, writing lots of code, making video, and stuff. But then on Friday, I woke up with that weird tickle in my throat, and just felt crappier by the hour. I made it to my last meeting at 3:30, and checked out immediately after. The fever and stuff came that night. On Saturday, I took a Covid test, as one does these days, and was negative for that, fortunately. Diana had a pretty bad sinus infection previously that she struggled with for a week, and this felt a little like that, although I seemed to have turned a corner. I had a little fever this morning but slept it off. Still a little pressure in the head, but not like yesterday.

It's just remarkable to me though how this stopped me in my tracks. I have in recent months really felt like I wake up with purpose every morning (again, pretty sure it's the bupropion), eager to do stuff, and this illness just stopped it all. I'm usually zen about being sick. I watch the movies that make me feel better (Pitch Perfect marathon!) and just turn off my brain. But I noticed this time I was anxious to get back to it all.

As Covid restrictions have lifted, I really expected to be subject to more of the common stuff that causes illness, especially with a child in school, but that hasn't really panned out. My last illness, not counting the 24 hours of side effects from the vaccines, was a little less than a year ago with something very similar. While I'm remote, Diana works in a theater, which is a whole lot of people gathering in one place. So my point is that I'm surprised at how infrequently I've been sick in the last year.

Ready for this to pass. I've got a lot going on this month!


Popcorn and panic attacks

posted by Jeff | Friday, June 17, 2022, 12:20 PM | comments: 0

Diana and Simon went to Epcot on Tuesday, and they scored a virtual queue slot for the new Guardians of The Galaxy: Cosmic Rewind coaster. Even better, the time was later in the day after work, so I could join them (fun fact, only one person in the party has to be in the park to get into the virtual queue). We had already been on the ride once at the time of the passholder previews, and we were pretty excited to get another lap. Diana and I believe this is the best ride at Walt Disney World.

We were in the first staging room before the preshow when Simon started to freak out. That seemed odd since he had been on the ride once and had been talking about it ever since. It was an outright panic with tears. He started to communicate that this mostly had to do with the fear of losing his souvenir Skyliner popcorn bucket, which he bought with his own money a few weeks ago (cheap refills). By the time we got through the preshow and on the ramp down to load, we learned that it absolutely was the concern over losing the bucket that was causing the extreme panic. There was no consoling him. He ended up bailing to the pass-through to the exit while we did the ride.

I imagine that anyone's first response to this is to point out how ridiculous it seems to be so concerned over something relatively unimportant in the grand scope of the universe. But as much as I think that, I can't be the shitty parent that invalidates and ridicules his feelings. Diana was infinitely patient with him in this case, which is good because I wasn't sure what to do. I was looking forward to riding with him, as doing coasters together is one of the few things that he prefers to do with me. This isn't the first time that he hasn't been able to adjust over some seemingly irrational situation.

And of course, observing him causes the realization that I've experienced the same feelings. I remember not wanting to use stickers on things, because if I used them, then I wouldn't have them. I would avoid bringing certain toys on camping trips, deathly afraid of losing them if I did. Even today, I obsessively pat down my pocket to make sure that my phone is still in it. I'm also on the edge of panic when boarding any kind of transportation, bus, plane or boat, extremely anxious to get onboard and I don't even know what possible outcome I'm worried about. So I get where he's at, I just wish he had the coping skills to overcome it.

I'm starting to understand that this is a large part of the journey for an autistic person, developing the ability to cope with the situations that are irrational or deeply uncomfortable. And because it's a spectrum and everyone is so wildly different, everyone will get to different places at different times. And the brain wiring doesn't change. You may be able to cope with that situation, but it doesn't mean you aren't experiencing the situation. This is one of the biggest things for me to come out of my diagnosis, because now I recognize that the cognitive cost of these experiences sometimes leaves me exhausted.

As for Simon, he was very aware of his feelings and understood them, to the extent that he regretted not being able to handle them and ride with us. This awareness seems to be more common every year, and I think that awareness is the first step in developing the coping mechanisms. I'm hopeful that I'm right. It's difficult as a parent to recognize this, compartmentalize it, and react more clinically to it for the sake of helping him grow.


A video about gas

posted by Jeff | Thursday, June 16, 2022, 7:17 PM | comments: 0

I made a video about gas. Specifically, it's about gas prices. People have been saying all kinds of silly things on the Internet about gas prices, fundamentally misunderstanding the basic economics of supply and demand, and further making it a political issue. I'm not going to change their minds or anything, and I know that. For reasons I'll never understand, a lot of folks prefer willful ignorance over knowledge.

My bigger intention though is that I had been thinking about how fun it might be to do an entire video out of stock footage, using stuff from Storyblocks. I'll probably never make the subscription cost back, but maybe I'll find some other uses the next time I impulsively want to do this. The idea came to me and then it was a video within 24 hours, which for me is super unusual because I don't usually exercise that kind of follow-through.

One thing for sure is that I forgot how much fun it is to write for video. It's a different muscle, and one that I haven't used much in recent years. The words come with specific images in mind, and in this case, having a library of essentially everything recordable, there really was no limit to what I could write. Not having to actually go out and shoot stuff sure is easier. I also didn't want to spend a lot of time on graphics, which is why I just scribbled stuff on a screen capture and used that instead. It's satisfying to be lo-fi in 4K!

I'd like to do a video about home solar and storage, but I need a drone to get footage of my roof. You know, for science.


I saw Glitter Jesus!

posted by Jeff | Monday, June 13, 2022, 6:11 PM | comments: 0

Our Broadway season in Orlando ended last weekend with the 50th anniversary tour of Jesus Christ Superstar. It seems like a small miracle that we didn't have a single show cancelled, although maybe I'm not that surprised given the strict Covid protocols of the touring companies and a robust set of understudies, standbys and swings in every one of them.

I've wanted to see a professional version of this show since I was in high school, because I found the music interesting as a time capsule of sorts from the early 70's. My aunt was in a community theater production around that time as well, which I recall mostly was on a very small stage. It was also interesting to me as the earlier work of the composer that did Phantom of The Opera, Andrew Lloyd Webber. All the theater kids in school had Phantom sweatshirts and what not, and I had a cassette copy of the original cast soundtrack. The JCS soundtrack was rough and super analog. Fast forward to the NBC live performance of the show a few years ago, and it gained new life for me, sounding "bigger" and surprisingly not particularly dated.

Let me say that I'm not particularly interested in it as a religious piece. I believe there likely was a Jesus because the historical record is fairly compelling, as he seems to have pissed off quite a few Jewish and Roman authorities at the time. Whether or not he was the son of God is a matter of belief, and that's up to you. While I border on atheism, because religion feels like a thing to give meaning to our tiny existence in the vast universe, and a means of comfort relative to our mortality, I hold no ill intent toward anyone who chooses to believe. Ditto for any religion, unless you weaponize that religion to oppress, hurt or demean others.

The musical version of these Biblical events center mostly on Judas' role in betraying Jesus, and reconciling that he had little choice in the matter. Jesus also has to reconcile his persecution as the plan of his father. These paint God in a cruel light. Meanwhile, the apostles and Mary spend time contemplating their admiration for a man convinced of his own doom. It's all very dark, were it not for the rock music that goes with it.

It's compelling to me though because the themes of fate and duty are common throughout literature. I mean, we know the Titanic is going to sink, but it doesn't mean there aren't good stories leading up to it. So goes the story of Jesus, attempting to inspire people to be good to each other and calling out that everyone is flawed and shouldn't be casting stones (a lesson that, sadly, seems completely lost on many self-identifying Christians). Add in end-to-end music and opportunities for dynamic choreography, and you have Jesus Christ Superstar.

I wasn't sure what to expect, because we understood it to be a non-union show, though apparently the principles and some others are in fact union. It's not that I use this as a measure of the ability of the performers, but rather it's often an indicator of how willing the the producers are to pay for the right talent in all parts of the production, from the performers to the musicians to the production designers to the touring technicians and stage managers. If you need an example, look back at the non-Equity tour of The Little Mermaid. What a train wreck. There also seems to be some hostility on behalf of Lloyd Webber's production company and unions, exhibited just a few weeks ago when they abruptly canned their London run of his new Cinderella. Anyway, I'm not sure what you call this, because it's mixed. I imagine that post-Covid, unions are willing to make some concessions just so people can work.

The good news is that the show was mostly excellent. The principles were all completely awesome and exceeded my expectations in every way. They were backed by a fairly large band that was also amazing. I can't pick out exactly why, but there are definitely tweaks and improvements to the arrangements compared to the 70's version, and I think they worked those out in the NBC show. Matching the talent on stage was a brilliant set, and a lighting design that was rock-n-roll without being obnoxious overkill. I really loved it.

It wasn't perfect though. There were some really strange choreography choices, not the least of which was humping hips and mic stand stroking to the lyrics, "Touch me, touch me Jesus!" There was a lot of African movement reminiscent of The Lion King, which I did not understand. There were also a lot of frantic jazz hands and Fosse arms that came off a little silly. They did have a "mob leader" role that expressed a lot of sentiment with dance, and that was a good choice to move the ensemble beyond background filler. They had more intent that way.

They also decided to use handheld microphones for a lot of stuff the principles did, and it didn't do anything to add to or advance the story. In fact, some of them were just props, as the priests and soldiers had microphones, but they weren't actually used (they also had traditional headset microphones). And in a particularly awkward way, they used a microphone to imply Judas' suicide.

But the strangest choice was the 39 lashes performed by the ensemble throwing glitter at Jesus. I've said this before, but that entire scene, with a guy angrily counting off to the side, could be cut from the show and I don't think anyone would miss it. Someone suggested that no, it was crucial to the story because the Bible, to which I responded that accuracy isn't essential when Jesus is playing guitar with backup singers. In fact, I just looked it up, and if it was so important, perhaps it would have been mentioned more beyond, "Then Pilate took Jesus and flogged him." That's it? Worse yet, flogging to the limit of 39 times was a Jewish custom, not Roman, and the Bible doesn't count them at all. Like I said, leave it out. It's boring, regardless of how much glitter is used.

Those criticisms aside, I really enjoyed the show, and would absolutely see it again. It's a fascinating case study of Andrew Lloyd Webber's career, because the same guy who made the epic dog shit (cat shit?) of Cats is the same guy that composed this fantastic rock opera about a religious figure, which I imagined was well out of his comfort zone. Also Evita and Phantom. Even School of Rock. And then there was Love Never Dies, quite possibly the worst story ever put on stage. If I can say anything about him, it's that he was brave enough to fail after high levels of success.


Cleaning up the non-deliberate UI of POP Forums

posted by Jeff | Tuesday, June 7, 2022, 11:17 PM | comments: 0

Someday I'll have the answer to understand why I can't quit my open source forum app. Recently, I got over the hump about starting to revise the UI, which has evolved in a non-deliberate way for years. Instead of trying to embrace one of the many libraries out there, all of which are overkill and don't make a lot of sense for walls of text, I decided that native web components are supported well enough that it made sense to port my spaghetti code to those. I'm actually having fun with that and learning new things and using Typescript in a non-trivial way, but that's a totally separate topic. I wanted to capture where things are today, in part so I can laugh at it at some future date, but also to organize my thoughts. I'm on a tear with commits, partly because I don't have a great way yet to test without deploying a build. Safari on iOS is the new IE11, and it tends to not work like other browsers.

First off, let me work through the topic list.

I've already started to revise the upper right navigation because there will be a new notification count up there, and I wanted to keep those counts and the search visible even on mobile. One thing about that is the inclusion of the recent link, which is often redundant everywhere but the home page. Some people prefer to use that as their starting point instead of the individual forums. Those folks also don't use the mark-all-read function, so they have hundreds or thousands of last-time-read records. My suspicion is that I can include a notification all-read function to be the same thing.

The other thing I've never quite found a use for is the topic stats (they appear under forums on the home page as well). These don't even appear on mobile at all, and they exist mostly because forums have had those since the beginning of time. Definitely no one cares who made the last post in a forum, and I'm not sure if they care about it in topics. I look at the reply count sometimes. I think that people may be interested to know what's "hot," but depending on the community, that could mean lots of view or lots of replies, or both. I wonder if there's a way to visually represent that.

The post pages are a bigger mess. The moderation log button only appears for moderators (obvs), but the subscribe and favorite buttons seem clunky. Also, "subscribe" currently means email notification, but it'll switch to in-app notification, and users will have an option to subscribe to anything they post in automatically. There aren't really icons for these actions that follow an understood convention, let alone in six languages.

The date I call out because it does show things like "4 minutes ago" and update every minute. They count up the first hour in minutes, then say "today" or "yesterday" with the appropriate time, in all six languages. The problem is that they come from the server and depend on the user's profile time zone, otherwise defaulting to a time zone in the settings. Ideally, this would all be in the browser using the browser's time zone and I can persist the language parts in the header or something. Rewriting that will be gross though. It's 60 lines of code that I barely understand, and I haven't researched if the browser knows anything about the use or non-use of daylight saving.

The post tools I've always hated. I do think that these could use icons, something like a chain link, a reply icon as seen in every email app, quotation marks and a square-and-pencil (delete is only seen my moderators). I'm worried that these would appear even junkier than the words, and I don't know if they translate well into the other languages. No matter what, I'm thrilled with the improved post quoting.

Private messages are kind of dumb the way they're set up now, because they follow an email paradigm. It would be easy enough to just make this straight-up chat, I guess. I already converted the new message badge to be real-time, so the notification mechanism is already there. I would have to ditch titles and limit users to one "thread" per user, or groups of users.

Stats show that exactly five people use the activity feed on CoasterBuzz, and I literally know most of them. I imagine I could throw it away and keep the individual feeds on user profiles for novelty, and beyond that, the future notifications may satisfy the same curiosity.

The other thing not pictured here is the Q&A forum layout, which is better than it used to be. That's a pretty specific use case, and mostly known to people who use something like StackOverflow. We have one of those on PointBuzz, and no one ever marks an answer as "the one," which could be a UI problem or people don't care or both.

I'm giving myself the rest of the year to act on this stuff, and I'll ship whatever I have. The number of things in the "done" column are already pretty high. Heck I'm just thrilled with the post quoting. It already eliminated the gratuitous whole-post quoting.


Pissed about gas prices? We had a solution years ago

posted by Jeff | Monday, June 6, 2022, 11:00 PM | comments: 0

It definitely feels like we've achieved a new level of crazy town and willful ignorance when the goofy reality denying crowd wants to blame gas prices on the president. Forget for a moment that basic sixth grade economics explains supply and demand, which is why prices are what they are. The more sinister issue is that these asshats have been opposed to the solution for years. It's a solution I already enjoy, by the way.

For reasons I don't understand beyond the influence of lobbyists, these same reality-challenged people have for years been opposed to the adoption of renewable and sustainable energy. The benefits seem pretty obvious, not the least of which is that we'll stop killing the planet, and you should be able to smell the money for all of the new jobs it could create. Reinventing the way we create and consume energy has a lot of opportunity with it, and it not only means jobs but also generally lower costs for consumers.

Maybe you've heard, but solar power has been around for decades. Now the lifetime cost per MWh is less than any fossil fuel. Ditto for wind and hydro. The critics suggest that the sun doesn't shine all day, and while I'm thankful that there's at least one truth that they accept, there's a solution for that too called batteries. Create a distributed generation model, on rooftops, over retention ponds and sub-regional utility scale plants, and you can create clean energy everywhere.

I bring up the subject of electrical generation because it is tied to the electrification of cars. While the economy of scale math means that EV's are "greener" even when the power comes from coal or oil generation (for real, I did the math), the truth is that electricity is a far less expensive way to move stuff around. A lot of people think of Tesla as the start of mainstreaming EV's, and that's mostly true if you overlook Nissan because of their lack of sales volume, but the truth is that GM pioneered the production of EV's way back in 1996 with the EV1. That program eventually ended officially because GM said it wasn't profitable, but the people leasing offered to buy them and GM refused, collecting them all and crushing them. There was a whole documentary about that car, but the short story is that demand and interest was potentially as high as 15% of the California market, leading to the theory that GM was either pressured by the oil industry or feared for its parts business, both of which were threatened by electric cars.

By 2013, when Tesla Model S started appearing on the roads in trivial quantities, it was clear that even at the crazy price there was a lot of interest. This makes sense, because Toyota's hybrid Prius went through the same cycle. Today a used Tesla is worth crazy money. Our 4-year-old Model 3 could fetch $45k right now, and we only paid $52k in the first place!

Where I'm going with this is that electric cars could have been a thing by now had lobbyists and politicians not been so against it two decades ago. The battery tech would have advanced faster, the cost would have come down, and we could be there. Shortsightedness is why we're not. Ford may have been guilty of participating in the delay as well, but they're going to laugh all the way to the bank when they can't make enough electric F-150's to meet demand.

Two-thirds of my electricity comes from my roof, and that includes the part that goes into our cars. Between the two of them, we've save $200 this month by not having to buy gas.

So thank your asshat politicians for being against renewable energy and fighting against EV rebates. Today it costs me about 3.5 cents per mile to drive somewhere, but if I was still driving a Prius, it would cost me 16 cents per mile. If I was driving a typical SUV, 32 cents a mile. And the year that I installed solar and bought that Model 3, I got all of my federal taxes back, and some carried over to the next year.

Tell me again the case against renewables and EV's. This mini-crisis about gas prices could have been avoided. And frankly, I'm going to be smug about it.


The world at arm's length

posted by Jeff | Monday, June 6, 2022, 2:00 PM | comments: 0

In the last few weeks, I have largely disengaged from much of the world via the Internet. I don't watch news on TV, I've largely dropped into a "post-only" mode on social media. I read a lot of the headlines on the NYT, and I read a lot of stuff from Ars Technica. That's about as deep as I can go.

The result is that my mental health is better than it has been in some time. Part of my bupropion journey is the recovery of joy, and with it, sadness to some degree. My emotional self is no longer dull, and it has been fantastic. I feel music and movies again. I notice sunsets. I want to see people (in small numbers). I'm very driven to do things I enjoy. Despite some objectively shitty years, for everyone, I am optimistic and content often.

That doesn't mean that I don't know what's going on. I'm just trying to avoid getting sucked into the whirling vortex of shit. One of my friends and I had a conversation about this a couple of weeks ago, on a day when our tourist endeavors were not going to plan. At one point we resolved to just stop and people watch. We recognized that we're fortunate to be able to do that, among other things that would be considered a luxury to some. And indeed I have the additional advantage of being a straight white guy. For as much as the world isn't right, I'm likely least affected by the ugly parts.

Let me be clear that I don't feel guilty for having such privilege. I don't want anyone else to feel that way either. That's the part that unfortunately a lot of white, straight, middle-class Americans don't seem to be getting. No one wants you to feel bad or guilty about where or who you are, despite the asshats on cable "news" who insist that's what "they" want you to feel. But what you should do is recognize the inequities of society and commit to resolving them in whatever way possible, because that's what decent human beings do.

It sounds like I'm describing an impossible duality here, but I don't think that I am. There are a lot of upsetting things going on in the world, but I can keep them at arm's length and find ways to change them. At the very least, basic civic engagement is a start, as is voting for people who aren't white nationalists, racists, anti-Semites, homophobes, fascists or otherwise horrible people. I mean, for some reason they can come right out and declare how terrible they are, so they're not hard to spot. Maybe they're not in the right party, but at some point you have to send a message to them that trying to subvert democracy and squish all of the folks not like them isn't a great look for the nation.

We can donate time and money to things that advance us toward an equitable world. Don't confuse equity with socialism or whatever you think it is. We can all have constructive conversations about the merits of government paying for certain things or not, but these are not the same issues as those that cause some people to be less than others due to policy, past or present.

So yes, I'm learning to do what I can to improve the world, and understand my scope of influence. I can find ways to empower others who have even greater influence. I can keep a distance without burying my head in the sand. What I will do less of is worry.


Tesla Energy is a case study in how not to run a company

posted by Jeff | Saturday, June 4, 2022, 1:14 PM | comments: 0

Way back on March 13 we were hit by lightning for the second time in about the same place. My poor neighbor lost three TV's, cable boxes, a fan, a light and one of his heat pumps. We lost just the cable modem and my trusty old router, but it also fried our electrical plant in a way that kept us off-grid and running on the backup battery. So began a lengthy struggle to get Tesla to fix it.

Let me layout our setup first. Our electrical service is split into two panels in the house. One is all of the high-voltage stuff... the oven, water heater, HVAC, car charging, and what not. The other is everything else than runs on a typical 120V outlet. The latter can be powered by a Powerwall battery in the event of power loss, so at the very least we would have lights and a powered fridge. The solar plant is divided into two inverters, with the smaller load connected on the outside of the battery switch, and the the larger one on the inside of the switch. You can't use solar and/or batteries and still be connected to the grid in an outage, because you don't want to electrocute line workers that would assume in an outage that there's no electricity there. So in the event of an outage, the larger solar inverter, the battery and the lower voltage panel all become one synchronized system isolated from and switched off from the grid. The smaller solar inverter, since it's outside of the switch, disconnects.

When the lightning hit, the contactor switch would not engage back to the on-grid position. There are a lot of reasons this could happen. The contactor itself could be broken, or the inside system, the battery and solar inverter, could not synchronize to the grid. It all has to run at the same frequency to work, since the power is coming from potentially three sources. The contactor is part of what Tesla calls the gateway, and it has a computer that makes the synchronization happen, as well as meters that measure all of the parts. The synchronizer and the meters could go bad as well, and in fact the meters are what were damaged in the last lightning hit. In that case, we couldn't go off-grid and use backup because the meters couldn't detect the current correctly.

So the day after the hit, I called Tesla, and they saw the same thing I did when reading the numbers off of the gateway (it has a web interface I can see inside our network). The numbers were erratic and all over the place, as if to suggest that the sun was turning on and off and we were having a constant brown-out from Duke Energy. Of course, this wasn't the case, as I could observe the solar output on the inverters as steady, and our lights were certainly not blinking on and off. But they guy on the phone insisted that I had a utility problem. OK, fine, I'll play the game. I called Duke Energy, and they sent a guy out, who promptly put his meter in front of and behind the meter, to show that the power was steady and clean. By the time I made my third call to Tesla, they were still insisting that nothing was wrong with the system, it was the utility. Eventually I pointed out again that their remote measurement was incorrect, and I knew this because I physically observed the guy from Duke probing around, and physically observed that the solar was steady. This debate went on for more than an hour as he consulted with coworkers and I told him he was putting me in the impossible position of Duke telling me everything is fine on their end, and Tesla insisting (without a human on-site) that Duke was the problem. Eventually, he relented to send out a tech, but only if I signed a thing saying I'd pay for the visit ($300) if nothing was wrong.

The next day, a young guy came out and did some troubleshooting, and he wasn't sure why we were stuck off-grid. He tested and measured all of the things, confirming that the metering at least was wrong. It got late and he was instructed to relay to another tech the next day. That day, Alfred came out, who happened to be one of the guys who installed the Powerwall and rewired everything to split the loads. Super nice guy, real electrician and genuinely wanting to help. The thing is, that's the case for all of the techs who have been here. The people on the ground are really awesome. After messing around with it for awhile, he determined that contactor seemed to be the problem, but it's not a part they typically have separately of the gateway. The only course of action left that day was to bypass the contactor, which would also take the solar out of the equation. But at least I'd be back on the grid.

Here's where I point out how not to run a company. Tesla does everything by ticket workflows. So for example, when I had the initial installation, a ticket was generated to have the permit guy get a permit for the installation. Only that sat on his desk for like two weeks, preventing the next step, scheduling, from happening. I eventually called them and asked what was going on, and sure enough they found the permit guy wasn't permitting. In the case of my contactor part, I called once a week, for seven weeks, four to the main support number, three to the scheduling people (once I got that number), and each time they weren't sure why they didn't have the part, but would call me back within 24 hours to let me know what they found out after calling around. All seven times, they did not call back. There was a ticket tied to my case in the hands of someone at a warehouse, who clearly wasn't doing anything.

I'm familiar with this sort of thing, because it's partly how we build software. Support resources do it this way too. But in order for that to work, someone, in some role, has to be accountable for the higher outcome. Always. If you simply put a name on a task, and that person isn't accountable to outcomes, then there's no incentive to see it through. As a result, no one is actually advocating for the outcome. I've seen that a hundred times. It's an anti-pattern. In software, you need to have someone accountable for delivery, typically a manager (me), who is advocating for the customer or stakeholders to see it through. Stale tickets cause me to poke and prod until they're resolved. Similarly, in support situations, someone is looking out for the customer and following up on work assigned to others.

For Tesla Energy, customers have to advocate for themselves or things stop happening. It was the case with the solar installation, with the Powerwall installation, and getting the repairs done for both lightning strikes. They're absolutely terrible to work with, and as much as I think their products are elegant and amazing, I can't recommend them. Again, the people on the ground doing stuff are great, and I can't emphasize that enough. The infrastructure around them and the customer is awful.

On the eight call, the rep said my part was in the warehouse and he scheduled me, indicating he wasn't sure why someone had not done so already (I know why, see previous paragraphs). Adam came out, and he actually had an entirely new gateway that he would cannibalize. First he replace the contactor and sensor unit. Once in place, again, it got stuck off-grid. So he replaced the synchronizer and computer module, surprised because that might mean it was the computer all along and not the contactor. Unfortunately, the gateway he just cannibalized had been sitting somewhere for so long that the security certificate in it used to talk to Tesla for monitoring had expired, and there was no way to remotely update it. He was able to get everything into a normalized state though, meaning I finally had the larger part of the solar plant generating again, I just couldn't switch to backup in the event of a power failure. He was able to find the part quickly and schedule a return visit the next week. That came June 2, and he got everything back to normal within an hour or two.

It took 81 days, almost three months, to resolve this. In that time I missed the largest solar production window of the year, and incurred a couple of gigantic electric bills. Tesla stopped making the gateway that I have some years ago, so if this one goes, I imagine they would have to replace the whole thing. If it does, I can only imagine what a struggle it will be.


I made Phrazy with Blazor

posted by Jeff | Wednesday, June 1, 2022, 11:29 PM | comments: 0

About a month ago, I wrote a bit about how I made a word game, but I haven't talked much about how I built it, so let me go a little deeper there.

Phrazy was built on top of Blazor, which for the unfamiliar is a way to use familiar C# and .Net tech to compile to web assembly, a standard supported by all of the major browsers. My first real stab at building something with Blazor came toward the end of 2020, when I made a cloud based music player that I call MLocker. I've been using that app for more than a year almost every day, and while it's far from perfect, it's robust enough, and was easy enough to build, that I was compelled to build something else with it.

Inspired by the success of Wordle as a web-based game, I came up with Phrazy mostly because it was easy enough to imitate the classic hangman game. A lot of people see it and think of Wheel of Fortune, but hangman inspired that too. Blazor can generally be organized in much the same way as a React or Vue app, meaning that you can build a series of components nested within each other until you have a complete application.

Phrazy starts with a class called the "game engine." The game engine does what it sounds like it does, and acts as the centralized state for everything that the game has to track. Most components use dependency injection to interact with the one instance of the game engine, through its properties, methods and events. When it first loads, it does some initialization to see if there is a game in progress or it needs to fetch the day's puzzle from the server. It will also see where you ranked the last time you played. Each player is assigned a random identifier, and that identifier is the only thing sent to the server with your play results. It's used to record the results of your play and to rank all of the players by number of guesses, then time, once a day. I'm using local storage in the browser to store that state, because it's more robust than cookies.

The game engine has a state box that keeps track of the puzzle, which letters you've already guessed on the keyboard, the time you started (the clock is "ticking" even if you leave the game because it stores your start time), whether or not you're in solve mode, and the state of each letter on the board (not guessed, guessed, solving and typed a letter, solving and have not typed a letter). That state model is simply serialized to local storage a few times a second, so if you bail, the state is stored.

The structure of it all is straight forward. The Blazor "page" has a number of components on it, including the keyboard, the timer and the game board. The keyboard in turn has a bunch of key components, and the game board has a bunch of tiles. What gets rendered in each of these components largely depends on the game state stored in the game engine. Re-rendering or changing the state of these components depends entirely on the events that they subscribe to. The game engine has a bunch of events that correspond to things you would expect, like choosing a letter on the keyboard or pressing the solve button.

How does this work in practice? Let's look at the entirety of the Key component:

@using Phrazy.Client.Services
@using Phrazy.Client.Models
@inject IGameEngine GameEngine

<button class="key @GameEngine.GameState.KeyStates[Letter]" @onclick="Click" style="@(GameEngine.GameState.IsGameOver ? "cursor:default;" : "")">@Letter</button>

@code {
    [Parameter]
    public string Letter { get; set; } = null!;

    protected override void OnInitialized()
    {
        GameEngine.OnKeyPress += StateHasChanged;
    }

    private async Task Click()
    {
        await GameEngine.ChooseLetter(Letter);
    }
}

There isn't much here to look at. When it initializes, it binds its StateHasChanged method to the game engine's OnKeyPress event. That means that if the engine calls OnKeyPress?.Invoke(), for example in the engine's ChooseLetter() method, everything subscribed to that event fires, which is literally every key. You can see that the button's CSS class is set to @GameEngine.GameState.KeyStates[Letter], and there are classes set to "not guessed," "hit" and "miss," meaning it ends up gray, green or red respectively.

That's how the whole game works. The game engine responds to input, changes its state, and the appropriate components are coaxed into re-rending in response to those changes via events. If you've spent most of your career writing code for a stateless web or transient data flowing through high volume systems, it's a lot of fun to have all of the state just sitting there!