Looking for writing-related posts? Check out my new writing blog, www.larrykollar.com!

Monday, July 13, 2020 No comments

Oh deer! (redux)

Somehow, we as a family have been fortunate when it comes to deer encounters. This one marks the third occasion that a deer and one of our cars have attempted to occupy the same point in space, without damage to (at least) humans and vehicles.

Last week (Monday, of course), Daughter Dearest was heading back from the church to her house. Just beyond the church driveway, of course… a doe and its fawn decided to play a live-action version of Crossy Road, using DD as an NPC. Unlike non-players in Crossy, DD stood on the brakes, and the doe scooted on by. The fawn… not so much.

There, there…
Fortunately, at this point, she was going slow enough to bonk the fawn and tumble it a few times. For all her ferocity with people, DD has an extremely tender heart when it comes to animals. So she gathered up the four-legged victim (which was unable to get its own act together) and carried it up to the church porch.

From there, she called her mom (totally upset), then the DNR. The latter was busy trying to deal with a bear keeping someone in her car* so the two of them sort of comforted each other while Wildlife Rescue got its act together.

The DNR people got there, and assured DD that the fawn wasn’t severely damaged—no broken back, at least. With any luck, they’ll fatten it up for Thanksgiving dinner reunite it with its mom shortly.

Of course, wife and I were concerned first with DD, and then with her car. Both were fine. Wife opined: “She can hit a deer and not have any damage, but hitting a groundhog tore out half the underside of the car!” Well, this is Sector 706… logic is neither common nor appreciated.

*Probably not the same bear I encountered Friday night. That one has been sneaking up to the manor, on dark nights when we forget to drop the garage door, and gobbling an entire 40lb bin of dog food. I happened to be on a late-night grocery run, and probably startled him off as I pulled up the driveway, since the bin was just outside the garage. Turning on the floodlights, I saw him standing there on all fours in the back yard. After I cussed him out and banged on the plastic garbage bin (empty because of him), he shuffled into the woods. The dogs, who usually lose their shorts when a strange car comes up the driveway, amazingly didn’t say boo about a freeking bear coming up to visit. Then again, as I’m fond of saying, “stupidog” is one word.

Tuesday, June 30, 2020 1 comment

Impending: screen tan

I’ve been plugging along in my new work space for a couple of months, now. A couple weekends ago, while taking some time off, I did turn the light fixture 90° as threatened, and my gorgeous face is now lit up much better during videoconferences. :P

One thing that has chafed me about the homegrown workspace… I had two large monitors at work, side by side. At home, I had the laptop screen and a 17" NEC monitor that Solar gave me a few years ago. The work monitor mount was integrated with the cube/desk, and I didn’t have the time or inclination (at the time) to figure out what to do with them. I’ve made do, but wanted a little extra.

I am SO buying these socks for her.
Well… let me preface this by saying I’m not trying to criticize in any way. We all have our own ways of coping with the pandemic (not to mention The Boy checking out in August), and maybe her watching the Hallmark Channel for hours on end is healthier than me sitting at the computer and drinking myself stupid most nights.

Anyway, The Boy left us a 40" Sony TV. Wife wanted to upgrade our 32" Samsung for a while, and got someone to swap TVs for her when I was occupied doing something else (i.e. upstairs working). All well and good, except that the Sony’s HDMI2 input was boogered somehow. We used HDMI1 for the satellite connection, and #2 is the DVD player. We would see the DVD player's startup screen, then it would go black and not respond to pretty much anything but an input change.

Long-time readers know that the wife’s idea of troubleshooting is to go for the most expensive/time-consuming fix. Without my knowledge or input, which is fine if she used her own money, she bought another 40" TV. A Vizio, this time, which is fine. I don’t exactly trust Sony to keep its mitts out of my LAN. But I digress. There was something about a new wall-mount involved, and I dragged out the tools.

A while back, someone left a DeWalt driver/drill at the manor, with a 20V battery. I bought a charger and a spare for it, and I’ve used it for a couple of two-minute projects… then the parsonage’s back deck needed resurfacing. I brought it along, and it tore through that job like it was SARS-COV-2 tearing through immunocompromised lungs.

But I digress. The driver also made quick work of the wall-mount, and the Vizio was playing Hallmark movies in well less than an hour.

BIG screen!
That left me with an extra screen, a need for it, and a specific set of circumstances. The old wall-mount was great for the living room corner, but I needed something that went sideways from a wall, over my desk. Dragging out the measuring tape, I found that 18"-24" would give me plenty of clearance. Off to Amazon I went, quickly found a wall-mount arm with 24" of clearance, and ordered it. It arrived today, and I hucked it and the toolbag upstairs.

It took longer to mark the holes than to drill pilot holes, and to drive the bolts into the studs. It makes SUCH a huge difference to have good tools. In a manner of minutes, I hung the monitor on the mount, routed cables, and plugged everything together. The laptop’s dock has an HDMI connection, and I happened to have a stray cable laying around… presto, a humongous 1920x1080 monitor!

Maybe now that I have the hardware in place, the employer will spring for a 4K monitor… ha. I'm trying to decide whether to return the 17" NEC monitor to my bedroom desk. It might be useful for side jobs. After all, you can’t have too much screen real estate.

Monday, May 25, 2020 1 comment

To disc, perchance to golf

I was tempted to file this one as pandemic-related, but it was more of a “last straw” thing than a completely isolation-related incident.

Disc golfing has been around for a while. I remember going to a park in Grand Rapids, with Other Brother, when we were either nearly done with high school or just starting college (so, 1977, give or take a year or two). Back then, everyone called it “Frisbee golf” and played with backyard discs. The goals were usually posts that you tried to hit with your disc.

Portable goal
I enjoyed it, but college, a move to Planet Georgia, and doing other things caused me to lose touch with the sport. It was only after I went to see The Boy in Manitowoc that I started to reconnect. One of the parks has a disc golf course, and he had taken it up. We got me a disc (there was a shop near the park that sold a variety) and had a blast. By then, of course, the official goals (or holes) were now baskets with vertical chains, like in the pic here. Except, of course, actual courses have their goals sunk into the ground to prevent mischief.

