Well… That Was Fun

Published at 23:07 on 30 June 2016

Not really.

I’ve been working on a set of command-line utilities to let me post here without using an interactive browser. Reason is that WordPress is infected with excessive amounts of crap Javascript, to the point that its editor window is nearly useless if one doesn’t have a solid high-speed connection. Which I often don’t while commuting on the ferry.

Anyhow, two idiots have conspired to make my life more difficult than it needs to be. Both have used an object containing actual or implied time zone information to represent an XML-RPC date/time stamp (which doesn’t contain any time zone information).

Idiot No. 1 wrote the WordPress XML-RPC code (or the PHP library that uses same), and Idiot No. 2 wrote the Apache ws-xmlrpc code. Both idiots made feeble and ultimately failing attempts to defeat the lossage their idiocy begat, and I’ve spent most of the evening puzzling out the gyrations necessary to reverse engineer then counteract the lossage caused by both the base design flaw and the ineffectual original countermeasures… on both the client and server ends.

Yes, I’m being uncharitable and abrasive by calling those programmers “idiots”. You would too if your temper had just been worn thin by dealing with bizarre behavior caused by a stupid design decision.

Brexit Frankly Surprised Me

Published at 17:37 on 29 June 2016

It does go to show that the sentiment which gave birth to the Trump phenomenon is not unique to the USA. As if there was ever any doubt. Italy had Berlusconi (and before that, Mussolini), France has the LePen family, Austria has a popular right-wing nationalist party, and so on. Smug Europeans have nothing to be smug about.

It’s a problems that has its roots in hierarchical class society. It doesn’t benefit the majority who live in it. The only way electoral democracy (or any open society) can be maintained under such a system is to have a powerful system of propaganda to keep the masses convinced to act counter to their best interests. And it has been shown, repeatedly, that the level of propaganda needed to do that, and the level of propaganda needed to sell fascism are dangerously close to each other

Reality-based politics is the only practical antidote to fascist myths, and that same reality is fatally toxic to class society, so absent revolutionary change it won’t happen and fascism will be an ever-present risk.

Beware Replacing os.spawn with subprocess.Popen in Python

Published at 14:30 on 17 June 2016

This is going to be a very geeky post, but the bug in question just bit me and I am not aware of anyone else having written about it. Worse, the buggy code is actually recommended in the official Python documentation, which claims that the library call:

pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg")

Can be replaced with:

pid = subprocess.Popen(["/bin/mycmd", "myarg"]).pid

It can’t. Not unless you want your child processes to mysteriously disappear on you without calls to os.wait() reflecting they’ve completed, that is.

The problem is that the suggested code immediately creates an unreferenced subprocess.Popen object, and this class declares a destructor (i.e. a __del__ method) which automatically reaps exited child processes at GC time. So the code in question creates a race condition as to which code will call os.wait() first: yours, or the destructor.

Arguably, subprocess.Popen should have an option to disable this feature (which is actually the correct behavior if you’re going to hang on to the Popen object and use it to manage the child process). Until such a time the workaround is to do something like:

class PopenNoDel(subprocess.Popen):
  """
  A Popen object that never gratuitously reaps dead children.
  """
  def __del__(self, **kwargs):
    pass

pid = PopenNoDel(["/bin/mycmd", "myarg"]).pid

Thankfully, it didn’t cause me much lost time. I had thought of the recommended code myself, then rejected the idea because of worries about gratuitous process reaping at GC time, and only changed my mind about the idea when the Python manual itself endorsed it. So the cause was fresh in my mind when my child processes started mysteriously vanishing.

Keywords: os.spawn, subprocess.Popen, wait, reap, garbage collector, subprocess, disappear, bug.

Zfacts Really Doesn’t Like Bernie

Published at 07:56 on 17 June 2016

Partly it’s a misunderstanding of his democratic socialist politics. Partly it’s an understanding but a personal disagreement with them. It’s lead to several smear pieces about him on their site, some of which come across as downright conspiracist, predicting he will do his darndest to defeat Hillary even if that means helping Trump.

It seems the latter have just been proven wrong. It’s a cautionary tale about not letting your personal emotions about something get in the way of being able to perceive and interpret facts.

Remembering Muhammad Ali

Published at 07:49 on 11 June 2016

I don’t follow sports much (never have, probably never will) but I came of age in the 1970s when Ali was making his comeback and it was hard not to be aware of him unless you were living under a rock.

But even then, the media mostly portrayed him as this talented boxer with a huge ego. (Both of which were aspects he indeed had, but which alone were an incomplete picture.)

It was only much later that I became aware of how much an amazing fighter he really was, both inside and outside the ring. He literally gave up the best years he could have had in his career as a professional boxer for his principles, principles that were based on fighting for a better world for the oppressed.

It’s a commitment to personal honor exceptionally rare in this world. (The only comparable example I can think of is Paul Robeson.)

Yes, he was in a sport that is now looked down on (in part because of outcomes like the early-onset Parkinson’s disease that Ali himself eventually succumbed to). Yes, in his early years he aligned themselves with the Nation of Islam and embraced their sometimes hateful rhetoric.

That just makes him a real person with real-world flaws who still achieved the greatness he did, which just makes me admire him all the more.

Getting a Land Line Phone Again

Published at 19:38 on 27 May 2016

