Announcement

Collapse
No announcement yet.

Ha ha ha ha! "How To Write Unmaintainable Code"

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ha ha ha ha! "How To Write Unmaintainable Code"

    I'm only about 3 or 4 pages into this, and I've already snickered a few times...

    https://www.se.rit.edu/~tabeec/RIT_4...ble%20Code.pdf
    Skilled programmers aren't cheap. Cheap programmers aren't skilled.

  • #2
    Hell I don't need to read the whole article. I lived the life of a "maintenance" programmer way back when there were some limitations on even source code size back when single letter variable names (used for more than one purpose) and switches were used more than once using GOTO's instedad of a sub-routine (passing values back and forth) and creating comments or documentation or flowcharting was considered being a wussy.

    IBM punch card style ridged column based RPG COBOL FORTRAN and throw in some mainframe JCL to surround said source code

    OR

    in the IBM S/36 world OCL surrounding said not free form single letter reuseable variable and switches Source code

    3000 lines of WTF is this shit show spaggetti code.

    I wrote one particularly big long complex program using various language "tricks" to solve some variable name problems . HELL my internal comments/docs had more llines than the actual code as I explained in DETAIL how stuff worked and what I did and how I did it. I am willing to bet if I were to get a hold of that source code to day 25 years later I would be able to decipher and understand it.
    I'm lost without a paddle and headed up SH*T creek.
    -- Life Sucks Then You Die.


    "I'll believe corp. are people when Texas executes one."

    Comment


    • #3
      Yeah, but this one is bad (in an amusing way)...

      It's got things in it like "name a function something completely different than what it actually does".

      Misspell function names on purpose, so a Save() method might turn into Saave() or Saev() or Sav()

      Obfuscate where possible.

      Things like that.

      The author says he wrote it kind of tongue-in-cheek, because he wrote articles on how to write maintainable code, and no one read them.
      Skilled programmers aren't cheap. Cheap programmers aren't skilled.

      Comment


      • #4
        Step 1: Write it in the Perl language... That s**t is write-only code, I swear!!!
        “There are two novels that can change a bookish fourteen-year old’s life: The Lord of the Rings and Atlas Shrugged.
        One is a childish fantasy that often engenders a lifelong obsession with its unbelievable heroes, leading to an emotionally stunted, socially crippled adulthood, unable to deal with the real world.
        The other, of course, involves orcs." -- John Rogers

        Comment


        • #5
          Write-only: You must be thinking of TECO, where literally any string can be a valid program. The Jargon File has an example of sorting in TECO. (APL is even worse; Wikipedia has Conway's Game of Life in APL2, and it literally looks like line noise to me.)
          Fool me once, shame on you. Fool me twice, you speak with the Fraud department. -- CrazedClerkthe2nd
          OW! Rolled my eyes too hard, saw my brain. -- Seanette
          she seems to top me in crazy, and I'm enough crazy for my family. -- Cooper
          Yes, I am evil. What's your point? -- Jester

          Comment


          • #6
            Quoth Deserted View Post
            Write-only: You must be thinking of TECO, where literally any string can be a valid program. The Jargon File has an example of sorting in TECO. (APL is even worse; Wikipedia has Conway's Game of Life in APL2, and it literally looks like line noise to me.)
            The old-timers in Unix had a party game with TECO: Type your name in and see what it does.

            The big thing about APL was just that they extended the character set (to hell and gone) to include all the mathematical operators for arrays and the like. Back in college, one of my professors had an ASCII version that was much more readable. (You still needed to understand the math, though.)

            Comment


            • #7
              Quoth Mental_Mouse View Post
              The old-timers in Unix had a party game with TECO: Type your name in and see what it does.

              The big thing about APL was just that they extended the character set (to hell and gone) to include all the mathematical operators for arrays and the like. Back in college, one of my professors had an ASCII version that was much more readable. (You still needed to understand the math, though.)
              OMG APL you are giving me flashbacks to 40 years ago (yea wacko character set and the special typeball for the IBM Selectric terminal to input your code) when I had that in college. The next semester I took LISP.
              I'm lost without a paddle and headed up SH*T creek.
              -- Life Sucks Then You Die.


              "I'll believe corp. are people when Texas executes one."

              Comment


              • #8
                Quoth Racket_Man View Post
                ... The next semester I took LISP.
                And by semester's end the paren characters on the golfball were pounded flat.
                I am not an a**hole. I am a hemorrhoid. I irritate a**holes!
                Procrastination: Forward planning to insure there is something to do tomorrow.
                Derails threads faster than a pocket nuke.

                Comment


                • #9
                  Quoth dalesys View Post
                  And by semester's end the paren characters on the golfball were pounded flat.
                  Yeah and I had to pay for a new one.

                  and all of the "strange" operators and that even 20 years after its inception the reliance on machine address locations .......
                  Last edited by Racket_Man; 06-01-2018, 05:31 AM.
                  I'm lost without a paddle and headed up SH*T creek.
                  -- Life Sucks Then You Die.


                  "I'll believe corp. are people when Texas executes one."

                  Comment


                  • #10
                    Quoth Racket_Man View Post
                    Yeah and I had to pay for a new one.

                    and all of the "strange" operators and that even 20 years after its inception the reliance on machine address locations .......
                    I joked once that it'd be amusing to make class, method, and variable names Latin.

                    So instead of a method named Save() it would be Salvare()

                    Or something like that. Like for a variable that tests whether something is permitted, you could use the latin "licet".

                    That would really confuse people.
                    Skilled programmers aren't cheap. Cheap programmers aren't skilled.

                    Comment


                    • #11
                      Quoth Racket_Man View Post
                      Yeah and I had to pay for a new one.

                      and all of the "strange" operators and that even 20 years after its inception the reliance on machine address locations .......
                      hmm... IIRC (it's been a while), the "address locations" in LISP were defined such that any given implementation could use whatever arbitrary values made sense for the underlying system. So, certainly non-portable at binary-data level, but fine at source-code level.

                      Comment

                      Working...
                      X