Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

Recommend a good free text editor?

Thread view: 
Atreju - 12 Dec 2007 05:44 GMT
Hi all,

Following up from a previous post, I just started using Sams Teach
Yourself Java 6 in 21 days. So far it seems very nice, very similar to
my old VB book of the same series.

However, the text editor it comes with is buggy (for example, doesn't
colorize syntax until file is saved) and doesn't really do what I
need, and I'm wondering if anyone knows of any java-aware freeware
editors that do what i need:

For example, I had compile errors a few times because I failed to
capitalize the word "String" and simliarly I named a method
"showAttributes" but when I called it in an application I accidentally
capitalized ShowAttributes and it did not recognize any time I used it
like that, until I changed them to lowercase the way it is written in
the method declaration.

Having been using VB for so long, I'm spoiled in that, let's say I
name a variable strMyStringVariableWithAWeirdName
I could type ANYWHERE in my project strmystringvariablewithaweirdname
and it would automatically recognize it as having been declared as a
variable, and it applied the appropriate capitalizations. This
"awareness" as it is referred to is extraordiarily useful for me, and
especially since I'm only just learning... I understand that in the
scope of a whole IDE it can have the power to recognize everything
built therein, but even just having not capitalized "String" in my
main, for example, caused me a problem:
I wrote
   public static void main(string[] arguments) {

and it left the word string un-capitalized. Given that's a variable
type that's part of the java language, I would think at least I could
get an editor that would correct that. It wouldn't compile until I
found that error.

Yes, yes, I know I've been spoiled, but I often, in my freeware hunts,
see a gazillion "editors" on the internet  that feature all kinds of
these abilities for various languages.

I need the easiest and most reliable one in terms of taking care of
holding my hand like this. I want something free. I've been browsing
sourceforge but nothing catches my eye yet, so I figured... here's a
good place to get recommendation.

Any recommendation is appreciated, thanks.
Lew - 12 Dec 2007 06:15 GMT
> ...  but even just having not capitalized "String" in my
> main, for example, caused me a problem:
[quoted text clipped - 5 lines]
> get an editor that would correct that. It wouldn't compile until I
> found that error.

Well, that editor trusted you.  It is conceivable, and legal, if ill advised,
to name a variable or a type "string", therefore it would be presumptuous of
an editor to re-cast the spelling.

As an example, it is quite common for people to use a construct like

  List list = ... ;

The editor cannot "correct" something that might not be wrong.

Signature

Lew

lord.zoltar@gmail.com - 12 Dec 2007 14:38 GMT
Symbol names in Java are case-sensitive. VB/VB.NET they are not and
the IDE is designed to correct a name to the way it was originally
spelled when declared.
That is why
String string = new String();
is valid. Also:
int a1;
int A1;
creates two DIFFERENT variables. The IDE won't want to presume which
one you mean, because it might get it wrong.
Atreju - 12 Dec 2007 15:56 GMT
>> ...  but even just having not capitalized "String" in my
>> main, for example, caused me a problem:
[quoted text clipped - 15 lines]
>
>The editor cannot "correct" something that might not be wrong.

Ah, see for example, in VB you cannot name a variable string. There
are lots of words you cannot use since they are reserved. I supposed
down in the core of the language BASIC, maybe you could, but the IDE
prevents you from using reserved words where inappropriate.

Perhaps it is in fact an IDE I am in need of.
Lew - 12 Dec 2007 16:24 GMT
Lew wrote:
>> As an example, it is quite common for people to use a construct like
>>
>>   List list = ... ;
>>
>> The editor cannot "correct" something that might not be wrong.

> Ah, see for example, in VB you cannot name a variable string. There
> are lots of words you cannot use since they are reserved. I supposed
> down in the core of the language BASIC, maybe you could, but the IDE
> prevents you from using reserved words where inappropriate.
>
> Perhaps it is in fact an IDE I am in need of.

"list" and "string" are not reserved words in Java.

Signature

Lew

voorth - 12 Dec 2007 12:51 GMT
> I need the easiest and most reliable one in terms of taking care of
> holding my hand like this. I want something free. I've been browsing
> sourceforge but nothing catches my eye yet, so I figured... here's a
> good place to get recommendation.
>
> Any recommendation is appreciated, thanks.

There are several good IDE's that give you that; both Eclipse <http://
www.eclipse.org/> and NetBeans <http://www.netbeans.org/> are free and
support auto-completion, and more (refactoring support comes to mind).

I would recommend getting both and see which one suits you best.

Henk
Patricia Shanahan - 12 Dec 2007 14:50 GMT
> Hi all,
>
[quoted text clipped - 13 lines]
> like that, until I changed them to lowercase the way it is written in
> the method declaration.
...

This is not an editor issue, but a programming language design issue.
One of the key decisions in designing a programming language is whether
to treat capitalization as significant. Is "string" the same as "String"
or different?

An editor for a language in which identifier case is not significant can
treat these as equivalent, and normalize to one capitalization for display.

In Java, "showAttributes" and "ShowAttributes" are distinct identifiers.
An editor that automatically "corrected" one to get the other would be
badly broken. At the most, it should offer "showAttributes" as a
possible correction when it finds "ShowAttributes" is undefined.

If you are used to a language in which identifier capitalization is not
significant you may benefit from an IDE that will mark undefined
identifiers and offer corrections. I suggest Eclipse.

Patricia
Lew - 12 Dec 2007 15:23 GMT
> If you are used to a language in which identifier capitalization is not
> significant you may benefit from an IDE that will mark undefined
> identifiers and offer corrections. I suggest Eclipse.

NetBeans is a suitable alternative.

Signature

Lew

Atreju - 12 Dec 2007 16:03 GMT
>> If you are used to a language in which identifier capitalization is not
>> significant you may benefit from an IDE that will mark undefined
>> identifiers and offer corrections. I suggest Eclipse.
>
>NetBeans is a suitable alternative.

Yea the book came with Netbeans and I already installed Eclipse so
I'll play with both. Do these do what I'm referring to?

Despite what many have suggested, that myFunction and MyFuntioN are
two distinct things, I cannot imagine anyone wanting to use them
differently within any project... it makes for some serious confusion
not to mention not very good in terms of re-usability and clarity to
other developers looking at the code. I would think that even though
some conventions may be legitimate, any responsible developer would
avoid such things... I am only an amateur but one of the most
fundamental tenets I stick to is the code should be as consistent and
distinct and readable as possible. I realize what is being pointed out
is that the editor should not presume anything, but an IDE I hope
would recognize once a variable or a function has been declared and
then henceforth correct spelling to match it. Even, perhaps, as a
user-defined preference that it should do this.

Thanks for the advice all - I had a sneaking suspicion that what I
really needed was a full IDE not just an editor. I had been advised to
keep it very very simple at first and start just with text editors,
but I'm so used to being spoiled by an IDE that I guess maybe I should
dive right in and just ignore anything I don't need to know yet.

All your replies are much appreciated.

-Dan
Lew - 12 Dec 2007 16:27 GMT
>>> If you are used to a language in which identifier capitalization is not
>>> significant you may benefit from an IDE that will mark undefined
[quoted text clipped - 3 lines]
> Yea the book came with Netbeans and I already installed Eclipse so
> I'll play with both. Do these do what I'm referring to?

I'm not sure.  What exactly are you referring to?  Neither IDE can mark as an
error something that is not an error.

> Despite what many have suggested, that myFunction and MyFuntioN are
> two distinct things, I cannot imagine anyone wanting to use them
> differently within any project... it makes for some serious confusion

Not the compiler's problem.

> not to mention not very good in terms of re-usability and clarity to
> other developers looking at the code. I would think that even though
[quoted text clipped - 6 lines]
> then henceforth correct spelling to match it. Even, perhaps, as a
> user-defined preference that it should do this.

Also not the IDE's job.  Its job is to enforce correctness, not style, for the
most part.

> Thanks for the advice all - I had a sneaking suspicion that what I
> really needed was a full IDE not just an editor. I had been advised to
> keep it very very simple at first and start just with text editors,
> but I'm so used to being spoiled by an IDE that I guess maybe I should
> dive right in and just ignore anything I don't need to know yet.

IDEs aren't going to flag as wrong what is not wrong.

Signature

Lew

Atreju - 12 Dec 2007 18:25 GMT
>IDEs aren't going to flag as wrong what is not wrong.

I'll give you an example, and I know that to compare VB to Java is
likely to make some if not most readers of this post want to reach for
the Maalox, just hear me out.

What I'm looking for, it is possible that it doesn't exist, and this
could be because the java community does not want to baby down
anything but quite frankly, anything that makes my life easier is
good.

Let me give you an example of the way VB's "IntelliSense" works and
this is why I don't think it's such a horrific thing:

First of all, suggestions popup which is very useful since you can use
them or just ignore them:

Let's say I start typing dim strMyString as st
Once I start the word that follows "as" the IDE knows I'm declaring a
variable and it starts auto-suggesting things as I type. This may not
seem too amazingly useful to very seasoned developers, but let's say I
have defined a Type called "CustomizedRoundButton"

Let's say I want to declare a new one. It is a pain to type it all out
every time I'd want to do that, and once that Type has been defined
anywhere within the project, VB will use the intellisense as such:

I type "Dim myButton as cus
at this point, the intellisense is already suggesting filtered
possibilities, and my Type will be one of the few or even only one
available. I can then just hit enter or tab, and it fills in for me.

Now, the aforementioned is more of a luxury than a correction feature.
But in the example that I gave where my statement in java was:

String strStatus;

Let's say I had not capitalized "string"

string strStatus;

Would it not be sensible for the IDE to not only realize that there's
a syntax error here (which it does! it flags it in the gutter and also
redline's the word), but also popup with suggestions, probably the
foremost being "String"

It's possible what I'm really getting at here is more of a "I'd like
to see this feature" rather than a "why doesn't this happen?"

Just my thoughts on the matter, and I welcome comments/corrections
etc.

Dan

PS - Eclipse does something similar but it takes like 5
keystrokes/mouse-clicks to finally get to "choose" what it should
replace with!

However, all this having been said, I _WILL_ start diciplining myself
to use the proper convention, it is only that I never had to due to
VB's hand-holding. Whatever some people may say about VB, the IDE's
intellisense and its intuitiveness is extremely useful, and aside from
a staunch purist perspective, I can't see how anyone wouldn't want
that kind of functionality. You can turn it off if you don't want it.

Maybe this will be refined in future versions of java IDEs.
Mark Space - 12 Dec 2007 23:25 GMT
> Let's say I start typing dim strMyString as st
> Once I start the word that follows "as" the IDE knows I'm declaring a
> variable and it starts auto-suggesting things as I type. This may not

NetBeans already does this, at least to a degree.  As long as you get
the first couple of characters correct (capitalization counts), NetBeans
will pop up a suggested list of identifiers, with the first ones being
most likely.  You can press Control-Space to force this behavior if it
hasn't kicked in yet (maybe NetBeans thinks there are too many
identifiers still that match).

You can also press Control-K to match variable names that are in scope.
 This is a great why to copy parameters name from the argument list of
a method.

> Let's say I had not capitalized "string"
>
[quoted text clipped - 4 lines]
> redline's the word), but also popup with suggestions, probably the
> foremost being "String"

I don't think that NetBeans will suggest that string be String here.  It
will recognize that there is (most likely) a syntax error here and put a
red line under string, but you'll have to get the first few characters
of String correct then hit Control-Space to get a completion.

It's actually not too bad of an idea however.  Most Java programmers
just get used to case correctness I guess.  I don't mind it.  Still some
basic "word processor spelling checker" features like spotting incorrect
capitalization and transposed characters might not be a bad addition to
the editor.

Hmmm.....
Patricia Shanahan - 12 Dec 2007 18:44 GMT
...
> Despite what many have suggested, that myFunction and MyFuntioN are
> two distinct things, I cannot imagine anyone wanting to use them
> differently within any project... it makes for some serious confusion
> not to mention not very good in terms of re-usability and clarity to
> other developers looking at the code.
...

You will not get comfortable in a case-significant language until you
get used to thinking of them as distinct things. For example, I've seen
case used to distinguish between a constructor parameter and a field
that will remember it.

Patricia
Lew - 13 Dec 2007 03:32 GMT
> ....
>> Despite what many have suggested, that myFunction and MyFuntioN are
[quoted text clipped - 8 lines]
> case used to distinguish between a constructor parameter and a field
> that will remember it.

Having the IDE substitute "String" for "string" is as bad as having it
substitute "Integer" for "string".

Signature

Lew

Daniele Futtorovic - 12 Dec 2007 22:10 GMT
> Despite what many have suggested, that myFunction and MyFuntioN are
> two distinct things, I cannot imagine anyone wanting to use them
[quoted text clipped - 5 lines]
> fundamental tenets I stick to is the code should be as consistent and
>  distinct and readable as possible.

Java's case-sensitiveness forces you to write a given identifier every
time in the same manner. Don't you think that improves clarity and
readability? Note: in VB, it's your editor (a /specific/ editor) which
enforced consistency for your identifier's spelling. Not the language.

I have, sigh, been forced (well, kinda) to write VB.NET just recently.
It has been pissing me off in some ways, but the single thing which made
me really despise it was its case-INsensitivity, among other reasons
because it restricted my choices of identifiers -- what with its load of
keywords.

As for you being spoiled: I'd rather use the term "ruined". With all due
respect.

In the course of my .NET excursion, I've had to train a few apprentices.
The first thing I usually get irritated about is their lax handling of
character case. My advice is this: regardless of whether the piece of
software you're using allows you to trade an 'a' for an 'A' (a very
wide-spread phenomenon in the Microsoft world), *ALWAYS* mind the case.

This isn't the pathetic ranting of a pricky old geezer, for I'm not old.
It's about the, IMO, single most important trait of a programmer:
discipline. And discipline in programming is an all-or-nothing trade.
Minding case and similar "small" things might yield direct benefits --
but possibly only so much and those benefits might be got otherwise, as
with your editor enforcing your spelling's consistency. What's most
important with these things is the /attitude/ they help you develop (or
rather, admittedly: impose on you). Although it is only natural for
coertion to be percieved negatively by its object(s), in this case and
in the end it's a Good Thing (TM), IMO.

df.
Patricia Shanahan - 12 Dec 2007 22:37 GMT
>> Despite what many have suggested, that myFunction and MyFuntioN are
>> two distinct things, I cannot imagine anyone wanting to use them
[quoted text clipped - 10 lines]
> readability? Note: in VB, it's your editor (a /specific/ editor) which
> enforced consistency for your identifier's spelling. Not the language.

I disagree with this. In English, capitalization of a word can change
depending on its context, without changing the meaning. I'll capitalize
a word in a title that I would not capitalize in the middle of a normal
sentence. I don't think that makes English writers sloppy - it just
means capitalization does not have much to do with word meaning in that
language.

I don't have a strong view about which is better for programming
languages, case sensitive or case insensitive. Either works well.

