If null is the absence of something, and zeo represents nothing, equivalent to nothing, then storing nothing billions of times should amount to storing nothing, which should take no time and no space! So why the problem? </smirk>
S
script_man
@script_man
0
Reputation
3
Posts
25
Profile views
0
Followers
0
Following
Best posts made by script_man
This user hasn't posted anything yet.
Latest posts made by script_man
-
RE: Storage in cost per giga-NULL
-
RE: Security Scans From Beyond the Clue
I particularly like the last 7 words of your post.
-
RE: Thought not required
@dmwit said:
I just recently got interested in vPython for doing graphics. I thought I'd look at the code they had as examples of good form, and found this little gem:
if pfc.x > self.boidflock[aboid].x:
pfc.x = (pfc.x - self.boidflock[aboid].x)*self.FACTOR
if pfc.x < self.boidflock[aboid].x:
pfc.x = (self.boidflock[aboid].x - pfc.x)*self.NEGFACTOR
if pfc.y > self.boidflock[aboid].y:
pfc.y = (pfc.y - self.boidflock[aboid].y)*self.FACTOR
if pfc.y < self.boidflock[aboid].y:
pfc.y = (self.boidflock[aboid].y - pfc.y)*self.NEGFACTOR
if pfc.z > self.boidflock[aboid].z:
pfc.z = (pfc.z - self.boidflock[aboid].z)*self.FACTOR
if pfc.z < self.boidflock[aboid].z:
pfc.z = (self.boidflock[aboid].z - pfc.z)*self.NEGFACTOR
<FONT face="Times New Roman" size=4>I mean, it isn't terrible, but I probably would have just used
<FONT size=2><FONT face="Courier New">pfc = (pfc - self.boidflock[aboid]) * self.FACTOR</FONT></FONT>
</FONT>True, but the sample code in a lot of packages is not written for brevity; it's written to illustrate to a product-noobie how the thing works under-the-hood. Sample code is usually less than ideal for illustrative purposes.