Closed Thread Icon

Topic awaiting preservation: A few beginner's Java questions Pages that link to <a href="https://ozoneasylum.com/backlink?for=12756" title="Pages that link to Topic awaiting preservation: A few beginner&amp;#039;s Java questions" rel="nofollow" >Topic awaiting preservation: A few beginner&#039;s Java questions\

 
Author Thread
Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 05-22-2003 05:26

I haven't really started hacking Java at all, but I have two very basic questions for InI and any other Java types who feel like chiming in.

First off, what editor or IDE would you recommend? Obviously I can just Google around for "Java IDE," but that won't tell me what's hot and what's not. Cross-platform is an interest, so I was kind of thinking good 'ol emacs -- or possible JEdit, which was one of my first Google hits. But if you've got faves, I'm all ears.

Second, what's your take on variable naming? Coming from PHP, I really like the $word and $two_words styles. That way variables are very easy to distinguish from functions/methods. Compare this:

code:
$some_variable
someMethod()



to this

code:
someVariable
someMethod()



In the first example, the variable is much more obviously a variable. But it seems like the second example is by far the most common usage. What's your opinion?

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 05-22-2003 05:50

Hello,

If you can get "Visual J++" or "Borland JBuilder" ...there are one of the best IDEs...
You can also use lots of editors that can hilight java syntax and run the java compiler from inside it... (EditPlus for example).

As for variables, ...Java is like C++ syntax so variables are unlike PHP:

int myVar;
and $myVar is not a valid syntax.

Elias

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 05-22-2003 05:58

Hmm... the Java book I'm reading ("Beginning Java 2" by Ivor Horton, 2001) was wrong about the $, then. I just looked up some other sources, which say that the dollar sign is used by the Java compiler, and thus should not be part of identifiers. That's too bad -- I still think C-style variable names can too easily just fade into the background.

rickindy
Nervous Wreck (II) Inmate

From: Indianapolis, In USA
Insane since: Jan 2002

posted posted 05-22-2003 14:11

I've been using jEdit for quite a while now and I really like it. It has lots of features and you have the ability to write your own routines/macros/whatever in a very spiffy scripting language.

Give it a shot.


Few problems in life can't be solved by chocolate

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-22-2003 14:37

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 05-22-2003 21:03

I've always used Vim when coding, and editing any kind of text file for that mather. It is, in my opinion, one of the best text editors available. Can be configured to do just about anything, has syntax highlighting for all the languages you would ever think of using, plus a couple of more, and it is a joy to work with

_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 05-26-2003 02:55

The Sun Java coding style docs say "Four spaces should be used as the unit of indentation. The exact construction of the indentation (spaces vs. tabs) is unspecified. Tabs must be set exactly every 8 spaces (not 4)."

So, if indents are four spaces, and tabs are eight spaces... do I have to use the spacebar to indent my code? I'm not sure I get this particular spec.

I just checked with jEdit... that program lets me use the tab key for indentation, but it actually inserts four spaces. Then if I indent twice, it replaces those four spaces (one indent level) with a tab (one 8-space double-indent). This is fine, and it's very convenient, but the official specification still doesn't quite make sense to me. Why not make the tab width equal to the indent width?

[This message has been edited by Perfect Thunder (edited 05-26-2003).]

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 05-26-2003 15:38

Never checked the Sun specifications on indention before, but it doesn't seem very clear. I've always used 4 spaces for both tabs and indents, and I'm going to continue to use that even if the specifications are different

I've configured Vim to not convert the indentations to spaces. Can't really see the reason why you would want to convert to spaces really. When I program I never use any kind of half-indetion. So it is seems easier for me to remove an indention with one backspace click instead of having to press the button 4 times...

_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"

[This message has been edited by Veneficuz (edited 05-26-2003).]

« BackwardsOnwards »

Show Forum Drop Down Menu