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.
  • K Offline
    K Offline
    keegan
    wrote on last edited by
    #1

    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;

    M I N M R 13 Replies 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;

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      I don't use it, maybe it's more of an english language thing.


      Maximilien Lincourt "Never underestimate the bandwidth of a station wagon filled with backup tapes." (from /.)

      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;

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

        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

        R L 2 Replies 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;

          N Offline
          N Offline
          Navin
          wrote on last edited by
          #4

          I tend to use "foo" and "bar" (and their cousin, "baz") in example, prototype, and temporary code. I'll use them for variable names in coding standards and documentation. But I rarely if ever use them in production code - there's almost always a better variable name that I should be using in real code. "When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein

          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;

            M Offline
            M Offline
            Mike Zinni
            wrote on last edited by
            #5

            I use it here and there. I've also become accustomed to using 0xDEADDEAD and the likes throughout my embedded code. Anyone else having some fun with hex in their stuff? -Mike Zinni "No shit it's tough. If it wasn't, everybody and their sister would be an engineer and then you wouldn't have a job."

            M 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

              R Offline
              R Offline
              Ryan Binns
              wrote on last edited by
              #6

              Ian Darling wrote: And I knew a guy who got up to temp47 before thinking he might have gone about the function the wrong way Slow learner... :)

              Ryan

              "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

              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;

                D Offline
                D Offline
                David Chamberlain
                wrote on last edited by
                #7

                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 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;

                  R Offline
                  R Offline
                  Ranjan Banerji
                  wrote on last edited by
                  #8

                  I used to use it but stopped a long time ago. Now I dont even use temp as a variable name for the same reason I stopped using foo and bar. So much easier to name the variable so that another developer can actually tell what the hell is happening.

                  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;

                    R Offline
                    R Offline
                    Ryan Binns
                    wrote on last edited by
                    #9

                    I use variable names that make sense :) So I don't use foo or bar at all, unless my variable actually represents a bar... ;)

                    Ryan

                    "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

                    1 Reply Last reply
                    0
                    • M Mike Zinni

                      I use it here and there. I've also become accustomed to using 0xDEADDEAD and the likes throughout my embedded code. Anyone else having some fun with hex in their stuff? -Mike Zinni "No shit it's tough. If it wasn't, everybody and their sister would be an engineer and then you wouldn't have a job."

                      M Offline
                      M Offline
                      Mike Dimmick
                      wrote on last edited by
                      #10

                      Microsoft's eMbedded Visual C++ team clearly love it: The program '_blah_' has exited with code -1159943394 (0xBADCAB1E). :wtf: :squint: Ah, replace 1 with L... -- Mike Dimmick

                      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;

                        R Offline
                        R Offline
                        Rickard Andersson20
                        wrote on last edited by
                        #11

                        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 1 Reply Last reply
                        0
                        • 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
                                          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