The vagaries of life kept me from taking it up much, partly because I didn’t know of any nearby courses. But when The Boy returned to Planet Georgia, he quickly found two courses 15 and 25 miles away. I bought a “starter pack,” four discs with varying flight characteristics and a carry bag, and I added my Manitowoc disk to the collection. When The Boy took his longest journey, Mason (who also likes to disc golf) and I got his bag. Mason has mostly taken it over, but I picked out one or two to round out my set.

Backyard goal
Now, with parks closed (or if they aren’t, it’s still iffy to go), I decided it was time to work with what I have—a large-ish yard with lots of obstacles—and ordered a pair of goals. I put them at opposite corners of the house, and chose some tee-off spots. I have a four-hole course: the first two counter-clockwise around the house, the second two clockwise.

The course, given the limited space I have to work with, rewards accuracy much more than raw power. Tee shots require threading a needle between trees, bushes, and the house. I’m getting noticeably better.

Going online, I’ve also learned a little about flight characteristics, and what to expect from a disc when you throw it. That has improved my game as well. Now I can step outside at lunch and throw two or four holes, depending on time constraints, and then play a little more once I’m done for the day.

Weather permitting, of course. It has been raining a lot in the last couple of months.

Friday, April 24, 2020 2 comments

Life and Work in the Time of Pandemic (part 4, workspaces)

Planet Georgia's sorry excuse for a governor partially lifted the shelter-in-place, starting today. That’s going to have consequences in late May, for sure. Nevertheless, we got an email from work that said, in effect, “yeah, we know, keep working at home.”

Things I needed to set up a workspace arrived this week, and I found some other necessities in the garage. So after I sent my reports this afternoon, I got to work. After clearing the space, I vacuumed the (horrid) carpet.

We’ve been using The Boy’s old room for storage for a while. Clearing out a corner wasn’t all that difficult, but lighting has always been an issue. The house is a Cape Cod, and the only window in each upstairs bedroom is in the gable. I ordered a 4-foot LED fixture and power cord, and mounted it on the sloped part of the ceiling. Plugging it in yielded plenty of light, enough for most of the rest of the room. I used an old wire shelf hanger hook to keep the cord up against the wall.

Now for the furnishings. Daughter Dearest’s old office chair was sitting in that corner, and I found an old typing desk in the detached garage. Of course, it was all the way to the back, and covered in stuff (including lots of dust and grime). Fortunately, it was light enough for me to lift and carry by myself, and I hucked it across the driveway before wiping it down. I really need to hit the metal parts with a wire brush and repaint it, but that can wait.

With the desk mostly cleaned up, I hucked it up the stairs and dropped it in place. I grabbed the bag of gear (dock, keyboard, mouse) that I got from the office back when they first told us to not come in, and took that upstairs. To my delight, there was also a power strip that I’d forgotten about. Finally, the laptop and my second monitor went on up to make the final connections.

Another garage find—a big monthly planner whiteboard—was the last piece. We have a little container of picture hanger hooks, and there was a length of wire as well. I put it together, and there was already in a screw in the wall at just the right height. Incidentally, it covers a bunch of marks, so it wins twice.

It’s not quite done yet, even if it’s usable as a workspace in its present state. I plan to put some hooks under the front of the desk to neaten up the cabling, for starters.

Longer term, the wife wants to replace all the carpeting in the room and paint the walls. When that happens, I plan to use whiteboard paint at least in that corner. Maybe I’ll replace the cord with house wiring, to get it out of the way.

Come Monday, I’ll be a lot more comfortable about turning video on for our many conference calls than I have been in the past. I could also put pithy messages like “Approvals needed ASAP” on the whiteboard behind me, to enhance my presence.

Thursday, April 09, 2020 2 comments

Life and Work in the Time of Pandemic (part 3, school)

We’re on spring break this week… like I said in the last post, we were supposed to be at the beach, but having to cancel a vacation falls into the #firstworldproblems bucket.

The two-week “online learning” got extended to next week… then just before break, they finally realized the wisest course was to finish out the school year online. It’s a pain in the rear, but better that than getting a bunch of people sick without need (or the resources to take care of them).

I need to say, the school system obviously meant the whole online learning program to be something used once or twice over the winter, maybe for a few days. Now they’re having to adapt it for a months-long outage. My biggest beef with it is that they couldn’t settle on a single app or website to manage everything—there are three or four apps/sites, and they occasionally roll out another one. Although my Mac has a built-in password manager, I’ve gotten account fatigue over the years. So every time I get a memo about Yet Another Account to set up, they can hear my eyes rolling all the way out here.

“Out here” presents its own online learning issues. This is farm country, and I still think it’s amazing we have DSL. It usually works OK, unless heavy storms take out a line card (which happens pretty often)… or everybody who can work at home is doing just that and their kids are also online trying to do their schoolwork. It gets where the connection can’t even support a low-bandwidth music stream. I can do the normal work things—email, edit a DITA file from the cloud, chat—because that traffic is mostly short bursts and can slide in between the school traffic. Conferences are more iffy, but I usually use my cellphone for audio and the video is showing mostly static images of spreadsheets or documents.

But I digress. Our school is swimming against the Zoom current (an app I only heard about after the isolation began) and using Google Meet (aka Hangout). We can often manage one hangout at a time, or at least phone in if bandwidth is an issue. Charlie’s therapists (and pre-school) is also using Meet. Most of the time, this seems to work out. The bandwidth is hitting Daughter Dearest even harder, because she’s a teacher and has to be online. It got so bad that she simply bypassed the wheezing DSL and used her phone to get out. Needless to say, that burned through our data cap, our reserve, and then some. Now we don’t have a cushion for this month. I suggested she go to Dunkin', get a coffee and maybe a doughnut from the drive-thru, then sit in her car and scarf the Wi-Fi from there.

Often enough, our connection is marginally good enough, so DD and her kids have been at the manor most school days. That means I’ve had AJ (or Charlie) in my lap more than once during a conference call. I can totally derail a meeting by turning on my camera with either one; they’re both cute.

While we’re on break, I’m trying to set up a place in the larger upstairs bedroom (The Boy’s old room) as an office space. We made some headway yesterday. But I can’t help but think that once I get upstairs, all the kids will wander (or be sent) upstairs so I can still deal with something. I guess that’s okay, as long as I hold my end up at work. So far so good!

How about you? Have you torn a bumper sticker off your van yet? Comments are open!

Wednesday, April 08, 2020 No comments

