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. piece of javascript code

piece of javascript code

Scheduled Pinned Locked Moved The Weird and The Wonderful
javascriptcomcode-review
21 Posts 14 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.
  • C codemunkeh

    How about we just shoot all the numpties* that learn VB (that was sarcasm: I am one), just to get into the swing of it, you know, hobbyists? People that aren't getting paid to learn modern-day hieroglyphics for an extra 20% performance in their app, [to cue the sarcasm again] because they are noobs and know not the way of truth, light, and irritating bugs to do with random punctuation mistakes. [Start of ostentatious, verbose humour, with nationally-specific "u"] * To prevent a language war, a "numpty", or pl. "numpties" is Scots slang for someone who is incorrect or inferior on a matter. Note that it is about as offensive as mistaking the gender of someone's budgie. Example: "Ye** should be passing parameters here, not using a global variable, ye numpty." ** "Ye" is a reference to "You". No, not you, "you". [End of humour...or is it?]


    Need Another Seven Acronyms...
    Confused? You will be...

    S Offline
    S Offline
    Shog9 0
    wrote on last edited by
    #12

    Wait now, i'm confused - which language was it that decided only one value out of 4 billion+ available was valid as true? ;) (but that's the problem with grand abstractions - they tend to leak around the edges...)

    ----

    Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?

    -- Nish on sketchy hiring practices

    C 2 2 Replies Last reply
    0
    • S Shog9 0

      Wait now, i'm confused - which language was it that decided only one value out of 4 billion+ available was valid as true? ;) (but that's the problem with grand abstractions - they tend to leak around the edges...)

      ----

      Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?

      -- Nish on sketchy hiring practices

      C Offline
      C Offline
      codemunkeh
      wrote on last edited by
      #13

      [Terminal screen display on Ninja] > ping 127.0.0.1:Brain Timeout. Timeout. Timeout. Timeout. Warning! Critical system component failure detected. OK to continue living, (Y)es or (N)o? * Please note: Computers do not understand sarcasm * > ... In otherwords, huh? Oh, you're insulting VB? Ach, shameful. I'm not fussed about defending VB, so long as someone realises it is at least easy to learn, using less than all of the keys on the keyboard. I'm just here for the humour; he says, getting serious and rolling up his sleeves...;P


      Need Another Seven Acronyms...
      Confused? You will be...

      1 Reply Last reply
      0
      • D David Stone

        Actually...the laughing smiley is :laugh:. ;)

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #14

        Somewhere I have seen a laugh-and-roll animated smiley. I was actually intending to mention that.:)

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        1 Reply Last reply
        0
        • S Shog9 0

          Wait now, i'm confused - which language was it that decided only one value out of 4 billion+ available was valid as true? ;) (but that's the problem with grand abstractions - they tend to leak around the edges...)

          ----

          Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?

          -- Nish on sketchy hiring practices

          2 Offline
          2 Offline
          2b 2b
          wrote on last edited by
          #15

          How many values do you think should be equated to true?

          S 1 Reply Last reply
          0
          • 2 2b 2b

            How many values do you think should be equated to true?

            S Offline
            S Offline
            Shog9 0
            wrote on last edited by
            #16

            All of the ones that aren't equal to false... ;)

            ----

            Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?

            -- Nish on sketchy hiring practices

            2 1 Reply Last reply
            0
            • S Shog9 0

              All of the ones that aren't equal to false... ;)

              ----

              Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?

              -- Nish on sketchy hiring practices

              2 Offline
              2 Offline
              2b 2b
              wrote on last edited by
              #17

              Let me nominate the value 47 as true. Why? Because I've always liked that value. So lets pustulate a language where zero and 47 are both true.

              J 1 Reply Last reply
              0
              • 2 2b 2b

                Let me nominate the value 47 as true. Why? Because I've always liked that value. So lets pustulate a language where zero and 47 are both true.

                J Offline
                J Offline
                jhwurmbach
                wrote on last edited by
                #18

                2b|!2b==? wrote:

                Let me nominate the value 47 as true.

                47, being not equal to 'false', is 'true'. What is your problem with that concept?

                2b|!2b==? wrote:

                So lets pustulate a language where zero and 47 are both true.

                Stop, 0 is defined to being 'false'. You might use the Humpty-Dumpty-boolean-logic, but please lets not confuse others. *) Humpty appears in Lewis Carroll's 'Through the Looking-Glass', where he discusses semantics and pragmatics with Alice. "When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean -- neither more nor less." Among other things, he (mis-)explains the difficult words from Jabberwocky.


                Failure is not an option - it's built right in.

                1 Reply Last reply
                0
                • S Sylvester george

                  I found a piece of javascript code when i did a code review. I am just sharing with you function getState(radioButton) { if(radioButton.checked == true) return true else return false }

                  Regards, Sylvester G sylvester_g_m@yahoo.com

                  E Offline
                  E Offline
                  Erik Midtskogen
                  wrote on last edited by
                  #19

                  Tee-hee-hee. Hey, it's Javascript. You weren't expecting software engineering, were you?

                  1 Reply Last reply
                  0
                  • M Mauro Leggieri

                    In Visual Basic TRUE is -1... in most languages TRUE is 1. For e.g. if I call a C function in a dll from visual basic and the return value is a boolean you will have problems if you test the result against "true". Best regards, Mauro.

                    G Offline
                    G Offline
                    Guffa
                    wrote on last edited by
                    #20

                    Mauro Leggieri wrote:

                    in most languages TRUE is 1

                    One of the things I like about languages like Pascal and C# is that true is not a number at all, true is a true true. :)

                    --- single minded; short sighted; long gone;

                    1 Reply Last reply
                    0
                    • S Sylvester george

                      I found a piece of javascript code when i did a code review. I am just sharing with you function getState(radioButton) { if(radioButton.checked == true) return true else return false }

                      Regards, Sylvester G sylvester_g_m@yahoo.com

                      S Offline
                      S Offline
                      Sathesh Sakthivel
                      wrote on last edited by
                      #21

                      :laugh::laugh:

                      Regards, Satips.:rose: Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Walk beside me, and just be my friend. - Albert Camus

                      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