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").


decay & ruin
Biosphere II
dead malls
Irving housing

got that wrong

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff

(nobody does!)

Like my brownhouse:
   deeper learning with ChatGPT
Wednesday, January 31 2024
I was all out of beer, so late this morning I snuck out of the house without the dogs (they were on the beanbag in the laboratory) and drove down to the Stewarts in Old Hurley. There I bought a six pack of Voodoo Ranger Juice Force hazy imperial IPA, which has all the traits I want in an IPA (hazy and imperial) as well as a bag of Fritos. On the drive back home, I noticed that the light overnight snow that had turned the forests into a winter wonderland was still on the trees of Hurley Mountain above a distinct line running at about 550 feet above sea level. Our house is above that line, which also explains the distinct difference in weather I'd noted on Sunday night on the drive to Ray & Nancy's place on Sunday.

Early this afternoon, under the effects of a 150 milligram dose of pseudoephedrine, I managed to overcome my procrastination and follow a tutorial on YouTube where an extremely simple counting app is made in ReactJS with Redux. The idea was that if I did this then I wouldn't be completely clueless about React and Redux in a technical interview tomorrow. Just mindlessly following a tutorial without understanding what is happening wouldn't've been too useful, and that was what was going to occur if I just followed along, since the tutorial was fast-moving and didn't explain much of what the technology was doing. If we made the right encantations, the magic would occur. I'm a very practial person who learns by doing, so I wasn't happy just getting a working counter app (which I did). By modifying it and making it do other things, I hoped to get the deeper understanding that I sought.
With React/Redux, some of the mystery was wrapped up in the terminology. What the fuck, for example, is a "reducer." I'm familiar with the term in the more general programming context, where it means "to perform analysis on an array and return a single value." Taking an average or determining the median are two common reducers, for example. In the context of React/Redux, though, "reducer" seems to mean any kind of data transform or lookup, some (as in the counter example I'd just built) affecting simple scalar values. The tutorial spends no time explaining any of this. So to get to the bottom of this, I wanted to add a new feature to the app so that, instead of just incrementing or decrementing an integer, I could push a button and have a random word (picked from an array) appear on the screen. To do this, I first had to figure out where to put that array. Did it belong in the "store"? I tried putting it there, but then it turned out the store was completely unreachable from the reducer (needed to obtain the data). It looked like the reducer knew about the store but the store didn't know anything about the reducer. In the past when dealing with questions like this, I would normally have to give up or try my luck with Stack Overflow, where I was likely to be berated and ridiculed for my foolishnessness and lack of preparation. But these days there is an infinitely patient and seemingly all-knowlegeable intelligence that can be consulted. I am referring, of course, to ChatGPT. All I had to do was craft a prompt that included some of the code I was working on and the question about where the array was supposed to go. It cheerfully replied that the proper place for the original data was indeed in the reducer, not in the store. The impression it gave me was that the store was something React/Redux uses internally to keep track of front-end Javascript state, not data on a server, and that I wasn't really supposed to do anything with it except make it available through some boilerplate code. ChatGPT was also helpful in explaining where "actions" were coming from after I'd used createSlice from @reduxjs/toolkit. To me, these seemed to have popped up in the tutorial code like mushrooms, undefined and of unknown provenance. In the past I would've had to accept them as if they'd been delivered supernaturally, but when I asked ChatGPT about them, it explained that they were produced by the React/Redux libraries.

This evening, I fried up a pan of tofu, mushrooms, and onions and boiled up a box of bucatini (the thick spaghetti that is actually hollow). We ate all this red sauce and some broccoli that Gretchen cooked up after she got home from working at the bookstore and buying some groceries. I had a single Voodoo Ranger beer with dinner, which is allowed under my personal drinking rules even when I do not produce any art. The beer was a little sweet for my tastes, but it was an authentically hazy-style IPA.

For linking purposes this article's URL is:

previous | next