Re: Java: Helping the world build bigger idiots

2005-09-23 Thread Bill Frantz
On 9/22/05, [EMAIL PROTECTED] (Olle Mulmo) wrote: >Peter's example is "standard to the language". It's just not used much >by those influenced by other idioms prior to learning Java. > >I guess another way of saying this is: the people on this list are >getting old. :-) I guess insisting on cor

Re: Java: Helping the world build bigger idiots

2005-09-22 Thread Olle Mulmo
On Sep 21, 2005, at 23:27, Steve Furlong wrote: If by that you mean, "Program dumb: avoid tricky code, avoid odd usage, stick to the basics", I agree. Save your clever tricks for hobby code and the snippets you use to score hot chicks. Critical code, potentially dangerous code, and professional

Re: Java: Helping the world build bigger idiots

2005-09-22 Thread Steven M. Bellovin
In message <[EMAIL PROTECTED]>, Steve Furlong writes: > >On a related note, I've worked a bit with avionics and embedded >medical software. The certification requirements for those bits of >critical code might be helpful for crypto programming. > Not quite. The name of the game is information se

Re: Java: Helping the world build bigger idiots

2005-09-21 Thread Steve Furlong
On 9/20/05, Rich Salz <[EMAIL PROTECTED]> wrote: > This is wandering way far afield of the list charter. In an effort > to maintain some relevance, I'll point out that code reviews, and > crypto programming, are rarely done, and arguably shouldn't, by > programming wizards. If by that you mean, "

Re: Java: Helping the world build bigger idiots

2005-09-21 Thread Jerrold Leichter
| > One thing to consider is that an idiom like this solves an annoying problem. | > Consider a linear search through an array: | > | > for (i = 0; i < lim; i++) | > { if (a[i] == target) | > { | > break; | > } | > } | > /

Re: Java: Helping the world build bigger idiots

2005-09-21 Thread Rich Salz
The very name of the term -- exception -- argues against using it as a standard flow-of-control construct. Python's for/else is better; it'd be nice to see that show up in Java/C# some day. This is wandering way far afield of the list charter. In an effort to maintain some relevance, I'll point

Re: Java: Helping the world build bigger idiots

2005-09-21 Thread Greg Black
On 2005-09-20, Jerrold Leichter wrote: > One thing to consider is that an idiom like this solves an annoying problem. > Consider a linear search through an array: > > for (i = 0; i < lim; i++) > { if (a[i] == target) > { > break; >

Re: Java: Helping the world build bigger idiots

2005-09-20 Thread Jerrold Leichter
| It used to be that checking bounds on certain collections was less | efficient than waiting for the out of bounds exception. I think Joshua | Bloch discusses this in his book. | | I've also seen this in generated code where you aren't sure of the | nature of the object you're indexing and thus d

Re: Java: Helping the world build bigger idiots

2005-09-20 Thread Bill Frantz
On 9/19/05, [EMAIL PROTECTED] (Peter Gutmann) wrote: >Found on the Daily WTF, http://www.thedailywtf.com/forums/43223/ShowPost.aspx: > > try { >int idx = 0; > >while (true) { > displayProductInfo(prodnums[idx]); > idx++; > } >} > catch (IndexOutOfBoundExcepti

Re: Java: Helping the world build bigger idiots

2005-09-20 Thread Jeremiah Rogers
It used to be that checking bounds on certain collections was less efficient than waiting for the out of bounds exception. I think Joshua Bloch discusses this in his book. I've also seen this in generated code where you aren't sure of the nature of the object you're indexing and thus don't know th

Re: Java: Helping the world build bigger idiots

2005-09-19 Thread Steven M. Bellovin
In message <[EMAIL PROTECTED]>, Peter Gutmann writes : >Found on the Daily WTF, http://www.thedailywtf.com/forums/43223/ShowPost.aspx: > > try { >int idx = 0; > >while (true) { > displayProductInfo(prodnums[idx]); > idx++; > } >} > catch (IndexOutOfBoundExcept

Java: Helping the world build bigger idiots

2005-09-19 Thread Peter Gutmann
Found on the Daily WTF, http://www.thedailywtf.com/forums/43223/ShowPost.aspx: try { int idx = 0; while (true) { displayProductInfo(prodnums[idx]); idx++; } } catch (IndexOutOfBoundException ex) { // nil } The editor also comments that when he