The Machinists & Their Secret Sorrow

They are basically a harmless bunch, and much put upon, as their careers have careened into dust as CNC-controlled machining and worse took over the world. They speak a tightly-hermetic argot which appears to be intended to exclude outsiders and succeeds admirably — I’ve subscribed to Home Shop Machinist for years, and I think the offerings that weren’t totally opaque number in the small integers, usually involving some electronic gadget whose interaction with the machinery they had to explain in simpleton terms, since usually they barely understood it themselves. I believe their secret tongue took root even in their glory days as they assiduously annoyed their betters, like butinsky engineers such as my father.

But Digital Machinist, the evil CNC-contemplating offspring of Home Shop Machinist, offers Ed Nisley columns, who was the only person I ever saw explain that 3D printing takes approximatley forever — such a sad betrayal of the otherwise sacred omerta is of course forbidden in the normal regulation puffery of the magazines & internet. But the rest of the articles are as intensely opaque as all get out. ... And I do not rudely scorn the machinists and their secrets. The reason I keep subscribing is because I enjoy it; it’s sort-of a private game — will this issue contain anything actually comprehensible — which I always lose & win. ... I wrote a letter to the Home Shop Machinist guy, congratulating him on the impenetrable argot, and explaining that as a software engineer I was an expert, and could proudly obfuscate anything....

The Yokels

The machinists have their excuses: many of the faithful were in fact employed as such before their places all closed, providing to be sure a lively market in giant metal lathes and other such, which many of these lunatics install in their snow-frozen barns. But many also enjoy the “I’m just a yokel” pose, where they pretend to be complete ignorami but just picked-up this machining thing ril ez ’cause they’re so manly & bright I guess, when they obviously have some background which they’ll certify by tossing in a technical phrase, just to show they’re really an insider — like the fellow who “learnt very quickly that my hand cut threads are crap” — I know I really hate it when that happens. ... The linuxistas do exactly that same thing in the Linux Format letters pages, which regularly feature sincere missives from complete Linux newbies who claim they figured-out some ridiculously complicated server nonsense, an’ it was so much better than Windows, come’on kids! ... But the Linux children have far less excuse, since their skills are still presumably saleable. Although perhaps not the idiots on the letters pages....

The Toys

When the purpose of a machinist article isn’t shrouded in secrecy, it is always a toy: a model steam engine, a beautiful “garden” locomative the incredibly-skilled guy can ride around on — and I may jest, but they are incredibly skilled. ... The small scale would seem inevitable with the hobby lathes like my father’s Unimat, although it does leave the question of what they made on the big rigs — it doesn’t seem possible it was parts for my fathers D21. ... And I’m pretty sure the beloved pater was as clueless as I am, since he seemed to use the Unimat as a drill press.

... Other machinist articles are almost all about clever accessories for the fellow’s and presumably readers’ existing equipment — which purpose and mechanism are of course totally shrouded in hermetic argot & sacred secrecy.



The Cheap ’n’ Stupid Apple SD Socket

In my beloved silly cameras and older computers, one pokes an SD into the socket and it “snicks” almost all the way in, with a spring latch mechanism. Getting it out is a matter of pressing the thing a little, and it springs out. In my life, this mechanism has never failed, on numerous devices.

I used to think Apple’s grotesque abandonment of the spring/latch socket, in favor of a much stupider cheaper system where the SD card sticks half way out — which was immediately copied by numerous other stupid companies like asus, imitating the cla$$y apple — was just stupid cost cutting, but then I realized it was in aid of another cherished latter-day Apple Inc. goal: to prevent the wretched user from any modification/expansion of his machine in any way. Not the historic Apple perhaps, but quite evident in recent years, as batteries and memory and hard drives got soldered-into phones & computers permanently.

So not only is the stupid SD socket annoying and stupid, it prevents the wretched victim user from expanding his storage even a little. Because the stupid thing’ll break off, forcing him to use SDs only as a temporary storage medium, as the presumably pro-monopoly Deity intended. ... So the user’s forced — if he’s stupid-enough, and after all we are talking Apple — he’s forced to buy a more expensive machine, sooner. ... Although many of us still offend the sky and use the SD as permanent storage and indeed there is a cottage industry of special short SD cards that won’t stick out so much. And cost ridiculous amounts. One company “BaseQi” appears to be making a killing, at least I bought two “iSDA 350A” “For Surface Book” genuine-aluminum adapter for ~$25/each @ amazon, and it seemed to fit two troubled Asii in the herd. But they have a whole selection, and maybe the “345A” if it existed’d fit better.

... But Apple’s way ahead of that: the new macbrook pro has no SD card socket. My fourth hit when I googled “macbook missing SD socket” was some fawning macintosh fan drip claiming it was the camera companies’ fault for not zooming-up the wifi or blue something or whatever he was babbling about....

The Sad Decline of Asus

But the LOL got an HP laptop where, as we discovered when we tried it, the SD socket works! ... I am so jealous. My last HPs, a laptop and a desktop, behaved so shamefully I’ve stayed away from the brand for years, but who knows; perhaps I’ll have to reconsider. ... Particularly since Asus appears to be floundering, at least judging by my 12/17 Asus VivoBook F510UA FHD Laptop — no longer available, maybe for good reason, since I finally had to “recover” idiot Windows in a 4-hour operation, after some stupid asus program BhcMgr.exe would hang-up the startup. ... Really, I expect Windows to constantly complain about missing programs, but this stalled the boot — a great tradition in really stupid software, what asks at some moment “What’s your favorite color?” or some equally idiotic question, like how some program one has never heard of is missing, and then offers nothing to do about it, but click the obviously inappropriate “OK”. This is the kind of stupidity we pay for in a brand name, and I’m afraid Asus is now that brand. ... My computer herd includes numerous discarded Asii of the LOL, and I guess I should’ve noticed the trend....



Brave Browser Batch

The “Brave” browser is the guy Mozilla fired for competence + offenses against the ministry of truth — not sure what offenses, but like twitter, the ministry never explains and never regrets. ... Sadly, his browser cannot be invoked from the Windows command-line without strong mumbo-jumbo, something like:

set pgm=“C:\Users\owner\AppData\Local\Brave\Update.exe”
if %1.==. goto doit40

:start an HTM file or who knows -- Brave must be Windows Stupid Default....
start %*
goto done

::::::::::::::::::::::::::::::::
:doit40
:start brave by itself.

start %pgm% --processStart Brave.exe

::::::::::::::::::::::::
:done

So EZ, so fun! ... Linuxoids will have to translate to their barbaric Bash chicken tracks...

Why is it like that? ... Well, the sacred Usux™ “Edge” is like that, the worst possible excuse. CEO Eich must’ve had a hangover. ... And oh yes, to make my silly brave.bat work with “owenlabs.org/silly” I had write a function for my general-purpose fixit setxp, which’ll do like

c:\stage>setxp -:: bongo
set httpized=http://bongo

But I realized I hadn’t squashed it yet — needed more code to recognize it’s an HTM file or not or maybe or who knows, so all-in-all, for me, Brave is far from ready for prime time.

But in the end I figured-out how to get firefox back, albeit in its 64-bit incarnation which, while not quite as bad as Brave, is plenty bad. However one thing it still does better is render resized jpgs etc., with better fidelity than Brave, who prefers the fuzzy flavor. ... I don’t really understand why Brave doesn’t just steal all that stuff — it’s open source, like the chrome code itself, is it not?

Why is it so?

And then it occurred to me, in a scurrilous inspiration, that perhaps both the usux™ “edge” browser and brave dispense with the command-line stuff to make it harder to compare browsers. ... But the LOL points out it’s not so hard at all: just click the brower’s icon, and then goto a page inside the browser; like all the peasants normally do it. Not of course a page on one’s hard drive, if it’s Brave or Edge, but anything on the web. But the local drive prohibition still makes comparison harder, particularly for people who don’t have access to a web server....

The Holy Internet Explorer

& then I discovered that internet explorer — which will load local files — lives, even in Win10!


Backslash-Quote: The Greatest Bug of All

When the earth was cooling, computerists, probably those Kernighan & Ritchie guys, figured C-language programs should have command-line arguments, and they made it so. At that moment or shortly afterwards, people wanted command-line arguments with spaces in them, which was supported by quotes. Thus, one could go grep phrase *.txt or grep "phrase with spaces" *.txt. Both ways! Total flexibility!

But then the guru masters realized they must do something; what if someone wanted a quote in the argument? So they introduced the backslash-quote, i.e. grep "he said \"Hi\"" *.txt. It was a backslash presumably because C-language already used that punctuation in C-language literals and printf syntax to indicate special characters, including quote marks, control characters, random hex values. ... But only the double-quotes were “escaped” for the command-line.

This was a terrible error, because they didn’t provide for escaping the backslash itself! They only used it as an escape character when it came before a double-quote mark, and otherwise just passed it through. Perhaps they wondered, who could possibly be stupid-enough to need an argument like “c:\windows\stupid directory\”?