What matters is for the programmer to match thinking and attitude to the
language - and that applies to a lot more than case sensitivity.

If you are programming in a case sensitive language, it is important to
really see "String" and "string" as different words, even though they
would be the same word in English or in any case-insensitive programming
language. Equally, if you are programming in a case-insensitive
language, you need to see them as the same word.

> This isn't the pathetic ranting of a pricky old geezer, for I'm not old.
> It's about the, IMO, single most important trait of a programmer:
> discipline.

On the other hand, this really is the pathetic ranting of a pricky old
geezeress? geezerette? she-geezer? (What is the female of "geezer"
anyway?). IMO, the most important trait of a programmer is mental
flexibility, including the ability to adjust thinking to fit the problem
and programming language. It is important to be disciplined about the
things that matter in the current context, and a waste of time and
effort to be unnecessarily precise about things that don't matter.

Patricia
Daniele Futtorovic - 13 Dec 2007 20:03 GMT
>>> Despite what many have suggested, that myFunction and MyFuntioN
>>> are two distinct things, I cannot imagine anyone wanting to use
[quoted text clipped - 19 lines]
> sloppy - it just means capitalization does not have much to do with
> word meaning in that language.

Well, my point was about programming languages, i.e. totally different
things than English. Consequently, what holds true for the former need
not be applicable to the latter, and what's a contradiction to the
latter needs not be a contradiction to the former.

