in reply to Re^2: Element Count from Array to HoH
in thread Element Count from Array to HoH
As for your question above. Even though they have the same value, they should differ because it comes from different index (I1,I2).
I realize that, but given that in your description of the task indices are not mentioned, they can't be a basis for treating the two instances of TTAT differently.
A cardinal skill in programming (or any form of engineering for that matter) is knowing how to specify the task you are trying to solve. Many bugs are the result of incorrect or incomplete specification. Examples are useful to quickly convey the gist of your goal, but they are no substitute for a full specification.
How do you fully specify the task you are trying to accomplish? Apparently this is something that takes some practice, but to get in the right frame of mind you can begin by imagining that you are paying a lot of money to someone else for coding this thing, and therefore you have to make sure that you explain to him/her exactly what this thing needs to do, for otherwise you will be paying a lot of money with every round of revisions to the code's objectives.
Knowing how to spec software is a fundamental programming skill. Don't rely on the monks doing it for you, or you will never progress as a programmer.
the lowliest monk
|
|---|