News for hackers. Stuff that matters.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by whirlycott1 on Wednesday May 06, 2009 @09:37PM (#597233)
Anybody who writes java code in anything outside of Eclipse, NetBeans or IntelliJ is wasting their time. It doesn't take an enormous amount of time to learn how to use Eclipse. It probably takes 15 minutes of someone showing you the ropes. You need to stop thinking of the problem as "I need a text editor" because that's almost certainly not what you need.

Eclipse in particular does nothing like what you claim ("unnecessary metadata and internal abstractions") except one or two files in the root of your project's directory tree. Upgrading your machines to support Eclipse means at worst spending $20 to buy 2Gb more memory, which doesn't seem like a lot to me.

All of the requirements you mention (plus a lot more) are available today in Eclipse. And you don't want Eclipse because of a few poorly defended misconceptions that you are clinging to. Go back and give this a second look and get someone to show you the ropes with it over lunch. You will never look back.

I have personally converted two people like you: die-hard emacs users who will never use an IDE because you tried them ten years ago and they sucked then. Neither of these two fellows would ever go back to that world now that they know what they're doing.

You won't regret the few minutes it takes to learn basics.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by zenocon on Wednesday May 06, 2009 @10:12PM (#597275)
I have to second this. If you are building anything more complex than a very simple project, and you are not using one of the three (Eclipse, Netbeans, Intellij) -- you are wasting a lot of your time. They are not hard to learn.

The stuff you lose in a simple text editor: refactoring support, integration with version control, code-complete, debugging...etc.

I'm simply going to guess based on your post that you also don't know much about the java open-source community. It is giant, diverse, and fantastic. Everything you need is out there. Before you write it yourself -- poke around on Google and no doubt you'll find something that already does what you need.

I personally hate Ant builds. I think Ant can be done right -- but every place I've seen it used it just gets hacked, and the builds are a nightmare. This is why I prefer Maven b/c it constrains the build to a standard layout and there are a gazillion plugins to do everything you need.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by litewulf on Thursday May 07, 2009 @03:43AM (#597610)
The only problem of course is that when your "more complex than a very simple project" hits the size where Eclipse just can't take it any more. A project I'm working on is pretty much at that scale, and random things basically stop working if I so much as stop looking at them. Its quite amazing.

I've heard from coworkers that IntelliJ could handle it, but at the cost of agonizing slowness. So now I fire up eclipse (and reset all my project options and input from scratch) only when I need refactoring, and use emacs otherwise. Its not great, but at least I don't swear all day long.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by trapper on Thursday May 07, 2009 @03:47AM (#597613)
What size projects are you using?
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by davidw on Thursday May 07, 2009 @05:51AM (#597700)
> So now I fire up eclipse (and reset all my project options and input from scratch) only when I need refactoring

That seems a pretty sensible approach in any case. Emacs is just a nicer environment to live in for day to day editing.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by javanix on Wednesday May 06, 2009 @10:56PM (#597326)
I'm the complete opposite of the OP. My intro CS courses were taught using Eclipse, and I am constantly using it (for lack of a better, free, option) at work. I am getting more and more fed up with the bloat in Eclipse. Running in a Linux environment results in hard-to-diagnose crashes fairly often, and the memory overhead is, quite frankly, unacceptable.

I would gladly move to something lightweight like the OP asked for. Most of the features in Eclipse aren't useful to people working on relatively small projects, and the features that are useful (code completion, refactoring, nice library integrations) could probably be deployed with much less overhead.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by whirlycott1 on Wednesday May 06, 2009 @11:02PM (#597334)
At my company, we've had people use it on WinXP, Vista, OS/X and Linux. Nobody ever suffered from crashes. There are a few different flavors of Eclipse and it sounds like you were using the kitchen sink version. There's a smaller one which everybody I know seems to use that may be worth checking out.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by wlievens on Thursday May 07, 2009 @03:35AM (#597604)
Note that the argument isn't that Eclipse [1] is perfect, but that Java without Eclipse is impractical.

[1] Or some other rich IDE.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by abalashov on Wednesday May 06, 2009 @11:34PM (#597359)
That's what I'm saying.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by mping on Thursday May 07, 2009 @05:43AM (#597697)
I have to second whirly's opinion. When you are writing some rather complex java, eclipse gives you the following:

- Enforce code style (eg: checkstyle plugin) and source formatting rules - Project Management - Java code autocompletion (works perfectly like 99% of the time) - XML autocompletion through dtd - With some plugins you get autocompletion for jsp, etc - Hard-Core refactoring (you've got an example from another guy) - VCS integration (git, mercurial, svn, even vss, you name it) - I tend to prefer to use git or mercurial from the commandline, but eclipse has a nice merge editor and it lets me compare 2 commits very very easily. The Hg plugin even shows a tree graph with the commit tree - And lots of lots of plugins (the mylyn and jira/bugzilla/trac connectors are really nice for example)

My main argument is that it's so much easier to inspect for example a class in a jar library and see the methods it implements within eclipse/intellij/netbeans than with any other plain text editor. Eclipse even lets you see the javadoc for the class.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by wlievens on Thursday May 07, 2009 @03:34AM (#597602)
I agree 100%. On java projects, I don't consider myself a "java developer" because frankly, writing java in unsupported editors is a pain in the ass. I couldn't imagine writing java code with Eclipse. It would be an order of magnitude less efficient.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by 10ren on Saturday May 16, 2009 @01:52AM (#611919)
I just installed Eclipse, and in the workspace directory, it created a ".metadata" directory, containing 9.2M. Most of it is here (output from du -h):

    8.8M    ./.metadata/.plugins/org.eclipse.jdt.core
Unfortunately, finger memory takes a lot longer to retrain than 15 minutes of learning the basic basics - it's more similar to retraining from guitar to piano. But truly, it's just a matter of time.

I would love to have automatic refactoring tools, but they often don't do quite what I specifically need (and I don't need to do it often enough to become practiced with what the tool can do.) Last time I needed a lot of boilerplate, I wrote a quick script to do code generation for me. I very rarely need it, but it was a guilty pleasure to write the tool.

The other thing I like about Eclipse is that javac is always already loaded, so you don't have that 2-3 second start-up delay. So... I wrote a little javac server - javac is sitting there in the background, and I send it the src files and switches from a client - instant compile! I hardly use this either, but again it was fun to write.

Speaking for myself, most of my programming time isn't spent in editing, compiling, debugging or looking up docs - it's mostly spent in understanding new problems - with pen and paper. Typing is the easy part!

But my projects are unusual. It's funny, in trying out Eclipse, I'm more interested in the cool ideas they've had than in actually using it. It does have some cool stuff in it.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by abalashov on Wednesday May 06, 2009 @10:26PM (#597289)
All right. So, what if I have an existing project I want to import into Eclipse and not have it lay its workspace droppings all over it? Can I do that and leave the actual source tree relatively untouched? What happens when I want to export it out of the workspace back into the external form the tree took before?
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by krschultz on Wednesday May 06, 2009 @10:48PM (#597317)
You mention Vi, but as an Emacs user one of the things that eased the transition to Eclipse for me was a setting that enabled all of the commands I already knew (google emacs mode). Also Eclipse has a great set of keyboard shortcuts to do everything, I normally do my whole workflow without the mouse being on my desk.

For Java work an IDE is essential. For C/C++ I still use Emacs but having Javadocs integrated right there and a nice debugger and refactoring is key.

You might also be interested in this: http://community.buglabs.net/kgilmer/posts/114-Getting-the-f...

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by jrockway on Thursday May 07, 2009 @01:14AM (#597478)
Eclipse's emacs mode is nothing like Emacs. For example, it binds undo to F9, leaving C-/ (the emacs binding for undo) as "comment this line". WTF. Of course, once you fix the bindings, Eclipse's undo doesn't work anything like Emacs' undo. It's not Emacs, it's Eclipse with C-a (but not M-n) and C-e.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by brown9 on Wednesday May 06, 2009 @10:36PM (#597303)
Yes. Eclipse can be flexible with where the source folders are, where your libraries are coming from, etc. You'll (usually) only have two metadata files: a .classpath and a .project, and occasionally, a .settings folder (for any per-project settings you might change such as compiler warnings, etc.)

Otherwise, you can leave your structure intact and unchanged.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by abalashov on Wednesday May 06, 2009 @10:51PM (#597321)
How do I export the project back out to its original form once I imported it into the workspace? Or is it safe to just copy the stuff out of my workspace folder?
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by whirlycott1 on Wednesday May 06, 2009 @10:59PM (#597330)
First of all: you are using version control, right? Please tell me yes.

Eclipse isn't going to "change" your code at all. It'll put two or three files and dirs in the root of your project. That's it. Your code is the same as it was before.

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by abalashov on Wednesday May 06, 2009 @11:35PM (#597360)
Yep, using SVN. Not sure I want Eclipse to ride it, though.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by wlievens on Thursday May 07, 2009 @03:36AM (#597605)
If you move a class to another package in Eclipse (using drag&drop), it will automatically issue the necessary svn move command, and synch up the import statements everywhere. That's a 20 minute job done in 2 seconds.
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by brown9 on Wednesday May 06, 2009 @11:00PM (#597331)
Eclipse won't change your file/folder structure (unless you tell it to).

In fact, you can have source code somewhere outside of your "workspace" and just point Eclipse to it, there is no requirement for the code to be inside the "workspace".

Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by abalashov on Wednesday May 06, 2009 @11:35PM (#597361)
I'm guessing that's done by some method other than the "Import" facility...?
Re:Ask HN: Reasonable Java editor for heavily CLI-oriented U... by johngunderman on Thursday May 07, 2009 @12:05AM (#597388)
Import will just tell Eclipse where the code is located, not actually copy it into the workspace. Import is probably what you want.