> I don't have a strong view about which is better for programming
> languages, case sensitive or case insensitive. Either works well.

I'd agree either work equally well as far as the programming language is
concerned. I'd disagree either work equally well as far as the
/programmer/ is concerned.

> What matters is for the programmer to match thinking and attitude to
> the language - and that applies to a lot more than case sensitivity.

Why, certainly. Actually, one /automatically/ tends match their thinking
and attitude to the tool they use for (personal) productivity all day
long (IOW as long as they don't switch languages really often), since
that's a premice for maximizing effectiveness. This phenomenon is a
crucial part of my argumentation. I argue that there are languages which
are /better/ to match with your thinking than others.

> If you are programming in a case sensitive language, it is important
> to really see "String" and "string" as different words, even though
> they would be the same word in English or in any case-insensitive
> programming language. Equally, if you are programming in a
> case-insensitive language, you need to see them as the same word.

Again, that's my point. If "String" and "string" are the same thing, you
have to do additional checks while reading. Think collated comparisions
versus plain ones. If you can be sure that a sequence of characters
you're looking for (say for instance you're tracking a variable's use in
an algorithm) will appear, if relevant, in exactly the same form you saw
it first in, then it's much less of a mental strain to find it.
Remember the topic which came up a while ago, about humans being able to
read a (-n English) sentence where the words' letters were in a slightly
different order? The explanation is that in order to read fast, one does
not look at the individual letters, but at the word as a whole. Take the
example I gave above again. You're looking for a variable. If the
language is case-sensitive, you can rely on the word's /shape/ and do
not have to look at the individual characters. Thus, you avoid a
sementical translation of the letter's graphical shape to the abstract
"letter". Easier. You can feel it.
Actually, the biggest point in my favor is brought by the makers of the
standard editor for the language the OP spoke about: Visual Basic/Studio
(I can't seem to get its name straight). By default, that editor will
change any word you type to match a certain case: capitalized for
keywords (IIRC) or the exact spelling of whatever variable matches the
word just typed when compared toLowerCase(). Now, guess why it does
that: because otherwise it's a pain in the a.s (the size of moderately
large pumpkin) to read.
If they agree it's a necessity for the result, they should agree it had
even better be built into the language in the first place.

>> This isn't the pathetic ranting of a pricky old geezer, for I'm not
>> old. It's about the, IMO, single most important trait of a
[quoted text clipped - 3 lines]
> old geezeress? geezerette? she-geezer? (What is the female of
> "geezer" anyway?).

Patricia. :-P

> IMO, the most important trait of a programmer is mental flexibility,
> including the ability to adjust thinking to fit the problem and
> programming language. It is important to be disciplined about the
> things that matter in the current context, and a waste of time and
> effort to be unnecessarily precise about things that don't matter.

I don't disagree with that. However, note how, as an allegory,
gymnastics are seldom performed on quicksand. For you need firm ground
to be flexible.

df.
Patricia Shanahan - 15 Dec 2007 22:41 GMT
...
> Actually, the biggest point in my favor is brought by the makers of the
> standard editor for the language the OP spoke about: Visual Basic/Studio
[quoted text clipped - 6 lines]
> If they agree it's a necessity for the result, they should agree it had
> even better be built into the language in the first place.

Indentation is not significant in Java, yet many programmers, myself
included, routinely use editors that ensure indentation consistent with
statement nesting. As indicated by protests in this newsgroup, some
programmers find unindented Java code somewhere between painful and
impossible to read. I tend not to bother to protest badly indented code
- if I care at all about the code, I'm too busy loading it into Eclipse
and running Source - Format on it.

Do you think that makes Java inferior to languages in which statement
nesting is controlled by indentation?

Patricia
Lasse Reichstein Nielsen - 15 Dec 2007 23:43 GMT
> Do you think that makes Java inferior to languages in which statement
> nesting is controlled by indentation?

I still can't decide on that one.

On one hand, having both indentation and block syntax ({...}) that
represent the same thing, is redundant. Being redundant, it's an
error waiting to happen when the two get out of sync.
Humans rely on indentation, and only use the block syntax for
verification. The compiler only understands the syntax.

if (foo == bar)
  foo = 42;
  bar = 43;

System.out.println(foo + ":" + bar);

It has happened to me at least once.

So yes, I do believe that a language where something as important
as block structure is only represented once is better at the DRY
principle, and is therefore superior.

On the other hand, whitespace having meaning really rubs me the
wrong way. Perhaps because I've been bitten by tab/space confusion,
and even \u0020 vs \u00a0.

/L
Signature

Lasse Reichstein Nielsen  -  lrn@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
 'Faith without judgement merely degrades the spirit divine.'

Stefan Ram - 15 Dec 2007 23:52 GMT
>Humans rely on indentation

 Then I am not human.

>On the other hand, whitespace having meaning really rubs me the
>wrong way. Perhaps because I've been bitten by tab/space confusion,
>and even \u0020 vs \u00a0.

http://www.research.att.com/~bs/whitespace98.pdf
Arne Vajhøj - 16 Dec 2007 02:15 GMT
> On the other hand, whitespace having meaning really rubs me the
> wrong way. Perhaps because I've been bitten by tab/space confusion,
> and even \u0020 vs \u00a0.

I have used a compiler (Fortran) that gave a fatal error
due to a blank line at the end.

Not so easy to spot.

Arne
Wojtek - 16 Dec 2007 19:07 GMT
Lasse Reichstein Nielsen wrote :

>> Do you think that makes Java inferior to languages in which statement
>> nesting is controlled by indentation?
[quoted text clipped - 12 lines]
>
>  System.out.println(foo + ":" + bar);

Ok, but that is why there are auto-formaters. For instance Ecplise will
format on save. So you press CTRL-S, the file is formatted and your
source is saved.

So the above would now look like:

if (foo == bar)
  foo = 42;
bar = 43;

System.out.println(foo + ":" + bar);

Signature

Wojtek :-)

Lew - 16 Dec 2007 19:21 GMT
Lasse Reichstein Nielsen wrote :
>> On one hand, having both indentation and block syntax ({...}) that
>> represent the same thing, is redundant. Being redundant, it's an
[quoted text clipped - 5 lines]
>>
>>  System.out.println(foo + ":" + bar);

> Ok, but that is why there are auto-formaters. For instance Ecplise will
> format on save. So you press CTRL-S, the file is formatted and your
[quoted text clipped - 7 lines]
>
> System.out.println(foo + ":" + bar);

There are two domains of discourse here when we speak of "meaning" in source
code.  One is meaning for programmers working on that source.  The other is
meaning for the machine that ultimately runs the program embodied in the source.

I shall call the first the "meaning" of the program, and the second the
"semantics" of the program.  Just for discussion purposes - I doubt I'm using
these terms in any endorsed way.

Languages that enforce semantics via indentation presumably intend to enforce
consistency between the meaning and the semantics.  Unfortunately in practice
over the years that style has turned out to be somewhat fragile.  Overall,
most programmers find semantically-neutral indentation to be easier to use to
convey meaning.  In other words, being loose about the semantics allows the
developer to be much more accurate conveying the meaning.

It does introduce that risk of having the meaning and semantics contradict
each other by failing to indent properly.  This seems to be a concomitant cost
to gaining the power to control how the meaning is documented.  It just
slightly adds to the burden of the source maintainer to be careful, thorough
and smart.

Since they're doing that anyway, it shouldn't be too egregious to match
meaning with indentation while they're about it.

Signature

Lew

Wojtek - 17 Dec 2007 20:36 GMT
Lew wrote :
> Since they're doing that anyway, it shouldn't be too egregious to match
> meaning with indentation while they're about it.

I sure hope not. Complier enforced white-space (other than as a
delimiter) is a Bad Thing.

I remember the first time I coded in COBOL. It took me several tries to
get a clean compile, and I was copying from an instructor supplied
sample. And it was ALL column positioning.

And it is the same with RPG, another column dependant language.

Program indentation problems with free form languages is all the
developers fault. And at that Ecplise flags empty bodies, so something
like

for ( int c = 0; c < max; c++);

would be caught.

Signature

Wojtek :-)

Roedy Green - 12 Dec 2007 16:20 GMT
>If you are used to a language in which identifier capitalization is not
>significant you may benefit from an IDE that will mark undefined
>identifiers and offer corrections.

The other way so make Java's picky capitalisation less painful, till
you get used to it, is to RIGIDLY follow the naming conventions, which
include capitalisation rules.  If you are sloppy, you make life 100
times more complicated than it need be.

See http://mindprod.com/jgloss/codingconventions.html

I recall my early frustration. Now cap errors appear as glaring as
spelling errors.  The catch is, I have a heck of a time reading newbie
code that violates the coding conventions.  To make matters worse,
whenever I correct newbies, some nerd will point out the coding
conventions are not enforced by the compiler so the newbie can code
caps and name variables any screwy way he pleases, nya nya nya.

You will see some posters like patient sheepdogs constantly herding
newbies who write arraylist when they mean ArrayList, trying to get
them to understand it DOES matter.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green - 12 Dec 2007 16:12 GMT
On Wed, 12 Dec 2007 00:44:36 -0500, Atreju
<someone@who.hates.junkmail> wrote, quoted or indirectly quoted
someone who said :

>However, the text editor it comes with is buggy

You might want to jump directly to an IDE. See
http://mindprod.com/jgloss/ide.html

If you want to stick with a text editor see
http://mindprod.com/jgloss/editor.html
for some possibilities.

I suggest speed dating.  Asking someone to arrange a marriage for you
won't work, since everyone has such specific tastes in what they like
in a editor.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Thomas Kellerer - 12 Dec 2007 16:29 GMT
Roedy Green, 12.12.2007 17:12:
> If you want to stick with a text editor see
> http://mindprod.com/jgloss/editor.html
> for some possibilities.

You might want to add PSPad (www.pspad.com) to that list.

Thomas
Joshua Cranmer - 12 Dec 2007 22:16 GMT
> However, the text editor it comes with is buggy (for example, doesn't
> colorize syntax until file is saved) and doesn't really do what I
> need, and I'm wondering if anyone knows of any java-aware freeware
> editors that do what i need:

A small suite of editors:
* vim -- with knowledge and utilization of some helper external programs
(like exuberant-ctags), this is a very powerful tool.
* emacs -- I've never used it; I'm just putting it in here to straddle
both sides of the emacs/vim editor wars
* NetBeans \ The standard Java editors. I myself can't recommend one
* Eclipse  / of these over the other one.
* JBuilder -- I used to use this heavily, but I have grown less fond of
it, probably due to my increasing desire for handling the command-line
part myself.
* jEdit -- My editor of choice on Windows computers, this program seems
to go through active and dead development periods. Crappy without
installing many of the plugins: Console and ErrorList are necessary.

Signature

Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth

Arne Vajhøj - 16 Dec 2007 02:20 GMT
> However, the text editor it comes with is buggy (for example, doesn't
> colorize syntax until file is saved) and doesn't really do what I
> need, and I'm wondering if anyone knows of any java-aware freeware
> editors that do what i need:

Several has suggested an IDE. And for you usage I think an IDE
is indeed the best choice.

Personally I prefer Eclipse. But that does not imply that you will
do the same.

If you insist on a general purpose editor with Java support, then I
will recommend JEdit. I use it for all my non-IDE editing and really
like it.

> For example, I had compile errors a few times because I failed to
> capitalize the word "String" and simliarly I named a method
> "showAttributes" but when I called it in an application I accidentally
> capitalized ShowAttributes and it did not recognize any time I used it
> like that, until I changed them to lowercase the way it is written in
> the method declaration.

The Java language is case sensitive.

If you use Eclipse, then in case of errors due to wrong capitalization,
then it will often be capable of suggesting a proper change to you.

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.