[MUD-Dev] Re: let's call it a spellcraft
Adam Wiggins
adam at angel.com
Thu Sep 24 11:14:28 CEST 1998
On Thu, 24 Sep 1998, Jon A. Lambert wrote:
> > On Tue, Sep 22, 1998 at 10:13:04PM -0500, Vadim Tkachenko wrote:
> > > Again, why limit yourself with numbers like 50? Why not 500? Why not
> > > just X?
> [snip]
> It begs the question, "Is the fixed dimensional array evil?"
No. But designing/implementing something without the slightest thought
for how you (or someone else) would be able to extend it someday is, IMO,
one of the greatest failings of modern programing, and programmers
themselves.
IMO it doesn't take much effort to pause for a moment when implementing
something like this spellsystem and think, "Hum, six major elemental
effects are plenty for now; what if I ever want to add more?" The most
basic way to deal with this, of course, is taught in Programming 101:
don't put magic numbers into the code, make them easily locatable
constants somewhere at the top with a clearly identifiable name. Many
programmers are too lazy to even do *this*, much less consider what
changes will have to be made if that number is ever changed.
IMO picking an arbitrary number like "50" is just fine, especially for
design purposes. It's concrete, which is important; it gives a scale and
a frame of reference. But a good implementation won't care if it's 10 or
50 or 5000. This seems quite obvious to me, yet if that were really the
case people wouldn't be jumping out of windows due to the "Y2K" (blech)
problem.
More information about the mud-dev-archive
mailing list