GOTO Considered [Rarely] Necessary

My answer is below, but, surprisingly enough, only a couple of days later, I found it expedient to use a GOTO in a PHP script, admittedly to fix a logic problem that wasn’t very well thought out.  In a while() loop, a test at the end needed to start a new output section, but the current data set needed to be put in the new section.  The expediency was to use the initialization code to start the new section, which was at the top of the loop, but allowing the loop to cycle would read a new data set, so the “quick-and-dirty” solution was to jump to the top of the loop without reading the new value.  Problem solved, and preserved the integrity of the code block, which was the main problem with GOTO in unstructured programs, back in 1968 when Edsgar Dykstra gave his infamous “GOTO Considered Harmful” proclamation.

The only time I have used GOTO has been to implement a decision construct not supported by the language. Of course, GOTO was necessary in linear programming languages which did not have syntactic constructs as we use in structured programming. All compiled programs have a GOTO in each and every looping or decision construct, but in the resulting output code. When it is necessary to use, it must be a construct defined in a safe manner, rigorously applied. Usually, this would be to stop execution in the middle of a code block by a GOTO to exit the block, something which most structured languages already have, in the form of a ‘break’ statement, or similar keyword. I could imagine a deeply nested decision tree construct where GOTO could be used for clarity, but there would probably be another way to write such a construct to be unambiguous.

One such example in C/C++ I could envision would be to construct a type of switch construct that accepted strings instead of integers as case arguments, where GOTO took the place of the break clause. I had used a similar construct in COBOL successfully, to build a switch-type operation, which doesn’t exist in COBOL, such that, once a test succeeded, the rest of the tests would be skipped. (Disclaimer: I took a job writing COBOL as a last resort, around 1990, in the middle of changing careers from systems engineering to software engineering—not a recommended choice: wrote COBOL by day at work and C by night at grad school).


