Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 19 Jun 2013 02:34:42 -0500 Date: Wed, 19 Jun 2013 08:34:41 +0100 From: lipska the kat <"nospam at neversurrender dot co dot uk"> Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: About java program. References: <324f929f-772e-4004-81e1-6b454cdae794@googlegroups.com> <%L8wt.20476$5w3.6434@newsfe03.iad> In-Reply-To: <%L8wt.20476$5w3.6434@newsfe03.iad> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 34 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-YEWfb44mdHu2D6pNfSs7eC8yr5kvO0xJdnULB4spmmMib71CYGS5wdCQgWIp32qYcUkPVZXKiKrkgQi!29Y7qEnCtv8gHRIdOFdRAteUDZBbGIaCXkTqbuzMOVyjg/WTzoTnF9KwxqOf1SLHPuQBhwhNfXY= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2955 Xref: csiph.com comp.lang.java.programmer:24464 On 19/06/13 03:33, Arved Sandstrom wrote: > On 06/17/2013 07:36 PM, Joshua Cranmer 🐧 wrote: >> On 6/17/2013 8:46 AM, lipska the kat wrote: >>> ... and what is your opinion of defensive coding? >> >> The term, as I understand it, refers to coding under the assumption that >> everyone who uses your API is a stupid idiot who can't follow your rules >> properly. The matter at hand here is basically a stylistic concern about >> which is mentally easier to follow, which falls under the category of >> "everyone has an opinion which is strongly held and won't be changed." > [ SNIP ] > > Like I stated in a different post in this thread, the stupid idiot is > often you yourself (you as in impersonal "you"), since you wrote both > the calling code and the called code, and six months later you are > adapting the called code and can't remember the assumptions you made > previously because you had a whitebox view then, and hence you f**k up. [snip] > Rule of thumb - if your average coder gets how the method does exits > quickly, then your style is fine. These days - basically the last 2 > decades after programming became a commodity and most coders have > minimal formal background - I'm all for coding to the LCD. Which means > very defensive, and frequently not being elegant in favour of being > obvious. Elegantly put lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun