|
I don't think this is a question about English but about "Computerese".
A well known joke is that "Computer amateurs think 256 is a round number. Real computer guys consider 255 a round number - they count from zero."
Before computer guys took over the world, arrays could have any base. In Pascal, an array could run from index 1814 to 2050. Ordinary people could relate to it, e.g. as years. That reduced the importance of the Computer Guys, so they detested it. Even the Fortran style, where the first element of array a was a[1], was too obvious to Common Man, reducing the power of the Computer Guy. Luckily, base zero index won the war. (There is only a small problem left: What if there is no "zero" element, like in the calender? What happened in year 1 belongs in eventsOfYear[1], but what about eventsOfYear[0]? That year never existed! Year -1 was immediately followed by year 1! ... Fortunately, the Unix epoch doesn't apply to historic dates!)
Yet, there is a question of where "every 10th" is counted from: Is the "first" (or zeroth, if you like) every tenth element the one with the lowest index, the one with the tenth lowest index, or the one ten above the lowest index? If we had had a quantum computer, it could have provided all three results, with varying degrees of probability/validity.
|
|
|
|
|
Even early FORTRAN compilers used the trick of using address of A(n) as being (address of fictitious A(0)) + (n * width of data type of A); or as the literature of the day put it (address of A(1)) + (n - 1) * (width of data type A)
[historical note: versions of FORTRAN prior to 1977 only had uppercase variable name and all versions used '(' and ')', not '[' and ']'; but that doesn't affect the validity of what I am saying]
|
|
|
|
|
The first computer I played around with at the instruction level had an instruction "MIX3" to decrement the accumulator by one and then multipy by 3. This was a 16-bit mini (PDP-11 class) with a 48 bit floating point format, 3 words (memory was not byte adressable). The instruction was tailor made for Fortran, to calculate the offset from the start of a 1-based float array of element "n" - just like you describe, but with a fixed element width of 3 words.
|
|
|
|
|
#1 is the way I would interpret the question. (English speaker)
"Go forth into the source" - Neal Morse
|
|
|
|
|
I know that you're a long time member Nelek, and I certainly don't have as high a reputation as you, so I can't help wondering:
At what rep point value should I start posting my programming questions in the Lounge instead of QA as well?
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
Johnny J. wrote: At what rep point value should I start posting my programming questions in the Lounge instead of QA as well
When you're above OG.
On the other hand, I see this more as a philosophical question about counting vs indexing (it's amazing how many people are mixing those up) rather than programming.
|
|
|
|
|
Johnny J. wrote: I know that you're a long time member Nelek and, I certainly don't have as high a reputation as you 1)You longer than me
2a) There is only a difference of 25k between you and me, so no that much to deserve this kind of ironic comment
2b) If you want it, you can have all my reputation added to yours. It is not going to bring food to my table or give me a rise at work, so all yours.
Johnny J. wrote: so I can't help wondering:
At what rep point value should I start posting my programming questions in the Lounge instead of QA as well? And I can't help but wondering:
if you see that as a programming question, do you need glasses?
The question was (simplified for you):
Does the english sentence "every 10th" imply that you have to start in the first one?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
modified 13-Mar-20 11:49am.
|
|
|
|
|
Let's put it this way: Imagine the state you live in chose to simplify taxes, and told all people to line up. Then, with everyone in place, they say: "This year, we will require one tenth of your total income as taxes. To simplify the procedure, every tenth person should give us all their income, and everyone else can go."
Now, if you ask the people, I'm sure almost all will agree that the 10th must pay, not the first. After all, that is exactly what the politicians said.
But, if you ask the authorities, they'll say differently, because then they're in danger of ending up short in cash: If there are 99 lined up, and only 9 would pay, there wouldn't be enough taxes collected; in an extreme case, there are only nine people lined up, and no taxes collected. Therefore, the authorites will demand that for every group of 10 people or less, the first should pay.
Of course the authorities' stance - as so often - doesn't correspond to what the politicians said...
So, to answer your question:
The correct answer is #1, but the politicians stating the task actually meant #2.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
I hope no politicians are reading this and getting stupid ideas.
|
|
|
|
|
Just make sure you are third to eighth and you'll be happy.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Stefan_Lang wrote: If there are 99 lined up, They will change the law and say every 5th has to pay. This way they get 19 people's earnings
And try to sell it as it was for our good
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Conventional usages aren't logical, they are conventional. On Thursday, to most people 'next Saturday' means 'Saturday of next week', 9 days away, not 'the next Saturday' which would be 'day after tomorrow'.
The conventional usage here is that 'every tenth' means 'the first and every tenth following'. Being stated using an assumed shared convention rather than a precise definition is one continuing devilment of software requirements.
|
|
|
|
|
Member 14772340 wrote: o most people 'next Saturday' means 'Saturday of next week', 9 days away, not 'the next Saturday' which would be 'day after tomorrow'. Not for me.. if I want to have the 9 days gap I say "Saturday of next week" because "next saturday" is the first one that comes from now on, that is the day after tomorrow.
Member 14772340 wrote: The conventional usage here is that 'every tenth' means 'the first and every tenth following'. And this "language" or "people" aspect was exactly what I wanted to know.
Most of the answers here were against the "conventional usage" though.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
im just gonna write these out to see the differences
What you doing Saturday
What you doing this Saturday
What you doing next Saturday
What you doing the Saturday after nexts
What you doing Saturday next week
What you doing next weekend
How was last weekend
How was the weekend
|
|
|
|
|
Supposing we are on Thursday:
maze3 wrote: What you doing Saturday #1a
What you doing this Saturday #1a
What you doing next Saturday #1b
What you doing the Saturday after nexts #2
What you doing Saturday next week #2
What you doing next weekend #1
How was last weekend #3
How was the weekend #3 Grouped by same meaning for me.
1a and 1b possiblity to be different if and only if they are asked in the same context one after another.
Even in that case, I would go for "What are you doing this/next Saturday? And the following?"
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
At what time of the day, on which day, does "next Saturday" skip one week ahead? If I ask you on one Saturday, "What will you be doing next Saturday?", is it 7 or 14 days ahead? If I ask you on Sunday night when I leave your mountain cabin, is "next Saturday" 6 or 13 days ahead?
On Thursday, as you assume, most people will not be in doubt. Maybe not even on Wednesday. Tuesday? Not quite as certain. Monday even less. Sunday: Maybe things have flipped then (or rather: not yet flipped one week ahead).
"Saturday after next" is quite obvious, but "Saturday next week" depends on the culture on a Sunday. In my childhood, Sunday was the last day of the week, making "Saturday next week" 6 days ahead. At some point (maybe 30-35 years ago) it was changed so that Sunday is the first day of the week. Saturday this week is 6 days later, Saturday next week is 13 days later. The calender setup in Windows allows defining Sunday as the last day of the week, indicating that some cultures still stick to the conventions of my childhood.
Bottom line: Anyone claiming that there is a clear cut, unambiguous answer to this, is narrowminded and ignorant of other cultures.
|
|
|
|
|
Member 7989122 wrote: "What will you be doing next Saturday?", is it 7 or 14 days ahead? If I ask you on Sunday night when I leave your mountain cabin, is "next Saturday" 6 or 13 days ahead? In your example, for me 7 or 6. Even saying Saturday next week (being today saturday or sunday) would still be 7 or 6 days.
Member 7989122 wrote: In my childhood, Sunday was the last day of the week, making "Saturday next week" 6 days ahead. Still the same for me.
Member 7989122 wrote: At some point (maybe 30-35 years ago) it was changed so that Sunday is the first day of the week. Saturday this week is 6 days later, Then yes you are right.
Anyways... in the moment I think there can be missunderstandings I just ask for confirmation with a date.
- Can you pick me up next saturday night?
- the 8th or the 15th?
This way... it doesn't matter.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
When broken down, this is a good intro to programming questions.
Nelek wrote: in an array
This indicates that an array is being used.
Most arrays are zero based.
Quote: Display every 10th number
To get your mind around this concept might be similar to that the length of an array can be 10, but the last position in the array is 9.
And as others pointed out. a[0] should not be expected in the output. Unless modulo was part of the previous discussions, and the person that wrote the question assumed and mixed up "a%10 == 0" being a possible solution, should be corrected.
|
|
|
|
|
maze3 wrote: And as others pointed out. a[0] should not be expected in the output. Unless modulo was part of the previous discussions, and the person that wrote the question assumed and mixed up "a%10 == 0" being a possible solution, should be corrected. That was my point of the comments in that question. But seeing that there were more people thinking the same (or having the same error)... is when I thought maybe is different meaning for english natives and the point of this question.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
maze3 wrote: Most arrays are zero based. You mean, like in Fortan? 1-based. Pascal? Arbitrary base. ALGOL? Arbitrary base CHILL, aka ITU Z.200? Arbitrary base. What about APL, the ultimate array language? 1-based.
Or anywere outside the programming world? If you are guided to take the third row to the right, do you then count: Road zero, road one, ...? If your coworker tells that is first child is named John, do you then ask what his oldest one is named? If you are asked to bring a message to the second person from the left, do you then count: 0, 1, 2 to decide who to deliver the message to? Do you often see books paginated from zero? Parking lots or apartments numbered from zero?
Outside the C class of programming languages, arrays, sequences and related phenoena are pratically always either 1-based or arbitrarily based.
There is one exception that I learned when working on a project with Korean participants: While our age concept is based on the number of years you have completed - you are not one year old until you have completed a full year (0-based). Koreans count the year you are in: From birth, you are in your first year (1-based). And since they also count moon years, not sun years, if you ask for their age, they may have to think for a couple of seconds to calculate their age in Western terms. (Note: With 50+ million people, there may be differenc subcultures with different traditions - I am referring to what was explained to me by those active on this project).
You could also count time as zero based: Until an hour has passed since midnight, you do not call it "hour one". At that time, most of us are asleep, so we don't care that much. But note that even in AM/PM cultures, we do not like the zero base, but refer to 12:30 PM, even though in a 0-base time we really ought to refer to it as 0:30 PM
|
|
|
|
|
Does an ice cap make your head cold?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Who snows if that's true? It's beanie long time since it was cold enough around here. I'd ask the Mrs., but I'd ad-vizor to think carefully about it.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
what color ice?
a cold head may not be the worst of it.
pestilence [ pes-tl-uh ns ] noun
1. a deadly or virulent epidemic disease. especially bubonic plague.
2. something that is considered harmful, destructive, or evil.
Synonyms: pest, plague, people
|
|
|
|
|
Meth you really ask? It's crystal clear, of course!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
ahh, 'snow very obvious
pestilence [ pes-tl-uh ns ] noun
1. a deadly or virulent epidemic disease. especially bubonic plague.
2. something that is considered harmful, destructive, or evil.
Synonyms: pest, plague, people
|
|
|
|
|