Saving the world from software

Discussion in 'Fred's House of Pancakes' started by pilotgrrl, Oct 5, 2017.

  1. pilotgrrl

    pilotgrrl Senior Member

    Joined:
    Jul 23, 2017
    889
    1,794
    0
    Location:
    Chicagoan in TX
    Vehicle:
    2016 Prius
    Model:
    Three
    RCO likes this.
  2. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    Sorry, that is one long article, not counting the ads. I'll have to pick it up later but as a former operating system programmer, I have some strong opinions based upon having to diagnose and correct obscure problems left by others that led to my career.

    Not perfect, I remember two especially embarrassing incidents: (1) used integer seconds counter when I should have used floating point that failed in November, and (2) a change I requested for an obscure bug in device driver that the configuration control board turned down and I finally diagnosed and helped correct 10 years later working for another company at another NASA center.

    Funny this didn't show up in the "Ballistic" thread. Since I figured out how to work around it ... <grins>

    Bob Wilson
     
    #2 bwilson4web, Oct 5, 2017
    Last edited: Oct 5, 2017
  3. pilotgrrl

    pilotgrrl Senior Member

    Joined:
    Jul 23, 2017
    889
    1,794
    0
    Location:
    Chicagoan in TX
    Vehicle:
    2016 Prius
    Model:
    Three
    It is long, but interesting. I've had to diagnose and correct obscure problems, with other things, generally networks and parts thereof.

    Posted via the PriusChat mobile app.
     
  4. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    94,786
    42,987
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    funny they use toyota as an example, and repeat the same mantra they've heard, but no one ever mentions the fix.
    i was in business in the late 90's, when the y2k apocalypse was being touted. no one could (or dared) answer the question of what would happen when a 2 digit year rolled from 99 to 00.
    a lot of new hardware and software was sold in the meantime, but in the end, it turned out that nothing happened to the old systems.
     
    RCO likes this.
  5. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    Ok,

    I found a stopping point:

    On this view, software becomes unruly because the media for describing what software should do—conversations, prose descriptions, drawings on a sheet of paper—are too different from the media describing what software does do, namely, code itself. Too much is lost going from one to the other. The idea behind model-based design is to close the gap. The very same model is used both by system designers to express what they want and by the computer to automatically generate code.
    Ok, I have found a stopping point with "model-based design". This assumes problem(s) can be defined within the limits of a "model" that encompasses all known requirements and operational scenarios. This can be done within a limited world-view, a concept of say a 'report writer.' But the real world encompasses much larger and varied problems. The reality of a universe is to understand that it is all, not a subset.

    There are narrow scoped problems that a generalized model can be based upon. But to think software to help design a computer network or super-conducting magnet in an accelerator, this is neither common nor fixed.

    Yes, I'll read the rest of this verbose article but it will take "a magic moment" to claim model-based software is a universal problem waiting for that hammer.

    Bob Wilson
     
    RCO and HPrimeAdvanced like this.
  6. ChapmanF

    ChapmanF Senior Member

    Joined:
    Mar 30, 2008
    14,683
    10,317
    0
    Location:
    Indiana, USA
    Vehicle:
    2010 Prius
    Model:
    IV
    How wide an integer did you use? An IEEE (single) float only has 24 bits for the significand—after 16777215 seconds (not quite seven months), instead of a goofy wraparound, you'd just reach the point where time stands still because "counter += 1" no longer changes counter (though "counter += 2" still would for a while)....

    One of my favorite systems programming challenges was a part of a MIDI driver that had to convert between musical pitch numbers and actual frequency (essentially powers of the twelfth-root-of-two), "accurately enough" within an OS kernel where no floating point operations were allowed because the context-switch code didn't save the floating point state.

    -Chap
     
  7. JimboPalmer

    JimboPalmer Tsar of all the Rushers

    Joined:
    Apr 14, 2009
    12,334
    6,723
    2
    Location:
    Greenwood MS USA
    Vehicle:
    2012 Prius v wagon
    Model:
    Three
    Stupid code I have written (long)

    The employees all work different shifts, some only repeat every 88 weeks. 8, 9, 10, 12, and 12.5 hour shifts have varying patterns of days worked and days off. (I worked 9 hour week days with every other wednesday off, my coworkers in IT had other days of the week off)

    If you work a Holiday, you get double time if you also worked your scheduled day before and after the Holiday. That sounds simple but right up front we may cut the check (there is no paper check, 98% direct deposit) before you have another scheduled work day.
    I had thought that since every employee needs 24 hours of safety training before he is allowed on the work site and the classes are only held on 'school days' that every employee would have a previously scheduled day before the holiday. It was in my HR specs that every employee had to have safety training.

    Four years later they transferred an employee from another site and started him on our payroll on a holiday. 2 days into the payroll run, it was still going farther back in time looking for a previous work day. Somewhere in the hour drive to the site I found the possible infinite loop. I added an IF statement comparing hire_date to previous_work_date and all was well. If we check past hire_date, he gets the double time! (Never trust HR, never)

    This is not a bug, just stupidity: Our AP checks at the time had an invoice field that allowed 12 invoices. If you have more invoices, we voided a check and used the invoice field on that check to record another 12 invoices, and so on. Our Administrative Superintendent, who had to sign the checks noticed we were 'wasting' checks. So I wrote code so that every 12 invoices we wrote another check. And we processed many more checks, and he signed many more checks, and our vendors had to cash many more checks. Dumb right? It gets worse, before if we got a refund, we could add invoices until the check was a positive value (never send negative checks, that is wrong) After my change our refunds just get unclaimed until we get 12 invoices that are larger than the refund. (When the Admin Super went on vacation, we put back the old code and took our refunds)

    Not really coding but sad: Never abbreviate Funeral Leave as Fun Leave. Just don't.
     
    RCO likes this.
  8. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    It was a 'wonderful' report language called "MARK IV" and I used what was probably a 24-bit integer. I was calculating the seconds between two time stamps but had an overrun in November. Mark-4 did not have time processing routines so I had to hand code it. I quickly realized that we just needed a wider range and changing to a larger number with more bits solved the problem.

    <old_geezer_voice>
    In my day:
    • early 1960s - analog and digital computers were considered valid alternatives.
    • assembler replaced front panel switches
    • terminals replaced card deck ... would solve the software problem
    • FORTRAN, COBOL, PL1 ... high level languages would solve the software problem
    • BASIC, JAVA, PERL ... interpretive languages would universally solve the software problem
    • databases ... would eliminate programming to solve the software problem
    • ADA, ATLAS ... strongly typed languages would solve the software problem
    • <anything>+ ... object coding would solve the software problem
    • <anything>++ ... more object coding would solve the software problem
    </old_geezer_voice>
    When I retired out of 'the white collar holler', my tools were:
    1. spreadsheet - to rough out solutions or stupidly fast report or analysis
    2. PERL - untyped and curiously, a truly portable language
    3. c - to accelerate PERL code to run 2-3 magnitudes faster
    My techniques were:
    1. Draft a User's Manual before writing a line of code.
      • Send a copy to customer and nag them for feedback.
    2. Use version control library
    3. Write the comments borrowing from (or generating) the User's Manual
      • Extracted comments may be used for mark-up language manual
    4. Insert code and debug
    5. Deliver
    Bob Wilson
     
    RCO likes this.
  9. ChapmanF

    ChapmanF Senior Member

    Joined:
    Mar 30, 2008
    14,683
    10,317
    0
    Location:
    Indiana, USA
    Vehicle:
    2010 Prius
    Model:
    IV
    Sounds like, in a different holler, you might have been a likely suspect to use web (as in tangle/weave, not as in www).

    -Chap
     
    RCO likes this.
  10. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    94,786
    42,987
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    software, like every new technology has its benefits and negatives. i agree with the author, we need a revelation, not the piling on of more code.
     
    RCO and pilotgrrl like this.
  11. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    That was my transition from operating systems to networks and network engineering. WARNING: old man war stories:

    BROADCAST STORMS ON LAYER 2 NETWORK


    I had started to run out of VAX/VMS problems but was maintaining the DNS server and DEC Polycenter system. So I was invited to join the network operations team working weekends and 3d shift. Then we had a problem with random PC failures ... most of the PCs in a building would suddenly 'blue screen.'

    So I took my VAXstation and wrote a parasitic device driver that found and patched itself into the VMS ethernet driver. The parasitic driver buffered the ethernet packets into a larger read buffer so I could read about a 20-30 packets with each I/O. Then I wrote the buffered blocks to the disk drive using two direct access files in descending block order to minimize rotation delay.

    We had an unused, 8mm, robot cassette drive that I repurposed to record from the other disk file. So in effect, I had assembled the first 'super sniffer.' One 8mm tape held about a day's worth of data. So when we had one of those building wide events, I could recover the packets.

    Turns out it was a subtle broadcast storm triggered by ARP requests that were responded with broadcast negative replies. One PC would make the request, the rest on that LAN replied "I don't have it" in a broadcast payload and the flood of broadcast packets did the 'blue screen.'

    DECterminal Failures

    We had a competing contractor operating a satellite data processing center that was suffering random failures of their DECterminal devices. Our contractor, Boeing, maintained the network but the other contractor was using 1st generation DECterminal servers. Instead of updating the equipment, they claimed it was our network.

    I put the 'super sniffer' on their LAN and asked them to let us know when if failed. The next day, I shared my report by playing back the data. The packets showed the DECterminal was failing on its own. Nothing abnormal on the LAN, just a crappy, first generation DECterminal. So I started playing back data streams to the supervisor:
    • First TCP stream showed someone playing text, video solitaire.
    • Second TCP stream was someone composing an e-mail about an employee review ... the supervisor blanched.
    The contractor decided to replace the DECterminal with a modern unit and the random failures went away and our professional relationship improved.

    Backbone vs Tail-sites

    When I joined the network engineering group, I specialized in tail sites. Depending upon how to count them, there are 14-16 NASA Centers around the USA connected by a backbone network. Each has an average of a dozen local contractors and universities, tail circuits, that spider out from the centers supporting NASA satellite missions. Many of my fellow engineers competed to do backbone, center-to-center, network packages where the most expensive circuits and carrier grade routers resided. In contrast, I sought out the tail circuit networks.

    Each tail circuit network had unique requirements so the equipment and technology was constantly changing. They also had limited budgets and often interesting technical twists such as: mix of realtime and ordinary data; unusual voice circuit requirements, and; isolated networks using the same circuit. One fun assignment (Mars rover control) had a redundancy requirement but only budget for a DS-3, 45 mbs, and T1, 1.5 mbs. When the DS-3 failed, all traffic went to the rapidly overloaded T1 but the 4-wire voice and satellite control had to continue with everything else slowed down. FYI, it was only supposed to work for 90 days.
    I ended my career managing the servers handing network monitoring. Sad to say, four years ago, it was top-down forced into the NASA Centers ... ever try to give a pet a pill they don't want? My request to visit the centers during the transition was turned down so there was no way to collaborate. Then the network management package I managed went "end of life" and I could finally retire.

    Bob Wilson
     
    #11 bwilson4web, Oct 7, 2017
    Last edited: Oct 7, 2017
    pilotgrrl likes this.
  12. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    Source: Apple’s Swift language is losing developers to multiplatform frameworks

    When Apple’s Swift language for MacOS and iOS development debuted in June 2014 as the modern successor to Objective-C, Swift began to gain a foothold with developers. But now Swift is actually slipping in popularity, according the latest Tiobe index.

    Why is Swift losing steam? Tiobe attributes it to developers leaving the Apple-only Swift/Xcode development environment for frameworks that build multiplatform mobile apps such as Microsoft’s Xamarin, Apache Cordova, and Ionic. Xamarin leverages C# while Cordova and Ionic rely on JavaScript.

    Nothing like a new language to solve the software problem.

    Bob Wilson
     
    RCO likes this.
  13. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    94,786
    42,987
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    que?
     
    RCO likes this.
  14. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    It was a semi-random article tossed up by Google News that reminded me of how people keep trying to 'solve the software problem.' A new language is so often invented; has a run; and then gets replaced by the next one.

    <old_geezer_voice>

    In the Marines, I signed up for three night school courses one semester not realizing they each would teach a different language. Funny thing, it taught me now to learn any computer language by mastering six, universal constructs:
    1. Start/Stop
    2. Data definition
    3. Data operation
    4. I/O
    5. Transfer of control
    6. Subroutine transfer of control
    No matter how hard language 'inventors' try to come up with a new taxology, even in their most mangled use of language, we can always ferret out those six structures.

    Around 1980, our project required all of the programmers to take a course in 'Structured Programming.' I noticed the early attendees would come back praising the course but committing the same software malpractice I'd seen before. The course had no effect on their behavior. But it was required.

    Eventually the supervisor tracked down the last of us and even showed up to make sure we were in the class. Then I realized he was describing the software practices I followed. The course wasn't the fraud, the 'students' were. They parroted what was necessary to 'get by' and reverted to the same, random coding practices they'd followed before the course.

    </old_geezer_voice>

    Bob Wilson
     
    RCO, Prodigyplace and pilotgrrl like this.
  15. Mark57

    Mark57 2021 Tesla Model 3 LR AWD

    Joined:
    Aug 14, 2009
    2,945
    2,727
    0
    Location:
    OK
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Thread title: Saving the world from software

    My experience, watch the humans.

    Some years ago when 2TB drives were still large, and while managing one of our large 200,000 sq ft data centers we had a large national fire protection service inspecting their system inside our data center. Everyone on our side was present and escorted the contractors during their inspection. They were professional, but there was this one guy. As they completed the job and were exiting the raised floor room, this one guy ( I remember it in S L O W motion) thought he was hitting the GREEN secure door open button and instead hit the RED, emergency power down button (EPO) and killed the power to the whole server room instantaneously. The door was already being held open by us when he decided he needed to keep it open by hitting the button.

    Oh, shit!

    For those that don't know, pulling the power to VERY large arrays of thousands of hard drives in SAN's and other systems that have been running for very long time frames is never a good thing. Not everything will start back up. It was awful. As soon as everything went dark, we hear this one voice in the dark say "Oh, SHIT." It was "that guy." It went down hill rapidly from there. We had some down time and lost some hardware, but due to good procedures, no data was lost. We had everything on video. The guy was fired by the contractor and the contractor payed a LOT of money to make it right.

    Soooo, watch the humans!


    [​IMG]
    600 × 600 - safetyproductswholesale.com
     
    RCO, pilotgrrl and Prodigyplace like this.
  16. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    24,655
    14,027
    0
    Location:
    Huntsville AL
    Vehicle:
    2017 Prius Prime
    Model:
    Prime Plus
    Reminds me of a room full of servers somewhere where every server was bought with its own mini-UPS. Then the Fire Marshal inspected and pointed out the room, emergency power off switch simply flipped all power to the small UPS systems that were buffering each server. Then there were the various backup generator issues. <SIGH>

    Bob Wilson
     
    RCO, pilotgrrl and Prodigyplace like this.
  17. ETC(SS)

    ETC(SS) The OTHER One Percenter.....

    Joined:
    Oct 28, 2010
    7,206
    5,907
    0
    Location:
    Redneck Riviera (Gulf South)
    Vehicle:
    Other Non-Hybrid
    Model:
    N/A
    Gee.....that wasn't much of a problem in a SCIF. :D
     
  18. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    94,786
    42,987
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    can anyone save us from priuschat software?(n)
     
    Prodigyplace likes this.
  19. RCO

    RCO Senior Member

    Joined:
    Aug 31, 2016
    3,709
    5,176
    0
    Location:
    Cornwall
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Not an expert, but I always felt that consumer software written in IBMDOS or MS-DOS had to be neat and tidy, or it wouldn't run. You probably know.

    My money's on WonderWoman!
     
    bisco, pilotgrrl and Mark57 like this.
  20. Mark57

    Mark57 2021 Tesla Model 3 LR AWD

    Joined:
    Aug 14, 2009
    2,945
    2,727
    0
    Location:
    OK
    Vehicle:
    Other Electric Vehicle
    Model:
    N/A
    Ah, the days of IBM Filing Assistant and IBM Writing Assistant all on a single 360K 5.25" floppy. I remember budgeting $900 for an 8087 math coprocessor to "vastly" speed up the machine at work.
     
Loading...