... Of course, they hadn’t met Bill Gates. ... MSDOS and later Windows had directory paths just like decent operating systems (i.e Unix) except to make them different, they used the backslash instead of the forward slash. To make absolutely sure everything was screwed-up forever, the option character, normally a - hyphen in Unix, was a forward-slash in MSDOS. Also, incidentally, the path separator was changed from a colon to a semicolon. ... Perhaps there had been some wacko software patent action contemporary to the bad dreams of MSDOS’ architects, but that’s what they did.

Windows 95

And then, Windows 95 and some version of NT introduced spaces in file and directory names. From there it was only a matter of minutes probably before somebody tried to describe a directory in a command-line like stupid-program "c:\stupid directory\" arg3 and failed utterly: the stupid-program would see a single argument c:\stupid directory" arg3 with that wacky double-quote stuck in the middle and nothing would work.

Today, all the compilers I tested include an additional “feature”: the sequence \\" will be seen as a single backslash, followed by a double-quote[1]. I know that the old Borland compilers I have, year 2000 and back, did not have this additional feature, so with programs compiled under those compilers it is impossible to use properly-backslashed windows spacey-directory arguments. ... As I learned to my sorrow while I was trying to beat into submission Corel X4 recently, which does only recognize a directory in certain contexts if it has a final backslash....

I believe that the pre-2001 Borland state of bugitude lasted through much of the history of the feature; I don’t have an adequate supply of antique compilers (!) to really tell, but my guess is Borland stole the feature from some Unix or Microsoft compiler around 1988, and probably at least at that time nobody provided the \\" fix.

It’s Not a Feature; It’s a Bug

For me, the beauty of this feature is my sense of millions of users, over the wandering years, trying to pass windows directories to various command-line utilities, and utterly failing. ... It’s poetic. A very small percentage of them will guess that the \\" feature is available — if it is — but most of course won’t. ... And often, command-line utilities are actually used by other programs, batch files, whoever, where the “feature” just fades out of sight into the maelstrom of chaos that is Windows (or really any recent OS). .. Of course we could all just Read the Fine Manual; but giant $500 programs hardly have manuals anymore, and pitiful Windows command-line utilities — never.

— the strangely-amused programmer
Monday, November 9, 2009 5:33 pm


