FRDB Archives

Freethought & Rationalism Archive

The archives are read only.


Go Back   FRDB Archives > Archives > IIDB ARCHIVE: 200X-2003, PD 2007 > IIDB Philosophical Forums (PRIOR TO JUN-2003)
Welcome, Peter Kirby.
You last visited: Today at 05:55 AM

 
 
Thread Tools Search this Thread
Old 07-15-2003, 06:52 PM   #121
Veteran Member
 
Join Date: Jan 2001
Location: USA
Posts: 1,072
Default Re: Re: Re: Re: Re: if you were boss

DNAunion: Principia flubbed it BOTH ways!


Quote:
Principia: 2) Manually, the items were added from indices 0 to 999. But Plan ranges from 1 to 999. Gee, DNAunion, where did you learn to count?
DNAunion: Uhm, "Plan" is also 0-based.

Code:
The code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>GREETINGs by Sophie </title>
<link type="text/css" rel="stylesheet" href="http://www.notrich.org/GREETING/greeting.css">


<script language="JavaScript1.2">
var PLANPic = new Array() ;
PLANPic[0] = 'http://www.notrich.org/ANIMATION/PLAN2.jpg' ;
PLANPic[1] = 'http://www.notrich.org/ANIMATION/PLAN1.jpg' ;

var PLANrc ;
var PLANj = 0 ;
var PLANp = PLANPic.length ;

var PLANpreLoad = new Array() ;
for (i = 0; i < PLANp; i++){
PLANpreLoad[ i ] = new Image() ;
PLANpreLoad[ i ].src = PLANPic[ i ] ;
}

var PLANspeed = new Array() ;
PLANspeed[0] = 300 ;
PLANspeed[1] = 240 ;
PLANspeed[2] = 180 ;
PLANspeed[3] = 140 ;
PLANspeed[4] = 50 ;
PLANspeed[5] = 130 ;
PLANspeed[6] = 183 ;
PLANspeed[7] = 130 ;
PLANspeed[8] = 50 ;
PLANspeed[9] = 321 ;
PLANspeed[10] = 440 ;
PLANspeed[11] = 500 ;

var LANspeed = new Array() ;
LANspeed[0] = 6 ;
LANspeed[1] = 3 ;
LANspeed[2] = 5 ;
LANspeed[3] = 1 ;
LANspeed[4] = 8 ;
LANspeed[5] = 2 ;
LANspeed[6] = 7 ;
LANspeed[7] = 2 ;
LANspeed[8] = 11 ;
LANspeed[9] = 2 ;
LANspeed[10] = 4 ;
LANspeed[11] = 4 ;
DNAunion: So whichever of Sophie’s programs (the original "PLAN" one or the updated one) we look at we see that the arrays were 0-based.

Principia flubs it no matter how you look at it.
DNAunion is offline  
Old 07-15-2003, 07:23 PM   #122
Veteran Member
 
Join Date: Jan 2001
Location: USA
Posts: 1,072
Default Re: Re: Re: Re: Re: Re: if you were boss

DNAunion: <sigh> Principia still can’t fight a fair battle.

Quote:
Principia:

EDIT: So here's more hypocrisy:
DNAunion: Nope, you show no hypocrisy on my part. Of course, the way you intentionally massage my statements and other details it does appear that hypocrisy exists, but that’s just an illusion you craft.

Quote:
Principia:

******************************
DNAunion [concerning Sophie’s code]:
(1) has an extra, unneeded array
(2) actually has more lines of code
(3) suffers from decreased clarity due to splitting of logic
(4) executes slightly slower due to having to handle each image name/reference twice
(5) uses more memory due to having to store each image names/references twice
*****************************

Yet, when I pointed out similar mistakes to DNAunion, above:
DNAunion: First, let’s get some facts straight. Did you point out that I had an extra, unneeded array? Nope. Did you point out that the clarity of my code suffered because I split logic? Nope. The only one you actually mentioned was that my program had unneeded lines of code.

Oh, and the first one you show below and claim is unneeded was put in there for flexibility, as the code makes clear, and as I have already explained to you.

