Tech Tuesday: Auto Code

Oscar Gordon

A Navy Turbine Tech who learned to spin wrenches on old cars, Oscar has since been trained as an Engineer & Software Developer & now writes tools for other engineers. When not in his shop or at work, he can be found spending time with his family, gardening, hiking, kayaking, gaming, or whatever strikes his fancy & fits in the budget.

Related Post Roulette

19 Responses

  1. Damon says:

    “Guess which company is actually doing better at this (if not perfectly)? Yep, Tesla. They write everything in-house.” So did my old company. Know what? They still couldn’t find test documentation given to the client a year ago. They still had people reinvent the wheel. They still had zero or little documentation created/saved in a location on a network where more than 1 or 2 guys knew where it was. We still had people leave who did the work and the remaining engineers couldn’t find the code, the test results, the original code, etc….and that’s been going on for years….

    Just because they write their own code doesn’t mean that the company or the employees know where it is or what it does. People leave, get fired, die, retire, etc. If you’re not spending time documenting and saving it an controlling the info, you’re still hosed.Report

    • Oscar Gordon in reply to Damon says:

      Oh, sure, you can still screw it up by the numbers even if you do everything in-house, and a lot of companies do just that*. It’s just orders of magnitude worse if you don’t have control of any of it because all of your development is farmed out.

      In the past, GM could order up a fuel pump from a supplier and put it through some simple stress testing to see if it passes muster. And they could do that because the engineers at GM understood how to stress test a pump to failure, and they could take that pump apart and examine it’s components carefully, etc. That parking sensor… They might know how to stress test it (maybe, although maybe not), but can they test for security?

      *Our core product is developed competently, but some of our tools… I mean, footnote 8 is there for a reason. The number of software products that have failed because the company could not maintain the code are legion.Report

    • Michael Cain in reply to Damon says:

      Decades ago, when I worked at Bell Labs, performance review consisted of the department head and the supervisors who reported to them sitting down and discussing what each employee had accomplished. Lists were prepared in advance by the supervisors. One infrequent occurrence was a supervisor asking about a particular claim with, “I don’t recall seeing the technical memo for that.” When it turned out that there was no technical memo, everyone scratched that line off the accomplishment list — if it wasn’t documented and in Engineering Records’ hands, it didn’t count.

      Bell Labs’ Engineering Records was amazing. In 1980 I requested a copy of something that had been written up in 1957. It took two days to get it because someone had to go off site, pull the microfiche, and produce a paper copy. But they knew exactly where it was archived.

      I can’t imagine companies getting by with that these days. I saw an RFP the other day from the US Air Force. The work involved taking two copies of a printed circuit board that did some important function in one model of airplane still in service, reverse engineering it, and providing the necessary information so more could be manufactured. Apparently the documentation had gone missing…Report

      • JS in reply to Michael Cain says:

        “The work involved taking two copies of a printed circuit board that did some important function in one model of airplane still in service, reverse engineering it, and providing the necessary information so more could be manufactured. Apparently the documentation had gone missing…”

        Vernon Vinge, in one of his deep future sci-fi novels, invented the concept of “programmer-archeologist”. His sole job was digging into the vast software libraries of a running starship (the slow kind, in a universe with no FTL) and figuring out if they already had solutions to given problems.

        It was documented, in book, as him getting bored one shift (a few years unfrozen) and digging back into how they handled “What time is is” and going back through the layers for calculating time based on their relativistic flight, back through layers and layers of software that would generate the time, all the way back to a primitive method that simple counted the seconds since some arbitrary date. (IE: Unix time, which started 1/1/70).

        Thousands of years of software creation, hundreds of layers of code, and at the bottom — something some guy knocked off in a few hours.Report

        • Michael Cain in reply to JS says:

          Yep. Until recently, my state’s unemployment insurance system core ran on whatever the contemporary equivalent of an IBM System/370 is. At some point the state bought a “wrapper” for it that provided additional functionality by translating stuff between what the core could handle and a new external interface. Then they bought another wrapper. Then they had someone hack on a web interface that talked to the second wrapper, which talked to the first wrapper, which talked to the core that managed the official database. The whole system finally got replaced when the cost of maintaining an environment where that antique piece of binary core code would execute properly became prohibitive.

          States generally buy their major software systems in combination with a maintenance contract from one of a small number of qualified vendors and get no access to the source code. At least in my state, this occasionally leads to the situation where the limiting factor in making some statutory change is how soon and at what price the vendor will implement a necessary modification in the software.Report

          • I wonder how many levels of compatibility wrapping the core part ran under. Back in the 80s, when I was a student, I had a summer job at a shop that still ran (amusingly, given the title of this post) some jobs written in Autocoder, an assembler for IBM 1401s, running on 370s. I’m pretty sure this was a 370 running a 360 emulator running a 1401 emulator.Report

            • Michael Cain in reply to Mike Schilling says:

              My understanding was it was a S/370 binary originally running on the S/370 that the state owned at the time.Report

            • Oscar Gordon in reply to Mike Schilling says:

              I’m tickled you caught that. I may not be old enough to remember Autocoder, but back when I was an undergrad, my boss was. There were tales told.

              We are still in touch. The current joke is that he’s old enough to remember when packets had to be delivered by hand and the parity was checked with a slide rule.Report

  2. DensityDuck says:

    People use things for not-designed uses all the time.

    If I went down to the engineering department and said “make me a tool that moves something almost exactly 1/32 of an inch” then it would take them two months and cost about twenty thousand dollars just to design the thing. But a number-10 fine-thread bolt has 32 threads per inch, which means each turn of the bolt moves the end almost exactly 1/32 of an inch, and that means a bolt is actually a tool for moving something almost exactly 1/32 of an inch, and it costs twenty-five cents at Home Depot and there’s a big bin full of them.

    ******

    The thing about Boeing’s MCAS is that the crashes were not actually a failure of function. The software was performing exactly as intended. It was behaving exactly as it was supposed to. It was doing what it was designed to do. The failure was in Boeing’s insistence (and the FAA’s agreement) that there was no special training needed for the new aircraft, that the software’s functions made the new aircraft behave exactly like the older one. And therefore nobody trained the aircrew with “when the plane starts going like this, it means the software is doing that, and here’s how you fix it”, and they crashed.

    ******

    People really like to point to software as this Weird Evil Black-Magic Thing that’s just gonna rise-of-the-machines one day and kill us all in our beds. That doesn’t happen. What happens is people not understanding how to use the tools they’re using. “But that’s not their fault!” sure, but that doesn’t mean it’s some kind of weird not-predictable not-understandable software issue, it’s more like you tried to drive a screw with a hammer. “That’s silly, nobody does that!” right, because we know it doesn’t work, we don’t say that modern tools are too complex to understand and the hammer experienced a mysterious failure mode that the designer failed to identify due to incompetence or malfeasance.

    *****

    Sudden Acceleration Incidents have been around for decades, and every so often there’s a call for a Big Government Investigation, and it always, always turns out that someone stepped on the gas instead of the brake, and they always, always refuse to just come out and say this. Toyota got in trouble over it a few years ago, and there were several court cases over the issue, where someone insisted that they couldn’t not deny that they hadn’t not tested every potential not-optimal non-standard operational mode and that meant every Toyota was perpetually a half-second away from immediately and irrevocably going to maximum acceleration and driving directly off a cliff–or, rather that Toyota couldn’t prove that wasn’t true.Report

    • Oscar Gordon in reply to DensityDuck says:

      People use things for not-designed uses all the time.

      The problem is when the thing gets used for a non-designed purpose while it’s supposed to be doing it’s designed purpose. Nobody really cares if you take a COTS ultrasonic sensor, flash the EEPROM with a new bit of software that adjusts the emitter to a range dogs can hear, and use it to drive your neighbors nuts. But if you do it to the sensors on their new car so all the neighborhood dogs are attacking them every time they try to park…

      …not actually a failure of function.

      Partly true. Remember, the problems didn’t really arise until pitch sensors failed. The plane has two pitch sensors, and the software did not have an adequate error-checking. One sensor was designated as primary, and one as secondary, and the software did not look at the data from the secondary unless the primary was reporting that it was in a failed state. That assumes that the sensor would know it has failed, which is a hell of an assumption. The software should have always been looking at both sensors, and if they were not within a certain agreement, flag it and disable MCAS.

      Weird Evil Black-Magic

      It’s not, but the functionality is not transparent. If you did not understand how an IC piston engine worked, popping the hood of your car would not grant you the understanding you lack. As for complexity of tools, there was a Condo near Miami until just recently…

      Sudden Acceleration Incidents

      If the only connection between the fuel injection and the driver is the mechanical linkage to the foot pedal, then you are right. If there is anything else that can also manipulate that linkage, or the injector directly (or the power feeds, for EVs) – say, an adaptive cruise system, or an autopilot, then you could have a problem if that system is poorly designed.Report

    • Michael Cain in reply to DensityDuck says:

      …and that means a bolt is actually a tool for moving something almost exactly 1/32 of an inch…

      More accurate than that if you have a well-marked circle attached to the bolt head so you can do accurate fractional turns. Some years back I got curious about something mechanical and it led me down a rabbit hole of old books learning how we got from large hand-carved wooden screws to Ramsden’s 125 threads per inch steel screws for precision survey and laboratory instruments in the 1790s (basically: use the screw to make a slightly more accurate gear, use the gear to make a slightly more accurate screw, repeat a few thousand times). Ramsden’s lab stuff could measure better than one ten-thousandth of an inch…Report

    • JC in reply to DensityDuck says:

      We have thousands of people dead this year because of a single, solitary “software malfunction.”
      You’ve heard about the incident, but there were more news articles about dead mutton than dead people.Report

  3. Bill Blake says:

    Re item 10: Back in the day, we had a saying, “No program is foolproof because fools are so ingenious.”Report

  4. Marchmaine says:

    I’m fairly tangential to the meat and potatoes of this discussion…

    But I can say I’m grateful to all the people in the 90’s and 00’s who were correct in the theory that they *could* code their own Data Warehouse, but overlooked the fact that they couldn’t maintain the Data Warehouse once they built it.

    And a shout out to all the folks in the 10’s who were correct that you *could* code your own Data Science projects, but overlooked the fact that you can’t scale your Data Science projects to keep up with Business Requirements.

    … on the topic of Systems Integrators (or companies acting as them)… will the component producers even allow them access to the code to test? I could see where they should, but I could also see where the component producers would tell them to pound sand. The ‘moat’ around fuel injectors is the cost/machinery of building them… the moat around code is cut/paste.Report

  5. Oscar Gordon says:

    Speaking of software doing bad things because the developers and the hardware people don’t talk much…

    https://en.wikipedia.org/wiki/Therac-25Report