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. How many people use fubar?

How many people use fubar?

Scheduled Pinned Locked Moved The Lounge
c++htmlcomquestion
26 Posts 16 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.
  • R Rickard Andersson20

    keegan wrote: instead of naming something 'temp' ill use foo or bar I don't use foo or bar but I use dummy. Rickard Andersson Here is my card, contact me later! UIN: 50302279 E-Mail: nikado@pc.nu Interests: C++, ADO, SQL, Winsock, 0s and 1s

    K Offline
    K Offline
    keegan
    wrote on last edited by
    #12

    heh... string dummy; cout << "Enter your name..."; cin >> dummy; cout << "\nHello, " << dummy; *.* cin >> knowledge;

    L 1 Reply Last reply
    0
    • K keegan

      I have a tendency to use the acronymn all the time in my code, instead of naming something 'temp' ill use foo or bar. I even saw foo used on a c++ test i took last year. Im just wondering how often professional programmers use it, if ever, or its just a little joke that people hint at but never use. the origin of fubar [^] *.* cin >> knowledge;

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #13

      i don't use foobar. i generally use "bob". it's easier to type than "foobar". -c CheeseWeasle

      T 1 Reply Last reply
      0
      • K keegan

        I have a tendency to use the acronymn all the time in my code, instead of naming something 'temp' ill use foo or bar. I even saw foo used on a c++ test i took last year. Im just wondering how often professional programmers use it, if ever, or its just a little joke that people hint at but never use. the origin of fubar [^] *.* cin >> knowledge;

        RaviBeeR Offline
        RaviBeeR Offline
        RaviBee
        wrote on last edited by
        #14

        Are you talking about my product FooBar[^]? :) /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com

        T 1 Reply Last reply
        0
        • I Ian Darling

          It's a commonly used "metasyntactic variable" (see the Jargon File or dict.org). My own opinion is that it's not good style to use them in production code (for examples it is ok), and to an extent can suggest unclear thinking - much like using terms like doohickey and thingy do when describing something in physical terms. Of course, I've probably done it myself a few times, but I do tend to do things like "OrderValueTemp" instead of "Temp" :-) And I knew a guy who got up to temp47 before thinking he might have gone about the function the wrong way :laugh: -- Ian Darling

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

          Ian Darling wrote: temp47 Yikes - maintaining his code must have been fun :~ Paul ;)

          That's better! It looks like radioactive waste now. - Ryan Binns

          I 1 Reply Last reply
          0
          • K keegan

            heh... string dummy; cout << "Enter your name..."; cin >> dummy; cout << "\nHello, " << dummy; *.* cin >> knowledge;

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

            :-D Paul ;)

            That's better! It looks like radioactive waste now. - Ryan Binns

            1 Reply Last reply
            0
            • K keegan

              I have a tendency to use the acronymn all the time in my code, instead of naming something 'temp' ill use foo or bar. I even saw foo used on a c++ test i took last year. Im just wondering how often professional programmers use it, if ever, or its just a little joke that people hint at but never use. the origin of fubar [^] *.* cin >> knowledge;

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

              I tend to come up with more descriptive names - pays dividends when I do maintenance :-D Paul ;)

              That's better! It looks like radioactive waste now. - Ryan Binns

              T 1 Reply Last reply
              0
              • L Lost User

                Ian Darling wrote: temp47 Yikes - maintaining his code must have been fun :~ Paul ;)

                That's better! It looks like radioactive waste now. - Ryan Binns

                I Offline
                I Offline
                Ian Darling
                wrote on last edited by
                #18

                Fortunately, it was when I was at uni, and he was in a different year to me :-D -- Ian Darling

                J 1 Reply Last reply
                0
                • K keegan

                  I have a tendency to use the acronymn all the time in my code, instead of naming something 'temp' ill use foo or bar. I even saw foo used on a c++ test i took last year. Im just wondering how often professional programmers use it, if ever, or its just a little joke that people hint at but never use. the origin of fubar [^] *.* cin >> knowledge;

                  T Offline
                  T Offline
                  Tom Archer
                  wrote on last edited by
                  #19

                  I do, but only in either testing something or in book code snippets. Cheers, Tom Archer Inside C#,
                  Extending MFC Applications with the .NET Framework

                  // Thanks to Atlantys
                  if (PostType == AnythingDistastful
                  || PostType == AnythingOld)
                  {
                  if ((rand() % 2) == 0)
                  { /* make fun of VB */ }
                  else
                  { /* make fun of COBOL */ }
                  }

                  1 Reply Last reply
                  0
                  • RaviBeeR RaviBee

                    Are you talking about my product FooBar[^]? :) /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com

                    T Offline
                    T Offline
                    Tom Archer
                    wrote on last edited by
                    #20

                    Impressive, Ravi. Congrats on the nice work. Cheers, Tom Archer Inside C#,
                    Extending MFC Applications with the .NET Framework

                    // Thanks to Atlantys
                    if (PostType == AnythingDistastful
                    || PostType == AnythingOld)
                    {
                    if ((rand() % 2) == 0)
                    { /* make fun of VB */ }
                    else
                    { /* make fun of COBOL */ }
                    }

                    RaviBeeR 1 Reply Last reply
                    0
                    • L Lost User

                      I tend to come up with more descriptive names - pays dividends when I do maintenance :-D Paul ;)

                      That's better! It looks like radioactive waste now. - Ryan Binns

                      T Offline
                      T Offline
                      Tom Archer
                      wrote on last edited by
                      #21

                      Agreed. This point is exactly why when I consult for a company, I always preach the mantra "Code is read more than it is written". Cheers, Tom Archer Inside C#,
                      Extending MFC Applications with the .NET Framework

                      // Thanks to Atlantys
                      if (PostType == AnythingDistastful
                      || PostType == AnythingOld)
                      {
                      if ((rand() % 2) == 0)
                      { /* make fun of VB */ }
                      else
                      { /* make fun of COBOL */ }
                      }

                      1 Reply Last reply
                      0
                      • K keegan

                        I have a tendency to use the acronymn all the time in my code, instead of naming something 'temp' ill use foo or bar. I even saw foo used on a c++ test i took last year. Im just wondering how often professional programmers use it, if ever, or its just a little joke that people hint at but never use. the origin of fubar [^] *.* cin >> knowledge;

                        J Offline
                        J Offline
                        John M Drescher
                        wrote on last edited by
                        #22

                        I never use either. I usually name variables using hungarian notation and selfdocumentation unless they are just iterators.. John

                        1 Reply Last reply
                        0
                        • I Ian Darling

                          Fortunately, it was when I was at uni, and he was in a different year to me :-D -- Ian Darling

                          J Offline
                          J Offline
                          John M Drescher
                          wrote on last edited by
                          #23

                          I see this kind of thing all the time in research...

                          feature56 = feature34 + feature23;

                          It does serve one unintended purpose. No one but the author could possiblly understand the code without months of study... John

                          1 Reply Last reply
                          0
                          • D David Chamberlain

                            I never caught on to using fubar, foo, or bar in any combination. I guess it was too abstract to be of any help to me, but of course, that was its purpose. Use foo when you intentionally don't want to be specific about something. Now, it has become one of those fingernail-on-the-blackboard things for me, and I hate using it and really dislike even seeing it. You won't ever see it in anything I write. Dave "You can say that again." -- Dept. of Redundancy Dept.

                            T Offline
                            T Offline
                            Turtle Hand
                            wrote on last edited by
                            #24

                            :rolleyes: a little tense about this. tell us how you really feel! ;) Josef Wainz Software Developer

                            1 Reply Last reply
                            0
                            • C Chris Losinger

                              i don't use foobar. i generally use "bob". it's easier to type than "foobar". -c CheeseWeasle

                              T Offline
                              T Offline
                              Turtle Hand
                              wrote on last edited by
                              #25

                              fred is the way to go. bob is reversible. but fred you'll never be confused which way to read the variable. i've been naming things fred for 15 years, go figure. Josef Wainz Software Developer

                              1 Reply Last reply
                              0
                              • T Tom Archer

                                Impressive, Ravi. Congrats on the nice work. Cheers, Tom Archer Inside C#,
                                Extending MFC Applications with the .NET Framework

                                // Thanks to Atlantys
                                if (PostType == AnythingDistastful
                                || PostType == AnythingOld)
                                {
                                if ((rand() % 2) == 0)
                                { /* make fun of VB */ }
                                else
                                { /* make fun of COBOL */ }
                                }

                                RaviBeeR Offline
                                RaviBeeR Offline
                                RaviBee
                                wrote on last edited by
                                #26

                                Thanks, Tom! :rose: PS: Check your email. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com

                                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