I used TextPad for all the Cattle Drive assignments when I was a student. System.out.println is very useful. I'm not sure you would get much bang for your buck with a debugger at this level (aside from the fact that we really don't provide support in this class for learning an IDE that would have a debugger).
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
As a current student I've been using the open source and free jEdit editor ( http://jedit.org/ ) and am quite happy with it. It's not an IDE but is Java-aware so it will highlight matching curly-braces, do auto-indenting, etc., very useful. Keep in mind that to be consistent with the Cattle Drive Style Guide you will have to make it substitute spaces for tabs (menu: Utilities / Global Options / Editing / checkbox for Soft Tabs).
I'm now using gvim/vim (7.2) on windows. My immediate reaction was that by default it auto-indents in a way that
is different from the JavaRanch style guide. I modified the java.vim file to enable indent with spaces and force the tab key to use spaces...
Works well. Auto-indent and bracketing features keeps me honest.
I use notepad and Eclipse.
Notepad when I want to write quickly and just test a statement out without modifying what I'm working on.
Eclipse when I want to make sure everything is coded correctly and to run the script without having to compile from a command line.
I've been using Notepad and Eclipse. (I should probably get something better than Notepad, but I'm used to it.)
I mostly use Eclipse for code formatting. I created a "cattle drive" editor profile that puts the braces in the right places, uses spaces instead of tabs, etc.
I test/tweak my code using Notepad. I store and compile my source code in my C:\java directory. When passing arguments via command line, it's easier to use DOS. Finally, I copy my result from Notepad before e-mailing to the instructor, to make sure it contains no funky characters (though it might also be safe to copy from Eclipse).
I don't like Notepad for several reasons. It wants to add a txt extension to everything, which combined with Windows' preference to hide file extensions, can lead to some pretty hard to spot problems. (You see Hello.java, but the compiler says it can't be found.) It doesn't automatically indent code, it doesn't convert tabs to spaces, it doesn't color syntax, it doesn't do code completion, and it has trouble with file endings from other operating systems. It's not a code editor and was never meant to be.
Eclipse is good, and IntelliJ is better. The only bugs I've really seen with Eclipse are with incompatible plugins. I don't know if they've improved that, but I'm still very careful about adding too many plugins. IntelliJ seems more solid and intuitive to me. However Eclipse and IntelliJ are both IDEs and there's some overhead to launching them and setting up a project. Sometimes I just want to open a Java file quickly to see what's in it. There are still a lot of better options than Notepad. GVim is the one I use, but there's also Notepad++, jEdit, Textpad, and on and on. Many are free. Pick one you like, and invest some time learning how to use it. I guarantee that investment will pay off in time saved and reduction of agony over trying to write code in Notepad.
Greg Charles wrote:I don't like Notepad for several reasons. It wants to add a txt extension to everything, which combined with Windows' preference to hide file extensions, can lead to some pretty hard to spot problems. (You see Hello.java, but the compiler says it can't be found.) It doesn't automatically indent code, it doesn't convert tabs to spaces, it doesn't color syntax, it doesn't do code completion, and it has trouble with file endings from other operating systems. It's not a code editor and was never meant to be.
I always found EDI's too confusing, difficult to learn and time consuming to set up for each new project. This is confirmed by the number of threads regarding EDI issues and questions on this forum. I use vi, gedit and notepad, depending on what's available in the environment I'm using (DOS Command prompt on windows, or bash/ksh shell on *nix). For debugging I either use simple System.out.println(), e.printStackTrace() and/or log4j functions, depending on the situation, in addition to regular code reviewing and following the process in my head. Seems time consuming but it's really not if done regularly enough.
As noted I've been using Eclipse for coding, and Notepad for intermediary steps. I disable Windows file extension hiding, so my major inconvenience with Notepad was having to click All Files when opening a .java file.
That said, I spent a few minutes today looking into other text editors. The first one I decided to audition was Notepad++ (I'm guessing one '+' was added since Janeice mentioned it in a 2010 post above). I used it to open a .java file, and bang: the default formatting seems to be the Cattle Drive standard. Seems like a winner.
If you are using a lot of Open Source libraries, and your project is maven built, I have found that the combination of Eclipse + m2Eclipse plugin is very powerful. If you are debugging your code, and you step into a class that you don't have the source code for, the m2 eclipse will look at the dependency's pom and it provides a source dependency, it will download the source for you.
When you are learning Java, you should stick to any kind of basic text editor. But, when learning to use 3rd party libraries/frameworks, nothing beats being able to debug your dependencies. Not only can you solve problems easily, you get to experience the technique and style of other masters. 60% of what I know about spring, I learnt from reading about it. The rest of it, I learnt by debugging through it. Eclipse+m2eclipse just makes it seamless to debug other people's code.
posted 5 years ago
Hmmm, the Eclipse/Maven integration (or lack thereof) was the primary reason I rebelled against Eclipse, last time I was asked to use it, and went back to IntelliJ. That was about 3.5 years ago. I hear it's better now. Maybe. But with IntelliJ, maven support is just there, and it works. It's not a separate plug-in that may or may not work depending on what other plug-ins are running and how your project is configured and the phase of the moon.
Mike Simmons wrote:Hmmm, the Eclipse/Maven integration (or lack thereof) was the primary reason I rebelled against Eclipse, last time I was asked to use it, and went back to IntelliJ. That was about 3.5 years ago. I hear it's better now. Maybe. But with IntelliJ, maven support is just there, and it works. It's not a separate plug-in that may or may not work depending on what other plug-ins are running and how your project is configured and the phase of the moon.
Not to make this yet another IDE battle, but I completely agree on this one. Infact, ever since I started developing software around 8 years back, I had been using Eclipse. From time to time I kept hearing that IntelliJ was good at many things, but I never felt the need to switch to it. But around 3 years back after I started working with Maven projects, I just couldn't get Eclipse to work smoothly on a daily basis. Note that I never used any plugins with Eclipse, except for the Maven plugin. So it wasn't really a overload of plugins which was causing this. It reached a point where I ended up spending a lot of time waiting for Eclipse to allow me to edit a file without going unresponsive. That's when I switched to IntelliJ. As Mike notes, it just works! Here too I haven't installed any specials plugins. Maven integration is far better in IntelliJ - it feels as if it's the core part of the IDE itself. Same with Git integration (helps a lot since I am working more and more on projects version controlled by git, these days). I don't know where Eclipse stands with Git integration.
I was actually thinking of DashCode. XCode takes a long time to open up a single file, so if I just want to look at something quickly, I open it in DashCode. I'm sure XCode is a better development environment, but that's what I use IntelliJ for.
Jaikiran Pai wrote:I don't know where Eclipse stands with Git integration.
EGit plugin provides basic git features, but is nowhere close to its svn counterpart. Hopefully, this gets improved in future versions.
I stick with git gui or command line only for working with git.
On the text editor, I use gvim/cream on windows or gedit on linux systems. For coding, SCI TextEditor (SciTE) is a nice addition too.