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. Points, Points Everywhere

Points, Points Everywhere

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharprubyvisual-studioquestion
11 Posts 7 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.
  • A Offline
    A Offline
    Argonia
    wrote on last edited by
    #1

    This little gem was found today in one class declaration thanks to Visual Studio Watch window. I was browsing one of the class members and i was stunned when i saw the window

    int m_cnt;
    CPoint m_points[50];

    Most of the cases are keeping around 4 - 10 max points. And i don't even know why exactly 50 ? Why not 100, or 500 or maybe more ... the more the merrier.

    B L V M 4 Replies Last reply
    0
    • A Argonia

      This little gem was found today in one class declaration thanks to Visual Studio Watch window. I was browsing one of the class members and i was stunned when i saw the window

      int m_cnt;
      CPoint m_points[50];

      Most of the cases are keeping around 4 - 10 max points. And i don't even know why exactly 50 ? Why not 100, or 500 or maybe more ... the more the merrier.

      B Offline
      B Offline
      Brisingr Aerowing
      wrote on last edited by
      #2

      So I guess 50 is rather.... (puts on sunglasses).... pointless.

      brisingr_aerowing@Gryphon-PC $ rake in_the_dough Raking in the dough brisingr_aerowing@Gryphon-PC $ make lots_of_money Making lots_of_money

      L 1 Reply Last reply
      0
      • B Brisingr Aerowing

        So I guess 50 is rather.... (puts on sunglasses).... pointless.

        brisingr_aerowing@Gryphon-PC $ rake in_the_dough Raking in the dough brisingr_aerowing@Gryphon-PC $ make lots_of_money Making lots_of_money

        L Offline
        L Offline
        Lutoslaw
        wrote on last edited by
        #3

        and... (puts on a black hat)... derivative. tee hee

        Greetings - Jacek

        1 Reply Last reply
        0
        • A Argonia

          This little gem was found today in one class declaration thanks to Visual Studio Watch window. I was browsing one of the class members and i was stunned when i saw the window

          int m_cnt;
          CPoint m_points[50];

          Most of the cases are keeping around 4 - 10 max points. And i don't even know why exactly 50 ? Why not 100, or 500 or maybe more ... the more the merrier.

          L Offline
          L Offline
          Lutoslaw
          wrote on last edited by
          #4

          Unused memory is a wasted memory, they said

          CPoint m_points[50];

          It will be fast, they said.

          Greetings - Jacek

          1 Reply Last reply
          0
          • A Argonia

            This little gem was found today in one class declaration thanks to Visual Studio Watch window. I was browsing one of the class members and i was stunned when i saw the window

            int m_cnt;
            CPoint m_points[50];

            Most of the cases are keeping around 4 - 10 max points. And i don't even know why exactly 50 ? Why not 100, or 500 or maybe more ... the more the merrier.

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

            50? Wait a sec.. A yes, 5 more years and I am there (Didn't think I was so old..) :)

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

            A 1 Reply Last reply
            0
            • V vonb

              50? Wait a sec.. A yes, 5 more years and I am there (Didn't think I was so old..) :)

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

              A Offline
              A Offline
              Argonia
              wrote on last edited by
              #6

              The project history stated its there since 2007 at least. I guess then they added the cvs system. The problem is that noone noticed this problem for 6 years :X

              V 1 Reply Last reply
              0
              • A Argonia

                The project history stated its there since 2007 at least. I guess then they added the cvs system. The problem is that noone noticed this problem for 6 years :X

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

                Can happen. Sometimes it makes sense to put a fixed array example:

                int[] iMonths = new int[11];

                Assuming it is 0 based..

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

                R J 2 Replies Last reply
                0
                • V vonb

                  Can happen. Sometimes it makes sense to put a fixed array example:

                  int[] iMonths = new int[11];

                  Assuming it is 0 based..

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

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

                  vonb wrote:

                  int[] iMonths = new int[11];

                  I hope that was a joke, or a typo!

                  "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
                  • V vonb

                    Can happen. Sometimes it makes sense to put a fixed array example:

                    int[] iMonths = new int[11];

                    Assuming it is 0 based..

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

                    J Offline
                    J Offline
                    johannesnestler
                    wrote on last edited by
                    #9

                    ;P if it's Zero based or not - the Count of elements you give should be 12 - or are you using a "Special" calendar?

                    V 1 Reply Last reply
                    0
                    • J johannesnestler

                      ;P if it's Zero based or not - the Count of elements you give should be 12 - or are you using a "Special" calendar?

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

                      I put away the month of August of course (usually holidays...) so 11. In case of salary should be 13. We have a 13th salary here. :)

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

                      1 Reply Last reply
                      0
                      • A Argonia

                        This little gem was found today in one class declaration thanks to Visual Studio Watch window. I was browsing one of the class members and i was stunned when i saw the window

                        int m_cnt;
                        CPoint m_points[50];

                        Most of the cases are keeping around 4 - 10 max points. And i don't even know why exactly 50 ? Why not 100, or 500 or maybe more ... the more the merrier.

                        M Offline
                        M Offline
                        MarkRHolbrook
                        wrote on last edited by
                        #11

                        The programmer has exactly 50 days left on his/her contract. Out door and wait for the frantic "It's broken call... please come fix it at 3x your previous rate!!!" Just a guess. We had a bug tracking system written some time ago that had a primary record holder delared something like DefectRecord Records[50]; Because he/she never thought anyone would have more than 50 defects to see at one time on a report. Guess they never ran into a project like the one I'm currently on.

                        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