You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Martin Cooper <mf...@gmail.com> on 2004/08/29 18:56:35 UTC

Re: Worst offence in Java :) Re: [lang] Interpolation

MUCH worse would be returning from a 'finally' clause, which can cause
unexpected control flow behaviour. See "The Java Hall of Shame":

http://www.cs.arizona.edu/sumatra/hallofshame/

and also "The Lost Exception" in Bruce Eckel's "Thinking in Java".

--
Martin Cooper


On Sun, 29 Aug 2004 02:12:37 -0400 (EDT), Henri Yandell
<ba...@generationjava.com> wrote:
> 
> On Sat, 28 Aug 2004, matthew.hawthorne wrote:
> 
> > > IMO, copy-paste reuse is the worst offense that a programmer can commit.
> >
> > I agree that it's bad news.
> >
> > But, I think the worst offense is this:
> >
> > try {
> >
> >    // ...
> >
> > } catch (Exception e) {
> >    return null;
> > }
> >
> > (shudder)
> 
> How lucky you've been. Have you never seen:
> 
> try {
>    ...
> } catch(Throwable t) {
>    // ignore
> }
> 
> ??? :)
> 
> Hen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: Worst offence in Java :) Re: [lang] Interpolation

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Thanx for the reference, Martin.  It is a hoot what people will do.  I 
am not immune, I am sure.

Michael

Martin Cooper wrote:

>MUCH worse would be returning from a 'finally' clause, which can cause
>unexpected control flow behaviour. See "The Java Hall of Shame":
>
>http://www.cs.arizona.edu/sumatra/hallofshame/
>
>and also "The Lost Exception" in Bruce Eckel's "Thinking in Java".
>
>--
>Martin Cooper
>
>
>On Sun, 29 Aug 2004 02:12:37 -0400 (EDT), Henri Yandell
><ba...@generationjava.com> wrote:
>  
>
>>On Sat, 28 Aug 2004, matthew.hawthorne wrote:
>>
>>    
>>
>>>>IMO, copy-paste reuse is the worst offense that a programmer can commit.
>>>>        
>>>>
>>>I agree that it's bad news.
>>>
>>>But, I think the worst offense is this:
>>>
>>>try {
>>>
>>>   // ...
>>>
>>>} catch (Exception e) {
>>>   return null;
>>>}
>>>
>>>(shudder)
>>>      
>>>
>>How lucky you've been. Have you never seen:
>>
>>try {
>>   ...
>>} catch(Throwable t) {
>>   // ignore
>>}
>>
>>??? :)
>>
>>Hen
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org