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. Working on some code and came across the Gem:

Working on some code and came across the Gem:

Scheduled Pinned Locked Moved The Lounge
ruby
13 Posts 8 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 Lost User

    GOTOs are absolutely ok. Like many things, you have to use them carefully and that's all. (RANT) At every corner there is someone who wants to forbid some particular stuff he did not quite get. Sorry guys, but if you can't figure out how to live with GOTOs, memory management, pointers, object orientation or whatever else, then stop making 'rules' for those who can live with those things. Flip some burgers instead (EOR (End Of Rant))

    The language is JavaScript. that of Mordor, which I will not utter here
    This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
    "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

    J Offline
    J Offline
    Johnny J
    wrote on last edited by
    #3

    I'm sorry, but you're not allowed to rant here. Some people can't stand it! :doh:

    Anything that is unrelated to elephants is irrelephant
    Anonymous
    -----
    The problem with quotes on the internet is that you can never tell if they're genuine
    Winston Churchill, 1944
    -----
    I'd just like a chance to prove that money can't make me happy.
    Me, all the time

    1 Reply Last reply
    0
    • L Lost User

      GOTOs are absolutely ok. Like many things, you have to use them carefully and that's all. (RANT) At every corner there is someone who wants to forbid some particular stuff he did not quite get. Sorry guys, but if you can't figure out how to live with GOTOs, memory management, pointers, object orientation or whatever else, then stop making 'rules' for those who can live with those things. Flip some burgers instead (EOR (End Of Rant))

      The language is JavaScript. that of Mordor, which I will not utter here
      This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
      "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #4

      If it is part of the language, you probably will hit a wall sooner or later that can not be broken without it... You only have to prioritize... (Not to mention, that at the end half of your nice code will translate to jumps of various types at machine level)

      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      L 1 Reply Last reply
      0
      • L Lost User

        GOTOs are absolutely ok. Like many things, you have to use them carefully and that's all. (RANT) At every corner there is someone who wants to forbid some particular stuff he did not quite get. Sorry guys, but if you can't figure out how to live with GOTOs, memory management, pointers, object orientation or whatever else, then stop making 'rules' for those who can live with those things. Flip some burgers instead (EOR (End Of Rant))

        The language is JavaScript. that of Mordor, which I will not utter here
        This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
        "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

        Mike HankeyM Offline
        Mike HankeyM Offline
        Mike Hankey
        wrote on last edited by
        #5

        Sorry RANTs are only allowed on Thursdays! :)

        New version: WinHeist Version 2.2.2 Beta
        I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!

        M 1 Reply Last reply
        0
        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

          If it is part of the language, you probably will hit a wall sooner or later that can not be broken without it... You only have to prioritize... (Not to mention, that at the end half of your nice code will translate to jumps of various types at machine level)

          Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

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

          I spent most of the weekend digging out almost 40 year old machine code and assembly. Crisp short routines that apparently were coded with the single responsibility principle in mind. Absolutely not the spaghetti code one might expect and the sparingly used branching instructions don't do any harm at all.

          The language is JavaScript. that of Mordor, which I will not utter here
          This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
          "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

          L 1 Reply Last reply
          0
          • Mike HankeyM Mike Hankey

            Sorry RANTs are only allowed on Thursdays! :)

            New version: WinHeist Version 2.2.2 Beta
            I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!

            M Offline
            M Offline
            Member 11683251
            wrote on last edited by
            #7

            Mondays are annoying enough as it is?

            1 Reply Last reply
            0
            • G glennPattonWork3

              Hi All, Picking through some code that isn't working and found the following in the comments

              //
                      // It may be necessary to get back here to process more characters.
                      // Goto's aren't pretty, but effective.  I feel extremely dirty for
                      // using not one but two of the beasts.
                      //
              

              Well thats good then! :wtf:

              T Offline
              T Offline
              Tim Carmichael
              wrote on last edited by
              #8

              In college, one of the COBOL instructors told his students, "If you use a GOTO, I will fail you"; good in principle. Then... we worked on some code (I forget the details) and the instructor said, "For this type of application, you must use a GOTO in COBOL". I looked at it and replied, "No, and I'll explain after class." My solution to NOT use GOTO's was valid, but it resulted in 3 times the code.. and this is COBOL.. not exactly a desirable outcome, but my point was: you don't HAVE to use a GOTO, but in this instance it is preferable.

              L G 2 Replies Last reply
              0
              • T Tim Carmichael

                In college, one of the COBOL instructors told his students, "If you use a GOTO, I will fail you"; good in principle. Then... we worked on some code (I forget the details) and the instructor said, "For this type of application, you must use a GOTO in COBOL". I looked at it and replied, "No, and I'll explain after class." My solution to NOT use GOTO's was valid, but it resulted in 3 times the code.. and this is COBOL.. not exactly a desirable outcome, but my point was: you don't HAVE to use a GOTO, but in this instance it is preferable.

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

                And then I avoided the problem entirely by using recursion, ending up with a crying CodeNazi at my desk. He insisted that nobody understands recursion. Ok, stop crying, then. And let me have a word with this Nobody.

                The language is JavaScript. that of Mordor, which I will not utter here
                This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                1 Reply Last reply
                0
                • L Lost User

                  I spent most of the weekend digging out almost 40 year old machine code and assembly. Crisp short routines that apparently were coded with the single responsibility principle in mind. Absolutely not the spaghetti code one might expect and the sparingly used branching instructions don't do any harm at all.

                  The language is JavaScript. that of Mordor, which I will not utter here
                  This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                  "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

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

                  Very true. Back in the days of MS Basic there was barely any flow control:

                  .. GOTO
                  .. IF THEN [ELSE ]
                  .. FOR = TO [STEP +/- val] ... NEXT

                  That was it. (even the If is a conditional goto). Surprisingly code hasn't changed much these days - just got more verbose, now we have while, do, switch, break, continue ... - and if you think about it all of those "new" things are just a slightly better controlled version of IF THEN [ELSE ] We HAD to use goto, but in reality our "spaghetti code" was doing the exact same thing as people do today with "structured" code. It's not that the new programming languages fixed anything at all - just hid the truth behind new verbs. Summary: yes we loved our GOTOs, not just because we had no choice, but because we had the balls to use them, and use them really really well. Yes - balls: ladies included - although those days weren't many females into being a 'computer nerd' (- and we never really noticed that - we had our line printer Marilyn Monroe style pin-ups, and bak then that was enough.)

                  Sin tack ear lol Pressing the "Any" key may be continuate

                  1 Reply Last reply
                  0
                  • T Tim Carmichael

                    In college, one of the COBOL instructors told his students, "If you use a GOTO, I will fail you"; good in principle. Then... we worked on some code (I forget the details) and the instructor said, "For this type of application, you must use a GOTO in COBOL". I looked at it and replied, "No, and I'll explain after class." My solution to NOT use GOTO's was valid, but it resulted in 3 times the code.. and this is COBOL.. not exactly a desirable outcome, but my point was: you don't HAVE to use a GOTO, but in this instance it is preferable.

                    G Offline
                    G Offline
                    Gary Wheeler
                    wrote on last edited by
                    #11

                    Tim Carmichael wrote:

                    it resulted in 3 times the code.

                    If it was COBOL, how could you tell?

                    Software Zen: delete this;

                    T 1 Reply Last reply
                    0
                    • G Gary Wheeler

                      Tim Carmichael wrote:

                      it resulted in 3 times the code.

                      If it was COBOL, how could you tell?

                      Software Zen: delete this;

                      T Offline
                      T Offline
                      Tim Carmichael
                      wrote on last edited by
                      #12

                      When you have to type it in, you can tell. And that IS the point: 3 times the volume of NORMAL COBOL!

                      G 1 Reply Last reply
                      0
                      • T Tim Carmichael

                        When you have to type it in, you can tell. And that IS the point: 3 times the volume of NORMAL COBOL!

                        G Offline
                        G Offline
                        Gary Wheeler
                        wrote on last edited by
                        #13

                        In a long and fairly mundane career, I have two minor claims to fame. One, I've never had to write an Engineering Change Order (ECO) at my employer of 26 years. Two, I've never had to learn or use COBOL. My impression has always been that the language was painfully verbose.

                        Software Zen: delete this;

                        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