Being bad at math
-
I understand that I'm hamster like in my behavior, but really, telling me that I'm fat by comparing a hamster to a guinea pig...? :(
If the post was helpful, please vote! Current activities: Book: The Gods Themselves by Isaac Asimov Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
No, no, no. I was not saying you were like a guinea pig, only that I was using you like one. I was trying to reproduce a problem that I was having in the programming fora, where after replying to a post, I could no longer select other messages. Needless to say, I could not reproduce it. So you were even useless as a guinea pig! :laugh: :laugh: :laugh:
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
Userland options should be written to reflect userland expectations. The first row is 1. If the setting is something that can only be changed by editing the registry key
HKLM\oh\my\god\worse\than\failure\all\is\not\dead\that\eternal\lies\row_style
using zero for the first row isn't an issue in and of itself. You've got other far more serious problems anyway. :rolleyes:It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
-
1 is odd. 0, 2, 4, 6 ... eleventyfour are even.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
My daughter has a DVD that is a pseudo-telling of 'The Lord of the Rings' called 'Lord of the Beans'. Bilbo's equivalent is celebrating his 'twelvetytwoth' birthday. So, in Middle Earth, eleventyfour is perfectly reasonable. But, more to the point, while the indices may start at 0 internally, visually, the first row displayed should be considered odd. Tim
-
Which odd rows? The displayed odd rows? That would be wrong. Or the rows which internally have odd indices, but which are displayed as even rows? That should be correct. I would think of it as the grid/list/whatever could have a line number (displayed at the left). The line numbers would be one-based. Which lines are getting the even-style?
If I set the even style then the first, third, fifth, etc rows are being styled based on my settings. Which in my opinion is incredibly retarded. It should have been obvious that the item at index zero is the first item. I am starting to believe that modern programmers may not even know why arrays start at 0 anymore. (Ironically it was to make the math easier).
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
-
My daughter has a DVD that is a pseudo-telling of 'The Lord of the Rings' called 'Lord of the Beans'. Bilbo's equivalent is celebrating his 'twelvetytwoth' birthday. So, in Middle Earth, eleventyfour is perfectly reasonable. But, more to the point, while the indices may start at 0 internally, visually, the first row displayed should be considered odd. Tim
Visually the first row should be considered odd, but mathematically 0 is the first positive even number, so if the first row shown is the zeroeth one it is both odd, as the first row, and even because it it is the zeroeth index. This anomaly is likely to cause a rift in the space-time continuum resulting in a Divide by Something or Other Exception.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
If we consider the binary number representation it is SO obvious that the zero row is even. The fastest way to check if some number is odd or even is:
bool IsOdd = (RowNumber & 1);
Hence, because zero is 0x00000000 and two is 0x00000010 the both are odd numbers.
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
-
If I set the even style then the first, third, fifth, etc rows are being styled based on my settings. Which in my opinion is incredibly retarded. It should have been obvious that the item at index zero is the first item. I am starting to believe that modern programmers may not even know why arrays start at 0 anymore. (Ironically it was to make the math easier).
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
You're right; send them a scathing bug report.
-
Visually the first row should be considered odd, but mathematically 0 is the first positive even number, so if the first row shown is the zeroeth one it is both odd, as the first row, and even because it it is the zeroeth index. This anomaly is likely to cause a rift in the space-time continuum resulting in a Divide by Something or Other Exception.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
That's not a math question, it's a UI question. The first row should be determined from the standpoint of the user, so it should be odd, regardless of how it is implemented under the hood. Do you care that Intel handles integers in little endian format while Motorola handles them in big endian format? Not as long as you get the right answer in the end(ian).
m.bergman
-- For Bruce Schneier, quanta only have one state : afraid.
-
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
What do you mean by first? rows[1] (which is the 1-st row) or rows[0] (there are no rows before this)? I think row[0] should be even, and row[1] odd, because that would fit with the usual modulo math. But I think you should call the row rows[0] the zeroth row, because "first" is ambiguous.
-
What do you mean by first? rows[1] (which is the 1-st row) or rows[0] (there are no rows before this)? I think row[0] should be even, and row[1] odd, because that would fit with the usual modulo math. But I think you should call the row rows[0] the zeroth row, because "first" is ambiguous.
Saying the first element in an array is an unambiguous statement. "On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage
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
-
Saying the first element in an array is an unambiguous statement. "On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage
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
-
Henry Minute wrote:
eleventyfour
I'd love to know how to render that in digits! :-D
If the post was helpful, please vote! Current activities: Book: The Gods Themselves by Isaac Asimov Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
Mustafa Ismail Mustafa wrote:
Henry Minute wrote: eleventyfour I'd love to know how to render that in digits! Big Grin
0xB4 :cool:
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
-
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
How do you know there is a first row? ;)
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
I understand that I'm hamster like in my behavior, but really, telling me that I'm fat by comparing a hamster to a guinea pig...? :(
If the post was helpful, please vote! Current activities: Book: The Gods Themselves by Isaac Asimov Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
Mustafa Ismail Mustafa wrote:
I understand that I'm hamster like in my behavior, but really, telling me that I'm fat by comparing a hamster to a guinea pig...?Frown
:laugh: :laugh: :laugh: :laugh: :laugh:
// Steve McLenithan
-
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
First row is definitely odd. 0 based indexes should rarely make it to end-user land.
-
Saying the first element in an array is an unambiguous statement. "On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage
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
"First" could mean many things in different contexts. As I recall, in Pascal, you can define an array in which the first index is -5 (for example). Which is why I say zeroth and oneth (or negative-fiveth) instead.
-
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.
-
Russell Jones wrote:
as Zero can't really be classed as either odd or even
How not? I assume the "official" definition is the modulus 2, or somethign equivalent to it.
Don't attribute to stupidity what can be equally well explained by buerocracy.
My latest article | Linkify!| FoldWithUs! | sighist -
Zero based indexes seem to be kicking programmer's A**es even today. I am recently using a software package that allows row styles to be applied for even and odd rows. If you apply an even style the 1st, 3rd, 5th, ... row receives the style instead of the correct row 2, 4, 6 etc. It would seem to me that the programmer that designed the underlying code used the index of a zero based index to determine if the row was even or odd. So let me pose this question: Do you think the first row should be considered even or odd?
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
Despite being indexed with zero, there really is not a 'zeroth' row. The FIRST row has an index of zero. So, the question is, should the term 'Even Rows' apply to the row or its index? Debate all you want - but I would wager that the majority of implementations, and the majority of technical and non technical people, when presented with a list, would count the first row as one and, therefore, odd. So the implementation you are using is, I'd say, non standard and confusing. Which one is it?
___________________________________________ .\\axxx (That's an 'M')