Now that I corrected Principia’s error on that, we can continue where we left off…Principia was just about to quote from my code.

Quote:
DNAunion:
Code:
// Pull a single tile out of the urn
nFoundOne = 0;
while (nFoundOne == 0)
{
	nIndex = (int) GetRandomNumber(0, nLetteredTiles - 1);
	if (nDiscardTilesOnceChosen == 0)
	{
		// Doesn't matter if the tile has been 
		// chosen previously because selected
		// tiles are placed back into the urn.
		nFoundOne = 1;
	}
	else if (cUrn[nIndex][2] == 'T')
	{
		// This tile has already been chosen and
		// discarded: it can't be selected again.
		nFoundOne = 0;
	}
	else if (cUrn[nIndex][2] == 'F')
	{
		// This tile has not been chosen previously.
		nFoundOne = 1;
	}
}
Principia [from old post]: Let me point out that here, the test (nDiscardTilesOnceChosen == 0) is always satisfied, so the then block is never reached. Let me also point out that the 1st elseif is irrelevant, since its action to set nFoundOne to 0 is redundant (i.e. nFoundOne would have to be 0 to get there anyways).

********************************

Principia [from current post] here's what DNAunion had to say:
DNAunion: And here is where Principia stoops to misquoting. He dishonestly left out a good bit of my response, shown in bold below. I'll include it all since much of what he omitted is relevant.

(Also, Principia failed to mention the explanation I gave elsewhere about the first comment he made being wrong because that code does have a purpose for being there: flexibility).

Quote:
DNAunion: I will point out that it is considered, by a great many programmers, to be a bad idea to sacrifice clarity for compactness.

When a tile is chosen, there are two possibilities: either it has been chosen before, or it hasn’t, and both possibilities have to be taken into account. If the statement setting nFoundOne to 0 were omitted, it could cause temporary confusion on someone encountering the code for the first time. “What? The programmer left out the code that handles the case where the tile was already chosen”. Putting it in makes the logic clearer.


As far as compactness:

1) It’s a only 14 characters and took me only about 2 seconds to type (and as the programmer, I get to decide whether to sacrifice clarity to save 2 seconds worth of typing)

2) The code does not become “fatware” simply because I added something like 14 bytes to it

3) The time it takes an average computer to execute that one command is negligible; even running 1,000,000 iterations it would probably add only a small fraction of a second to the total execution time.

So again, it is a tradeoff, and it is up to the programmer to decide how to handle it. That you would have done it a differently hardly makes the way I did it wrong, flawed, or faulty.
DNAunion: See the difference. I was saying that I traded a few keystrokes/milliseconds for improved code clarity.

But from the misquote that Principia just posted, no one would know that. Since Principia intentionally omitted RELEVANT material, he is guilty of misquoting.

Quote:
Principia:
1) So negligible runtime is an excuse for DNAunion, but not for sophie.

2) Extra code is a forgiveable offense for DNAunion, but not for sophie.

3) Extra typing is OK when DNAunion does it, but not for sophie.

See the pattern?
DNAunion: Sure, I see the pattern. Princpia continually misrepresents facts and tries to antagonize. Yeah, that’s perfectly clear for all to see.

Now, let’s talk facts.

Note that in Sophie’s script, speed, memory, AND code clarity suffer. So unlike in my code, in Sophie's there is no compensatory tradeoff.

Hence, no hypocrisy, despite Principia’s charge.
DNAunion is offline  
Old 07-15-2003, 07:38 PM   #123
Veteran Member
 
Join Date: Jan 2001
Location: USA
Posts: 1,072
Default Re: Re: Re: Re: Re: Re: Re: if you were boss

DNAunion: "And now, for something completely different"

What’s up with the clocks?

I made two back-to-back posts this morning just before leaving for work. They couldn’t have been posted more than 5 or at most 10 minutes apart. Yet the timestamps show:

July 14, 2003 07:30 PM

And

July 15, 2003 01:36 PM

What up?
DNAunion is offline  
Old 07-15-2003, 09:09 PM   #124
Veteran Member
 
