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. Spaghetti code

Spaghetti code

Scheduled Pinned Locked Moved The Lounge
adobequestion
31 Posts 21 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

    There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

    I P K A L 14 Replies Last reply
    0
    • L Lost User

      There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      I Offline
      I Offline
      Ian Shlasko
      wrote on last edited by
      #2

      If you think the code we see here is bad, you should check out the IOCCC[^] :)

      Proud to have finally moved to the A-Ark. Which one are you in?
      Author of the Guardians Saga (Sci-Fi/Fantasy novels)

      L L R 3 Replies Last reply
      0
      • L Lost User

        There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

        Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

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

        Never mistake stupidity for malice, and never mistake bureaucracy for stupidity.

        FILETIME to time_t
        | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

        1 Reply Last reply
        0
        • I Ian Shlasko

          If you think the code we see here is bad, you should check out the IOCCC[^] :)

          Proud to have finally moved to the A-Ark. Which one are you in?
          Author of the Guardians Saga (Sci-Fi/Fantasy novels)

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Ian Shlasko wrote:

          we see here is bad

          You should see the code I am stuck with.

          Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

          M 1 Reply Last reply
          0
          • L Lost User

            There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

            Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

            K Offline
            K Offline
            Kenneth Haugland
            wrote on last edited by
            #5

            Yes, we ought to send them to a special place, were they could get.. ehh... decoded :-D

            L 1 Reply Last reply
            0
            • I Ian Shlasko

              If you think the code we see here is bad, you should check out the IOCCC[^] :)

              Proud to have finally moved to the A-Ark. Which one are you in?
              Author of the Guardians Saga (Sci-Fi/Fantasy novels)

              L Offline
              L Offline
              lewax00
              wrote on last edited by
              #6

              I just went for the first item on their list of entries, then when it opened I realized I recognized the ASCII art the program forms :laugh: [Edit: looks like there are some anonymous Yuru Yuri fans here too ;P ]

              Z 1 Reply Last reply
              0
              • K Kenneth Haugland

                Yes, we ought to send them to a special place, were they could get.. ehh... decoded :-D

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                After spending 3 days unravelling their crap code to do something really simple, I need to be.... de-programmed... :-)

                Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                K 1 Reply Last reply
                0
                • L Lost User

                  After spending 3 days unravelling their crap code to do something really simple, I need to be.... de-programmed... :-)

                  Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                  K Offline
                  K Offline
                  Kenneth Haugland
                  wrote on last edited by
                  #8

                  Commonly know problem, and is in the chategory of stupidity de-mystified :laugh:

                  1 Reply Last reply
                  0
                  • L Lost User

                    There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #9

                    Indeed. Many of the coworkers I've had over the years seem to think that building complex code is impressive. I don't think so. I think building simple code to support complex scenarios is impressive.

                    Thou mewling ill-breeding pignut!

                    C 1 Reply Last reply
                    0
                    • L Lost User

                      There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      One mans spaghetti is another's attempt at manual obfuscation :)

                      Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                      1 Reply Last reply
                      0
                      • L Lost User

                        There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                        Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                        E Offline
                        E Offline
                        Ennis Ray Lynch Jr
                        wrote on last edited by
                        #11

                        for(int i=0;i<4;i++){ switch(i){ case 1: callThisMethod(); break case 2: callThisMethodAgain(); break case 3: andThenThisOne(); break } }

                        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                        L 1 Reply Last reply
                        0
                        • E Ennis Ray Lynch Jr

                          for(int i=0;i<4;i++){ switch(i){ case 1: callThisMethod(); break case 2: callThisMethodAgain(); break case 3: andThenThisOne(); break } }

                          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #12

                          Too clean for my taste. Could use some method calls in your start value, conditional, and adjusting. And why use a switch? Maybe we need to change the conditions for the cases dynamically ;P

                          for(int i=GetDefaultStart();Validate(i);Adjust(ref i)){
                          if(ConditionMet(i))
                          callThisMethod();
                          else if(OtherConditionMet(i))
                          callThisMethodAgain();
                          else if(YetAnotherConditionMet(i))
                          andThenThisOne();
                          }

                          Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                          1 Reply Last reply
                          0
                          • L Lost User

                            There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                            Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                            Z Offline
                            Z Offline
                            zenwalker1985
                            wrote on last edited by
                            #13

                            Its a problem with every software every where. At start every thing turns out to be beautiful, but over years and due to preassure and stuffs people tends to get the feature out rather than thinking about code beautification/maintaenance/quality etc. Yes on the contrary to this, one developer should be good at his/her skills. I always consider doing the things good though i my output will be a bit delayed, i always concentrate over quality of my output than the quantity, which many of my colleagues think i am weird.

                            My cUr10U5 w0rlD

                            D 1 Reply Last reply
                            0
                            • L Lost User

                              There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                              Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                              D Offline
                              D Offline
                              dazfuller
                              wrote on last edited by
                              #14

                              Nuke them and the code from orbit, it's the only way to be sure!

                              1 Reply Last reply
                              0
                              • L lewax00

                                I just went for the first item on their list of entries, then when it opened I realized I recognized the ASCII art the program forms :laugh: [Edit: looks like there are some anonymous Yuru Yuri fans here too ;P ]

                                Z Offline
                                Z Offline
                                Zabuzamomochi
                                wrote on last edited by
                                #15

                                Yuru yuri fans? where? :D

                                L 1 Reply Last reply
                                0
                                • L Lost User

                                  There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                                  Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                                  R Offline
                                  R Offline
                                  RogelioP EX DE HL
                                  wrote on last edited by
                                  #16

                                  Wes Aday wrote:

                                  ... go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                                  Code is not meant to be maintained, it is meant to be rewritten :cool: -- RP

                                  Z 1 Reply Last reply
                                  0
                                  • L Lost User

                                    There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                                    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                                    J Offline
                                    J Offline
                                    jsc42
                                    wrote on last edited by
                                    #17

                                    Wes Aday wrote:

                                    There really ought to be a special punishment reserved for people ... that go out of their way to write the most convoluted code that they can

                                    Over here, they get promoted to Management.

                                    Z 1 Reply Last reply
                                    0
                                    • L Lost User

                                      There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                                      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                                      F Offline
                                      F Offline
                                      Fran Porretto
                                      wrote on last edited by
                                      #18

                                      Sometimes it's a misconceived attempt at self-glorification. Has anyone here ever run into the Code of the Real Programmer?

                                      One of the enduring fallacies of the younger (but not the youngest) folks in this trade is the belief that coding tricks are a demonstration of expertise. Oftentimes, they'll go out of their way to embed a tricky bit of code in a program, and then draw others' attention to it. "Look at me, I'm standing on my hands!"

                                      A beginning programmer doesn't know enough to do such things. His programs are relatively easy to read and debug.

                                      A well-seasoned programmer appreciates the virtues of simplicity. His stuff looks a lot like the beginner's code, and is about as easy to comprehend and debug.

                                      It's the intermediate guy, who's knocked off a couple of problems and has begun to "feel his oats," who causes most of the trouble.

                                      The hell of it is, nearly all of us go through that stage on our way to becoming "productive members of society."

                                      (This message is programming you in ways you cannot detect. Be afraid.)

                                      I 1 Reply Last reply
                                      0
                                      • I Ian Shlasko

                                        If you think the code we see here is bad, you should check out the IOCCC[^] :)

                                        Proud to have finally moved to the A-Ark. Which one are you in?
                                        Author of the Guardians Saga (Sci-Fi/Fantasy novels)

                                        R Offline
                                        R Offline
                                        Reelix
                                        wrote on last edited by
                                        #19

                                        http://www.ioccc.org/2011/dlowe/dlowe.c[^] I've heard of Zombie code, but this is ridiculous! (Read the actual code)

                                        -= Reelix =-

                                        1 Reply Last reply
                                        0
                                        • L Lost User

                                          There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.

                                          Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                                          B Offline
                                          B Offline
                                          BillMillerGTC
                                          wrote on last edited by
                                          #20

                                          The best way to get the best spaghetti coders this side of Naples Italy to stop is to have the code reviews performed by Catholic Nuns! Sister Mary Concurrent reviews the code, and if it resembles spaghetti at all she will whack you on the knuckles with a yard stick (or metre stick), or the dreaded wooden pointer that resembles a cane used in Singapore!

                                          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