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. Being bad at math

Being bad at math

Scheduled Pinned Locked Moved The Lounge
questioncsharpdatabasewpfcom
73 Posts 33 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.
  • E Ennis Ray Lynch Jr

    And just what would you expect to happen if you applied and even row style to a list?

    cpkilekofp wrote:

    You need to distinguish between the ordinal occurrence of a an object in a sequence and its index label. Proper classification allows proper prediction of behavior.

    Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

    C Offline
    C Offline
    cpkilekofp
    wrote on last edited by
    #61

    Ennis Ray Lynch, Jr. wrote:

    And just what would you expect to happen if you applied and even row style to a list?

    Using the package you've described, I'm not applying it to a "list", I'm applying it to the published interface of the indexed sequence exposed by the package. Its underlying implementation can be a list, array, database table structure, binary tree, or WHATEVER. The minute you try to apply "common sense" to how an interface should be used, you have lost the battle. You are using ALTERNATING styles, which the documentor of the interface has decided to label "even" or "odd". Don't get hung up on the terminology used by the documentor - the important thing to find out is which property needs to be set to apply the style to which set of rows in the alternates. Your argument is with the documentor, not with the programmer.

    E 1 Reply Last reply
    0
    • C cpkilekofp

      Ennis Ray Lynch, Jr. wrote:

      And just what would you expect to happen if you applied and even row style to a list?

      Using the package you've described, I'm not applying it to a "list", I'm applying it to the published interface of the indexed sequence exposed by the package. Its underlying implementation can be a list, array, database table structure, binary tree, or WHATEVER. The minute you try to apply "common sense" to how an interface should be used, you have lost the battle. You are using ALTERNATING styles, which the documentor of the interface has decided to label "even" or "odd". Don't get hung up on the terminology used by the documentor - the important thing to find out is which property needs to be set to apply the style to which set of rows in the alternates. Your argument is with the documentor, not with the programmer.

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #62

      Sometimes I don't even know why I bother.

      Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      C 1 Reply Last reply
      0
      • R Russell Jones

        Mathematically the first row should have a style all of its own as Zero can't really be classed as either odd or even. It would make sense to style it as even though so that it had the contrasting style to row 1. Of course if you're going to allow the user a choice of what to do then you may end up asking the user what colour you want for the first third and fifth row etc and then set that to the even row style behind the scenes.

        S Offline
        S Offline
        samuelms
        wrote on last edited by
        #63

        Instead of thinking of rows as being either even or odd, why not call them "RowStyle" and "AlternatingRowStyle" similar to microsoft's asp .net gridview. Now I'm not not promoting microsoft or it's gridview, I just agree with the naming convention.

        1 Reply Last reply
        0
        • E Ennis Ray Lynch Jr

          Sometimes I don't even know why I bother.

          Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

          C Offline
          C Offline
          cpkilekofp
          wrote on last edited by
          #64

          oh...were you joking? Frankly, after thirty years programming at various times in both C and Basic, I got so sick of the zero vs. one first-index debates that I'm worn out on the topic and tend simply to respond reflexively. Your question is simply another form of this argument. Turning your last statement back at you, on this particular topic I don't know why you bother, either.

          E 1 Reply Last reply
          0
          • C cpkilekofp

            oh...were you joking? Frankly, after thirty years programming at various times in both C and Basic, I got so sick of the zero vs. one first-index debates that I'm worn out on the topic and tend simply to respond reflexively. Your question is simply another form of this argument. Turning your last statement back at you, on this particular topic I don't know why you bother, either.

            E Offline
            E Offline
            Ennis Ray Lynch Jr
            wrote on last edited by
            #65

            To define an algorithm that operates in a non-deterministic manner based on the language and/or libraries used is clearly flawed. (excepting algorithms whose purpose is to be non-deterministic) Using the index of an array to determine the cardinality of the members is ludicrous. In any event, if I asked an employee to highlight the first row of a document and he or she highlighted the second row and tried to argue any justification I would fire them on the spot.

            Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            C 1 Reply Last reply
            0
            • P pg az

              Rama Krishna Vavilala wrote:

              Users don't think in terms of zero-th row

              I have only begun reading "GUI Bloopers 2.0", but it's clear that 'Interfaces must be in the end-user's mental model' is a major obsession with the author. Personally I would not take it quite so far, if there are certain technical terms which are worth their weight, better to teach the terms than talk around them. Of course I agree, if the GUI labels the top row as 1, it must be odd. This could be an argument for relabeling the top-row as zero at the end-user-interface, end-users ought to be able to cope with that.

              pg--az

              D Offline
              D Offline
              DragonsRightWing
              wrote on last edited by
              #66

              I think you give end-users way too much credit! Having moved into programming from tech support, my experience is that many users are stumped by the power switch! Asking them to comprehend a zero-based array/list would be similar to asking a giraffe to design a particle accelerator!

              P 1 Reply Last reply
              0
              • E Ennis Ray Lynch Jr

                To define an algorithm that operates in a non-deterministic manner based on the language and/or libraries used is clearly flawed. (excepting algorithms whose purpose is to be non-deterministic) Using the index of an array to determine the cardinality of the members is ludicrous. In any event, if I asked an employee to highlight the first row of a document and he or she highlighted the second row and tried to argue any justification I would fire them on the spot.

                Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                C Offline
                C Offline
                cpkilekofp
                wrote on last edited by
                #67

                Yes, but realistically, how are you going to get the opposing camps to agree? Besides, you CONTINUE to confuse "first" with "item with index of 1". "Odd" and "even" obviously refer to characteristics of the value of the index, not the value of the cardinality. Get used to it - every interface in .NET and Java use zero-based indices. As for your scenario, why are you insisting that programming interfaces follow the rules of conversational discourse?? That is truly absurd.

                E 1 Reply Last reply
                0
                • C cpkilekofp

                  Yes, but realistically, how are you going to get the opposing camps to agree? Besides, you CONTINUE to confuse "first" with "item with index of 1". "Odd" and "even" obviously refer to characteristics of the value of the index, not the value of the cardinality. Get used to it - every interface in .NET and Java use zero-based indices. As for your scenario, why are you insisting that programming interfaces follow the rules of conversational discourse?? That is truly absurd.

                  E Offline
                  E Offline
                  Ennis Ray Lynch Jr
                  wrote on last edited by
                  #68

                  Again, just not worth it.

                  Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                  1 Reply Last reply
                  0
                  • D DragonsRightWing

                    I think you give end-users way too much credit! Having moved into programming from tech support, my experience is that many users are stumped by the power switch! Asking them to comprehend a zero-based array/list would be similar to asking a giraffe to design a particle accelerator!

                    P Offline
                    P Offline
                    pg az
                    wrote on last edited by
                    #69

                    DragonsRightWing wrote:

                    Having moved into programming from tech support, my experience is that many users are stumped by the power switch! Asking them to comprehend a zero-based array/list would be similar to asking a giraffe to design a particle accelerator!

                    (a) Without doubt you've got a point there, and historically I have a tendency to make mistakes in that direction. I have great respect for anyone with tech-support background, it's really quite a difficult job. (b) I like Cooper's take on 'Idioms - the future of UI design', which is sprinkled throughout "About Face 2.0". He points out that bending-over-backwards to write software in terms of user's existing vocabulary is a mistake "General Magic" among others made, to their cost. TRUE Star Trek's Scotty might have tried to use a mouse as a microphone, but the real question is, does the benefit outweigh the cost. New idioms CAN be worth-it, and like Cooper says, our brains are wired to accomodate lots of idioms which even usually lack grand-unifying-principles - he cites examples from the English language. (c) on the one hand, on the other hand, on the "Gripping Hand"( Niven + Pournelle )... Jef Raskin's "The Humane Interface" so rightly obsesses on the disaster of INCONSISTENCY, when autopilot-style-habits have been formed. He chats about having crashed model-aircraft when a "modal" switch happened to be in the wrong position, vs his habits. This reinforces my initial opinion that because 1 and 3 are odd, well they just have to be - to begin the table at row-zero would maintain CONSISTENCY, while to call row#1 "even" makes my head hurt. (d) Summary - new Idioms ok, but inconsistency must be avoided.

                    pg--az

                    modified on Saturday, May 9, 2009 9:39 PM

                    D 1 Reply Last reply
                    0
                    • P pg az

                      Naruki wrote:

                      Wikipedia has a whole page devoted to the topic

                      "5/7/09, is one of only six this century that will feature three consecutive odd numbers." -- Math Buffs Awed By Odd Day curious synchronicity, it does not seem the original post was deliberately intended to intersect with this anomaly.

                      pg--az

                      J Offline
                      J Offline
                      JohnNawrocki
                      wrote on last edited by
                      #70

                      Having grown up in the IBM assembler world I actually have trouble with 1 based indices. But if we take any number, say 25, and examine the set {1,25,625,390625} we know that member is the next power of 25 starting with, not 1, but 0. So I thing that says something for 0(zero) based indices.

                      John Nawrocki Chief Technical Advisor Custom Molded Products

                      P 1 Reply Last reply
                      0
                      • P pg az

                        DragonsRightWing wrote:

                        Having moved into programming from tech support, my experience is that many users are stumped by the power switch! Asking them to comprehend a zero-based array/list would be similar to asking a giraffe to design a particle accelerator!

                        (a) Without doubt you've got a point there, and historically I have a tendency to make mistakes in that direction. I have great respect for anyone with tech-support background, it's really quite a difficult job. (b) I like Cooper's take on 'Idioms - the future of UI design', which is sprinkled throughout "About Face 2.0". He points out that bending-over-backwards to write software in terms of user's existing vocabulary is a mistake "General Magic" among others made, to their cost. TRUE Star Trek's Scotty might have tried to use a mouse as a microphone, but the real question is, does the benefit outweigh the cost. New idioms CAN be worth-it, and like Cooper says, our brains are wired to accomodate lots of idioms which even usually lack grand-unifying-principles - he cites examples from the English language. (c) on the one hand, on the other hand, on the "Gripping Hand"( Niven + Pournelle )... Jef Raskin's "The Humane Interface" so rightly obsesses on the disaster of INCONSISTENCY, when autopilot-style-habits have been formed. He chats about having crashed model-aircraft when a "modal" switch happened to be in the wrong position, vs his habits. This reinforces my initial opinion that because 1 and 3 are odd, well they just have to be - to begin the table at row-zero would maintain CONSISTENCY, while to call row#1 "even" makes my head hurt. (d) Summary - new Idioms ok, but inconsistency must be avoided.

                        pg--az

                        modified on Saturday, May 9, 2009 9:39 PM

                        D Offline
                        D Offline
                        DragonsRightWing
                        wrote on last edited by
                        #71

                        I'm a bit of an "odd duck" as programmers go - I'm quite gregarious, and highly service-oriented: not the stereotypical socially-inept geek! Of course, stereotypes (like rules?) are meant to be broken ... Thanks for the reminder of that ST4 scene! Always loved that one :-) Using the end-user's existing vocabulary should be a consideration, but certainly not the only one - in many cases, that will lead to ridiculously complex user processes just do perform some new function - I think you hit it on the head with the idea that inconsistency is what should be avoided - silly things like reversing the order of the OK and Cancel buttons on a dialog can be devastating! I once (back about '98 - '99) looked at a piece of software that did exactly that - the Cancel was on the left of the dialog, with the OK button just to it's right - needles to say, I did not buy that package! That kind of inconsistency flies in the face of years of habit, and will be a huge problem - and in the case of commercial software is likely to lead to dismal sales: for internal software the only slightly less damaging "resistance to use" is likely to result.

                        1 Reply Last reply
                        0
                        • J JohnNawrocki

                          Having grown up in the IBM assembler world I actually have trouble with 1 based indices. But if we take any number, say 25, and examine the set {1,25,625,390625} we know that member is the next power of 25 starting with, not 1, but 0. So I thing that says something for 0(zero) based indices.

                          John Nawrocki Chief Technical Advisor Custom Molded Products

                          P Offline
                          P Offline
                          pg az
                          wrote on last edited by
                          #72

                          Welcome to CodeProject ... your "Having grown up" cued me to examine your profile, but, this is your very first message so no help there !

                          JohnNawrocki wrote:

                          power of 25 starting with, not 1, but 0. So I thing that says something for 0(zero) based indices.

                          For me "power" does not fall into the same mental bucket as "subscripting". I agree that since log( 0.1 * 10 ) = log( 0.1 ) + log( 10 ) = -1 + 1 = 0 therefore anything raised to the zero-power has to be 1. But still this is not the same as indexing, itsa different topic, at least the way it sorts out in my head.

                          pg--az

                          J 1 Reply Last reply
                          0
                          • P pg az

                            Welcome to CodeProject ... your "Having grown up" cued me to examine your profile, but, this is your very first message so no help there !

                            JohnNawrocki wrote:

                            power of 25 starting with, not 1, but 0. So I thing that says something for 0(zero) based indices.

                            For me "power" does not fall into the same mental bucket as "subscripting". I agree that since log( 0.1 * 10 ) = log( 0.1 ) + log( 10 ) = -1 + 1 = 0 therefore anything raised to the zero-power has to be 1. But still this is not the same as indexing, itsa different topic, at least the way it sorts out in my head.

                            pg--az

                            J Offline
                            J Offline
                            JohnNawrocki
                            wrote on last edited by
                            #73

                            We just see indexing in different ways. You think about rows and columns. I think, about indexing thru an array. Before starting, I have gone no where in the array and therefore are at location zero. One thing I'll agree with, the fact that anything to the zero power equals one really has nothing to do with indexing; then there is 0 to the 0 power... Zero to any power is zero, yet anything to the zero power is one. A conundrum pondered by many.

                            John Nawrocki Chief Technical Advisor Custom Molded Products

                            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