Join Date: Jan 2001
Location: USA
Posts: 1,072
Default Re: Re: Re: Re: if you were boss

Quote:
Principia: I'm content to let DNAunion have the last word on this matter to whoever thinks he has any credibility left. Moderators, don't worry about me.
DNAunion: Never a man of his word, Principia returned today and tried to "pick a fight".

Quote:
Principia: Oh wait, I guess DNAunion put up his standard disclaimer that he was in a rush and put up sloppy code, and so we ought to therefore excuse his mistakes. So let's spare him, shall we?

… But oh wait, for a novice programmer like DNAunion who still cuts and pastes code without thinking about the side effects, I guess tis forgiveable offense...

… Gee, DNAunion, where did you learn to count? But, oh wait, a novice programmer like DNAunion still having 0-1 index problems, who would have thought...

EDIT: So here's more hypocrisy: ...

I completely agree [that DNAunion is an incompetent programmer]. If you're reading this, sophie, you've engaged yourself in an exercise in futility. Do Not Feed The Troll (DNAunion). There is a long history behind this guy and his baiting techniques, and if you're at all interested, you can request a PM from me.

Sophie, there's absolutely no doubt in anybody's view who the better programmer here is, and it's certainly not DNAunion.
DNAunion: What a stand up kind of guy that Principia isn't, I mean, is.
DNAunion is offline  
Old 07-16-2003, 05:30 AM   #125
Veteran Member
 
Join Date: Jan 2001
Location: USA
Posts: 1,072
Default

DNAunion: Okay, time to point out another or Principia’s blunders and tricks, both of which deal with the block of code associated with if (nDiscardTilesOnceChosen == 0).

First, the trick. Note that no matter how many times and ways I explain the PURPOSE of that particular block of code, Principia continues to offer it up as though it were an error. Has he a clue? Obviously not.

Now for his blunder. Here are the relevant parts of exchanges.


Quote:
Principia:


Code:
[DNAunion’s code]
// Pull a single tile out of the urn
nFoundOne = 0;
while (nFoundOne == 0)
{
	nIndex = (int) GetRandomNumber(0, nLetteredTiles - 1);
	if (nDiscardTilesOnceChosen == 0)
	{
		// Doesn't matter if the tile has been 
		// chosen previously because selected
		// tiles are placed back into the urn.
		nFoundOne = 1;
	}
	else if (cUrn[nIndex][2] == 'T')
	{
		// This tile has already been chosen and
		// discarded: it can't be selected again.
		nFoundOne = 0;
	}
	else if (cUrn[nIndex][2] == 'F')
	{
		// This tile has not been chosen previously.
		nFoundOne = 1;
	}
}
Principia: Let me point out that here, the test (nDiscardTilesOnceChosen == 0) is always satisfied, so the then block is never reached.
DNAunion: I originally explained (and have continued to reexplain) to Principia…


Quote:
DNAunion: So? It is there for flexibility. If someone wants to change the model to use replacement (instead of discarding objects after they’ve already been selected), he/she simply changes a single value and the whole program is “reconfigured” – it works under the new set of parameters without requiring any new code to be written, or any existing code to be commented out.
DNAunion: Note that Principia really has no excuse for missing this. The flexibility was not burried in his imaginary "spaghetti code" (remember, to Principia just about all code is "spaghetti code" because he can’t read it), no, the flexibility was right out there in plain English, in a comment (gee, I guess Principia can’t read English either!). This is from the C++ version that Principia was “attacking” <snicker> <giggle>.

Code:
// [2] = CHOSEN: has this letter/tile already been chosen from the urn?
// If so, it may have been disarded and so not available 
// any more, or it may have been replaced and available to 
// be selected again. Which occurs for an already selected
// tile depends upon the value of the const variable
// nDiscardTilesOnceChosen.
DNAunion: If Principia were able to put 2 + 2 together to get 4 (wait a minute, maybe he can’t. Principia has trouble with the number 4…thinks that 7 – 4 = 4!!! ROTFLMAO) he’d understood that the code he says is never reached IS reached by just toggling nDiscardTilesOnceChosen to model a different scenario.
DNAunion is offline  
Old 07-16-2003, 06:37 AM   #126
Veteran Member
 
