comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Beginer problem: variable array size
Date: Mon, 23 Sep 2002 17:09:55 GMT
Date: 2002-09-23T17:09:55+00:00	[thread overview]
Message-ID: <CVHj9.45835$gA4.6897@sccrnsc02> (raw)
In-Reply-To: 1032789075.864322@master.nyc.kbcfp.com

> The professor probably has files of input numbers that will
> be fed to each submitted program. I'll bet one of them is
> very large, to test the input size limit even if the sort
> won't complete in a reasonable amount of time.
  I'd be very interested in seeing an answer to the OP problem that had no
limit on the number of inputs.  I'd even be interested in a version that
would run with a very large number, say 6E23, of inputs.  Would it use all
the machines on the internet to store input?  I fear even that wouldn't be
enough.  If you can't show such a program, then I'd like to know what in
fact are its limits, either as a constant like 8*3600 or 10_000_000
or by a formula like "System_RAM_In_Bytes/2" or some such thing.

> Furthermore, if you are going to have an arbitrary limit,
> you have to provide the extra code to handle the case of
> the limit being exceeded.
  Not for an introductory class.  And for a more advanced class,
I suspect a "raised Storage_Error" message, or taking a year to run,
wouldn't receive a very high grade.

> And further yet, why do you think you get to rewrite the
> given requirements just because they don't suit the style of
  The OP problem spec was incomplete.  Given that it followed a Hello
World program, I suspect it came early in a programming class and the prof
would be happy with a quadratic sort and would test it with a few tens at
most of inputs.  If it was my homework, I'd include a statement of that
assumption and why I made it.  If the assignment came up in an advanced
class after the prof had been describing a space probe crashing into the
sun, collecting a measurement every 50 nanoseconds for one half second,
then sorting and transmitting those 10 million measurements in the
remaining half second before meltdown, I would make different
assumptions, document them, and write the program a different way.

  It's bad to make foolishly limiting assumptions, but worse to
depend on undocumented assumptions.  Just the act of documenting
them may encourage a programmer to Think! and make better assumptions.



  parent reply	other threads:[~2002-09-23 17:09 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-15 14:53 Beginer problem: variable array size Nacho
2002-09-15 16:45 ` Larry Kilgallen
2002-09-15 16:16   ` Nacho
2002-09-15 16:26     ` Ludovic Brenta
2002-09-15 17:46     ` Jeffrey Carter
2002-09-15 18:27     ` Pascal Obry
2002-09-15 20:03     ` Larry Kilgallen
2002-09-17 14:22     ` Ted Dennison
2002-09-18 11:53       ` Marin David Condic
2002-10-02 15:08         ` Matthew Heaney
2002-10-03 12:17           ` Marin David Condic
2002-09-19  0:43     ` Robert A Duff
2002-09-19  1:25       ` Jeffrey Carter
2002-09-19 14:17       ` Hyman Rosen
2002-09-20  3:06       ` Munch
2002-09-20  4:49         ` Jim Rogers
2002-09-20  6:35         ` tmoran
2002-09-20 16:00           ` Pat Rogers
2002-09-20 16:07             ` Preben Randhol
2002-09-20 20:15               ` Pat Rogers
2002-09-20 12:11         ` Marin David Condic
2002-09-20 13:59           ` Larry Kilgallen
2002-09-20 14:55             ` Hyman Rosen
2002-09-20 16:10               ` Larry Kilgallen
2002-09-20 16:31               ` Warren W. Gay VE3WWG
2002-09-24 12:41                 ` Thomas Dickey
2002-09-21 10:44               ` Thomas Dickey
2002-09-23 13:37                 ` Hyman Rosen
2002-09-22 13:00               ` Marin David Condic
2002-09-26  3:37                 ` Kevin Cline
2002-09-26 12:42                   ` Marin David Condic
2002-09-22 12:49             ` Marin David Condic
2002-09-20 16:28           ` Warren W. Gay VE3WWG
2002-09-20 17:49             ` Hyman Rosen
2002-09-21  7:30               ` Preben Randhol
2002-09-23 13:41                 ` Hyman Rosen
2002-09-22  3:34               ` Ted Dennison
2002-09-22 13:18             ` Marin David Condic
2002-09-24 16:55               ` Warren W. Gay VE3WWG
2002-09-25 12:06                 ` Marin David Condic
2002-09-21 22:23           ` tmoran
2002-09-23 13:53             ` Hyman Rosen
2002-09-23 15:19               ` Chad R. Meiners
2002-09-23 16:00                 ` Hyman Rosen
2002-09-23 17:09               ` tmoran [this message]
2002-09-23 18:18                 ` Hyman Rosen
2002-09-23 19:53                   ` tmoran
2002-09-23 20:32                     ` Hyman Rosen
2002-09-23 20:10                 ` Dennis Lee Bieber
2002-09-23 23:09                   ` tmoran
2002-09-24  2:33                     ` Dennis Lee Bieber
2002-09-24 12:36               ` Marin David Condic
2002-10-02 15:13       ` Matthew Heaney
2002-09-19 20:25     ` Brian Gaffney
2002-09-17 10:20 ` Georg Bauhaus
2002-10-02 15:04 ` Matthew Heaney
2002-10-02 16:26   ` Preben Randhol
2002-10-02 19:53     ` Matthew Heaney
2002-10-03 12:31       ` Marin David Condic
2002-10-03 15:15         ` Matthew Heaney
2002-10-21 23:38           ` Matthew Heaney
2002-10-22 14:11     ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox