Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!137.226.75.22.MISMATCH!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Recommendation for a good Android programming book? Date: Tue, 26 May 2015 17:21:32 -0400 Organization: A noiseless patient Spider Lines: 92 Message-ID: References: <54d7e90b-302b-45ef-8f55-22eb38e8c60d@googlegroups.com> <7c1d9qow7tvt.1hllzvzp9zig2.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 26 May 2015 21:20:25 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="21942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+4XWWQFARQsd0BNB+7yq4" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: Cancel-Lock: sha1:uiI1RWulnN3akfg3mOFbCYYy3Xw= Xref: csiph.com comp.lang.java.programmer:31745 On 5/26/2015 3:52 PM, Martin Gregorie wrote: > On Tue, 26 May 2015 13:27:03 +0200, Joerg Meier wrote: > >> >> My God, do you guys still use MS-DOS and OS/2 as well ? >> > [...] In short, almost all my professional programming career has > used command linbes for development. I have never been impressed enough > with the additional capabilities, if any, of any IDE I've seen to think > it was worth installing and learning to use it. > > However, that's a personal viewpoint and yours may well be quite > different. An IDE (I use NetBeans for Java work) can be helpful in a few ways a plain editor isn't, mostly because the IDE can be language-aware. If I decide to change the name of a variable or method, or even of a class or a package, the IDE can manage the change throughout an entire source collection. This is a more precise operation than a global search-and-replace, because the IDE can distinguish one `x' from another: If I rename one of my instance fields from `x' to `columnIndex', the IDE won't mess up the references to `x' in some other class like java.awt.Point. Another convenience is auto-generation of code, or at least of code stubs. If I add `implements Kissable' to a class declaration, the IDE will tell me to write pucker() and smooch() methods, and will even offer to generate skeletons for them: @Override public void pucker() { throw new UnsupportedOperationException( "Not implemented yet."); } @Override public PulseRate smooch(long timeout) { throw new UnsupportedOperationException( "Not implemented yet."); } Granted, these aren't the most useful method bodies imaginable, but I find it helpful to have the boiler-plate in place (and typo-free). The IDE will also generate full-fledged implementations for getters and setters (although one often must add validity checks to the latter), and for equals() and hashCode() and a few others. (And when it writes equals() for you, it doesn't ever fall into the all- too-easy trap of writing `public boolean equals(Thing that)' instead of `public boolean equals(Object obj)'.) Finally, I like auto-completion. Java's class libraries have caught the interminableIdentifierLongerIsByDefinitionBetterDisease, and a clumsy typist (that would be Me) is happy to type `JFrame.EX' and let the IDE supply `IT_ON_CLOSE', correctly spelled and all. Editors can do this, sort of, but the IDE's suggestions are sensitive to the context: In a JFrame context `EX' elicits `IT_ON_CLOSE', while in a CanonizalizationMethod context you'll see `CLUSIVE' and `CLUSIVE_WITH_COMMENTS'. Admittedly, there are times I wish the IDE would just get out of my way and let me write code. It's constantly nagging me about non- problems: private static final int NORTH = 0; private static final int EAST = 1; private static final int SOUTH = 2; private static final int WEST = 3; ... int directionMask = 0x1 << NORTH; ... and the stoopid IDE gets its knickers in a twist about the "useless bitwise operation" that is "almost certainly an error." Pfui! Or, there's Vector names = new Vector<>(); names.add("Eric"); names.add("Martin"); ... JList nameList = new JList<>(names); Here, the IDE gets all schoolmarmish and tells me I should drop Vector and use ArrayList instead -- but does it offer to write a new JList constructor for me? No-o-o-o! Again, pfui! All in all, though, I find an IDE more helpful than hindering, and am (usually) glad to have it. If you haven't tried one recently, you may find their "capabilities, if any" have improved since last you looked. -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM