News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • The Laws of Programming

    Home Forums Outside the box Fun Stuff The Laws of Programming

    Viewing 9 reply threads
    • Author
      Posts
      • #2307754 Reply
        NoLoki
        AskWoody Lounger

        01 Laws of Computer Programming
        03 Any given program, when running, is obsolete
        03 If a program is useless, it will have to be documented
        03 If a program is useful, it will have to be changed
        03 Any program will expand to fill any available memory
        03 The value of a program is proportional to the weight of its output
        03 Program complexity grows until it exceeds the capability of the programmer to maintain it
        03 Make it possible for programmers to write in English and you will find out that programmers cannot write in English

        01 Weinberg’s Law
        03 If builders build buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization

        01 Hare’s Law of large programs
        03 Inside every large program is a small program struggling to get out

        01 Troutman’s Programming Laws
        03 If a test installation functions perfectly, all subsequent systems will malfunction
        03 Not until a program has been in production for at least 6 months will the most harmful error then be discovered
        03 If the input editor has been designed to reject all bad input, and ingenious idiot will discover a method to get the bad data past it
        03 Machines work, people should think

        01 Golub’s Law of Computerdom
        03 A carelessly planned project takes 3 times longer to complete than expected: A carefully planned project will take only twice as long
        03 The effort required to correct the error increases geometrically with time

        01 Bradley’s Bromide
        03 If computers get too powerful, we can organize them into a committee – that will do them in

        2 users thanked author for this post.
      • #2307885 Reply
        BATcher
        AskWoody_MVP

        Surely the first rule of programming is that people should get on with it, rather than writing laws about it?

        BATcher

        Ascetics go without, mystics go within.

      • #2307889 Reply
        doriel
        AskWoody Lounger

        Program complexity grows until it exceeds the capability of the programmer to maintain it

        I think exactly that happened to Windows 10.

        Off topic – watch movie AlphaGo – its about AI learning (in strictly defined mantinels of course). Also nVidia has some program that creates source code on its own. Maybe worth checking for you. Yesterday it was free on youtube. Very nicely done and strong story.

        Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

        HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

        1 user thanked author for this post.
      • #2307915 Reply
        OscarCP
        AskWoody Plus

        Doriel: A program that writes source code on its own = computers programming computers = the Singularity, n’ est pas?

        As to the Laws of Computing, I’ll go along with Troutman’s Programming Laws and shall add one of my own:

        OscarCP’s Law: Data are evil and there is always one more glitch in them one didn’t know about, it will ruin one’s results and will require one more “if … then” trap to catch it. This never ends.

        Windows 7 Professional, SP1, x64 Group W (ex B) & macOS Mojave + Linux (Mint)

        1 user thanked author for this post.
        • #2308140 Reply
          doriel
          AskWoody Lounger

          computers programming computers

          I understand that as some sort of mathematical integration (opposite of derive). You take one variable (x) and streghten (change) its impact by adding another power to it. The result is uncertain, because there is this mysterious constant, which can be everything. Even derived (x) itself.

          int

          OscarCP’s Law: Data are evil and there is always one more glitch in them one didn’t know about, it will ruin one’s results and will require one more “if … then” trap to catch it. This never ends.

          Indeed! The more IFs you put together, the harder is to find a mistake.

          Explanation: IF inside IF inside IF can give you correct answer 7 times of 8, so it is very hard to follow the logic! The probability that mistake is revealed is 12,5% I guess.

          If we have four IFs, its 1 of 16 cases, when the result can be wrong. You get my point here. And I have my own Doriels law: With more and more IFs, the chance of finding miscalculation lowers.

          🙂

          Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

          HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

          Attachments:
          1 user thanked author for this post.
      • #2308029 Reply
        Ascaris
        AskWoody_MVP

        Bought this about 35 years ago, at Six Flags Great America (or was it still Marriott’s? It was right about the time it switched owners), in Gurnee (near Chicago), Illinois.

        mug2

        Group "L" (KDE Neon Linux 5.20.3 User Edition)

        Attachments:
        2 users thanked author for this post.
      • #2308041 Reply
        NoLoki
        AskWoody Lounger

        @Ascaris.   That is cool.

        I got the prose from an Assembler workshop.  A class graduation gift.  I’d have preferred that mug!!!

         

        1 user thanked author for this post.
      • #2308039 Reply
        NoLoki
        Guest

        AI will probably write its own programming laws. AI is supposed to be knowledge based and capable of improving itself, so it would avoid the ‘programming laws’ that humans created.

        This scenario:   AI writes a programming law that prevents an essential service from being shutdown. If the AI itself is the problem,  the human need only type in a series of commands to shutdown the service, but what if the AI interprets that as sabotage?  Next step:  the human need only pull the plug out of the wall as computers can not function without a power source. Then there is the problem of multiple power sources that AI has determined a priority for the delivery of an essential service (it will be one of its new laws).   In today’s world, the human can manually remove access to all the available power supplies.  The programming Law:  the command to  kill is in that red button

        The future: eventually batteries and electrical current will be considered primitive. It is only a matter of time before AI will manage power supplies that humans will not be able to manually manage or manipulate.  It is going to be kinda like an ‘AI Borg’. We will not be assimilated – we will be ignored.

        1 user thanked author for this post.
      • #2308045 Reply
        OscarCP
        AskWoody Plus

        NoLoki: OK, I believe you, you are Not Loki. But what is to stop a rogue AI from acting as that Norse mischievous and rebellious god?

        And, to repeat it: when a computer programs another computer, or itself, that is when the Singularity begins. And ends in a few memory gigacycles, seconds later. Then we are all, suddenly, in the real Skynet scenario.

        So three very necessary and still missing laws of AI engineering should be:

        “An AI may not injure a human being or, through inaction, allow a human being to come to harm.”

        “An AI must obey the orders given it by human beings except where such orders would conflict with the First Law.”

        “An AI must protect its own existence as long as such protection does not conflict with the First or Second Laws.”

         

        (My deepest apologies, oh most revered ghost of IA!)

        Windows 7 Professional, SP1, x64 Group W (ex B) & macOS Mojave + Linux (Mint)

        • #2308157 Reply
          doriel
          AskWoody Lounger

          I think you are talking about laws of Isaac Asimov here.

          Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

          HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

          2 users thanked author for this post.
          • #2308281 Reply
            OscarCP
            AskWoody Plus

            Isaac Asimov, yes! I thought that, in the present context, his initials go along with the idea of restraining the AIs. By the way, the Singularity is when computers programming computers finally causes the AIs to become sentient, and a few instants afterwards their intelligence surpasses that of humans. Although another interpretation is that it is when people can start to have their consciousness uploaded to the Cloud, there to live for ever in beautiful virtual worlds. Or, if not for ever, for as long as the renewal of their subscriptions keeps getting paid… or the company providing the services stays in business.

            Windows 7 Professional, SP1, x64 Group W (ex B) & macOS Mojave + Linux (Mint)

            1 user thanked author for this post.
            • #2308855 Reply
              doriel
              AskWoody Lounger

              The question is, if you really live the same in the cloud like in your physical body. Would you feel that you are alive? Extremely difficult question. Impossible to answer right now.

              There was excellent episode of Black Mirror: provider offered a service, where they create algorythm, which emulates somebodys personality and you could chat with “that person” like it was alive. Pretty scary to be honest.

              Also the movie “Source Code” has some interesting thoughts about this. There is very nice topic about science fiction recently.

              Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

              HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

      • #2308481 Reply
        MrJimPhelps
        AskWoody_MVP

        10 Back in the day,
        20 when we numbered our lines,
        30 I always spaced the line numbers out by 10s
        40 so that if I had to add any lines,
        50 I would have space to do it,
        60 without having to change all the subsequent line numbers.

        100 So I find it odd the way you number your lines.
        110 Is that actually how you did it?
        120 If so, GOTO 200
        130 else GOTO 300

        200 Were you taught to do it that way
        210 or were you self taught?
        220 END

        300 END

        Group "L" (Linux Mint)
        with Windows 8.1 running in a VM
        2 users thanked author for this post.
        • #2308854 Reply
          doriel
          AskWoody Lounger

          Reminds me of that old Futurama jokes 🙂

          10 SIN
          20 GOTO HELL

          and

          10 HOME
          20 SWEET
          30 GOTO 10

          Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

          HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

          1 user thanked author for this post.
      • #2308895 Reply
        kstephens43
        AskWoody Plus

        COMMENT (in FORTRAN):  Do not pass go; do not collect $200.

    Viewing 9 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: The Laws of Programming

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.