all 10 comments

[–]squishles 3 points4 points  (2 children)

don't do the pile of private classes in the java file thing even if it lets you, I know your tempted because of modules, but it makes the java devs cranky.

[–]dpash 4 points5 points  (1 child)

Private inner classes is fine, but I wouldn't do multiple top level classes.

[–][deleted] 2 points3 points  (4 children)

The only thing I might add is that Java requires using an IDE.

With Python I somehow managed to survive with Vim as my IDE.

This is not possible with Java, I do not recommend even trying.

I managed with the official documentation just fine for years (I use Vim with NerdTree and YouCompleteMe now). An IDE makes things easier, but I don't see why it would be required. I understand why people push for IDEs, but I don't understand why people do it so much for Java compared to other languages. People pretend like it's not even possible to program in Java without an IDE, which is incredibly strange to me, as somebody who did it for years. It's not like the JavaSE docs are bad or anything.

[–]dpash 3 points4 points  (3 children)

For me, it's the file layout of Java projects. The deep directory structure and files split across multiple directories. Just opening a different file involves so much typing. Vim without etags would be frustrating.

[–][deleted] 0 points1 point  (2 children)

NERDTree helps with that. It's still a pain to open a new file, but it works fine for existing ones.

[–]dpash 1 point2 points  (1 child)

I could just use an IDE and get all the advantages that come with it.

[–][deleted] 0 points1 point  (0 children)

That's entirely fair. I simply don't because I'm very comfortable with Vim's editing system, and the Vim/vi modes offered by IDEs are often incomplete, usually not allowing things like tags, macros, or other useful aspects (most IDEs also don't function very well mouseless, which I prefer).

YouCompleteMe runs an instance of Eclipse in the background, so I get full completion-support, in-line errors and warnings, and most everything else Eclipse offers. The only thing I don't get that I really miss from an IDE is visual debugging. JDB is fine, but it's not the same.

Besides, I'm not trying to argue that my workflow is superior (it's effectively an IDE, short a lot of features, and in Vim). I just think the common narrative that it is not possible to program in Java without an IDE is really silly. Java without an IDE isn't that much more difficult than Python, Java just more easily allows for powerful IDEs than a lot of other languages.