home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
11362
< prev
next >
Wrap
Internet Message Format
|
1994-10-18
|
1KB
Path: wupost!gumby!newsxfer.itd.umich.edu!zip.eecs.umich.edu!yeshua.marcam.com!usc!math.ohio-state.edu!uwm.edu!lll-winken.llnl.gov!noc.near.net!transfer.stratus.com!sw.stratus.com!det
From: det@sw.stratus.com (Dave Toland)
Newsgroups: alt.sources
Subject: Re: Ugly code.
Date: 18 Oct 1994 12:33:12 GMT
Organization: pseudo-random
Lines: 20
Distribution: world
Message-ID: <380fa8$5uq@transfer.stratus.com>
References: <CxtEys.DKr@cs.dal.ca>
Reply-To: det@phlan.sw.stratus.com
NNTP-Posting-Host: phlan.sw.stratus.com
In article <CxtEys.DKr@cs.dal.ca>, franklin@ug.cs.dal.ca (Steve Franklin) writes:
> This is some code for a solid-state assignment which computes the number
> of neighbors from a central atom that are sqrt(1), sqrt(2), etc... away
> from the central atom. Anyone able to make itany more compact or ugly?
> It needs the math library, and it's ansi C.
Why try to compete for how BAD you can code it? It's kinda like competing
for the loudest smelliest fart.
Why not for once compete for a clean, elegant, maintainable recoding???
By the way, the whole thing would be cleaner and less error prone, and
would not require the use of floating point at all if only the square
of the distance were calculated.
--
--------------------------------------------------------------------------
All opinions are MINE MINE MINE, and not necessarily anyone else's.
det@phlan.sw.stratus.com | "Laddie, you'll be needing something to wash
(Dave Toland) | that doon with."