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. Why...

Why...

Scheduled Pinned Locked Moved The Lounge
question
19 Posts 11 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.
  • M Offline
    M Offline
    Moykn
    wrote on last edited by
    #1

    I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

    Sorry, my english is bad!

    R D L M P 7 Replies Last reply
    0
    • M Moykn

      I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

      Sorry, my english is bad!

      R Offline
      R Offline
      Rage
      wrote on last edited by
      #2

      Looks like forgotten to reset "hard debugging changes".

      ~RaGE();

      I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

      A 1 Reply Last reply
      0
      • M Moykn

        I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

        Sorry, my english is bad!

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Just shake your head back and forth in disbelief and move on. Try not to think about the abominations you see in someone elses code because there are a LOT of them out there.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        M A 2 Replies Last reply
        0
        • D Dave Kreskowiak

          Just shake your head back and forth in disbelief and move on. Try not to think about the abominations you see in someone elses code because there are a LOT of them out there.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          M Offline
          M Offline
          Moykn
          wrote on last edited by
          #4

          I wish it was the worst... did you mind making pagination using a foreach and 2 counters?

          D 1 Reply Last reply
          0
          • M Moykn

            I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

            Sorry, my english is bad!

            M Offline
            M Offline
            Mark_Wallace
            wrote on last edited by
            #5

            Moykn wrote:

            Sorry, my english is bad!

            Not as bad as the language-use you reported.

            I wanna be a eunuchs developer! Pass me a bread knife!

            1 Reply Last reply
            0
            • M Moykn

              I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

              Sorry, my english is bad!

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

              That's not too bad. Bad, certainly, but I'm not impressed yet. You said this isn't the worst - what is?

              M 1 Reply Last reply
              0
              • L Lost User

                That's not too bad. Bad, certainly, but I'm not impressed yet. You said this isn't the worst - what is?

                M Offline
                M Offline
                Moykn
                wrote on last edited by
                #7

                harold aptroot wrote:

                That's not too bad. Bad, certainly, but I'm not impressed yet. You said this isn't the worst - what is?

                Quote:

                pagination using a foreach and 2 counters?

                1 Reply Last reply
                0
                • M Moykn

                  I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

                  Sorry, my english is bad!

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #8

                  Moykn wrote:

                  object.Property = true ? "1":"0";

                  Surely that's

                  object.Property == true ? "1" : "0";

                  I was brought up to respect my elders. I don't respect many people nowadays.
                  CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                  S P M 3 Replies Last reply
                  0
                  • D Dave Kreskowiak

                    Just shake your head back and forth in disbelief and move on. Try not to think about the abominations you see in someone elses code because there are a LOT of them out there.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak

                    A Offline
                    A Offline
                    Albert Holguin
                    wrote on last edited by
                    #9

                    Dave Kreskowiak wrote:

                    Try not to think about the abominations you see in someone elses code because

                    ....there's probably a lot in your code too... :-D

                    D 1 Reply Last reply
                    0
                    • A Albert Holguin

                      Dave Kreskowiak wrote:

                      Try not to think about the abominations you see in someone elses code because

                      ....there's probably a lot in your code too... :-D

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #10

                      Entirely possible! :laugh:

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak

                      M 1 Reply Last reply
                      0
                      • R Rage

                        Looks like forgotten to reset "hard debugging changes".

                        ~RaGE();

                        I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

                        A Offline
                        A Offline
                        Albert Holguin
                        wrote on last edited by
                        #11

                        Yeah, looks like debug code that's somehow stayed in the main repo...

                        1 Reply Last reply
                        0
                        • M Moykn

                          I wish it was the worst... did you mind making pagination using a foreach and 2 counters?

                          D Offline
                          D Offline
                          Dave Kreskowiak
                          wrote on last edited by
                          #12

                          Moykn wrote:

                          did you mind making pagination using a foreach and 2 counters?

                          <Hands over ears>LA LA LA LA LA LA I CAN'T HEAR YOU LA LA LA LA LA LA</Hands over ears>

                          A guide to posting questions on CodeProject[^]
                          Dave Kreskowiak

                          1 Reply Last reply
                          0
                          • P Pete OHanlon

                            Moykn wrote:

                            object.Property = true ? "1":"0";

                            Surely that's

                            object.Property == true ? "1" : "0";

                            I was brought up to respect my elders. I don't respect many people nowadays.
                            CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                            S Offline
                            S Offline
                            S Houghtelin
                            wrote on last edited by
                            #13

                            Pete O'Hanlon wrote:

                            Surely that's

                            object.Property == true ? "1" : "0";

                            You're correct, and don't call me Shirley! :)

                            It was broke, so I fixed it.

                            1 Reply Last reply
                            0
                            • D Dave Kreskowiak

                              Entirely possible! :laugh:

                              A guide to posting questions on CodeProject[^]
                              Dave Kreskowiak

                              M Offline
                              M Offline
                              Moykn
                              wrote on last edited by
                              #14

                              Totally agree I don't think myself as the best coder in the world, there's a lot i need to learn(a better english, for example).

                              1 Reply Last reply
                              0
                              • P Pete OHanlon

                                Moykn wrote:

                                object.Property = true ? "1":"0";

                                Surely that's

                                object.Property == true ? "1" : "0";

                                I was brought up to respect my elders. I don't respect many people nowadays.
                                CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                P Offline
                                P Offline
                                PIEBALDconsult
                                wrote on last edited by
                                #15

                                Looked OK to me. Silly, but OK.

                                1 Reply Last reply
                                0
                                • P Pete OHanlon

                                  Moykn wrote:

                                  object.Property = true ? "1":"0";

                                  Surely that's

                                  object.Property == true ? "1" : "0";

                                  I was brought up to respect my elders. I don't respect many people nowadays.
                                  CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                  M Offline
                                  M Offline
                                  Moykn
                                  wrote on last edited by
                                  #16

                                  nope.. what have to be done is set "property" not evaluate its value.

                                  Sorry, my english is bad!

                                  P 1 Reply Last reply
                                  0
                                  • M Moykn

                                    nope.. what have to be done is set "property" not evaluate its value.

                                    Sorry, my english is bad!

                                    P Offline
                                    P Offline
                                    Pete OHanlon
                                    wrote on last edited by
                                    #17

                                    Then that makes even less sense. So, this code is evaluating true and assigning the result back. Okey dokey.

                                    I was brought up to respect my elders. I don't respect many people nowadays.
                                    CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                    1 Reply Last reply
                                    0
                                    • M Moykn

                                      I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

                                      Sorry, my english is bad!

                                      A Offline
                                      A Offline
                                      AspDotNetDev
                                      wrote on last edited by
                                      #18

                                      Because this:

                                      valueReturn = (3 * 60).ToString();

                                      means 3 minutes, but this:

                                      valueReturn = "180";

                                      means the opposite.

                                      Thou mewling ill-breeding pignut!

                                      1 Reply Last reply
                                      0
                                      • M Moykn

                                        I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...

                                        Sorry, my english is bad!

                                        T Offline
                                        T Offline
                                        TheGreatAndPowerfulOz
                                        wrote on last edited by
                                        #19

                                        OMG! WTF??!! :omg: :wtf: :mad: :sigh: :(( :~ X|

                                        If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
                                        You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun
                                        Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein

                                        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