Join Date: May 2003
Location: On the road to extinction. . .
Posts: 1,485
Default further discussions

Any further discussions I will take part in will only be about the algorithm of the code I presented.

I think we have flogged the horses enough. Time to run the race.
sophie is offline  
Old 07-16-2003, 06:37 AM   #127
Veteran Member
 
Join Date: Aug 2002
Location: In the land of two boys and no sleep.
Posts: 9,890
Default

Consider this a general reminder to all to play nice.

8-10 threads in a row where one person criticizes another while not addressing them directly does not seem productive to me.

This goes for more than one person, by the way.

If the conversion has value with regards to the actual topic, ehtn carry on by all means, but let's try to move away from the current line of accusations personal comments please.

Wyz_sub10.
S&S Moderator
Wyz_sub10 is offline  
Old 07-16-2003, 11:09 AM   #128
Veteran Member
 
Join Date: Apr 2003
Location: Level 6, Inside a Burning Tomb
Posts: 1,494
Lightbulb Out of Curiosity

Might a non-programmer be allowed to ask a question? I certainly don't understand the program code itself being discussed here, but I'm curious how the principles spoken of might apply to a specific situation:

Does anyone know if the specific error in the "killer X-ray machine" software was ever discovered, and could the tenets of program clarity noted here have prevented it?

Background: Atomic Energy of Canada Limited once made an X-ray machine called the Therac-25, which could be used for both research work (delivering radiation doses lethal to humans) and medical work (same doses attenuated by a software-controlled lead beam shield). A bug in the code and the operator interface allowed several people to receive lethal doses when the shield failed to swing into place.

I should note that I don't have to be a programmer to appreciate this stuff, after having skimmed through Boris Beizer's The Frozen Keyboard: Living With Bad Software. I highly recommend this, as it's some of the wryest and wittiest writing available on this subject.

Any light you can shed is greatly appreciated. Thanks --

Deacon Doubtmonger

"In any decently-run universe, this [God] would've been out on his all-powerful ass a long time ago!"

--George Carlin
Deacon Doubtmonger is offline  
Old 07-16-2003, 11:29 AM   #129
Veteran Member
 
Join Date: Jan 2001
Location: Median strip of DC beltway
Posts: 1,888
Default Re: Out of Curiosity

Quote:
Originally posted by Deacon Doubtmonger
Does anyone know if the specific error in the "killer X-ray machine" software was ever discovered, and could the tenets of program clarity noted here have prevented it?
There are certain practices that can dramitically help such a situation. I didn't see a lot described here that would apply to mission-critical systems beyond the most basic level.

The Capability Maturity Model (CMM) is one means of certifying the level of maturity in the process. Note that it follows my earlier caveat: a good process will exhibit the characteristics in the CMM outline, but using the CMM outline as your process will not necessarily provide you with good results. For comparison, the practices being discussed here have nothing to do with coding standards. They're all mistakes that people make, and no matter how good you are, you will make them from time to time. The quality assurance is how good your process is at catching these mistakes. Programming is an very small portion of designing good software, actually.

I don't know any specifics about the case you mention. Software engineering is hideously complex if you approach it from traditional engineering standpoints. The number of interactions is orders of magnitude higher than a project of equal "difficulty" in another field.

Embedded design is it's own little world, too.
NialScorva is offline  
Old 07-16-2003, 11:42 AM   #130
Veteran Member
 
Join Date: Mar 2002
Location: anywhere
Posts: 1,976
Default

I believe you are referring to the Therac fiasco, which is a case study used in many computer sci. courses of a bad software development model.

You can read about it here: http://sunnyday.mit.edu/papers/therac.pdf

PS: Nevermind, I see you had already referred to the case by name.
Principia is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -8. The time now is 07:54 PM.

Top

This custom BB emulates vBulletin® Version 3.8.2
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.