Freethought & Rationalism ArchiveThe archives are read only. |
07-12-2003, 07:58 AM | #81 | |||
Veteran Member
Join Date: Jan 2001
Location: USA
Posts: 1,072
|
Quote:
1) Contrary to what Principia asserted, my code was not spaghetti code. 2) Contrary to what Principia asserted, if is not in and of itself spaghetti code. 3) Improving code clarity by "wasting" a few CPU cycles or a few bytes of memory is considered, at least by some, to be good programming practice. Other points that Principia then reraised were dealt with as the thread progressed. Quote:
(1) Sophie's terribly misguided trashing warning. (2) Sophie's confusing contiguous memory as programmers use the term (note all of the quotes I marshalled to support my position) with the way that she interprets the concept, which is irrelevant to what I was stating. (3) For exampe, NialScorva's long dissertation about what havoc "MY" code causes even though the conditions he described did not pertain to MY code. Quote:
|
|||
07-12-2003, 08:16 AM | #82 |
Veteran Member
Join Date: May 2003
Location: On the road to extinction. . .
Posts: 1,485
|
GEE
Gee, DNAunion,
I guess we took over the thread, but you were concentrating too much on defending your precious work of art, that you were unable to suitably adjust. Bye for now. |
07-12-2003, 08:33 AM | #83 | |
Veteran Member
Join Date: Jan 2001
Location: USA
Posts: 1,072
|
Quote:
Yes, it’s a good thing that C# and other languages have moved to using only safe arrays, because there are thousands or millions of programmers out there that have accidentally overrun the bounds of an array. Not all of them catch their own errors as I did, though. Now, strong typing itself means only that the variable and its type must be declared before it can be used. In some languages, called loosely typed languages, a variable can be used without its ever having been assigned a type, or even declared, by the programmer. In fact, the type of data it stores can change during the execution of the program. It can store a date at one minute, a string at another, a boolean at yet another, and end up storing an integer. But in a strongly typed language, a variable must be declared and must be assigned a data type before it can be used, and any attempt to then assign a different type of data type value to it causes an error. Note that C++ is a strongly typed language even though it doesn’t (by default) implement safe arrays. Also, C++ will do some “interpreting” of values for you thereby circumventing, at least in some cases, the rule that a different data type cannot be assigned to a variable. For example, you can declare a variable as char myChar; and then assign an integer value to it, such as, myChar = 65;. So C++ is a strongly typed language, but does not necessarily perform strict type checking in the strongest sense of the term. PS: Notice I haven’t said that you are wrong in what you said, just that you weren’t precise enough. “Safe array” is the term for which you were looking. |
|
07-12-2003, 08:38 AM | #84 | ||
Veteran Member
Join Date: Jan 2001
Location: USA
Posts: 1,072
|
Quote:
Quote:
|
||
07-12-2003, 08:50 AM | #85 | |
Veteran Member
Join Date: Jan 2001
Location: USA
Posts: 1,072
|
Quote:
Let’s recap what people have done to my code: (1) What you did Sophie was issue a trashing warning on my code which I easily refuted. (2) What NialScorva did was “stuff code into my mouth” and then show what catastrophes his code could cause. (3) What Principia did was claim that I had written spaghetti code, which I showed not to be the case. (4) What I myself did was find the off-by-one error in my code. No, looks like I am the one debugging my code (as well as your guys’ responses!). PS: The only actual “bug” anyone other than I has found so far, at least that I can remember, is the one-tenth of one-percent bias built into my original pseudo-random number generating function (and even then the person who found it tried to sensationalize the problem, by substituting his own numbers in place of mine). PPS: And let me remind everyone that it is the Visual FoxPro program that was used by me to calculate the empirical probabilities I mentioned in the other thread, and, if anyone is going to criticize my programming abilities, they should stick to that original Visual FoxPro program -- and not my hastily created translation of it into C++ . |
|
07-12-2003, 09:03 AM | #86 | |
Veteran Member
Join Date: Jan 2001
Location: USA
Posts: 1,072
|
Quote:
Didn't you offer up that you were a professional in the field? How boastful of you. Didn't you repeatedly claim to be talking over my head? How self-applauding and self-congratulatory of you. |
|
07-12-2003, 09:19 AM | #87 | ||||
Veteran Member
Join Date: Jan 2001
Location: USA
Posts: 1,072
|
Quote:
Quote:
Quote:
I even provided a quote that demonstrated what I said. Quote:
|
||||
07-12-2003, 09:30 AM | #88 |
Veteran Member
Join Date: Jan 2001
Location: Median strip of DC beltway
Posts: 1,888
|
My first response to you (and further responses) were commenting on your statement that implied that it was no big deal to run past the end of an array by one element. So while I wasn't addressing anything specific in your code and was responding as a general commentary on the dangers of doing this, it wasn't exactly off topic or pointless.
|
07-12-2003, 09:31 AM | #89 |
Veteran Member
Join Date: May 2003
Location: On the road to extinction. . .
Posts: 1,485
|
DNAunion : you are explaining, but have just clarified what I was saying. The meta-representative. You r point seems pointless. Why bother?
Being a professional is not egotistic, but protecting your code to the degree you are, seems to indicate egotism. |
07-12-2003, 09:37 AM | #90 |
Moderator - Science Discussions
Join Date: Feb 2001
Location: Providence, RI, USA
Posts: 9,908
|
DNAunion and sophie, please drop the personal jabs.
|
Thread Tools | Search this Thread |
|