Afterword:  Here is a snippet of the code block…

  
while ($fil = readdir($subdir)) {
newpage:
    if (is_dir($fil)) { continue;}
    if ( $row > 8) {
.
.
.
    if ($column >= 5 ) {
      $column = 1;
      $row++;
      print ("\n");
      goto newpage;
    }
.
.
.

The Parkins Report: Events of 2018

We set the tone for 2018 with a bike ride on January 1. Judy made a resolution for us to ride every month in 2018, which we are happy to report that we have kept. This year, Judy rode over 640 miles (1043 km), and Larye rode over 750 miles (1221 km).

“Wait,” you say, “don’t you guys ride a tandem?” Yes, we do, but Larye decided he wanted to try for a birthday ride this year, in honor of his 75th. Judy says she’s not old enough to ride that far, so Larye had to train for a solo ride. In the end, time just caught up with us, so Larye compromised with a 75 kilometer ride.
Larye’s solo rides,  3 on the old Specialized commuter, and ending with a 76 km (47-mile) Idaho loop on the “Lean Green Machine,” the Bike Friday in single-bike mode.

In order to satisfy our goal, we took the bike with us in the van on our Southwest tour in February, riding in Albuquerque, Yuma, Seal Beach, and Huntington Beach. We offset the fuel bill for the van with a few nights camping along the way and staying with relatives. The budget cutting plan was lost when our van, with the bike inside, was impounded in Anaheim because the parking permit got covered up on the dash. After retrieving the vehicles for a fee equal to our fuel bill to get home, we dispelled our rage by riding down one of the concrete-lined river channels in the L.A. basin. We quickly realized we didn’t have any problems, as we passed many homeless camps along the way.

Our van travels took us across what we have called the Southern Exclusion Zone in New Mexico, Arizona, and California. We got mistaken for coyotes when our bike, with helmets hanging from the handlebars, looked to the border patrol like a van full of illegal immigrants. We passed a total of five border patrol checkpoints in our travels, at three of which we had to show papers to remain in the United States, though we never left the country at the other points.*

The primary reason for our winter travels, of course, was to visit relatives, which we did. But, as our family grows and scatters, it wasn’t possible to schedule time for all, because of their work and travel schedules. We did get to meet the newer members, though.

Since we planned to stay near home most of the rest of the year, we broke tradition and signed up for several organized bike rides: the “Your Canyon For A Day” ride through the Yakima River Canyon to benefit Crimestoppers, which was great fun; the “Tour de Mason Lake” in Shelton, benefiting the Karen Hilburn Cancer Fund (about which, more later); and, “Ride the Willapa,” an overnight ride to benefit trail improvements on the Willapa Hills Trail, a 60-mile-long state park, mostly gravel trail between Chehalis and Raymond.

Although we thought about riding the 50-km circuit on the TdML this year, we again opted for the 35-km, fortunately turning around at the break stop, as the frame broke on our Bike Friday tandem on the way back, 10 km from the finish line. We were scheduled to head for Montana the next day, so, after hitching a ride to retrieve our van, we swapped bikes at home, once again taking our ancient but reliable Santana.

Although the Bike Friday eventually got repaired, Judy decided it had run its course, and we rode the now 32-year-old Santana the rest of the year.  Larye later converted the repaired Bike Friday to single-bike mode.

A snapshot of the last rides of the Mean Green Machine (as a tandem).  January-June 2018

We had intended to use the Santana for the Ride the Willapa gravel ride, anyway, having made a practice run earlier in the year on the Friday, realizing it still wasn’t very good on gravel. And, since it was a supported tour, we ended up camping in our tent for the overnight.

Arriving late at the campground, we got a site with a slight slope, having to periodically crawl back up from the bottom of the sleeping bag a few times during the night. And, of course, abandon vegetarianism for the day, as rural Washington doesn’t serve our kind, either in town or in camp. The cover picture was taken when we stopped for ice cream at the Doty, WA General Store a few miles from camp.

In July, we made an impromptu tour of the Olympic Peninsula while the city repaved our street . We camped four nights and rode near camp three days. We were pleased to find that seniors pay only $10 to camp in national park campgrounds.

As usual during the prime touring season, we hosted bicycle tourists from early spring through late summer. Guests came from Brazil, the U.K, Germany, New Zealand, and Spain as well as around the U.S., and in a range of ages from early 20s to mid-70s.

On a quick trip to Montana in June, we attended a national aviation fly-in, visited friends and relatives, and rode our bike. We made a quick no-bike trip to Idaho to attend a wine festival with relatives. Another Idaho trip in September gave Larye a chance to ride his 75-km metric-age while Judy and friend Char went thrift shopping.

After two years of living with our fold-up sleeping platform in the van, we remodeled with a telescoping design with foam cushions that transformed into a sofa for more comfortable camp seating than sitting in the front seats. We also insulated and covered the rear side windows to cut down on drafts from the windows and keep the bike from hitting the glass.

Our bike rides continued into the fall, with an excursion to the San Juan Islands. We decided the hills on Orcas were too steep to ride, so we hiked mountain trails instead. On the way home, we camped overnight on Lopez to ride the flattest routes in the archipelago, We topped off the season with chilly short rides in Shelton and on the trails in Olympia, where we started the year.

The second half of the year, we rode our old Santana tandem.

Reflections

So it goes. Obviously, we remain reasonably healthy for old folks entering their fourth quarter-century. We attend yoga sessions when we can, and Larye even led a couple of sessions this spring when all the other regular leaders were out of town. Our bicycle excursions tend to be a little shorter than in days gone by, and our daily driving distances likewise get shorter.

We missed a lot of weaving guild meetings this year, but are still active and plan to do more fiber projects in the coming year. Judy sold a number of items at the fall show and sale.

We’re encouraging relatives to visit us next: Matt and Darice did visit from Wisconsin, (Matt twice, briefly). We have a couple of ambitious road trips planned for 2019 that don’t pass by too many relatives, so that will be the only way we will see many this year. We have also made contact with long-lost cousins in the last few years, on Judy’s side of the family, and went on a camping trip with some over Memorial Day, and have others on our list for 2019.

We enjoy visiting with and entertaining bicycle tourists, but too many in one week does tire us, and, though we count the hosting cost as entertainment expense, it does add up. Prices keep going up, but social security payments remain pegged to the price of cat food, so we realize we have to keep cutting corners somewhere as our retirement savings dwindle.

We lost a cousin this year, too young, and some friends, one tragically, one unexpectedly, so we plan ahead but realistically live one day at a time. The goal is to get very, very old, very, very slowly, or, as the late George H. W. Bush used to say, “… to die young as late as possible.”

We wish all a happy holiday season and joy in the year ahead.

Judy & Larye

* Little-known fact (except for those who live there): ICE patrols cover a 160-km zone within the borders of the U.S., with right of search and seizure of suspected undocumented persons. There are 33 permanent checkpoints, most on the southern land border, but also some on the northern border, primarily in the east.

Warm Showers 2018

A typical morning scene: a round of photos and sendoff for our guests (Emilie and Sheena), as seen from our webcam.

2018 was a typical year for our Warm Showers activities.  We hosted 29 bicycle tourists this year, turned down a half-dozen or so that passed through when we were out traveling or bicycling ourselves, and a few who made inquiries but ended up bypassing us  due to routing or scheduling.

Our first guest of the season, Luci, had traveled two years from Brazil, intending to tour Canada as well.  However, she ran into a stumbling block when Canada refused to issue her a visa.  With her US visa expiring, she retreated to Mexico and is still planning to continue when and if she can get permission to enter Canada.  Meanwhile, she has seen much of the U.S., thanks to the many friends she has made in her journey.

Our next guest, Liz, a British free-lance journalist, had traveled from the U.K. via Europe and Asia, continuing her trip down the U.S. coast to Central America before returning home to the U.K.

Sheena, from Maryland, and Emilie, from New Jersey, had met on a Bike ‘n Build crew a few years ago and decided to tour together down the Pacific Coast.  The discovered, to their surprise, while looking through our guest gallery, that two others of their crew had stayed with us when they continued touring after the group had reached Seattle.  We narrowly averted a disaster when Emilie slipped on the top stair and took a bumpy ride down to the living room, fortunately unhurt.

Tom and Becci, originally from the UK, but living in British Columbia lately, passed through in early June on a tour of the Pacific Coast.

Frank, from Germany, convinced his Swiss employer that an English immersion experience would help him with his new assignment as sales rep to English-speaking countries, choosing a bicycle tour down the West Coast as the best way to do that.

Charlie and Becci, both veterinary surgeons from the UK, took an interesting approach to touring, ordering new bicycles delivered to the U.S., then riding them from Vancouver to San Ysidro, California, where they sold the bikes and continued their tour by public transit to Mexico and Cuba, where they had very interesting (and amusingly related) adventures and volunteered their skills at veterinary clinics (albeit clandestine ones in Cuba, where small-animal practices are not licensed).

Ramon, a teacher from San Diego, and Peter, a pediatric oncologist from Indiana, arrived separately and went their separate paths the next day, though both headed south.

Daniel and Claudia, from Germany, had pedaled across Europe and Asia, then north through the U.S. and Canadian Rockies before heading back south along the coastal and Sierra Cascades routes.  When back at home, Daniel is a neurologist and Claudia is a political science graduate student.

Jennie and Daniel, aspiring actors from the East Coast, started their Transamerica tour in Arlington, WA, headed down the coast to the western terminus at Newport, Oregon to begin heading east to New York.

Tom and Amanda, from Alaska, were “drop-ins,” contacting us by phone late in the day after realizing they weren’t going to make it to their intended stop.  We usually prepare a meal for expected guests, but Tom and Amanda arrived late, so cooked their own.  We still got in a good visit.  Tom has had several pieces published in Adventure Cyclist, the membership magazine of Adventure Cycling.  They were on a tour around the Olympic Peninsula starting from Seattle.  We had just completed a car-bike camping tour around the same route, in the opposite direction, so gave them some tips, and got good feedback from their experience.

Yanouk, from Montreal, had ridden across Canada with a friend from the Gaspe Peninsula to Vancouver, then solo to Vancouver Island and around the Olympic Peninsula before returning home to continue his university studies.

Bill and Dave, Christian pastors from Oregon, on a short tour together in the Pacific Northwest.

Neeka and Kegan, from New Zealand.  Kegan has an outdoor job, so they devised an ingenious plan to spend  a couple New Zealand winters in Canadian summer to combine work and touring, intending to ride to San Francisco before flying home to New Zealand in time for spring building season.  Unfortunately, one of their excursions over the summer took them to Port Angeles, where the clock started on their U.S. visa.  After I asked them about the timing, they checked their visa and discovered they had mere hours to get back to Canada by bus and train before it expired.  Hopefully, they will be able to return to explore the U.S. next year.

Chris, from Colorado, made a fast tour of the Pacific Coast on her recumbent, by virtue of being a very early riser, getting on the road well before sunrise.

Alain, from Montreal, arrived the same day Chris did, but from a different route, delayed slightly by knee issues.

Carlton, from Michigan, and his friend Rachel, fellow travelers who met on a group tour several years ago, had traveled with a group of other cyclists from that first group down the Canadian Rockies, splitting off to ride the Washington Parks Loop on their own, arriving from Yakima via Mount Rainier and Elma on their way to Seattle.

Connie, from Colorado, and  Isabella, from Oregon, who met on a supported bike tour of Puerto Rico years ago, decided to tour the Olympic Peninsula Segment of the Washington Parks Loop route, with a side trip to the San Juan Islands.  The biggest problem they had in planning was where to leave their car, as the loop brings them back to the starting point.  We don’t have room to park extra cars, so they ended up starting their tour in Montesano, 60 km west of us.  Connie’s Bike Friday New World Tourist is the first BF in our garage besides our own “Q” tandem.

David, from Spain, toured across Canada from Montreal and was headed down the Pacific Coast on his first North American tour.  He was quite the celebrity on the Warm Showers network, as he was the first Spanish tourist most of us had hosted. I ended up picking him up near the airport north of town, to spare him the hill climb to our house and the rush-hour traffic through town, made worse by the extensive road and utility repairs that have made navigation across town interesting this summer and fall.

So, another season under wraps.  We had a few requests in October, as we usually do, but weren’t home, so no guests in October.  2018 brings our total number of guests hosted since we joined Warm Showers in 2011 to 216.  This year brought us guests from two new countries, Brazil and Spain, and cyclists from a variety of professions, as usual, including journalists, physicians, teachers, religious leaders, students, and retirees.  Yes, our food, water, and electric bills go up a bit during “the season,” but we do enjoy sharing our mutual passion with these world travelers.  With some, our contact is brief, but others we keep in contact with for years, passively through their blogs, or actively on social media.  One of last year’s guests is nearing her goal, the southern tip of South America, currently entranced with the scenery and people of Chile.  An early guest from 2011, now 76, continues to tour around the world, sharing his photos and stories in his blog and on Flickr.

The Curmudgeon Abides

This month marks four years since I finally stopped renewing consulting contracts, which made me officially retired.  Since then, I have continued to maintain my pro bono client lists, and took some time to learn enough Python coding to put up a custom webcam at home, but have let my professional organization memberships lapse and do less coding than ever.  I have continued to create bad videos of our too-infrequent bicycle rides, but the technical skills are gradually eroding without some stimulus to keep up.

Recently, that stimulus came with signing up for the Quora social media site, in which participants can ask questions about random subjects, which get directed to members who have listed some level of expertise in those particular subjects.  So, I get asked questions about software engineering, Linux, operating systems in general, and other related fields which are fading from memory, forcing me to do a bit of research to verify facts I think I know for sure, but which invariably turn out to be not true [or at least, any more].

As a result, my rambling and sometimes oblique discourses on things about which I know very little, but about which I have strong opinions yet, get thrust upon the world, or at least the segment of the Quora community interested in such things.  Some questions are inane, badly formed, or prompt me to ask myself, “People do that now?”  At any rate, a lot of questions get multiple answers, and the answers are ranked by how many members (which may or may not include the original member who posed the question) “upvote” a particular answer.  Quora tends to encourage continued participation by announcing who has upvoted your answer, but that is tempered by statistics showing how many people have seen your answer.  Which, if you weigh that against the paucity of upvotes, means most users glanced at it and moved on.  At least I haven’t seen any “downvotes,” yet.

The social engineering model is fueled by advertising: if users bother to read your post past the opening paragraph, they are greeted by an advertisement before getting to see the rest of the response.  So, Quora has a vested interest in getting lots of responses to questions, and generating lots of questions to be answered.  A large percentage of the questions I get fed are apparently generated by an AI algorithm rather than a real person.  The majority of questions submitted by real people are ones that come from those interested in how to advance in the field, or aspiring programmers curious about pay scales.  Students wonder about the downside of struggling to become a code monkey: how to advance without a formal education or survive in the industry long enough to pay off student loans.  Some, I assume, are looking for answers to class problems without doing their own research.

There are the usual Linux versus Windows arguments, and some loaded questions, possibly posed by ringers to justify promoting a point of view.  A number of the respondents to questions have impressive résumés, and are much better qualified to answer the questions authoritatively than I or many of the others that offer what are clearly biased opinions not grounded in fact.  Many of the questions appear to come from practitioners and aspirants who are in the global marketplace, not many with down-home American monikers like Joe and Charlie, which leads me to fear that the U.S. heartland just isn’t growing a lot of technologists these days, but have relinquished progress to ambitious immigrants and the growing tech sector in the developing world.

So it goes.  Besides keeping my personal technical knowledge base current, and maybe passing on some historical lore to the new generation of coders and admins, I’m preserving a tenuous connection with the community, albeit virtual rather than face-to-face.  However, after a long career of being either the lone “factory rep” at a customer site or the lone Unix guy at a Windows shop, dependent on USENET or other on-line forums for community, it isn’t much different.  It’s as close as I can get to being part of a “Senior Net,” offering advice and guidance as a community service.  And, I get to learn new things, or at least remember the old ones better.

 

 

Internet Purgatory

I’m writing the draft of this post on a word processor (LibreOffice, naturally), for a good reason. We’ve had the same web hosting provider for 17 years, ever since we moved from Missoula to Hamilton in Montana and lost access to ISDN services. For two years before that, we had hosted our own web sites and email from a couple of servers hung from the floor joists, in the basement.

When we needed to find a new home for our Internet presence, Modwest, a new and growing Missoula company, stepped in. The plans they provided were ideal: running on Linux servers, with SSH (Secure Shell) login access and the ability to park multiple domains on one account (at that time, we had two already: parkins.org and info-engineering-svc.com). Everything worked fine, and we added and deleted domains over the years, for ourselves (realizations-mt.com and judyparkins.com) and, temporarily, for clients (onewomandesigns.com). It just worked, and we also added WordPress engines to our personal/business domains. My programming sorted out which domain got served which landing page, and the links from there went to subdomains to keep the filesets separate.

We finally retired the old quilting web site, realizations-mt.com, when the registration expired in early 2018, but rolled the legacy pages into a subdomain of judyparkins.com to keep her client galleries on-line. Then, this spring, Modwest announced they had sold out to Intertune, another web hosting provider headquartered in San Diego. Billing transferred to the new host, with the same pricing. Fine. But, eventually, they told us, the websites and mailboxes would be transferred to the Intertune servers. The Internet thrives on economies of scale—the bigger the organization, the fewer resources are needed for failover, backup, and support.

So, at an inconvenient time (we planned to be out-of-town for a week), they informed us that our parkins.org account would be migrated, so we dutifully switched the collective domains to the new servers, upon which our blogs disappeared, and the other two domains disappeared entirely, along with mail service. Frantic exchanges by phone and email ensued:

Them: “Oh, we’re only migrating parkins.org at this time.”

Us: “But, they share a file set, database, and mailboxes, and have subdomains. It’s one account. And you didn’t migrate the subdomain content at all.”

Them: “Oh, gee, we’ve never seen anything like this. (ed. Note: almost all web hosting services support this.) Switch the others back to Modwest. We’ll get back to you.”

Us: “Unsatisfactory—they are all one and the same, just different names in DNS.”

Us: “Hello? Is anybody there?”

Us: “Our blogs still don’t work, and our mail is scattered across several mail servers.”

Them: “OK, we’ll do what you said, for judyparkins.com and the subdomains.”

Us: “You didn’t. The subdomains sort of work, but the WordPress installation doesn’t, because the three domains are intertwined.”

Them: “OK, try the judyparkins.com now.”

Us: “The blog works, sort of, for Judy’s, but mine doesn’t, and judyparkins.com isn’t receiving mail.

Them: “Oh, wrong mail server. Try it now.”

Us: “OK, now do the same thing for info-engineering-svc.com”

Us: “Hello? Is anybody there? It looks like your servers are pointed the right way, but the email and blogs still don’t work.”

Them: “Oh, wrong mail server. Try it now.”

Us: “OK, the mail works now, but the Larye blog is totally broken: I can’t see blogs.info-engineering-svc.com at all, and the admin page on blogs.parkins.org is broken yet. I can’t publish anything or respond to comments, nada.”

Us: “Hello? Is anybody there?”

Us: “Hello? … Hello?

Now, we could have decided early in this process to not trust them to migrate this successfully and moved everything to a different hosting service, but that would involve a setup fee and transferring all of our files ourselves—which, for the web, isn’t a big deal, but migrating 20,000 emails sitting in hundreds of folders on an IMAP server is—and working through an unfamiliar web control panel, so we didn’t. We should have, as the same level of service, with more space, is actually cheaper on the web hosting service we had before we moved to Montana in 1999.

But, meanwhile,  we’re busy, so a few days passed, and they still hadn’t replied to my latest comm check.  Rather than risk exposing my latent Tourette Syndrome with an expletive-laden outburst via email, I rechecked their servers to see if the info-engineering-svc.com site was working again.  It was, so I switched the domain pointers in ICANN, and waited.  The blog still didn’t work, and I sent another, unacknowledged message to say so.  But, finally, the info-engineering-svc.com blog started working [no reponse from Intertune, but it’s not magic, so they did something], at least in the display mode.  The administrative pages still did not work.

In between guests and visiting relatives, I decided to troubleshoot the WordPress installation, as something was definitely amiss, now that everything was on the same server.  But, changes to the configuration files seemed to have no effect, and a check of the error logs showed the same errors, which didn’t reflect the changes I had made.  A comparison of the installed file set with my backup I had taken before the migration showed no differences: The light begins to dawn, that my blog installation doesn’t match what Intertune is actually serving.

Sure enough, there is a ~/blogs folder, which I had instructed Intertune to configure as the blogs subdomain, and a ~/www/blogs folder, a different version of the wp-admin file set.  After a quick check to make sure that the dozen or two different files in the wp-admin folder were the only differences in the several thousand files in the blog, I copied the version from my backup into the “live” folder, and violá! the admin dashboard appeared, and here we are, composing the rest of the story on-line.

As it turns out, Intertune did not follow my instructions, but did something different, and did not tell me (not for the first time, either).  Somewhere in the middle of the migration, my blog installation got updated, and Judy’s did not, when the blogs were split between Modwest and Intertune, so that the update was only partial, breaking the installation when Intertune took it upon themselves to migrate files I had already manually installed, but to a different location.

So it goes.  One clue was in the WordPress FAQ, which suggested that a HTTP 500 error might be corrected by re-installing the wp-admin directory, which turned out to be the case. Whether we stay with Intertune or not depends on whether we meet any more difficulty with a tech staff that seems incredibly inept, and how much more work we want to do to move our Internet presence to yet another new hosting service, with new rules, and setup fees.  Our old webmail installation no longer works, being reconfigured by Intertune to use their web mail client instead, but we can live with that, and it’s less work for us, though with also less versatility and customization.  Now, to finish tweaking all the PHP-language scripts in the webs for compatibility with PHP 5.3.29.

Musings on Unix, Bicycling, Quilting, Weaving, Old Houses, and other diversions

%d bloggers like this: