Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31728 > unrolled thread

Recommendation for a good Android programming book?

Started byKnute Johnson <nospam@rabbitbrush.frazmtn.com>
First post2015-05-20 15:16 -0700
Last post2015-06-06 23:48 -0400
Articles 20 on this page of 30 — 7 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Recommendation for a good Android programming book? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-05-20 15:16 -0700
    Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-05-21 20:30 -0400
    Re: Recommendation for a good Android programming book? e.d.programmer@gmail.com - 2015-05-22 08:16 -0700
      Re: Recommendation for a good Android programming book? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-05-25 20:40 -0700
        Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-05-26 10:15 +0000
          Re: Recommendation for a good Android programming book? Joerg Meier <joergmmeier@arcor.de> - 2015-05-26 13:27 +0200
            Re: Recommendation for a good Android programming book? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-05-26 07:33 -0700
            Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-05-26 19:52 +0000
              Re: Recommendation for a good Android programming book? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-05-26 17:21 -0400
                Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-05-26 22:36 +0000
                  Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-03 21:26 -0400
                    Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-06-04 21:00 +0000
                      Re: Recommendation for a good Android programming book? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-06-05 08:06 -0400
                        Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-06-05 17:30 +0000
                          Re: Recommendation for a good Android programming book? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-06-05 13:59 -0400
                      Re: Recommendation for a good Android programming book? e.d.programmer@gmail.com - 2015-06-05 05:50 -0700
                        Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-06-05 17:35 +0000
                          Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-06 23:50 -0400
                            Re: Recommendation for a good Android programming book? e.d.programmer@gmail.com - 2015-06-08 07:39 -0700
                              Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-28 21:42 -0400
                                Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-06-29 08:20 +0000
                                  Re: Recommendation for a good Android programming book? Jeff Higgins <jeff@invalid.invalid> - 2015-06-29 05:49 -0400
                                    Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-29 07:37 -0400
                                  Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-29 07:35 -0400
                                    Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-06-29 15:01 +0000
                                      Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-29 14:08 -0400
                                        Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-29 14:18 -0400
                                          Re: Recommendation for a good Android programming book? Martin Gregorie <martin@address-in-sig.invalid> - 2015-06-29 21:00 +0000
                                            Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-07-27 22:22 -0400
                      Re: Recommendation for a good Android programming book? Arne Vajhøj <arne@vajhoej.dk> - 2015-06-06 23:48 -0400

Page 1 of 2  [1] 2  Next page →


#31728 — Recommendation for a good Android programming book?

FromKnute Johnson <nospam@rabbitbrush.frazmtn.com>
Date2015-05-20 15:16 -0700
SubjectRecommendation for a good Android programming book?
Message-ID<mjj121$u5s$1@dont-email.me>
Anybody got a recommendation for a good Android programming book based 
on the current Android Studio?

Thanks,

-- 

Knute Johnson

[toc] | [next] | [standalone]


#31730

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-05-21 20:30 -0400
Message-ID<555e78a0$0$288$14726298@news.sunsite.dk>
In reply to#31728
On 5/21/2015 7:59 PM, Stefan Ram wrote:
> Knute Johnson <nospam@rabbitbrush.frazmtn.com> writes:
>> Anybody got a recommendation for a good Android programming book based
>> on the current Android Studio?
>
>    Most Android books are alike, as if one author had copied the
>    structure from another author. For example, near the begining
>    you will learn that there are four types of components (activities,
>    broadcast receivers, and two others I now have forgotten) and
>    about the lifecycle of an activity (onCreate, onResume, onPause, ...).
>    You will learn about the structure of a file called IIRC
>    »AndroidManifest.XML«. There is not (yet) an outstanding work
>    that can be highly recommended (such as »Effective Java« by
>    Joshua Bloch or »Exceptional C++« by Herb Sutter).

I think that is oranges and apples.

There is a big difference between books teaching how to program X
and books teaching how to be better at programming X.

