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 use IntelliJ these days. It has syntax highlighting. And I can set it to complain about things I don't like.
I have used eclipse and was really frustrated by it. It had a lot of bugs.
When tinkering with these assignments, I use notepad a fair bit. I saw something one student did and mashed it into the instructors solution. I used notepad to do that.
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).
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.
Also, it runs very poorly on my Mac.
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.
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.
Mike Simmons wrote:
Also, it runs very poorly on my Mac.
Ha, mine too. The Apple Developer tools (free) come with a reasonably good code editor whose name is eluding me at the moment. I don't really like it though.
Koen Aerts wrote:I always found EDI's too confusing...
I can't tell if EDI's is a typo for IDEs, or it's a meta joke. It's funnier the second way!
I wouldn't suggest that you use it if you haven't used it before, though!
On a Mac I recommend Sublime Text if you don't already have a favorite (my non-vim colleagues have switched from TextMate recently and really like it).
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.
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.