<p>I find eclipse both too resource heavy and too "helpful". It does lots of crap that I don't want done. Maybe I am just picky.</p>
<p>--<br>
Sent from my phone... a G2 running CM7 nightlies!</p>
<div class="gmail_quote">On Feb 12, 2011 7:20 PM, "Tim Watts" <<a href="mailto:tim@cliftonfarm.org">tim@cliftonfarm.org</a>> wrote:<br type="attribution">> They'll also automatically insert a closing brace and indent when you<br>
> type {<enter> (*cough*eclipse*cough*). So the cost is near zero.<br>> <br>> <br>> On Sat, 2011-02-12 at 18:58 -0500, Michael Trausch wrote:<br>>> Any good editor (*cough*emacs*cough*) will properly indent and clue<br>
>> the human into the error. Its all about the text editor. ;)<br>>> <br>>> --<br>>> Sent from my phone... a G2 running CM7 nightlies!<br>>> <br>>> On Feb 12, 2011 5:11 PM, "Tim Watts" <<a href="mailto:tim@cliftonfarm.org">tim@cliftonfarm.org</a>> wrote:<br>
>> > [ pardon me for I'm butting in ]<br>>> > <br>>> > You're right: to the compiler it's just style. But I look at them as<br>>> > cheap insurance against future bugs. <br>
>> > <br>>> > // The code in Feb 2011:<br>>> > if (somethingIsTrue())<br>>> > doASimpleTask()<br>>> > else<br>>> > doTheAlternateTask()<br>>> > <br>>> > // The code in Feb 2012:<br>
>> > if (somethingIsTrue())<br>>> > doASimpleTask();<br>>> > else<br>>> > doTheAlternateTask();<br>>> > doTheWorkAroundToo();<br>>> > <br>>> > Of course, this is broke and you may very well have caught it. But<br>
>> > enclosing it in {} in the first place would have avoided the need to<br>>> > even think about it. About the only time I'll omit braces is with<br>>> > conditionals that are one-liners (and sometimes not even then):<br>
>> > <br>>> > if (log.isDebugEnabled()) log.debug("now i'm opening the pickle<br>>> jar.");<br>>> > <br>>> > <br>>> > On Sat, 2011-02-12 at 16:06 -0500, Joshua wrote:<br>
>> >> James,<br>>> >> <br>>> >> I put the {} around the block, (which helps to guard against<br>>> certain <br>>> >> bugs). the {} make the code easier to read, but I do not know that<br>
>> with <br>>> >> one line of code they prevent any bugs.<br>>> >> <br>>> >> from what I read, and the discussions I had on iirc, a dangling<br>>> else is <br>>> >> more of a grammatical (readability) thing, from a human<br>
>> perspective, the <br>>> >> compiler /interpreter will take care of any ambiguity with if/else <br>>> >> blocks, as far as I can tell. The else attaches to the nearest if <br>>> >> block. I can see the issue from a psuedocode perspective, where<br>
>> the <br>>> >> grammatical ambiguity can cause problems when actually implementing<br>>> the <br>>> >> code, but one the code is written it is the placement of the }<br>>> from <br>
>> >> preceding if statements that determine which 'if' the 'else' will<br>>> attach to.<br>>> >> <br>>> >> or am I missing something?<br>>> >> <br>>> >> <br>
>> >> <br>>> >> Maybe that is all the dangling else is: a semantics things.<br>>> >> <br>>> >> <br>>> >> James Sumners wrote:<br>>> >> > My only suggestion would be to fix your dangling else block --<br>
>> >> > <a href="http://pastebin.com/pTzUQzjJ">http://pastebin.com/pTzUQzjJ</a><br>>> >> ><br>>> >> > On Sat, Feb 12, 2011 at 2:53 PM, Joshua <<a href="mailto:jrtroberts@gmail.com">jrtroberts@gmail.com</a>><br>
>> wrote:<br>>> >> > <br>>> >> >> I am working with an API for currency conversion from<br>>> >> >><br>>> <a href="http://www.thomasknierim.com/index.php?s=currencyconverter&Submit=Search">http://www.thomasknierim.com/index.php?s=currencyconverter&Submit=Search</a><br>
>> >> >><br>>> <<a href="http://www.thomasknierim.com/index.php?s=currencyconverter&Submit=Search">http://www.thomasknierim.com/index.php?s=currencyconverter&Submit=Search</a>><br>>> >> >><br>
>> >> >> It is all written is Java.<br>>> >> >><br>>> >> >> The initCacheFile() method worked fine under windows, but it<br>>> broke<br>>> >> >> under linux.<br>
>> >> >><br>>> >> >> The original code grabbed the path to the java temp directory<br>>> and then<br>>> >> >> concatenated a file name onto the end of it. I do not know what<br>
>> it<br>>> >> >> produces under windows, but my suspicion is that windows is<br>>> something<br>>> >> >> like </driveletter:\pathtotemp\/> with the trailing '\'<br>
>> included.<br>>> >> >><br>>> >> >> Under linux the call to return the temp directory returns '/tmp'<br>>> and<br>>> >> >> then the concatenating of '/filename/' creates a file named<br>
>> >> >> /tmp/filename/ instead of /tmp//filename/ so the application was<br>>> trying<br>>> >> >> to write to / where it did not have permissions. So I had to<br>>> write a<br>
>> >> >> fix. Still not sure the fix is this best.<br>>> >> >><br>>> >> >><br>>> >> >> Maybe someone can look at the code I wrote and let me know.<br>
>> >> >><br>>> >> >> <a href="http://pastebin.com/vsC6vZRU">http://pastebin.com/vsC6vZRU</a><br>>> >> >><br>>> >> >> The old code is commented out.<br>
>> >> >><br>>> >> >> Joshua Roberts<br>>> >> >> <br>>> >> ><br>>> >> ><br>>> >> > <br>>> >> <br>>> >> _______________________________________________<br>
>> >> Ale mailing list<br>>> >> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>>> >> <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>
>> >> See JOBS, ANNOUNCE and SCHOOLS lists at<br>>> >> <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>>> > <br>>> > <br>>> > _______________________________________________<br>
>> > Ale mailing list<br>>> > <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>>> > <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>>> > See JOBS, ANNOUNCE and SCHOOLS lists at<br>
>> > <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>>> <br>>> _______________________________________________<br>>> Ale mailing list<br>>> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
>> <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>>> See JOBS, ANNOUNCE and SCHOOLS lists at<br>>> <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br>
> <br>> <br>> _______________________________________________<br>> Ale mailing list<br>> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>> <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>> <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br></div>