>    Newer books will also teach new APIs, like fragments. But to
>    learn the fundamentals, this is not required.
>
>    Another type of Android programming book is the »Android
>    programming cookbook« kind of book, there you will find
>    »recipes«, for example, how to take a picture using the cam.
>    These books might assume that the fundamentals are already know.
>    If you happen to need a certain »recipe« and you find this
>    in a certain cookbook, then this book is good for you,
>    even if you do not need the other recipes right now.
>
>    I checked out Android Studio. If you have no problems with software
>    that will connect to the internet and does stuff there that you
>    don't know about, it might be ok for you!
>
>    The build system of Android Studio is Gradle. I checked out Gradle.
>    In 2013 or 2014, I found that the Gradle DSL does not seem to
>    be well documented. See the repost below.
>
>    I wasted some time trying to understand and use Gradle.
>    And what works best for me now, is to just call the SDK myself!
>    No Ant, no gradle, no Eclipse, no AndroidStudio.
>    I just call javac, dex, aapt and jarsigner from a batch script.
>    I know what is going on, it's fast, and I can even do this
>    natively on an Android device using Terminal IDE (which,
>    however, does not work on Android 5 yet).

I would be tempted to do the same.

But that is not the norm in 2015.

And if you really want to learn to program X then you
need to learn the way it is done out in the world.

Arne



[toc] | [prev] | [next] | [standalone]


#31732

Frome.d.programmer@gmail.com
Date2015-05-22 08:16 -0700
Message-ID<54d7e90b-302b-45ef-8f55-22eb38e8c60d@googlegroups.com>
In reply to#31728
On Thursday, May 21, 2015 at 8:00:08 PM UTC-4, Stefan Ram wrote:
> Knute Johnson <nospam@rabbitbrush.frazmtn.com> writes:
> >Anybody got a recommendation for a good Android programming book based 
> >on the current Android Studio?
> 
>   Most Android books are alike, as if one author had copied the
>   structure from another author. For example, near the begining
>   you will learn that there are four types of components (activities,
>   broadcast receivers, and two others I now have forgotten) and
>   about the lifecycle of an activity (onCreate, onResume, onPause, ...).
>   You will learn about the structure of a file called IIRC
>   »AndroidManifest.XML«. There is not (yet) an outstanding work 
>   that can be highly recommended (such as »Effective Java« by
>   Joshua Bloch or »Exceptional C++« by Herb Sutter).
> 
>   Newer books will also teach new APIs, like fragments. But to
>   learn the fundamentals, this is not required.
> 
>   Another type of Android programming book is the »Android
>   programming cookbook« kind of book, there you will find
>   »recipes«, for example, how to take a picture using the cam.
>   These books might assume that the fundamentals are already know.
>   If you happen to need a certain »recipe« and you find this
>   in a certain cookbook, then this book is good for you,
>   even if you do not need the other recipes right now.
> 
>   I checked out Android Studio. If you have no problems with software
>   that will connect to the internet and does stuff there that you
>   don't know about, it might be ok for you!
> 
>   The build system of Android Studio is Gradle. I checked out Gradle.
>   In 2013 or 2014, I found that the Gradle DSL does not seem to
>   be well documented. See the repost below.
> 
>   I wasted some time trying to understand and use Gradle.
>   And what works best for me now, is to just call the SDK myself!
>   No Ant, no gradle, no Eclipse, no AndroidStudio.
>   I just call javac, dex, aapt and jarsigner from a batch script.
>   I know what is going on, it's fast, and I can even do this
>   natively on an Android device using Terminal IDE (which,
>   however, does not work on Android 5 yet).
> 

Why not just use Eclipse with the Android plugin?

[toc] | [prev] | [next] | [standalone]


#31738

FromKnute Johnson <nospam@rabbitbrush.frazmtn.com>
Date2015-05-25 20:40 -0700
Message-ID<mk0ps1$6uq$1@dont-email.me>
In reply to#31732
On 5/22/2015 08:16, e.d.programmer@gmail.com wrote:
> On Thursday, May 21, 2015 at 8:00:08 PM UTC-4, Stefan Ram wrote:
>> Knute Johnson <nospam@rabbitbrush.frazmtn.com> writes:
>>> Anybody got a recommendation for a good Android programming book based
>>> on the current Android Studio?
>>
>>    Most Android books are alike, as if one author had copied the
>>    structure from another author. For example, near the begining
>>    you will learn that there are four types of components (activities,
>>    broadcast receivers, and two others I now have forgotten) and
>>    about the lifecycle of an activity (onCreate, onResume, onPause, ...).
>>    You will learn about the structure of a file called IIRC
>>    »AndroidManifest.XML«. There is not (yet) an outstanding work
>>    that can be highly recommended (such as »Effective Java« by
>>    Joshua Bloch or »Exceptional C++« by Herb Sutter).
>>
>>    Newer books will also teach new APIs, like fragments. But to
>>    learn the fundamentals, this is not required.
>>
>>    Another type of Android programming book is the »Android
>>    programming cookbook« kind of book, there you will find
>>    »recipes«, for example, how to take a picture using the cam.
>>    These books might assume that the fundamentals are already know.
>>    If you happen to need a certain »recipe« and you find this
>>    in a certain cookbook, then this book is good for you,
>>    even if you do not need the other recipes right now.
>>
>>    I checked out Android Studio. If you have no problems with software
>>    that will connect to the internet and does stuff there that you
>>    don't know about, it might be ok for you!
>>
>>    The build system of Android Studio is Gradle. I checked out Gradle.
>>    In 2013 or 2014, I found that the Gradle DSL does not seem to
>>    be well documented. See the repost below.
>>
>>    I wasted some time trying to understand and use Gradle.
>>    And what works best for me now, is to just call the SDK myself!
>>    No Ant, no gradle, no Eclipse, no AndroidStudio.
>>    I just call javac, dex, aapt and jarsigner from a batch script.
>>    I know what is going on, it's fast, and I can even do this
>>    natively on an Android device using Terminal IDE (which,
>>    however, does not work on Android 5 yet).
>>
>
> Why not just use Eclipse with the Android plugin?
>

Since I don't know Eclipse any better than I know IntelliJ I don't think 
that would help.  I periodically download the latest Java and NetBeans 
but I give up pretty quick and go back to Vim and a batch file. 
Dinosaur I guess :-).

Thanks,

-- 

Knute Johnson

[toc] | [prev] | [next] | [standalone]


#31739

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-05-26 10:15 +0000
Message-ID<mk1h3a$eus$2@dont-email.me>
In reply to#31738
On Mon, 25 May 2015 20:40:01 -0700, Knute Johnson wrote:

> Since I don't know Eclipse any better than I know IntelliJ I don't think
> that would help.  I periodically download the latest Java and NetBeans
> but I give up pretty quick and go back to Vim and a batch file. Dinosaur
> I guess :-).
> 
In general I agree with you, Knute, except that I do use ant: think of it 
as make with XML recipes. IMO setting up the XML is a bigger pain than 
writing a makefile, but the difference isn't great.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#31740

FromJoerg Meier <joergmmeier@arcor.de>
Date2015-05-26 13:27 +0200
Message-ID<7c1d9qow7tvt.1hllzvzp9zig2.dlg@40tude.net>
In reply to#31739
On Tue, 26 May 2015 10:15:06 +0000 (UTC), Martin Gregorie wrote:

> On Mon, 25 May 2015 20:40:01 -0700, Knute Johnson wrote:
>> Since I don't know Eclipse any better than I know IntelliJ I don't think
>> that would help.  I periodically download the latest Java and NetBeans
>> but I give up pretty quick and go back to Vim and a batch file. Dinosaur
>> I guess :-).
> In general I agree with you, Knute, except that I do use ant: think of it 
> as make with XML recipes. IMO setting up the XML is a bigger pain than 
> writing a makefile, but the difference isn't great.

My God, do you guys still use MS-DOS and OS/2 as well ?

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

[toc] | [prev] | [next] | [standalone]


#31741

FromKnute Johnson <nospam@rabbitbrush.frazmtn.com>
Date2015-05-26 07:33 -0700
Message-ID<mk2052$cjh$1@dont-email.me>
In reply to#31740
On 5/26/2015 04:27, Joerg Meier wrote:
> On Tue, 26 May 2015 10:15:06 +0000 (UTC), Martin Gregorie wrote:
>
>> On Mon, 25 May 2015 20:40:01 -0700, Knute Johnson wrote:
>>> Since I don't know Eclipse any better than I know IntelliJ I don't think
>>> that would help.  I periodically download the latest Java and NetBeans
>>> but I give up pretty quick and go back to Vim and a batch file. Dinosaur
>>> I guess :-).
>> In general I agree with you, Knute, except that I do use ant: think of it
>> as make with XML recipes. IMO setting up the XML is a bigger pain than
>> writing a makefile, but the difference isn't great.
>
> My God, do you guys still use MS-DOS and OS/2 as well ?
>
> Liebe Gruesse,
> 		Joerg
>

No but I've got an MS-DOS on 3.5 inch disks and an OS/2 development kit, 
you want to buy them?

-- 

Knute Johnson

[toc] | [prev] | [next] | [standalone]


#31744

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-05-26 19:52 +0000
Message-ID<mk2iup$m42$1@dont-email.me>
In reply to#31740
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 ?
>
No, Nothing but Linux these days. However, I've done hugely more 
development using a command line that I've ever done with an IDE, so I'm 
happier with several console windows open and a decent multi-buffer 
editor plus ant/make than I've ever been with an IDE. I think the only 
ones I've used were (in date sequence):

- Borland C 3.2 and 4.5 
     non-standard make, very pedestrian editor and debugger
- Parallax BS2 STAMP 
     not a bad IDE but must be used since it is also the compiler,
     program loader and debug interface for the STAMP, which is a
     micro-PCB with a serial interface thats used for program loading 
     and debugging
- IntelliJ 
     very cluttered screen and first and second sight, and the editor
     isn't more than average apart from its refactoring ability   

OTOH I've used command lines development environments via teletypes, 
glass teletypes, block-mode terminals (ICL 2900/3900/ IBM S/360, AS/400), 
several types of serial terminal (VT100, Wyse120, Hazeltine and SWTPc) 
and X-term. 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.
 

-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#31745

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2015-05-26 17:21 -0400
Message-ID<mk2o2o$ldm$1@dont-email.me>
In reply to#31744
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<String> names = new Vector<>();
	names.add("Eric");
	names.add("Martin");
	...
	JList<String> 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

[toc] | [prev] | [next] | [standalone]


#31746

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-05-26 22:36 +0000
Message-ID<mk2shj$5i4$1@dont-email.me>
In reply to#31745
On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:

> 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.
> 
I normally use microEmacs, which can do almost that:

