Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A job for life

A job for life

Scheduled Pinned Locked Moved The Lounge
tutorialhtmlcareerlearning
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    How To Write Unmaintainable Code Some of my favorite parts Buy a copy of a baby naming book and you'll never be at a loss for variable names. Fred is a wonderful name, and easy to type. If you're looking for easy-to-type variable names, try adsf or aoeu if you type with a DSK keyboard. Use scoping as confusingly as possible by recycling variable names in contradictory ways. For example, suppose you have global variables A and B, and functions foo and bar. If you know that variable A will be regularly passed to foo and B to bar, make sure to define the functions as function foo(B) and function bar(A) so that inside the functions A will always be referred to as B and vice versa. With more functions and globals, you can create vast confusing webs of mutually contradictory uses of the same names. Let's start off with probably the most fiendish technique ever devised: Compile the code to an executable. If it works, then just make one or two small little changes in the source code...in each module. But don't bother recompiling these. You can do that later when you have more time, and when there's time for debugging. When the hapless maintenance programmer years later makes a change and the code no longer works, she will erroneously assume it must be something she recently changed. You will send her off on a wild goose chase that will keep her busy for weeks.

    A 1 Reply Last reply
    0
    • L Lost User

      How To Write Unmaintainable Code Some of my favorite parts Buy a copy of a baby naming book and you'll never be at a loss for variable names. Fred is a wonderful name, and easy to type. If you're looking for easy-to-type variable names, try adsf or aoeu if you type with a DSK keyboard. Use scoping as confusingly as possible by recycling variable names in contradictory ways. For example, suppose you have global variables A and B, and functions foo and bar. If you know that variable A will be regularly passed to foo and B to bar, make sure to define the functions as function foo(B) and function bar(A) so that inside the functions A will always be referred to as B and vice versa. With more functions and globals, you can create vast confusing webs of mutually contradictory uses of the same names. Let's start off with probably the most fiendish technique ever devised: Compile the code to an executable. If it works, then just make one or two small little changes in the source code...in each module. But don't bother recompiling these. You can do that later when you have more time, and when there's time for debugging. When the hapless maintenance programmer years later makes a change and the code no longer works, she will erroneously assume it must be something she recently changed. You will send her off on a wild goose chase that will keep her busy for weeks.

      A Offline
      A Offline
      Allah On Acid
      wrote on last edited by
      #2

      I have read that before. I bet a programmer would not keep his job very long if he did that sort of thing.


      Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski You did'nt get it. I over estimated you. - Josh Gray

      G P A T 4 Replies Last reply
      0
      • A Allah On Acid

        I have read that before. I bet a programmer would not keep his job very long if he did that sort of thing.


        Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski You did'nt get it. I over estimated you. - Josh Gray

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #3

        Unfortunately this is an all too often real occurrence.


        Software Zen: delete this;

        1 Reply Last reply
        0
        • A Allah On Acid

          I have read that before. I bet a programmer would not keep his job very long if he did that sort of thing.


          Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski You did'nt get it. I over estimated you. - Josh Gray

          P Offline
          P Offline
          peterchen
          wrote on last edited by
          #4

          Actually, it makes him the only one able to maintain this software - instant job security. Until the application will be "expired", of course...


          Pandoras Gift #44: Hope. The one that keeps you on suffering.
          aber.. "Wie gesagt, der Scheiss is' Therapie"
          boost your code || Fold With Us! || sighist | doxygen

          E 1 Reply Last reply
          0
          • A Allah On Acid

            I have read that before. I bet a programmer would not keep his job very long if he did that sort of thing.


            Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski You did'nt get it. I over estimated you. - Josh Gray

            A Offline
            A Offline
            Allah On Acid
            wrote on last edited by
            #5

            I didn't know that really happened. It seems like it would be obvious to the boss what you are doing.


            Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski You did'nt get it. I over estimated you. - Josh Gray

            1 Reply Last reply
            0
            • P peterchen

              Actually, it makes him the only one able to maintain this software - instant job security. Until the application will be "expired", of course...


              Pandoras Gift #44: Hope. The one that keeps you on suffering.
              aber.. "Wie gesagt, der Scheiss is' Therapie"
              boost your code || Fold With Us! || sighist | doxygen

              E Offline
              E Offline
              El Corazon
              wrote on last edited by
              #6

              peterchen wrote:

              Actually, it makes him the only one able to maintain this software - instant job security.

              This was tried at NASA, even to the claim of job security. They couldn't fire him without hurting themselves. They fired him to save themselves. Any trouble fixing what he destroyed was far better and safer than allowing him to continue. Of course selling company equipment for profit didn't help matters.... _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

              P 1 Reply Last reply
              0
              • A Allah On Acid

                I have read that before. I bet a programmer would not keep his job very long if he did that sort of thing.


                Pumk1nh3ad illustrates that Intelligent Design oft goes awry. - Ed Gadziemski You did'nt get it. I over estimated you. - Josh Gray

                T Offline
                T Offline
                the last free name
                wrote on last edited by
                #7

                In my first development job I inherited some VB6 (shudder!) code that managed to include most of those suggestions, only the last guy he didn't bother putting in any comments. A particualr method was named GetJourneyNumberFromJourneyNumber and I never did find out what it really did. Another favourite was to vary the variable names from the call to the parameter list, and to include the odd temp here and there, just for fun. And the return was always called result. A man with such obvious talents got promoted to management:laugh:

                1 Reply Last reply
                0
                • E El Corazon

                  peterchen wrote:

                  Actually, it makes him the only one able to maintain this software - instant job security.

                  This was tried at NASA, even to the claim of job security. They couldn't fire him without hurting themselves. They fired him to save themselves. Any trouble fixing what he destroyed was far better and safer than allowing him to continue. Of course selling company equipment for profit didn't help matters.... _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                  P Offline
                  P Offline
                  peterchen
                  wrote on last edited by
                  #8

                  Yep, best move ever. This rarely doesn't happen, because the longer the troublemaker is kept, the more is invested in him and it's naturally harder to "throw away" more money - especially in large corps that play the blame game.

                  Jeffry J. Brickley wrote:

                  Of course selling company equipment for profit didn't help matters....

                  :omg:


                  Pandoras Gift #44: Hope. The one that keeps you on suffering.
                  aber.. "Wie gesagt, der Scheiss is' Therapie"
                  boost your code || Fold With Us! || sighist | doxygen

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups