Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.java.programmer Subject: Re: Programming question determining two circle's relation Date: Sat, 30 Apr 2011 17:25:28 -0400 Organization: The Wasteland Lines: 25 Message-ID: References: <892252a0-e31d-426b-8f47-d37c0b2ec364@17g2000prr.googlegroups.com> <511ca68f-7866-4658-9b2b-b1c0c013a030@a21g2000prj.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3388 In article <511ca68f-7866-4658-9b2b-b1c0c013a030@a21g2000prj.googlegroups.com>, byhesed wrote: > On 4ø˜30¿¦, ø¿»Ÿ6‡ˆ08†­, Patricia Shanahan wrote: > > [...] > > > > If you have a calculation you need to do a lot, why not write and > > test a separate method to do it, rather than writing the > > calculation in-line repeatedly? > > > > [...] > > I know the source code I had posted is silly. > I do not perform any optimization because it is just an example. I would argue that the re-factoring suggested by Patricia is an opportunity to reduce error, both now and in future development or maintenance. I know it's tempting to dismiss the work as temporary, but we've all seen a prototype sneak into production. -- John B. Matthews trashgod at gmail dot com