Live data from Hacker News

Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

news.ycombinator.com

1–10 of 53 posts

Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

#1
Hi everyone --

Let me give some background to properly contextualise this question:

I am the type of programmer that has been doing UNIX (generally Linux, also some commercial varieties) since 5th grade or so, and consequently am very command-line oriented in my habits. Did mostly C growing up, and a fair bit of Perl later.

So, obviously, when I was faced with the real-world need to do some Java, I approached it with my usual arsenal of half a dozen, uh, terminals and vi (VIM) sessions. Eventually I broke down and started using 'ant' for building instead of Makefiles, but apart from that, this approach has served me well.

I wouldn't mind a more Java-aware editor, though; something that can save me a little time on the tedious task of having to switch in and out of editor windows without having a holistic view of my source tree, as well as provide cross-referencing of symbols and API-specific autocomplete and perhaps online javadoc summaries built right into the editor. I spend a lot of time juggling all these editors and 15 tabs in my browser.

I've looked at Eclipse and NetBeans, but, they're just way too bloated and complicated. It would take me an enormous amount of time to figure out how to use them correctly and do things the Eclipse Way or NetBeans Way, and I don't think it'd be worth the flexibility I'd be giving up. Plus, they do far, far more internally than I really need, and I'd have to upgrade half my desktop machines just to stand a hope of realistically running them. They introduce gigantic piles of unnecessary metadata and internal abstractions I don't really want to deal with for my relatively simple, terse code (as much as Java can be).

On top of that, much of my development is server-side and, although I can mount the code tree with SSHFS or NFS or whatnot, local building and testing is essentially useless.

So, I was wondering if anyone had any suggestions for a decent editor for someone in this predicament. I'm imagining something like an "IDE lite," or perhaps a really glorified take on UltraEdit (but not for Windows). I don't really know. Something that can get me the aspects of Eclipse that make editing Java code easier without all of the metadata, complicated build processes, user interface bulk, or sheer scope. Some say IntelliJ is the way to go here -- is it?

Thanks very much in advance, guys!

Re: Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

#2
Emacs?

For command-line folk, either Emacs or vi would probably make the most sense long-term. They often have plugins to add functionality to make them more IDE-like. Learning curve's a bit tougher though, and might require more effort than it's worth. I still haven't completely switched over to Emacs yet, but it might pay off in the long run.

Re: Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

#3
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 UNIX types who hate bloat?

#4
I love IntelliJ, but if you think Eclipse and NetBeans are bloated you'll almost certainly think the same of IntelliJ. Keep in mind, though, you do get a lot of features in return for all the "bloat"-- refactoring, intentions, inspections, better navigation and too many others to mention.

Programming in Java is tedious and a good IDE makes things much less painful so maybe you'll want to reconsider. Unfortunately, there's not much middle ground between plain old text editors and full fledged IDE's so your options will be a little slim.

You may want to check out JDEE for emacs. Setting it up is a little complicated, but it's probably going to be a little snappier than an IDE. You could also try jEdit. There are various Java development plugins so you can pick and choose the features you want.

http://jdee.sourceforge.net/ http://plugins.jedit.org/list.php?category=5

Re: Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

#6
post #5

it seems really weird to me you find netbeans complicated. There's a reason java developers use bloated IDE's for anything more than quick edits. Spend a week in Netbeans and I bet you a lap dance you keep using it.

That said, maybe Geany is what you want... It's lightweight and somewhere in between an IDE an editor. I quite like it.

Re: Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

#7

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 ("unnec…

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 UNIX types who hate bloat?

#8
I get funny looks for using emacs for Java work, but it loads and runs fast on all the different platforms I work on. I have used and support people using Eclipse, and generally I like the ability to find definitions etc, but the refactoring rarely proves essential. As for autocompletion, if you can't hold the whole core language in your head, there's something wrong somewhere ;-)

Re: Ask HN: Reasonable Java editor for heavily CLI-oriented UNIX types who hate bloat?

#9

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 ("unnec…

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 UNIX types who hate bloat?

#10

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 ("unnec…

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?

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.

Post reply on HN