|
|
foundation is basically Hello World Friday, October 18 2019
I would have a presentation of my data importer later today, so this morning I thought I'd do a last-minute compilation to make the executable electron app. Shortly thereafter, though, I made a troubling discovery: when I ran the app by issuing an npm start (the way I generally test it), it worked great, but the executable was no longer working. I'd done so much development since testing the executable that there was no telling what was broken, though it was probably something in the reporting module, where I'd done most of the recent work. Situations like this is where the fundamental problem of modern frameworks, especially Javascript frameworks, rears its ugly head: there are too many things happening under the hood (many of which we are told not to worry our pretty heads about) for any but the most experienced developers to understand, and so when the app breaks in an unusual way (in this case, only when compiled to Electron), then it's going to be a beast to debug. It's important to note here that, as much work as I've put into this app, its rickety foundation is basically Hello World. I'd done some Google searches to see how to put an Angular frontend on an Electron app, found a basic example, and worked from that, learning as little as possible about Webpack Angular-cli, and the other garage-full of tools that goes into getting it to work. And when I later found I couldn't actually get it to compile to an executable, I did a little more research until I got that working.
Still, I wasn't too panicked despite the fact that I would have to demonstrate the app later today. I could still get it to work by issuing an npm start from a console window. I did patient web searches in hopes of finding someone who was experiencing the same problem I was. I soon isolated the problem to ng2-ace-editor, the embedded code editor that was allowing me to edit SQL and JSON in a nicely-formatted color-coded textarea alternative. Unfortunately, I couldn't find a single example of someone having trouble with this editor in an Angular frontend that was part of an Electron app. Remember, it worked fine when it wasn't compiled as an Electron app. Something was going on in Electron that was different. I suspected this had something to do with the fact that paths to things are different in Electron than they are in just Angular, but none of the experiments I tried were successful. In an app this complicated, debugging is frustrating because one has to wait a couple minutes for the Electron app to compile (which I do by issuing electron-packager . --overwrite). So I found myself reading what I could of the latest archipelago of Trump scandals in my favorite websites.
The meeting was held upstairs in the conference room, where I was somewhat stymied by the terrible user interface on the smart television into which I plugged my laptop. Eventually I got that working. Then, for the two remote employees on the team, I started up a Google Hangout. I couldn't actually figure out how to spawn a new one using the latest version of the Google interface, so I just jumped into Slack and found the URL for last night's Mercy For Animals diaspora happy hour, and that worked great.
Unfortunately, the presentation didn't go as well as I expected it would; the various imported all had various problems, one of which appeared to be from a bug that had crept into the code. Still, I was able to demonstrate how the app works. Best of all, I was able to showcase the newly-polished reporting module, demonstrating how easy it was to make changes and create new ones. I was a little surprised by how resistant some of the developers were to the concept of hand-editing JSON in a text editor, though that might've just been because the first instance of JSON they saw was a dump of a large, complicated JSON file that had been entirely stripped of all its whitespace. Agreed, such a file is impossible to edit in any but the most trivial manner.
I left work immediately after the meeting, stopping at the Stewarts at the south end of Red Hook and buying a sixer of Hazy Little Thing IPA. I went out of my way to visit the Tibetan Center thrift store, even though it's been a bit of a bust ever since Rob had leave for apparently medical reasons. Today, though, I found a nice old Canon Powershot G1 3.5 megapixel digital camera (with tiny fold-out screen) for a price that looked like $2.00. That was a Rob-type price, and it came with all the accessories, including power supply, extra batteries, and a 256 megabyte CF card. I'm a sucker for old digital cameras, so I marched up to the counter to buy it. The grey-haired cashier who vaguely reminds me of my mother was pleased, saying she'd just priced it today. Then she rang it up: $20! What the fuck? My brain must've elided the extra zero. But I bought it anyway, even though I never would've considered it had I seen that a 19 year old digital camera was priced at twenty fucking dollars. That's a Salvation Army price! But I've gotten a lot of deals at the Tibetan Center, and the $20 was for a good (if completely doomed) cause. And later, back at the house, I was really impressed with the camera despite its age. It had a big lens driven by a powerful motor, and the zoom even changed in the optical viewfinder when I zoomed the lens in and out. Its all-metal construction felt high-end in a way that nothing really does anymore. Also, unlike every other camera I've owned, it came with an infrared remote, which will allow me to control it from afar. This could prove useful should I ever have another chance to photodocument the goings-on in a bird nest.
Meanwhile Gretchen was down in Newburgh, having a reading with a poet who is much more famous than she is. They all went out for dinner later at a decidedly non-vegan restaurant where Gretchen had to settle on a portobello burger (and fries) that I would end up eating most of. For his part, the famous poet would order lamb chops, which are apparently still a thing. He felt a little guilty about this when he learned that Gretchen is vegan, though, as he pointed out, lambs are not an endangered species. Then again, it's doubtful that Ms. Fairfax has ivory-billed woodpecker on its menu.
For linking purposes this article's URL is: http://asecular.com/blog.php?191018 feedback previous | next |