1. Actually I realized later my beloved Borland Builder version 5 — beloved, because I can’t see paying $1000s for a probably more-broken copy-protected upgraded .net-based (!!) monstrosity — has the \\" feature, sort-of, but does it wrong. Of course. So if I want "c:\windows\stupid directory\" it’ll produce c:\windows\stupid directory\" — strange trailing quote — which isn’t terribly helpful. As my beautiful arguments.zip might demonstrate. Note that arguments.zip there includes exciting and almost-certainly deadly fixit code for the problem; typing it without arguments probably won’t crash and will tell you how to see for yourself the exciting results — and perhaps if your compiler is like that, fix it also. Please note the included source code isn’t nearly as bad as it looks; like Mark Twain I believe said of Wagner (“not nearly as bad as it sounds”). ... And then I got guilty and wrote a beauteous C-language version; so there are two things in arguments.zip, argument.cpp with the C-- borland command-line arguments fixer and handy house destroyer, and a comparably talented plain old C-language version arg2.cpp — which, to be sure, is still a CPP file, a practice I follow since the error-checking’s more annoying. Both of these fixits, incidentally, as well as rendering "\stupid directory\" correctly, also can embed quotes by doubling, i.e. "\really ""stupid"" directory\" would produce \really "stupid" directory\ — and heck with Windows 8, it could happen! — and even edge conditions like """\really"" stupid\" and "\really ""stupid""", producing respectively "\really" stupid\ and \really "stupid". ... Amazing isn’t it?

FINDJ: A Logical Grep

Just like Spock! So much more sensible. ... No, not really; you should assume findj is bad and dangerous and will erase your hard drive almost instantaneously, but here in the attic, at last, I can go

findj "balm&gilead" c:\gregor\textkeep\bible.txt

and if you had the Guttenberg Project ASCII bible text, your copy might also print

::::::::: c:\gregor\textkeep\bible.txt
8:22 Is there no balm in Gilead; is there no physician there? why then
46:11 Go up into Gilead, and take balm, O virgin, the daughter of

Get it here, with complete obsolete Borland version 5 C++ source! ... And, absolutely free of charge, a BSD-style (free free free!) license therein. ... Note that this is a slovenly wasteful ungreppish thing, which stows the entire file in memory. That could be fixed but I’m not going to. ... But on the other hand, it’s survived minutes of testing!

It prints a supposedly-informative message if invoked without arguments....

... and A Few More Dubious Utilities

While I’m at it, here’s sortj, sumj, and randj, which sort, add-up, and randomize respectively ASCII lists. All are of the memory-wasting whole-file-in-memory persuasion, like findj. And randj is particularly pitiful. ... Won’t we have fun?!?! — after you clean-up the extensive damage these harmless bits of pestilential software will wreak on your computer, your home, and your innocent pets.... Jgotabs is a much scruffier sort of thing, but the others are disdainful of those nasty tab characters, so it might be handy. And it might even work! ... Although, again, do hide the pets....

... And then again, for something entirely different, let’s take a stroll amongst the shacks and tents down by the water and the cannery, and see how the peasants live! Specifically, how we wrote programs when men were men and programmers were probably impaired in numerous dubious ways: my precious, my only, a legacy of my misspent productive years, JGODIR! ... You don’t need it, I don’t need it, but I started it on 12/15/93!!! ... I vaguely recall I concocted this for an associate in a distant land — Pennsylvania I think. ... I would send him various software I had concocted — probably by modem by then, I think the days of mailed diskettes were over, but who can tell? But one day the stuff I sent couldn’t be deleted, it was a virus! ... I have a vague guilty memory of my making it read-only, to correct some other amazing problem we were supposedly having, but anyway I suspected that, and so I borrowed some code from my almost-as-fascinating OwenView so I could send him a command-line directory utility that, as opposed to the MSDOS DIR command, would show the file’s attributes; and I think the strategery actually worked. And I’ve found JGODIR strangely useful over the years, for its wacko formats and what-not. ... But you almost certainly won’t, if you survive the destructive matter-anti-matter collision which will infallibly occur if you ever are so foolish as to run the program....

And then Monday, February 11, 2013 I discovered I was reporting file times in UTC aka “Coordinated Universal Time” but in some barbarous language, aka Greenwich time! ... So sophisticated ’n’ all. ... I might make it an option someday, but I think I’ve got it to tell the real time now....

CBuilder (Version 5, 2000) Tips ’n’ Trickery

Aka the last decent version; aka the “version I own”. ... Up there I explain about “\stupid\backslashes\” in quoted command-line arguments — but there’s more! .... Builder and Turbo C and the other awful Borland Cs (but still much better than Microsoft!) had a conio library where you could make these cute little windows with, of course, mono-spaced fonts, like the beautiful illustration. But when Windows 7 and its hideous 64-bit snootiness rushed at me (see antiques for more on that), my old 16-bit Turbo C (1988) programs wouldn’t work until I added a “textmode(C80X50)” call to them; then they would beautifully locate their primitive characters in a typical 80-character 50-line console screen and all was good and new again. ... The “C80X50” constant came from a large collection in conio.h, all of which, constants and calls alike, are apparently undocumented in Builder and, as usual, my helpful suggestions are likely to melt your car at least if not your appliances and children, but nevertheless I am so happy that I got this stuff to work....

— the kindly programmer
Thursday, March 10, 2011 1:41 pm

The Dark Side of the Arduino

In my role as the only being in the entire known webiverse who will say anything bad about anything, here at last are the astonishing hidden secrets of the world-famouos Arduino hobbyist experimenter board:

  • Some wonderful Italians created this FOSS project, which consists of hardware — an adorable little board with an Atmel/AVR microprocessor on it, originally thru-hole (aka “antique”) to make it easier for hobbyists — and software: an IDE for you to write your programs, and an entire c-like programming language to write them in!

  • I must admit I assumed for some time that the Arduino Programming Language (as it’s ingeniously known) was an interpreter, probably because some idiot on the web or a magazine said so (including in days of yore my helpful entry). Which would make it really really stupid if you can’t breakpoint or single-step in the Arduino system. Which you can’t.

  • But in fact the language is C++, with “EZfied” features: “Your sketch [aka your Arduino progra in their quaint argot] undergoes minor changes ... and then is passed directly to a C/C++ compiler” (http://arduino.cc/en/Main/FAQ).

  • But you can’t use ICE h/w or whatever it’s called this week with the Arduino language. So even if you have one of the ($350?) Atmel in-circuit debuggers, you still can’t single-step or breakpoint. At least in the Arduino language/environment.

  • To summarize, it’s bad because it’s stupid to make an EZ-to-program system which is hard-to-debug. (See this stack overflow summary, which references a dubious-looking Visual Studio plug-in Arduino debugger for sale.)

Delusional Rant

And I know why the Arduinistas did that: because real men, at least in my wonderful embedded system world, debug with a few toothpicks and printf statements; they don’t need no stinkin’ ridiculously expen$ive debugging equipment! ... Which, but a little while ago, in these guys’ formative years, were, like everything else in our hideous denegerate free-market capitalist greed-ruled world, much more expensive. ... Actual mortals, like myself, nevertheless need debugging equipment, at least if we want to do anything beyond the abysmally simple. We need breakpoints and single step.

And I am an expert, and I never lie. And it isn’t just my delusional rant, it’s an official programming verity that debugging takes at least twice as long as writing the program. When I googled “arduino debugging”, the stackoverflow recommendation was to use a plugin with the free Visutal Studio 2015, which doesn’t seem like much of an improvement, or upgrading to an AVR debugging environment. Otherwise, as someone points out, “during development, we all use Serial.print() to help debug our code”. Which is what they did with the teletypes in olden days when men were men....

Compared to many educational / hobbyist products and others, the Arduino is still ridiculously functional per $. And perhaps I will find-out how it’s possible to debug with “Arduino Language”, although not, apparently, from the Arduistas. ... It’s like my beautiful toy sextant , made somewhere in the wide wonderful world so it looks like a genuine antique instrument — but, sadly, not actually so good at sextanting. ... The Arduino shares its traditional ’n’ quaint socket/thru-hole[1] CPU style with other hobby offerings, but adds open source goodness and a resulting large competitive market of compatible products and add-on boards (in Arduino-speak, “shields”!?). ... So it’s good. ... But not all good....

Arduino Mega 2560: Knave or Fool?

And as I and the Arduistas wander through the years, I eventually got their lovely Mega 2560 board for a pittance, and then dawdled for a few months, and finally went to get the Eagle schematic and PCB files, which are a standard part of the wonderful and uplifting open source deal. ... And there were none! ... There were such files for the despised revision zero Mega 2560. Which is not the board I bought; with the Arduino logo on it and everything! ... It’s “despised”, because I assume if it was changed — twice! — so early in the young board’s history, there was something regrettable about revision zero. ... What I got is the “MEGA 2560 R3”, as is printed right on the bottom of the board; without my italics of course. ... But the Eagle file I found on the web “arduino-mega2560_R3-reference-design.zip” was not good; it was a broken zip, which would unzip not!

Knaves?

... I must say, for a few days, even a week, I figured things must be really sad over there in Arduino land; the classic organizational sclerosis must’ve set in, if they had become so stupid they couldn’t post a valid zip file. This is the sort of thing Bob’s Software and Used CDs would do. ... But then the snake whispered in my ear: perhaps, in the classic “Knave or Fool” dilemma, we have not the fool here? ... Perhaps, the Arduistas are tired of the cloners churning out their designs in a few days, robbing all the obscene profit from the otherwise wholly pure and noble Arduino enterprise? ... The Arduino folks must have the Eagle files to produce the board; surely they’re capable of zipping them up and posting them? I mean, I could do that in my sleep. ... But when they post the Eagle files promptly, the cloners get right to work with their shoddy cheap exact entirely legal imitations....

Fools

But later, I realized everything’s OK. ... They’re not venal but, indeed, just fools. ... Eventually they posted a working zip file which still wouldn’t open in Eagle. Legions of the usual idiots forum participants posted assurances that sure absolutely it really really worked this time. Since I had already applied zip-file fixit tools to the broken zip and achieved a similar result — i.e., it would unzip, but the resulting supposed-eagle files wouldn’t open in Eagle — I assumed the notional Bob’s Software idiot-in-chief had just done the same. ... But no; the arduweeny are not so easy. What they did was post a working zip file with working Eagle files in it — but for a different version of Eagle! ... This sort of creativity is the mark of the True Cluelessness! ... That is, the Eagle files of arduino-mega2560-reference-design.zip aka “Rev 0” opened good in Eagle version 5, but arduino-mega2560_R3-reference-design.zip’s files, cunningly, would only open in Eagle version 6. ... Not so terrible, since to just look at the file, Eagle’s a free download — but that’s true only if you tell people!

Now there were a few vagrant posters who claimed it’d open great in Eagle 6, along with the people who insisted the zip file was never never broken; and of course the apparently officialish poster who said the broken zip file was a “known issue”. ... Such are the ingredients for truly great broken software, and I doff my cap to the arduweeny masters. ... And I still suspect the “broken” zip file was a bit of anti-cloner medicine....

— the thoughtful compassionate programmer
10/17


1. I, too, am fond of thru-hole socketable parts. And apparently large numbers of hobbyists and I’d suspect some back-alley professionals are also, since the parts vendors still seem to keep quite a few available. But one cannot fit a 112-pin CPU into a 48-pin socket, and the 48-pin socket is already too big. So time marched on. ... Recent Arduino offerings have, in fact, turned to a darker side and use SMT devices....