Well, I’ve done it. I now have a land line after a little over 10 years of being cell-phone only. Two things precipitated this decision:

  1. About three years ago, I moved to Bainbridge Island. Once you leave the big city, cell coverage ceases to be so reliable. It was acceptable at the apartment I rented, but in my current home I get two bars of signal… at best. The missed and dropped calls at home eventually reached my breaking point.
  2. Verizon is getting more and more intolerable. They don’t care about troubleshooting the issues I currently have. All they care about is trying to up-sell me to a smart phone, which I do not want. My cell service is less reliable than ever and I have no hope of any quick or easy resolution to that issue.

We’ll see how long this option lasts. Traditional analog twisted-pair landlines are slowly dying out, and that’s what I just got. Reason is that the electric power here is unreliable, and I don’t want a cable or IP phone that depends on some piece of equipment somewhere that in turn depends on commercial power. With plain old telephone service I can use a phone powered by the battery plant in the central office.

It would be a shame if I eventually had to settle for something less reliable, but it may come to that. It wouldn’t be the first time a less reliable new technology has eclipsed a more reliable older one. (Just think of all those fidgety electronic soap dispensers, faucets, and towel dispensers in public restrooms.)

Back Early from Anacortes

Published at 13:15 on 15 May 2016

Yes, I was there for the action. I left early because yesterday I woke with a cold and felt the need to get back home and rest. I wasn’t planning on being arrested anyhow; my role was more of a support one. Which I did.

Given how I fell asleep at 7:30 last night and didn’t get up until 6:30 this morning and have been napping all day, I would say my assessment that I needed to get home and rest was a correct one.

Sleazy Recruiter: Terry Terrell of AXA Advisors

Published at 09:17 on 11 May 2016

What part of the boldfaced text (emphasis added) from my on-line résumé do you not understand, Mr. Terrell?

Note: I am not interested in jobs outside the Seattle area, nor am I interested in jobs outside the field of software development….

I know: it’s an academic question. You ran a harvester bot and then spammed me. Repeatedly. Welcome to my hall of shame.

From: Terry Terrell <terry.terrell1@swftmail.com>
To: xxxxx@xxx.com
Reply-to: Terry Terrell <terry.terrell@axa-advisors.com>
Date: Tue, 10 May 2016 01:09:10 +0000
Subject: hope to arrange an interview with you

Hello David,

I contacted you last month about potential job openings with our
company. I haven't heard back yet, but I wanted to follow up and see if
I can provide you with some additional information about our company and
some of the positions available.

Again, we think your skills are a perfect match for some job openings
here that present real growth and a pathway for a prosperous future. If
we can set up a time convenient for you, I'd like to discuss your job
goals and see if there might be a match for you with us.

Thanks again,

Terry L. Terrell
Regional Vice President

AXA Advisors, LLC
10500 NE 8th Street, Suite 1600
Bellevue, WA 98004
Visit My Website

office: (206) 956-6220
fax: (206) 956-6202
Please Add Me On LinkedIn!

If you would like to unsubscribe and stop receiving these emails click
here.

Sleazy Recruiter: Babin Raj of IT Trailblazers LLC

Published at 08:02 on 9 May 2016

Just because I feel like listing it, no other reason. I get several of these per day. Just because I don’t normally post them doesn’t mean I don’t get recruiter spam all the time.

Date: Mon, 09 May 2016 10:05:26 -0400 (EDT)
From: Babin Raj <babin@ittblazers.com>
To: xxxxx@xxx.com
Subject: Fast Moving Requirement - Devops Engineer - San Jose, CA

Hi  David,
 
This is Babin. I'm an IT recruiter at IT Trailblazers LLC. I found your
profile relevant to one of my current openings.

Title: Devops Engineer
Location: San Jose, CA
Duration: 12 Months

Job Description :
• Should have good working knowledge of Continuous Integration, Continuous
Delivery, Automated Deployment, Application Performance Monitoring and Agile
Development
•  Knowledge of configuration management and provisioning tools
•  Knowledge of software build tools
• Ability to apply analytical and problem-solving skills to solve complex
deployment problems.
•  Practical knowledge of Deployment best practices and procedures
• Practical knowledge of containerization and deployment technologies and
infrastructure tools.

Thanks and look forward to working with you.
Regards,
Babin Raj,
Phone : (732) 227-1772 Ext.425 /
Fax: (732) 909 2358
2050 Rt. 27 Suite 203 North Brunswick,NJ 08902
www.ittblazers.com  / Email: babin@ittblazers.com

Note: Please allow me to reiterate that I chose to contact you either
because your resume had been posted to one of the internet job sites to
which we subscribe, or you had previously submitted your resume to IT
Trailblazers US/Canada. I assumed that you are either looking for a new
employment opportunity, or you are interested in investigating the current
job market. If you are not currently seeking employment, or if you would
prefer I contact you at some later date, please indicate your date of
availability so that I may honor your request. In any event, I respectfully
recommend you continue to avail yourself to the employment options and job
market information we provide with our e-mail notices.

You have received this message because either you have contacted our Company
to express interest in employment, or you have posted your resume in an area
accessible to recruiters or HR professionals, which implies an interest in
being contacted regarding employment opportunities.

If you would prefer to no longer receive any emails whatsoever from our
Company, you may opt out at anytime by clicking here.

Gotta love all the crap in there about my receiving the sleazeball’s spam because I posted my résumé on line. It’s crap, of course: my résumé clearly indicates I am only interested in local opportunities.