decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
Simple + Brief = Powerful + Persuasive = Focus on the Evidence | 122 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
Simple + Brief = Powerful + Persuasive = Focus on the Evidence
Authored by: Anonymous on Friday, August 10 2012 @ 01:09 PM EDT
I'm not sure Google's letter to the court, nor our discussion
here, constitute a legal "debate."

[ Reply to This | Parent | # ]

Simple + Brief = Powerful + Persuasive = Focus on the Evidence
Authored by: Anonymous on Friday, August 10 2012 @ 02:53 PM EDT

I believe the testimony is that the code is executed 2600 times at startup.

But Rangecheck is sanity check code. I will provide a faulty analogy. Let's think of Rangecheck as a lifeguard at a pool. Every time a swimmer wants to go into the water, even if they just go out, the lifeguard verifies that there is water in the pool. If not, all swimmers are sent home and the pool is shut down for the day. One fault with that analogy is that the callers of Rangecheck have their own pools.

What is an array? It's a block of contiguous memory reserved for homogeneous data and featuring instant access and update. For example, it behaves better than a list, which takes n steps to get to or update the n+1st element. A list, though, cannot be filled past its end, where an array is set up with a fixed number of slots. If you need 20 slots, but the array was initialized with 15, one has to start a new array, copy the 15 elements, initialize the other 5, and then notify the program that the new 20-slot array is what is now current. (The old array has its memory freed.) Here's a bit of history. In C and C++ programming, if one called an index beyond the end of an array, the contents of that memory would be dereferenced, read and processed, even though it had no validity as a member of the array. The program crashes, or more insidiously, produces invalid answers. Java specifies that an Exception be thrown when the value of a non-existent index is requested from an array. This is a RuntimeException, which means the program stops.

During development and debugging, indices that don't exist are common exceptions and occur because there are logic problems as the algorithm and implementation evolve. Developers see the Exception, figure out why they wanted value 17 from a 16 item array and fix that logic error. Shipping code should not have ArrayIndexOutOfBoundsExceptions, but Rangecheck cannot know that the code is solid, so it does its job each and every time someone wants a value from an array.

Is it necessary to the program? Well, it's an implementation of the java specification regarding the behavior of arrays. But good programs don't need it and, indeed, it exacts a cost in time as the lifeguard keeps checking that the pool has water.

[ Reply to This | Parent | # ]

Simple + Brief = Powerful + Persuasive = Focus on the Evidence
Authored by: tknarr on Friday, August 10 2012 @ 03:29 PM EDT

It's executed fairly often. But rangeCheck() won't have a significant effect on the program's operation. If the program's fully debugged rangeCheck() won't ever find a problem and will just return, and to the user the program will behave exactly as if rangeCheck() weren't called at all. If there's a bug and rangeCheck() finds a problem, it throws an exception that'll probably cause the program to crash. But the problem would've caused the program to crash anyway if rangeCheck() hadn't detected it, and to a user the subtle variation in the exact crash won't make any difference, the program's still crashed.

rangeCheck(), as often as it's called, simply makes no difference to the operation of the program that a user could see.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )