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. Other Discussions
  3. The Weird and The Wonderful
  4. Hello? I guess

Hello? I guess

Scheduled Pinned Locked Moved The Weird and The Wonderful
rubyquestion
11 Posts 11 Posters 1 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.
  • U User 9666128

    I was looking at some legacy code that I re-wrote for a project and found this gem. There were also variables named bob, mike, jane etc...

    string hi;

    // some code

    if(true)
    {
    hi = "hi";
    }
    else
    {
    hi = "hi";
    }

    G Offline
    G Offline
    Guirec
    wrote on last edited by
    #2

    ... or a test for 'unreachable code detected' feature of the compiler...

    Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

    1 Reply Last reply
    0
    • U User 9666128

      I was looking at some legacy code that I re-wrote for a project and found this gem. There were also variables named bob, mike, jane etc...

      string hi;

      // some code

      if(true)
      {
      hi = "hi";
      }
      else
      {
      hi = "hi";
      }

      K Offline
      K Offline
      krumia
      wrote on last edited by
      #3

      I have decided to write a compiler that handles a robotic arm to slap the developer when this kind of code is fed to it. :doh:

      G R J 3 Replies Last reply
      0
      • K krumia

        I have decided to write a compiler that handles a robotic arm to slap the developer when this kind of code is fed to it. :doh:

        G Offline
        G Offline
        Giuseppe Tollini
        wrote on last edited by
        #4

        What if the robot became very picky on which code is right? What if it start to slap everyone even his master and creator and then go on a slap-kill spree? Be careful or you may create a machine that will kill us all!

        L R 2 Replies Last reply
        0
        • K krumia

          I have decided to write a compiler that handles a robotic arm to slap the developer when this kind of code is fed to it. :doh:

          R Offline
          R Offline
          Rob Grainger
          wrote on last edited by
          #5

          That reminds me of an idea I had at our office - extended validation using a keyword capable of administering mild electric shocks every time a user does something like use a "." in a text field they can't be bothered to fill in.

          "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

          1 Reply Last reply
          0
          • G Giuseppe Tollini

            What if the robot became very picky on which code is right? What if it start to slap everyone even his master and creator and then go on a slap-kill spree? Be careful or you may create a machine that will kill us all!

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

            :laugh: Slap happy[^]

            If it moves, compile it

            1 Reply Last reply
            0
            • G Giuseppe Tollini

              What if the robot became very picky on which code is right? What if it start to slap everyone even his master and creator and then go on a slap-kill spree? Be careful or you may create a machine that will kill us all!

              R Offline
              R Offline
              Rajesh Anuhya
              wrote on last edited by
              #7

              :laugh: +5

              my Tip/Tricks[^] |Contact me[^]

              1 Reply Last reply
              0
              • U User 9666128

                I was looking at some legacy code that I re-wrote for a project and found this gem. There were also variables named bob, mike, jane etc...

                string hi;

                // some code

                if(true)
                {
                hi = "hi";
                }
                else
                {
                hi = "hi";
                }

                I Offline
                I Offline
                Ingo
                wrote on last edited by
                #8

                Member 9704383 wrote:

                There were also variables named bob, mike, jane etc.

                That's good to write readable code. Bob, short for Robert, meaning: "bright fame". So it's a variable used as a loop counter. Jane has the meaning of "God is Great" it's used for holding global program-status. Everybody knows that someone with the name mike drinks to much alcohol. So it's used for error-handling. The meaning of Jina is "named child", so child-objects are called that way, while root-objects are called adam and an objects that controls other objects is called eve. If you use those variable-names, everyone knows the meaning. :-\

                Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                V K 2 Replies Last reply
                0
                • I Ingo

                  Member 9704383 wrote:

                  There were also variables named bob, mike, jane etc.

                  That's good to write readable code. Bob, short for Robert, meaning: "bright fame". So it's a variable used as a loop counter. Jane has the meaning of "God is Great" it's used for holding global program-status. Everybody knows that someone with the name mike drinks to much alcohol. So it's used for error-handling. The meaning of Jina is "named child", so child-objects are called that way, while root-objects are called adam and an objects that controls other objects is called eve. If you use those variable-names, everyone knows the meaning. :-\

                  Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                  V Offline
                  V Offline
                  vonb
                  wrote on last edited by
                  #9

                  The best function I had was. It was in VBA, so translated to C#

                  public void ApriTiQuandoTiDicoIo()
                  {
                  ...
                  }

                  It's Italian for "OpenWhenITellItToYou()", and it did exactly that: Open a File only when I (the developer) wants it.

                  The signature is in building process.. Please wait...

                  1 Reply Last reply
                  0
                  • I Ingo

                    Member 9704383 wrote:

                    There were also variables named bob, mike, jane etc.

                    That's good to write readable code. Bob, short for Robert, meaning: "bright fame". So it's a variable used as a loop counter. Jane has the meaning of "God is Great" it's used for holding global program-status. Everybody knows that someone with the name mike drinks to much alcohol. So it's used for error-handling. The meaning of Jina is "named child", so child-objects are called that way, while root-objects are called adam and an objects that controls other objects is called eve. If you use those variable-names, everyone knows the meaning. :-\

                    Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

                    K Offline
                    K Offline
                    Killzone DeathMan
                    wrote on last edited by
                    #10

                    Maybe you should smoke tobacco instead of marijuana :laugh:

                    1 Reply Last reply
                    0
                    • K krumia

                      I have decided to write a compiler that handles a robotic arm to slap the developer when this kind of code is fed to it. :doh:

                      J Offline
                      J Offline
                      Joan M
                      wrote on last edited by
                      #11

                      I have a 200kg capable anthropomorphic robot in the basement I can lend it to you, don't hesitate to ask for it, of course given the fact you will allow me to use it before some times... Please, put a MadSlapMode in the software in which the robot will start slapping everyone at a fast pace without even making a single question. :thumbsup:

                      [www.tamautomation.com] Robots, CNC and PLC machines for grinding and polishing.

                      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

                      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