Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

welcome to the collapse
Clusterfuck Nation
Peak Oil

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   in the weeds again
Tuesday, April 9 2019
It was an unusally foggy drive to work this morning, which made things a little scary in places, but I'd rather have fog than the sun in my eyes. I love crossing the Kingston-Rhinecliff Bridge in fog because of the sense of being an indeterminate height above the ground and distance from anything other than the immediate roadway and edges of bridge. It's like an endless grey soundstage.

I've had maybe a week of good feelings about what I've been doing at work, but that wasn't destined to last. Today I got into the weeds again trying to implement a bunch of exceptions to the default business logic of this Electron app I've been working on. The first of these required a call to the backend API to do a database update, something that (in this app) had only been done from within Angular components. They had always used a library called HttpClient decorated as Injectable (I'm not entirely clear what that means) which had always been passed into the Angular components via the constructor. The whole point about a lot of this shit is that we're not supposed to worry our pretty heads about how they work so that we let Angular do all the heavy lifting. This is good to a point, but then inevitably you run into cases where the whole thing breaks down and there is no easy way to do the thing that would be trivial (or at least straightforward) in a language like vanilla Javascript. In this case, the breakdown happened when I wanted to make API calls from some place other than an Angular component. I had a number of frontend classes with no obvious relationship to the components that were using them to organize a data model. And yet the only way to make API calls was through the components. I tried making my API be just another property of the class that needed to make the API call, but I couldn't make it work. In frustration, I eventually had the Angular component pin my API onto the global object, and damn if that didn't work! I could now call on the API from wherever in the frontend that I wanted to. On the surface, though, this seemed to violate good practices. Isn't it generally bad to "pollute" the global scope (or things accessible from the global scope) with random things needed in disparate places? In this case, it didn't matter. My mission is to build a working app, and it doesn't have to be pretty. But I'm left to wonder, how am I supposed to do stuff like this in Angular? And, more importantly, who has the time to find out what that is when the global object is right there, ready to use?
Later in the day, I had similar problems when it turned out that I had to override some equality-determining methods and, in the place where the override was happening was a not within a descendant class of the class of the method being overridden. This meant that in doing the override, I wouldn't have access to the this object. And that, in turn, meant that in any equality-determining method to be overridden in this way, that method had to be static. And that in turn meant that the equality-determining method had to accept two inputs, one for one object on one side of the equality comparison and one for the object on the other side of the equality comparison (remember, I had no access to this).
As you might imagine, I left work kind of hating the app that I'd begun to love as recently as last week.
On the rainy drive home, I stopped at Adam's Fairacre Farms to get some produce Gretchen had requested. The the list of things I bought was almost identical to what she and I had bought several weeks ago on our drive up to Saugerties to see the movie Us, including non-organic asparagus, orange juice, mushrooms, broccoli, butter lettuce, and loaf of sourdough bread. I did not, however, get any pasta.
Tonight for dinner, Gretchen made a dish that included farro rice, sauteed mushrooms, broccoli, and a delicious creamy sauce. It all looked a bit too healthy for me, but I ended up going back for seconds just before Double Jeopardy. In the episode of Jeopardy we watched today, it was the third day in the reign of terror by a very smart, very unpleasant gentleman with very white teeth named James Holzhauer. He routinely wins at least $40,000 per game.


For linking purposes this article's URL is:
http://asecular.com/blog.php?190409

feedback
previous | next