me org/gregorie/newproject/*.java

Then tell it once only what I want it to replace and what with just once 
and it works through all the files. I've never discovered a limit to the 
number of files it can load. As a bonus the search term can be a regex.

>      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.
>
Since I also write a lot of C and lesser amounts of bash and gawk, I 
suspect I'd be stuck with Eclipse since I really wouldn't want to learn a 
different IDE for each language. the other thing I didn't much like about 
any of the IDEs I've used is the necessity to use the mouse frequently, 
which I find slows me down a lot, while working the way I do, I don't 
need to touch it unless I need to switch console windows and, when it 
comes to repeating one or more commands, scrolling/searching up with bash 
and then hitting RETURN is faster and less of an interruption than having 
to grab a mouse. But, as I said, its just another case of horses for 
courses.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#31759

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-06-03 21:26 -0400
Message-ID<556fa92c$0$295$14726298@news.sunsite.dk>
In reply to#31746
[sorry if duplicate post]

On 5/26/2015 6:36 PM, Martin Gregorie wrote:
 > On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:
 >> 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.
 >>
 > I normally use microEmacs, which can do almost that:
 >
 > me org/gregorie/newproject/*.java
 >
 > Then tell it once only what I want it to replace and what with just once
 > and it works through all the files. I've never discovered a limit to the
 > number of files it can load. As a bonus the search term can be a regex.

Yes. But can it distinguish between different x's based on the meaning
of the code within the files being edited?

Arne

[toc] | [prev] | [next] | [standalone]


#31767

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-06-04 21:00 +0000
Message-ID<mkqe9c$bi5$1@dont-email.me>
In reply to#31759
On Wed, 03 Jun 2015 21:26:04 -0400, Arne Vajhøj wrote:

> [sorry if duplicate post]
> 
> On 5/26/2015 6:36 PM, Martin Gregorie wrote:
>  > On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:
>  >> 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.
>  >>
>  > I normally use microEmacs, which can do almost that:
>  >
>  > me org/gregorie/newproject/*.java
>  >
>  > Then tell it once only what I want it to replace and what with just
>  > once and it works through all the files. I've never discovered a
>  > limit to the number of files it can load. As a bonus the search term
>  > can be a regex.
> 
> Yes. But can it distinguish between different x's based on the meaning
> of the code within the files being edited?
>
No, unlike vi, where once you start an "s/x/y/" request running you can't 
interfere, microEmacs approach is to ask what you want to do at each 
match. The options are do it, skip this one, abandon (and it has an undo 
facility) or to get on and do the lot. This lets you pick and choose 
which matches to replace if you know that not all hits need replacing 
(your 'x' case), or if you know that all should be replaced, to check 
that the first one or two are working as expected and then let it do the 
rest without asking.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#31769

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2015-06-05 08:06 -0400
Message-ID<mks3a1$cnm$1@dont-email.me>
In reply to#31767
On 6/4/2015 5:00 PM, Martin Gregorie wrote:
> On Wed, 03 Jun 2015 21:26:04 -0400, Arne Vajhøj wrote:
>
>> [sorry if duplicate post]
>>
>> On 5/26/2015 6:36 PM, Martin Gregorie wrote:
>>   > On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:
>>   >> 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.
>>   >>
>>   > I normally use microEmacs, which can do almost that:
>>   >
>>   > me org/gregorie/newproject/*.java
>>   >
>>   > Then tell it once only what I want it to replace and what with just
>>   > once and it works through all the files. I've never discovered a
>>   > limit to the number of files it can load. As a bonus the search term
>>   > can be a regex.
>>
>> Yes. But can it distinguish between different x's based on the meaning
>> of the code within the files being edited?
>>
> No, unlike vi, where once you start an "s/x/y/" request running you can't
> interfere, microEmacs approach is to ask what you want to do at each
> match. The options are do it, skip this one, abandon (and it has an undo
> facility) or to get on and do the lot. This lets you pick and choose
> which matches to replace if you know that not all hits need replacing
> (your 'x' case), or if you know that all should be replaced, to check
> that the first one or two are working as expected and then let it do the
> rest without asking.

     So, you get to see

	int value = things[i].x;

... and then you answer "yes" or "no?"

     Trust me, Martin: An IDE will do this *much* more easily and *much*
more accurately than what you've described, because the IDE knows what
type `things[i]' is, even if the declaration is four hundred lines away
from the point of use.

     There certainly was a time when Java IDE's were rather pathetically
awful.  I started using NetBeans at version 3 (my then employer's
choice), and it wasn't until version 5 that it became worth the trouble.
But it has in fact become worth the trouble, and an impression of its
uselessness that you might have formed some years ago may not still be
accurate.  (I've had only the briefest exposure to Eclipse and none at
all to other Java IDE's, but I'd imagine they, too, have progressed.)

     "Horses for courses," you said, and that's fine.  But I'd encourage
you to take a fresh look at the stable; the horses there are no longer
helpless foals.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

[toc] | [prev] | [next] | [standalone]


#31771

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-06-05 17:30 +0000
Message-ID<mksmbl$t4s$1@dont-email.me>
In reply to#31769
On Fri, 05 Jun 2015 08:06:32 -0400, Eric Sosman wrote:

> On 6/4/2015 5:00 PM, Martin Gregorie wrote:
>> On Wed, 03 Jun 2015 21:26:04 -0400, Arne Vajhøj wrote:
>>
>>> [sorry if duplicate post]
>>>
>>> On 5/26/2015 6:36 PM, Martin Gregorie wrote:
>>>   > On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:
>>>   >> 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.
>>>   >>
>>>   > I normally use microEmacs, which can do almost that:
>>>   >
>>>   > me org/gregorie/newproject/*.java
>>>   >
>>>   > Then tell it once only what I want it to replace and what with
>>>   > just once and it works through all the files. I've never
>>>   > discovered a limit to the number of files it can load. As a bonus
>>>   > the search term can be a regex.
>>>
>>> Yes. But can it distinguish between different x's based on the meaning
>>> of the code within the files being edited?
>>>
>> No, unlike vi, where once you start an "s/x/y/" request running you
>> can't interfere, microEmacs approach is to ask what you want to do at
>> each match. The options are do it, skip this one, abandon (and it has
>> an undo facility) or to get on and do the lot. This lets you pick and
>> choose which matches to replace if you know that not all hits need
>> replacing (your 'x' case), or if you know that all should be replaced,
>> to check that the first one or two are working as expected and then let
>> it do the rest without asking.
> 
>      So, you get to see
> 
> 	int value = things[i].x;
> 
> ... and then you answer "yes" or "no?"
>
All are single keystrokes Y/y to make the change, N/n to skip it, Ctrl/C 
to abort, ! to do the rest without prompts. I don't see what's hard about 
that.

    
>      Trust me, Martin: An IDE will do this *much* more easily and *much*
> more accurately than what you've described, because the IDE knows what
> type `things[i]' is, even if the declaration is four hundred lines away
> from the point of use.
>
So, how's that different from what almost any good editor? 

About the only things I've seen that an IDE (IntelliJ, arounf Java 5 or 6 
time) could do better that a good editor were some types of refactoring, 
and that was offset by less flexibility in search and replace operations.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#31773

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2015-06-05 13:59 -0400
Message-ID<mksnv3$6io$1@dont-email.me>
In reply to#31771
On 6/5/2015 1:30 PM, Martin Gregorie wrote:
> On Fri, 05 Jun 2015 08:06:32 -0400, Eric Sosman wrote:
>
>> On 6/4/2015 5:00 PM, Martin Gregorie wrote:
>>> On Wed, 03 Jun 2015 21:26:04 -0400, Arne Vajhøj wrote:
>>>
>>>> [sorry if duplicate post]
>>>>
>>>> On 5/26/2015 6:36 PM, Martin Gregorie wrote:
>>>>    > On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:
>>>>    >> 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.
>>>>    >>
>>>>    > I normally use microEmacs, which can do almost that:
>>>>    >
>>>>    > me org/gregorie/newproject/*.java
>>>>    >
>>>>    > Then tell it once only what I want it to replace and what with
>>>>    > just once and it works through all the files. I've never
>>>>    > discovered a limit to the number of files it can load. As a bonus
>>>>    > the search term can be a regex.
>>>>
>>>> Yes. But can it distinguish between different x's based on the meaning
>>>> of the code within the files being edited?
>>>>
>>> No, unlike vi, where once you start an "s/x/y/" request running you
>>> can't interfere, microEmacs approach is to ask what you want to do at
>>> each match. The options are do it, skip this one, abandon (and it has
>>> an undo facility) or to get on and do the lot. This lets you pick and
>>> choose which matches to replace if you know that not all hits need
>>> replacing (your 'x' case), or if you know that all should be replaced,
>>> to check that the first one or two are working as expected and then let
>>> it do the rest without asking.
>>
>>       So, you get to see
>>
>> 	int value = things[i].x;
>>
>> ... and then you answer "yes" or "no?"
>>
> All are single keystrokes Y/y to make the change, N/n to skip it, Ctrl/C
> to abort, ! to do the rest without prompts. I don't see what's hard about
> that.

     I'll try to be clearer.  Suppose you've got

	public class Thing {
	    public final int x;
	    ...
	}

... and you decide `columnIndex' would be a better name than `x'.  In
another file, perhaps, you've got

	Thing thing = ...;  // has a field named `x'
	java.awt.Point point = ...;  // has a field named `x'

	... four hundred lines ...

	int value = theReference.x;

Now the editor shows you the last of these lines and asks you to
decide Y or N: Should the `x' change to `columnIndex', or should it
remain as it is?  The IDE will get this right every single time;
I certainly couldn't, and I'd be surprised if you could.

     When I wrote my first programs, my editor of choice was the
IBM 026 keypunch.  Tools have improved -- and I've been glad to take
advantage of the improvements, even though I'm temperamentally a bit
of a Luddite.  All I'm saying is that it's an error to judge today's
tools by what yesterday's were like, even if they share a brand name.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

[toc] | [prev] | [next] | [standalone]


#31770

Frome.d.programmer@gmail.com
Date2015-06-05 05:50 -0700
Message-ID<f0f65df3-9e3a-4faf-953a-50de2f1b92d9@googlegroups.com>
In reply to#31767
On Thursday, June 4, 2015 at 5:02:01 PM UTC-4, Martin Gregorie wrote:
> On Wed, 03 Jun 2015 21:26:04 -0400, Arne Vajhøj wrote:
> 
> > [sorry if duplicate post]
> > 
> > On 5/26/2015 6:36 PM, Martin Gregorie wrote:
> >  > On Tue, 26 May 2015 17:21:32 -0400, Eric Sosman wrote:
> >  >> 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.
> >  >>
> >  > I normally use microEmacs, which can do almost that:
> >  >
> >  > me org/gregorie/newproject/*.java
> >  >
> >  > Then tell it once only what I want it to replace and what with just
> >  > once and it works through all the files. I've never discovered a
> >  > limit to the number of files it can load. As a bonus the search term
> >  > can be a regex.
> > 
> > Yes. But can it distinguish between different x's based on the meaning
> > of the code within the files being edited?
> >
> No, unlike vi, where once you start an "s/x/y/" request running you can't 
> interfere, microEmacs approach is to ask what you want to do at each 
> match. The options are do it, skip this one, abandon (and it has an undo 
> facility) or to get on and do the lot. This lets you pick and choose 
> which matches to replace if you know that not all hits need replacing 
> (your 'x' case), or if you know that all should be replaced, to check 
> that the first one or two are working as expected and then let it do the 
> rest without asking.
> 
> 
> -- 
> martin@   | Martin Gregorie
> gregorie. | Essex, UK
> org       |

This sounds great, if you're coding on a 486.  If you're using a decent machine I'd recommend an IDE.  There's a BlueJ if you're in grade school, NetBeans if you want someone to hold your hand, and Eclipse if you know what you're doing.
Changing variables can be tedious, if for instance I want to change the input parameter to a few dozen grid related methods to all use the name rowIndex.  Finding and changing object class and method references in Eclipse is functionality that is hard to beat.

[toc] | [prev] | [next] | [standalone]


#31772

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2015-06-05 17:35 +0000
Message-ID<mksmkf$t4s$2@dont-email.me>
In reply to#31770
On Fri, 05 Jun 2015 05:50:03 -0700, e.d.programmer wrote:

> This sounds great, if you're coding on a 486.  If you're using a decent
> machine I'd recommend an IDE.
>
I'm interested only if said IDE can do exactly the same stuff in exactly 
the same way for any language (C, Perl, Java, awk, python and COBOL as a 
minimum set). Anything else just wastes my time having to learn and 
remember different ways of working for each language while a good text 
editor works the same way for any language and under any supported OS.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#31777

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-06-06 23:50 -0400
Message-ID<5573bfa2$0$302$14726298@news.sunsite.dk>
In reply to#31772
On 6/5/2015 1:35 PM, Martin Gregorie wrote:
> On Fri, 05 Jun 2015 05:50:03 -0700, e.d.programmer wrote:
>
>> This sounds great, if you're coding on a 486.  If you're using a decent
>> machine I'd recommend an IDE.
>>
> I'm interested only if said IDE can do exactly the same stuff in exactly
> the same way for any language (C, Perl, Java, awk, python and COBOL as a
> minimum set). Anything else just wastes my time having to learn and
> remember different ways of working for each language while a good text
> editor works the same way for any language and under any supported OS.

There are IDE's that support many languages and many platforms and
behave as similar as possible.

Eclipse comes to my mind.

Arne

[toc] | [prev] | [next] | [standalone]


#31781

Frome.d.programmer@gmail.com
Date2015-06-08 07:39 -0700
Message-ID<4f7c6df1-f3cb-4087-a170-97acf40dd9a5@googlegroups.com>
In reply to#31777
On Saturday, June 6, 2015 at 11:52:28 PM UTC-4, Arne Vajhøj wrote:
> On 6/5/2015 1:35 PM, Martin Gregorie wrote:
> > On Fri, 05 Jun 2015 05:50:03 -0700, e.d.programmer wrote:
> >
> >> This sounds great, if you're coding on a 486.  If you're using a decent
> >> machine I'd recommend an IDE.
> >>
> > I'm interested only if said IDE can do exactly the same stuff in exactly
> > the same way for any language (C, Perl, Java, awk, python and COBOL as a
> > minimum set). Anything else just wastes my time having to learn and
> > remember different ways of working for each language while a good text
> > editor works the same way for any language and under any supported OS.
> 
> There are IDE's that support many languages and many platforms and
> behave as similar as possible.
> 
> Eclipse comes to my mind.
> 
> Arne

We use Eclipse for Java, Oracle Java and Android Java, so I know it supports other languages but I don't know which ones.  If it doesn't have built in support for another specific language it does support plugins which can make it support any language.  You can write your own plugins, though if the language is somewhat popular odds are someone else already wrote one.

Programming any language in a generic text editor sounds tedious.  PsPad is my favorite, which can do syntax highlighting, but generic text doesn't do anything fancy such as refactoring or filling in sections of code which end up similar in every program.

[toc] | [prev] | [next] | [standalone]


#31869

FromArne Vajhøj <arne@vajhoej.dk>
Date2015-06-28 21:42 -0400
Message-ID<5590a27b$0$301$14726298@news.sunsite.dk>
In reply to#31781
On 6/8/2015 10:39 AM, e.d.programmer@gmail.com wrote:
> On Saturday, June 6, 2015 at 11:52:28 PM UTC-4, Arne Vajhøj wrote:
>> On 6/5/2015 1:35 PM, Martin Gregorie wrote:
>>> On Fri, 05 Jun 2015 05:50:03 -0700, e.d.programmer wrote:
>>>
>>>> This sounds great, if you're coding on a 486.  If you're using
>>>> a decent machine I'd recommend an IDE.
>>>>
>>> I'm interested only if said IDE can do exactly the same stuff in
>>> exactly the same way for any language (C, Perl, Java, awk, python
>>> and COBOL as a minimum set). Anything else just wastes my time
>>> having to learn and remember different ways of working for each
>>> language while a good text editor works the same way for any
>>> language and under any supported OS.
>>
>> There are IDE's that support many languages and many platforms and
>> behave as similar as possible.
>>
>> Eclipse comes to my mind.
>
> We use Eclipse for Java, Oracle Java and Android Java, so I know it
> supports other languages but I don't know which ones.  If it doesn't
> have built in support for another specific language it does support
> plugins which can make it support any language.  You can write your
> own plugins, though if the language is somewhat popular odds are
> someone else already wrote one.

Everything in Eclipse is a plugin even Java.

My experience with Eclipse and languages are:

good support: Java, Scala, C, C++, Fortran, PHP, Perl, Python, Ruby, 
Tcl, JavaScript, Ada

bad support: C#, Cobol (the open source one not the MicroFocus one)

unknown support: Groovy, Clojure, Lua

no support: PL/I, VB

Arne

Disclaimer: I do not know all language well enough to truly evaluate
capabilities and for some of the languages it is many years ago
since I last tried.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.java.programmer


csiph-web