Staycation, pandemic-style

We were supposed to be in Florida this week, hanging out with Mom and hitting the beach. Instead, we’re at FAR Manor.

Over the weekend, I finally got the new front derailleur on the Fuji dialed in. Hooray, time to take a ride! Um, no. The rear inner tube had partly separated from its stem. Well, Solar had suggested I put wider tires on it to improve the ride, anyway. There’s not a lot of clearance at the front fork, but thought maybe I could go from the current 25mm width to 32mm. I have a pair of 47mm tires, but they’re definitely too wide and the wrong diameter anyway. So I made plans to run over to the bike shop on Monday, and maybe get Charlie a bike with training wheels. Meanwhile, Skylar’s bike (the one he has here) needed shifting and braking adjustments. I got him rolling as well.

In the vein of “don’t go out unless you have to,” I called the bike shop before going. Nope, the shop guy opined, there’s not enough room. And they didn’t have any Charlie-sized bikes in stock. I thought we had a small frame laying around, so instead of driving to another bike shop I thought I’d try to Frankenstein a bike from bits and pieces.

Needs a little cleaning along with training wheels
Instead, I found an entire bike with a 12” frame! It was one Mason had for a while, until he outgrew it. The tires, amazingly, still held air. Some WD-40 got the chain loosened up, and I regreased the bearings on one wheel. So it rolls, it pedals, and the coaster brake works. I ordered a set of training wheels, and almost added a Trailgator (basically a towbar to pull his bike behind mine). The price—$65 for a metal bar with clamps on either end—put me off, though. Anyway, I raised the seat an inch and it fit Charlie perfectly.

All that, actually, was in between the ceiling fans. Daughter Dearest had ceiling fans for each of the kids’ rooms (three in all), and asked me to put them in because Sizzle is still working while the rest of us are on spring break. I succeeded, only after multiple trips back to the manor to fetch hardware, tools, and at last I had enough and brought everything. That turned out to be the way to go, and the fans are all happily spinning away.

I mentioned Skylar… he’s been spending weekdays at the manor because his nominal guardians are both working. He brought his bike up (the one I adjusted) over the weekend, and an HP laptop. “Do you have a cord for this?” he asked, repeatedly, until I told him to knock it off and let me do it when I had a chance. Before the fans, I scrounged a power cord and had to shave a little off the female end to make it fit in the power supply. I pushed it in, using as much force as I dared, and a light came on when I plugged it in. He wanted to start it right away, of course, but I told him to give it a few hours to let the battery get charged.

Finally, after everything, we started it. Black screen, and the Caps Lock LED was flashing. I realized it was a pattern—three long, two short—and I looked it up. Memory error. “Well,” I told myself, “it hasn’t been run in a while. Maybe if I reseat the RAM, it will be OK.”

So I flipped it over, opened the little door on the bottom, and… no RAM at all! I found out later, from Skylar, that a house guest had scrounged the single memory stick to put in his own computer. Nice guy. So I couldn’t reseat the RAM, but I had a 4GB stick on my desk from when I upgraded the iMac. It looked to be the same style, so I used the “cat in a box” formula: if it fits, it sits. I buttoned it up, plugged it in, and hit power. It coughed to life and displayed a login screen for the Microsoft thing. Yuck. Of course, I didn’t have the PIN it requested, although I tried some of the common ones (1234, 9999, etc). I configured the BIOS to boot from a USB drive, stuck one on and rebooted, and I soon had a Kubuntu desktop. Things seemed to be working properly, and exploring the hard drive suggested there was little or nothing (besides the OS and apps) on it. Skylar thinks his grandfather (Big V’s widower) knows the PIN, so he should soon be off and running.

So that was my first day of staycation: mostly fixing other people’s stuff. But I’ll soon have a new inner tube for the Fuji, and I’ll at long last take it on its shakedown cruise.

Wednesday, March 25, 2020 No comments

Life and Work in the Time of Pandemic (part 2, food)

Coronavirus (image credit: CDC, public domain)
Our “online learning” was extended through Spring Break, the first full week of April here, and they should probably close out the school year doing it. I suggested that to Daughter Dearest, and her response was “SHUT UP. SHUT UP.”

But whether we pull a Hong Kong and lift restrictions early (spoiler alert: it would be a Bad Move), or keep movement tamped down to prevent further spreading, the occasional grocery trip is a necessity. Maybe less necessary is occasional pickup from restaurants, although they might argue the “less necessary” part.

Restaurants are adjusting as well as they can, offering incentives like extra points for rewards programs or free delivery. Meanwhile, the wife and I have roughed out meal planning. We’re mostly digging meat out of our freezers, although we're short on ground beef and the hoarders (aka #covidiots) grabbed it all last weekend. Bread and milk are easier to find, now… both have a finite shelf life and hoarders might have a hard time using what they have before it spoils. Ground beef should soon be available as well, because even covidiots have only a finite amount of freezer space. (But they must be using all that toilet paper as mattresses.)

Meanwhile, the school system is still running the bus routes… except instead of dropping off kids in the afternoon, they drop off lunches in the late mornings. We don’t need the extra food, but they beg us to take it because we’re at the end of the route. Today, we got burgers. The kids eat whatever sandwiches are provided, but sometimes skip the veggies + ranch dip packages (add 1/4 tsp of onion powder to the ranch containers, instant chip dip). We’re going to cook the veggies for supper, if I keep my mitts out of them. Still, it’s starting to get overwhelming—we’re covered up with fruit, milk, juice, etc. We’ll need to make sure the neighbors get some of this if it continues.

Since the kids don’t drink all the milk, I have rediscovered the joy of drinking half-pints of chocolate milk from the carton. I have not yet tried my old trick of jabbing the side with a pencil, making a hole of the exact diameter of a straw; I could pressurize the carton and pump the milk into my mouth. One of my better memories of elementary school.

Fortunately, Charlie is expanding his protein sources, although he still strongly prefers his latest adoptions to be breaded and fried. Chicken nuggets (especially Chick-Fil-A) and fish sticks are winners. We thawed and baked a slab of salmon I had kicking around in the freezer earlier this week; the adults ate that, and Mason and Charlie gobbled several helpings of sticks. We got these corn dog bites, and Charlie ate half of one before he realized it wasn’t chicken, then ate the breading and left the mystery meat. Sometimes, it’s hard to tell the difference between picky and intelligent.

We have a few days of not-rain this week (yay!) so I’ll likely pull some ribs out of the freezer and smoke/grill them.

Monday, March 16, 2020 2 comments

Life and Work in the Time of Pandemic (part 1)

Coronavirus (image credit: CDC, public domain)
Local schools are on “online learning” this week (and I’m sure that will be extended). I started working from home last week, and we all got a “recommendation” from a manager to work at home through March 27 (again, it’ll probably be extended). Oddly enough, Charlie’s daycare (a Petri dish if I ever saw one) is remaining open. His therapy office is also open, but they’ve moved the waiting room out to the parking lot… in other words, wait in your car until your therapist comes out. Our little church has moved its sermons online (unfortunately, to the Book of Face, which I don’t use) for the duration.

You’re probably seeing the same things in your locale, and I’m not here to provide dry statistics. I’m going to journal the mostly self-isolated life in a rural area, in case someone else finds it interesting now or later on.

Long-time readers might remember FAR Future, a long blog-novel I wrote starting all the way back in 2007. Although the chronic energy shortages that the whole story is built around have yet to materialize, some of the things I wrote about have had eerie parallels in real life. One episode (written in Sep 2008) discusses a serious flu pandemic, with a 3%-5% mortality rate, breaking out in… December 2019. We’re not laboring under a junta, but the administration in real-life 2020 is every bit as incompetent as was the junta in FAR Future. The difference is, the fictional flu was like the 1918 pandemic, hitting young and healthy adults the hardest. This one goes (mostly) after the elderly. We also have the Internet, a find way to find information (and plenty of misinformation) about what’s happening.

Saturday was “run errands” day, so I combined the trips to limit time out and contacts. Charlie had horse therapy, and we needed both some groceries and a UPS battery. Other than that, we were in all weekend. Wife and I keep talking about meal planning, so we can order pickup from the local Kroger, but haven’t quite done it just yet. Today, she’s out with Charlie for therapy. I’m not sure he’ll go to daycare today. If he does, I might run to the office to grab a laptop dock and some notes, then pick him up on the way back.

These first few days of (mostly) shelter-in-place are very strange. It’s like a winter storm, except that all the utilities are working and the roads are even more clear than usual. Our crappy DSL is crappier than usual, what with all the school kids with Internet doing their work online (not to mention people like me, trying to work). Structure is going to be important… along those lines, Daughter Dearest forwarded me a suggested schedule for families. Modify as needed, but a little structure will make everyone's day go better:


Meanwhile, I have a minor cold. I’ve never been so glad to sneeze.

Tuesday, March 10, 2020 No comments

Adventures of a #techcomm Geek: Match Game, 2020

It’s been a while since I did one of these, and this one goes in deep.

We’ve been using DITA at work for a year or two now, but rarely is there time to go back and take advantage of the things it offers, retrofitting those things into the documentation we brought in. (Docs we’ve created since then seem to get more thorough treatment.)

One of those things is reuse. It’s easy to reuse an entire topic in a different book—even if it was duplicated. “Hey,” says a writer, “that’s the same thing. Let’s throw away topic B and use topic A.”

DITA also supports reusing common paragraphs in two or two dozen topics, but that’s a little harder. First, you have to recognize that paragraph. Then, you have to create a new topic (a collection file), copy the paragraph into the collection file, and assign it an ID. Then you have to replace the duplicated text (in topics) with a content reference (a/k/a conref). It’s a worthwhile thing to do, because you might say the same thing slightly differently otherwise. Still, who wants to go through an entire book (or worse, set of books), looking for reuse candidates?

Of course, you can always let a computer do the tedious work… if you know how to tell it what to do.

Preparing the (searching) grounds

A while back, I wrote my first useful Python scripts. One takes a particular JSON file and reformats it as a DITA reference topic, containing a table with the relevant data from the JSON file. Another walks through a CSV file, grabbing the columns I need, and producing topics documenting a TR-069 data model. Both scripts take advantage of a vast library of pre-written code to parse their input files.

It occurred to me that, if I were to find (or create) a way to export all the text from a DITA book into a CSV file, I could use a Python script to compare each paragraph to all the others. Using fuzzy matching would help me find “close enough” matches. That was a while ago, because I bogged down on trying to get properly-formatted text out of DITA.

Last week, I got bored. Someone on the DITA-OT forum mentioned a demo plugin that translated DITA to Morse code, and the lightbulb in my head went on. If I could modify that plugin to just give text instead of -.-. .-. .- .—. then maybe I’d have what I needed.

It was an abject failure. What I need is one line per block element (paragraph, list item, etc). What I got was one line for the entire topic, sometimes with missing spaces. I put that aside, but realized that DITA-OT can also spit out Markdown. If I could convert Markdown to plain text, I’d be ready to rock!

So you want to convert DITA to Markdown? It’s easy, at least with the newer toolkits:

dita --format=markdown_github --input=my.bookmap --args.rellinks=none

The DITA-OT output continues to be topic-oriented, writing each topic to its own file. That wasn’t quite what I wanted, or so I thought at the time. Anyway, we have Markdown. How do we get plain text out of it, with each line representing a block element?

Turns out that pandoc, the “Swiss Army knife for converting markup files,” can do it:

pandoc -t plain —wrap=none -o topic.txt topic.md

In the heat of problem-solving, I realized I didn’t need a CSV file… or Python. I could pick up Awk and hammer my nails the text into shape. My script simply inhaled whatever text files I threw at it, and put all the content into an array indexed by [FILENAME,FNR] (FNR is basically the line number of paragraphs inside the file). There was a little stray markup left, not to mention some blank lines, and a couple of Awk rules threw unneeded lines into the mythical bit bucket.

Got a (fuzzy) match?

A typical match is an all or nothing Boolean: you get true (1) if the strings are an exact match, or false (0) if they don’t.

Fuzzy matching uses the universe of floating-point numbers in between 0 and 1 to describe how close a match is. It’s up to you to decide what’s close enough, but you usually want to focus on values of 0.9 and higher. And yes, an exact match still gives you a score of 1.

Why do we want to do this? Unless content developers are really good about cutting and pasting in a pre-reuse environment, inconsistencies creep in. You might see common operations described in slightly different ways:

Click OK to close the dialog.
Click OK to close the window.

So along with flagging potential reuse candidates, a fuzzy match can help you be consistent.

Python and Perl have libraries devoted to fuzzy matching. There are several ways to do a fuzzy match, but one of the more popular is called the Levenshtein distance. There's a scary-looking formula at the link, but it boils down to single-character edits (addition, deletion, or replacement). The distance between “dialog” and “window” is 4 (d→w, a→n, l→d, g→w).

But this is an integer, not a floating-point number between 0 and 1! But that’s easy to fix. If l1 and l2 are the lengths of the two strings, and d is the calculated Levenshtein distance, then the final score is (l1+l2-d)/(l1+l2). In the above example, the score is 0.93—the strings are 93% identical.

There are websites with Levenshtein distance implementations in all sorts of different programming languages, although the ones written in Awk are not as common. But no problem. Awk is close enough to C that it’s simple to translate a short bit of code. I picked the second of these two. There was one already written in Awk, but it took a lot more time to grind through a large set of strings.

Save time, be lazy

The time it takes is important, because it adds up fast. Given n paragraphs, each paragraph has to be compared to all the rest, so you have n2 comparisons. A medium sized book, with 2400 paragraphs, means 5.76 million comparisons. Given that a fuzzy comparison takes a lot longer than a boolean one, you want to eliminate unnecessary comparisons. A few optimizations I came up with:

  • It’s easy to get to (n2-n) by not comparing a string to itself. We also do a boolean compare and skip the fuzzy match if the strings are identical. Every little bit helps. Time to analyze 2400 paragraphs: 2 hr 40 min. My late-2013 iMac averages about 600 fuzzy match comparisons per second.
  • By deleting an entry from the array after comparing it to the others, you eliminate duplicate comparisons (once you’ve compared A to B, doing B to A is a waste of time). That eliminates noise from the report, and cuts the number of comparisons required in half. Time to analyze 2400 paragraphs: 1 hr 20 min. Not bad, for something you can do with one more line of code.
  • Skip strings with big differences in length. Again, if l1 and l2 are the lengths of two strings, then the minimum Levenshtein distance is abs(l1-l2). If the best possible score doesn’t reach the “close enough” threshold, then you don't have to do the fuzzy match. Time to analyze 2400 paragraphs: 5 min 30 sec!!! Now that’s one heck of an optimization!

So we’ve gone to something you run overnight, or at least during a long lunch break, to something that can wrap up during a coffee break (eliminating 96.5% of the time needed is a win no matter how you look at it). Now if your book is all blocks of similar length, it will take longer to grind through them because there isn’t anything obvious to throw out.

Still, this is down to the realm where it's practical to build a “super book” (a book containing a collection of related books) and look for reuse across an entire product line. That might get the processing time back up into the multiple-hours realm, but you also have more reuse potential.

Going commercial

The commercial offerings have some niceties that my humble Awk script does not. For example, they claim to be able to build a collection file (a “library” of sorts, containing all the reusable paragraphs) and apply it to your documentation. That by itself might be worth the price of entry, if you end up with a lot of reuse.

They also offer a pretty Web-based interface, instead of dropping to the command line. And, they have likely implemented a computing cluster to grind through huge jobs even faster.

But hey, if you’re on a tight budget, the price is right. I’m going to make sure the employer doesn’t have a problem with me putting it up on Github before I do it. But maybe I’ve given you enough hints to get going on your own.
UPDATE 10 May 2020: The script is now available on Github.

Sunday, March 08, 2020 2 comments

Mooooving out

I called him Buncha (as in Buncha Bull). Mason called him Bully. The young woman that helps the wife out with farm stuff called him Carl (Carl?).

Whatever you call him, the time came for him to moooove back to the pasture. Wife put a halter on him, handed me a lead (basically a really heavy-duty leash) and told Mason and me to walk him down to the pasture.

So down the garden path we went. We brought his milk bottle along, just in case. The calf was both excited and nervous about this Really New Thing, and spent the entire walk alternately planting his hooves or trying to frisk ahead. But despite him weighing well over 100 pounds, he didn’t pull as hard as a 30 pound Aussie Shepard.

The pasture is calling
and I must go.
We got to the pasture. I unclipped the lead and let him go, then slipped through the gate. He stood there, looked around… then stepped through the barbed-wire fence like it wasn’t even there. As Mik’s Aunt Morcati said, cattle are born knowing all profanity and will gladly teach it to anyone nearby.

So I waved the milk bottle at him, he ambled over and chowed down, and I clipped the lead back on him. Now what? I thought. I can’t stand here with him forever.

Finally, I decided to take him further into the pasture. Riding a milk high, he was glad to follow my lead (the one attached to his face via the halter). About 50 yards in, I unclipped him and backed away to see what happened next. He munched on a big clump of grass, then looked up and got this look about him. It was almost like it dawned on him: This is my place, and that’s my herd. The pasture is calling, and I must go. He walked up the hill, found some other calves around his age, and they included him right away.

It’s not like he’s completely gone… he still has the halter, so we can spot him in the herd and bring him an occasional bottle. Like this:


He still comes trotting over when he sees us… or at least sees his bottle. So we don’t have to miss him. Especially since another calf is now in the pen. It never ends at FAR Manor.

Thursday, February 27, 2020 3 comments

The great flopover

Today began the way it often does through the week: wife putting AJ next to me on the bed while she gets Mason on the bus. Today, AJ seemed anxious to be self-propelled; she squirmed and grunted on the bed until I put her on my chest. She’s 3 months old now, and even crawling is another entire lifetime away. It has to be frustrating, to be a curious rugrat and have to depend on the big stupid giants to figure out what you want to do or where to go.

I was working at home today, so I took Charlie to daycare and picked up some breakfast on the way back while the wife tried to keep AJ content. They hung out most of the morning, because I had a call I needed to be on from 10 to 11:30… but then it was lunch break. I took AJ, and let the wife scarf her egg and cheese croissant.

As I’ve said before, AJ is a lot like Mason—she likes to be walked around. I can also keep her occupied for a little while by turning on the ceiling fan in the bedroom; she loves watching it go 'round and 'round. But I walked her around a little more, and she zorched out. I laid her in the bassinet (on her tummy) and went back to work.

About half an hour later, the wife called down the hall: “Did you lay her on her back?”

“No,” I replied.

“Then she rolled over!”

I had to text Daughter Dearest with the news. I missed it :(, she replied. Get video!

Getting video was easier said than done, because AJ only flipped onto her back (she did it twice through the day) after waking up. So when DD came to pick her up, she really wanted that video…


(I cut out a lot of DD encouraging the flopover in a very squeaky voice.)

BTW, don’t suggest to DD that her laying on the bed made it easier for AJ to roll over.

Monday, February 24, 2020 No comments

Bedtime follies

Getting Charlie to go to bed can be a crapshoot, especially if he hasn't had a lot of outdoor time to wear himself out… or if he has a cold.

Most nights, I'm the one who gete his pajamas on. As I am ever a hopeful soul, I’ll ask him, “are you ready to go to sleep?” He nods, which is a gigantic lie, but I'll put a blanket on him and turn off the light. Usually, he jumps out of bed after a couple minutes and does his thing until one of us reels him in and settles him down.

But yesterday night, he didn’t jump out of bed right away. After a short while, the wife called down the hall: “Is Charles with you?”

“No, I put him in bed…” Is it possible? I thought. Maybe he went to sleep! 

I went to his bedroom, and waited for my eyes to adjust. I saw a dark shape on the bed, and touched it… too soft. It was one of his stuffed bears. I felt around some more, then finally gave up and turned on the light.

And there was Charlie.

Sitting cross-legged up in the corner of the bed.

Stark naked.

Diaper at his side, pajamas a little farther away, socks at the foot of the bed.

Seriously. I have no idea what his thought process was for this… was he expecting me to find him like that? Or did he plan to sleep in his all-in-all? Or (more likely) would he have shortly wandered into the living room to make the wife wonder what he was thinking?

I re-assembled his nighttime ensemble, and put him in my bed until he gave up and zorched out.

That was one of the more off-beat things Charlie has done in his nightly battle against the Sleep Monster. It makes me wonder what he’ll do to top it, later on.

Monday, February 03, 2020 2 comments

Done!

After all the hearings, the forms, the interviews and evaluations, the end was almost anti-climatic. We went into a conference room, the judge swore us in, and asked us if we still wanted to go through with it. He signed a paper and said, “It’s official.”

Charlie is now our adopted son.

The judge was happy to stand with us and get a pic. He said, “Adoptions and drug court graduations are the best part. Everything else can be kind of sad.”

Our second family (plus the judge and AJ)
There’s still stuff to deal with, including getting Charlie’s updated birth certificate and changing the name on his Social Security card. And the adoption assistance will take over from the foster stipend to cover Charlie’s therapies and the like.

I took the day off, and we kept Mason out of school so he could be part of the final ceremony.

Then I got to thinking… if Splat (Charlie’s bio-dad) is his cousin, does that make Splat his own uncle? Well, family trees in this part of the country do have their share of tangled branches…

Wednesday, January 29, 2020 2 comments

Mooooving along

When you live in a free-range insane asylum, you never know who (or what) is gonna show up next, looking for a little living space…

I guess this is the season for calves, because the wife has been talking about all the new babies out in the pasture lately. But, it seems like one of them had some issues… not so much the calf itself, but the mama. Here’s a mental image you won’t see often, in two words: prolapsed uterus.

However it was, the mama didn’t make it. That meant catching the calf, which is usually just a matter of letting it hang out for a day or two until it’s too weak to run away, then bring it to an enclosure where we can feed it. Lief, who was The Boy’s dog, got displaced from his pen and moved back to a tree and doghouse so the calf could have a place to live. The first day or so was… interesting. We had to pin him against a corner, then get him to figure out that the bottle had foooooood. After exactly one of those ordeals, he got the idea and was glad to see us coming.

Slurp… uh, eet mor chikin… Slurp
A week or two later, and he's pretty much a really big doggie. He’ll slide around your legs, looking for the bottle, and has figured out he needs to let go on occasion to equalize the pressure.

Mason helped me out one evening. “What should we call him?” he asked.

“Steak,” I grinned. “He’s gonna go on my grill.”

“No he won’t!”

Super-cute eyelashes notwithstanding… but whatever. I’m calling him Buncha, as in Buncha Bull. Most likely, once he’s weaned, we’ll return him to the pasture. But before that happens, we’ll most likely be feeding him out of a bucket. Buncha is already trying to find an opening out of the pen, so I hope it won’t be much longer before he returns to the herd. But I guess if someone waves a bottle at him, he’ll be glad to go wherever it leads.

Saturday, January 18, 2020 2 comments

Weekend AJ blogging

Daughter Dearest’s maternity leave ran out last week, which meant she went grumbling back to work on Monday. And that meant AJ was at the manor through the day until she got home.

She doesn't mind having her @$$ in a sling!
AJ is definitely her mother’s daughter. DD liked to be held close, so does AJ. The difference is, DD's happy place was rocking. AJ is like Mason; she likes to be carried around. Wife asked me to work at home so she could deal with a couple of things without having to listen to AJ howling to be picked up. After a couple tries, we found a good position for her in my old sling, and I had both hands free for working (and taking a selfie). Of the three babies who have spent time in that sling, she’s the earliest adopter… Mason and Charlie were both about 3 months old when they got comfortable in it. She also sat in on her first two conference calls, and started crying when someone said the schedule had to slip (so she’s already qualified to be a Product Line Manager!).

She’ll sleep about half the day, and we have a little bed for her. “Safe Sleep” notwithstanding, she likes to sleep on her side more than her back (which is what Charlie preferred as well).

She's like 7 weeks old now, growing quickly and gobbling prodigious amounts of formula. When she’s hungry, everyone knows it. Charlie started sympathy-crying at one point.

She looks a lot more like Daughter Dearest now, and the eyebrow ridges and lack of hair make her look a lot like my youngest bro Solar. He replied (paraphrased), “Yup, we’re both gorgeous.”

Both of us enjoy our baby time, and Charlie likes being around her as well (although we have to make sure he doesn’t hug too hard). She’s not a boarder, she doesn’t live here, but she’s aboard.

Monday, January 13, 2020 No comments

Holding a… garage (door)

Back before Christmas, Panda was at the manor, and backed up his big truck to turn around…

BAM

I was working at home that morning, and ran out to see what had happened. To be honest, the only surprise was that it hadn’t happened years ago. FAR Manor has a treacherous driveway. Someone, and it turned out to be Panda, finally hit the garage door.

You really couldn’t see any problem from the outside, and you had to be looking for it to see it from the inside. One of the panels was pushed in. “I’ll come by tomorrow and put it back in,” Panda assured me.

But he didn’t.

After he left, I hit the lift button. The Orange Crate was parked in there, and I would need it. The garage door went up, but made one h3|| of a racket, squealing like a Republican who had been confronted with its lies. I told the wife about it, and we agreed to leave the door open until we could get someone to deal with it.

So the holidays went by, and a brief Winter #2 came around. The garage door isn’t awesome insulation, but it’s a lot better than nothing (especially when it’s windy, which is typical of Planet Georgia’s five winters). The wife dug around, and found the number of the guy who had installed our replacement garage door opener (that I got from Freecycle). He said he could come by on Thursday, and I agreed to work at home that day.

Gotta love maintenance windows… I had an urgent bathroom appointment, and somehow I missed hearing him come up, but heard him leave. Thinking he had arrived, I forced an early finish and ran out to the garage. All there was, was a sticker saying he had come by.

Since I had to move my cube at work on Friday, there was no opportunity to work at home then. Wife figured she would hang out, and arranged a second-chance visit… and he never showed up.

Sunday afternoon rolled around, and I realized the garage door was still in the same shape it had been. After confirming that the garage door guy never showed up Friday, I decided to tackle the issue myself.

First, I backed Moby Yo (the great white minivan) out. If I got the door down, and it wouldn’t go back up, at least we wouldn’t have a trapped vehicle. Then I hit the button. It wailed, stalled, and went back up. Maybe I’d been overly cautious, but at least I had room to work. I got a stepladder, hammer, and wood block, and got pounding.

Back in place… mostly.
After dorking around, I was able to get the door down. I attacked the panel in earnest, pushing it out and banging the framework down enough to get it back into place.

I didn’t address the bent metal beams, but hoped I’d straightened things out enough to get it going. Hitting the button was encouraging… the door went up without drama. Down, it howled and stopped again.

“Huh,” I thought. I know the definition of insanity is trying the same thing and expecting a different result, but I hit the button again anyway. This time, the door went down like nothing had ever happened. There’s a reason I call this place the free-range insane asylum.

Given that Spring #3 seems to be really wet and not all that cold, we might not restart the firebox until the end of the week. We’ve had plenty of the “cool/warm and wet” part of Planet Georgia winters, but only (so far) brief spates of the other part, “cold and dry.” More will come, and at least now we can put the garage door down to keep the worst of it out.

But we have wood on the rack, and a little more in the shelter. Maybe I’ll get a chance to cut more firewood in the weekends ahead. Winter is coming… and going, through March anyway. Dry weekend days, and we’ve been lucky to get one for two the last few, means tackling those maintenance issues while you can.

Friday, January 10, 2020 No comments

Turkey slow-cooker chili

Eating Season is finally behind us… maybe. A lot of us still have a metric eff-ton of meat in the freezer, we’re trying to ditch those holiday pounds, and maybe we’re tightening the financial belt a little after blowing the budget on presents. It's still cold out, at least for most of us.

Gotta have those toppings!
We need something hot, cheap, and reasonably healthy for supper, but still tasty… so here you go. I based this on an AllRecipes version, and found it spiced well enough that I wasn’t reaching for the jar of ghost pepper sauce The Boy made for me a year or so ago (a half-teaspoon takes anything from mild to wild, so it will last a while). Like the turkey tacos recipe I posted, this is a good way to rescue dry or undercooked turkey. I ate all of this over a week, except for one bowl, and the wife thought it was pretty good. My second batch used some thawed leftover chicken, from a September church BBQ, and it worked fine as well.

Turkey slow-cooker chili
1 lb turkey (or chicken), diced
1 onion, chopped
1 1/2 tsp olive oil (more if the turkey is dry)
1 T minced garlic
2 T chili powder
1/2 tsp paprika
1/2 tsp oregano (dried, or 1 tsp fresh)
1/2 tsp cayenne pepper (ground)
1/2 tsp cumin
1/2 tsp No-salt
1/2 tsp ground pepper (black or white)

2 c water
1 can (14oz) white beans*, drained and rinsed
1 can (28oz) diced fire-roasted tomatoes
2 T unsalted tortilla chips, crushed (optional)**

Toppings:
Sliced jalapeños
Crema (or sour cream)
Shredded cheese (sharp cheddar, Colby-Jack, etc)

Pour water, beans, tomatoes, and crushed tortilla chips into a lined slow-cooker. Set on High.

Heat olive oil in large skillet. Add onion and garlic; sauté until the onion softens. Add turkey and remaining ingredients, stir until turkey is heated and oil is absorbed. Transfer turkey/onion/spice mixture into slow-cooker, stir.

Cook on High approx. 3 hours or until simmering, stirring occasionally; then simmer for 1 more hour. Serve hot with toppings as desired. Leftovers can be reheated in a microwave.

*I usually reach for black beans, but found that they tend to “stain” poultry-based soup/stew/chili. White beans don’t discolor the meat. Red beans also seem to work okay, if you drain and rinse them, at least.

**The crushed tortilla chips thicken the broth a little. Alton Brown came up with the idea, so don’t blame me.

Do you have a favorite recipe for turning leftover meat into chili? Comments are open!

Wednesday, January 08, 2020 No comments

Four!

Wife observed: “Now that Charlie is four, he’s entering his Terrible Twos.” He’s definitely four, Terrible Twos notwithstanding. He’s curious about everything, he can reach the top of the dressers in our bedroom, and he’s trying so hard to talk. He invented a sign for Play-Dough, hands inverting over each other (I should probably post a video). Daughter Dearest got him to make the “d” sound, and the “oh” sound, but he just can’t quite seem to put them together. Hey, at least he’s starting to use consonants. The rest will come.


Bread with pizza sauce… perfect!
We had a sort-of pizza party for him this evening, to mark the occasion. He can’t actually eat pizza, but he’s fine with the crust and sauce. So one of the pepperoni pizzas I made this evening had a fourth of it missing cheese and 'roni. Sauced bread was just fine with him. We also had a veggie pizza, but that didn’t last the night. I’d have liked one with 'roni, ham, and bacon, but hey… it’s not my night.

There was also bowtie pasta (Charlie’s favorite) with marinara sauce. Instead of a birthday cake, we had assorted doughnuts. Charlie likes plain ones, and I think he got two of them. (“Hey, it’s his birthday.”) As we’re working on the theory that he sleeps better on a really full belly, we were okay with letting him eat. Besides, there are a few doughnuts left over for tomorrow morning, and I fully intend to grab one to enjoy with my coffee.


After the food (and cake, or cake doughnuts in any case), what comes next with a birthday? Presents!

Charlie got the hang of opening presents during the Christmas craze, and he obviously doesn’t have a problem remembering how. His favorite was a Play-Dough activity set (have I mentioned he loves his 'doh?). He got a set of Baby Shark puzzles and games, and only got interested in that once we put up the Play-Dough.

He’s not really into the Grand Acquistion of Stuff phase just yet, and Mason didn’t get there until he was six or so. If he has attention, cars, or Play-Dough (roughly in that order), he’s fine. Mason complains about him being annoying, but the two of them aren’t all that different. Mason gets massively annoying when he wants attention from us, and Charlie gets massively annoying when he wants attention from Mason (or us). Both of them torment the dog, and I think Charlie learned some of that from Mason.

Anyway. Big news might be coming in slightly less than a month. Stay tuned for the latest from the free-range insane asylum!

Friday, January 03, 2020 No comments

Goals vs. resolutions

A new year has arrived, and perhaps people are asking you if you have any resolutions.

Perhaps you reply, “I don’t do resolutions,” and add some variation of “they never work out.” The reasons they don’t work out could be greater than one per person, but here’s a couple common ones:

Too vague. “Lose weight” or “Have a cleaner house” are things many of us can aspire to, but where’s the finish line? Being one pound lighter on December 31 is technically losing weight, but is that really going to satisfy you? Do you really have a cleaner house if you binge-clean twice a year and otherwise let it go like usual?

Impossible. You might try biting off too much. “Lose 40 pounds” or “get out of debt” aren’t vague, anyway. But if you’re honest with yourself, you know what the odds are of achieving something that big.

Maybe this year, instead of making sweeping resolutions you’ll blow off before February, set goals. I wrote about setting goals on my writing blog a couple years ago, and how much they help. But your goals should be SMART:
  • Specific (I would say Short-term is as important)
  • Measurable
  • Achievable
  • Results-oriented (I would add Rewarding)
  • Time-bound
(Yes, you may give this an epic eyeroll. I know I do.)

Some of these run together. M and R especially can be variants of S. To me, they’re not as important as the other three. Let’s run with the examples I used earlier.

“Lose 40 pounds” checks most of the boxes, but is it achievable? The implication is “by December 31,” and that’s nothing like short-term. These days, our attention spans are eroded by all the input we’re bombarded with, and focusing on a goal for an entire year might not be achievable. If you’re not 40 pounds overweight, it might not be achievable in any case. So, lower your sights and go short-term: Lose 7 pounds by Feb. 15. Don’t forget your reward; you want an incentive to stay focused on your goal(s). There’s nothing wrong with wanting a pat on the back or an effing cookie, even for doing what you know you should. If you’re too demanding of yourself, never satisfied, you could end up asking yourself “What’s the point?” and giving up.

Once you’ve achieved that first 7 pounds, reward yourself and then set your next goal. Just keep it realistic, and remember, it takes longer to lose less as you go.

“Have a cleaner house” is results-oriented, but how do you measure it—in other words, how can you tell if you’ve succeeded? It’s certainly not specific. Maybe it’s achievable. It’s an end, and your goals are the means. Develop the habit of putting stuff away this month is a goal. You can measure it by the lower amount of clutter. It might not be your only cleanup-related goal; things like give away kitchen stuff I don’t use this March or install shelving in the garage next week are short-term, achievable, and will help get you to the cleaner house. Break things down into smaller chunks whenever possible.

“Get out of debt” is a noble aspiration, and it’s even specific and measurable. But is it achievable? Besides having sufficient funds to do it, can you stay focused on that for an entire year? If you have a partner who likes to splurge, you’ll need to get on the same page, too. I actually had a three-year plan to get rid of everything but the mortgage, and of course things happened in the second year.

Some credit bites your wallet harder than others. You might have one card with a 12% interest rate and other with a 30% rate. Get more specific, and get achievable: Pay off RipOffBank Visa by March, then cancel it. If you don’t think you can pay it all off by March, specify the goal balance; once you’ve reached it, set the next goal.

Big resolutions have a place—they guide the goals you set—but they aren’t what you actually do. Do the goals, and the resolutions will come along for the ride.

What are your goals for 2020? Sound off in the comments!

Tuesday, December 31, 2019 No comments

FAR Manor paninis

I got a panini press for Christmas, a fairly fancy one that also has electric griddle and grill (open or closed) functions, Mason and I made pancakes on it a couple of times already, but what’s a panini press really for?

Paninis!

The wife was hungry, and gobbled hers right down, but even picky Mason liked his. Personally, I think it's better than Panera’s by a long shot. A family friend brought us a ham, and I expect I’ll be pulling out the FoodSaver and chucking a bunch of it into the freezer (joining the pound or so of ham left from Thanksgiving). But until then…

FAR Manor paninis (makes four)
8 slices Italian bread
12 oz sliced ham
Asiago cheese to taste, sliced
2 T butter
1/2 onion, sliced thin
4 mushrooms, sliced thin
8 sun-dried tomatoes, reconstituted and chopped (about 5 chunks per tomato)
olive oil

Pre-heat panini press (to 400°F if it has temperature controls).

Melt butter over medium heat in a small skillet. Add onion and mushrooms, sauté until onions are soft and mushrooms lose their white color.

Layer four sandwiches thus, dividing fillings equally: bread, cheese, ham, onion/mushroom/tomato, cheese, bread. Brush bottom of sandwich with olive oil, lay on panini press, brush top with olive oil. Press one or two sandwiches at a time, adjusting position if needed to make the top sit even. Grill for 4 to 4-1/2 minutes, until bread is browned and cheese melts.

Cut in half and serve with salad, chips, or soup.

What do you like in your paninis? Comments are, as always, open.

LinkWithin

Related Posts Plugin for WordPress, Blogger...