Evaluating Java IDES for teaching teachers.

# COMMENTS

Since Hunter uses C++ as it's core language, I haven't used Java much in the past three years. That's going to change pretty soon. Once we start offering our CS teacher Certificate and Masters programs I'll once again start teaching with Java as that's one of the langauges that we want to prepare our teachers with.

That means deciding on a set of tools and so I've been spending time evaluating Java programming environments with an eye on the beginner since not only do the teachers I work with have to be comfortable with the tool but more importantly they will have to be able to support the tool for all of their students.

One tool we're likely to use is repl.it. That's an online environment for Java and a bunch of other languages. There's a lot to like about it and teachers might go with it or a similar cloud based option in their classes but it's important that we also prepare teachers to build programs locally.

The tool has to install easily on all platforms

So, here's my criteria and here's what I found.

I started with my desktop Linux machine. I'm running LinuxMint which is pretty mainstream and I installed the Java tools using Mint's package manager. The packages are openjdk-11 and it looks like running Java 10. If the IDE or editor I installed didn't work off the bat it was no good. If it installed and I liked it I'll pass it off to friends who use Windows and Macs to see if the install there is equally seamless.

The tool has to be easy to run

After install you have to be able to run it easily. No fancy java -jar blah blah blah.

I'm not looking for a professional tool

Professional tools can be too compex and do too much for students. I was looking for the sweet spot of giving a nice amount of support but not giving away the store.

Here are the tools I looked at (and you can debate if something belongs in the other category in some cases):

Editors

  • Emacs
  • Gedit
  • Vim
  • Sublime Text
  • Atom
  • Jedit

IDES

  • Eclipse
  • DrJava
  • Geany
  • BlueJ
  • IntelliJ
  • VSCode
  • JGrasp

Editor vs IDE

The line between editor and IDE is a blurry one. I tend to think of an editor as multi-purpose and multi-language where an also useful for non programming text realted tasks whereas an IDE comes with more programming bells and whistles. The truth is, though. that some IDES can do well with non programming tasks and many editors are pretty close to IDEs.

In any event, for a teacher, there's something to be said for keeping it "close to the metal" and have them use an editor to edit source code and compile from the command line. This doesn't mean they shouldn't also see IDEs and perhaps use them with their students but a teacher should know a little more about what's going on than just load a program, write some code, and click run. If a teacher is that limited you end up in situations similar to that common comment from people who finish a beginner course on Codecademy - "I finished the course and I can program in their environment but I don't know how to actually make something anywhere else."

The Editors

Here the idea would be start as I mentioned above. Edit files adn then compile on the command line. Eventually, though, many of these tools can be used as IDEs

Emacs

https://www.gnu.org/software/emacs/

I've got to start with my tool of choice although I can't really be unbiased. I think it gets a bad wrap because it's old and out of the box looks plain but, yes, you can use your mouse and it does have menus. The upside is that it can do everything an IDE can do and a thousand times more. I do email, read rss feeds, maintain my calendar and more in Emacs.

The downside is that it doesn't do Java well out of the box and kids like shinier objects.

I don't think I'd start the teachers with Emacs but I'd probably shift my instruction to using it at some point and show some of the cooler features (many highlighted in my Emcacs videos)

Gedit

https://wiki.gnome.org/Apps/Gedit%0A

This is a plain simple editor. You can bucket in notepad+ and whatever the basic Mac editor is in here. Nothing special and nothing fancy. It's easy enough to load, edit a file and save but not much more. I'd be fine using it were it not for better options.

Vim

https://www.vim.org/

No

Sublime Text

https://www.sublimetext.com/%0A

This was the hotness for a while and it's a pretty slick editor. I can't recommend it for teachers though for two reasons. One is that it's not free (although it isn't expensive). The other is that it's not open source. There were other hot editors before sublime and when their companies folded or sunset the editor all those plugins and customizations had to be redone on a new platform.

Atom

https://atom.io/

Atom's an editor I want to like. It's open source and looks pretty neat but it seems more focused on the JS ecosystem. I couldn't find enough Java related plugins to make it better than Gedit although it was easy to theme and customize the keys. Were I not an Emacs guy I'd probably use Atom for much of my non-Java development but it doesn't seem like a great fit for Java

Jedit

http://www.jedit.org/

This looked like the strongest contender for Java. Not too complicated. Nice syntax highlighting out of the box. It doesn't do completion but that's arguably a good thing when teaching programming (incidentally, Emacs doesn't do completion out of the box but it can be added so you can up the tools ability as the class moves along). From my limited explorations you can install plugins like a Java Linter and you can run a console from inside JEdit which means you can actually type things like javac file.java and then run the program all from within the editor.

Jedit also has some nice builtin macros for boilerplate code like setters and getters.

IDEs

Eclipse

https://www.eclipse

I've used eclipse before and as a Java environment, it's actually pretty nice. You can customize the keys so I set mine to Emacs. It has a lot of plugins, you can compile and test your program from within the IDE and do tons of other things. It's a VERY nice professional tool.

I don't like it for teaching for three reasons. First, it does too much. By giving too much professional support kids rely too much on the tool. Second, it's made for big projects using build systems not small AP class programs consisting of one or two files where you run javac manually. Yes, you can do this in Eclipse but it seems more awkward. Third, becasue there's so much going on you need a HUGE screen and kids and schools might not have enough screen real estate.

There's also a fourth reason which is that I installed Eclipse using LinuxMint's package manager and it crashed when running. If I'm going to recommend a teacher roll out a tool that all of their students are going to install at home on their own, at the very least it has to install and run seamlessly.

DrJava

http://www.drjava.org/

Like Eclipse, I've used DrJava before. It's similar to DrRacket (nee Scheme) and Dr. Python. It's close to perfect. You get highlighting, helpful error finding, can run your program from within Dr. Java and more.

The killer problem is that I can't get the latest version to run. Actually the first problem is that it's just a jar file so you have to run it with java -jar drjava.jar. Beyond that, it didn't work out of the box. It loaded but compilign and running didn't After some mucking around, I got it to compile but it doesn't run the programs.

This is too bad because when it runs it's a terrific learning environment.

BlueJ

https://bluej.org/

This is another tool that was DOA. I tried the debian package as well as the jar file. Couldn't get it working.

I have used an older version so I'll describe that instead just remember things might be different in the current version.

BlueJ does one thing very well - objects. It visually shows object creation and relationships. I recall that you can create an opject, click on it's box in a visual graph pane, inspect it, instantiate new ones and in general explore and expirement. If you're big on OOP and like Object First by all means check BlueJ out. It's probably best in class for that approach.

On the other hand, it's a one trick pony. If you, like me, are not all in on OOP or an Objects first and all the time approach it's probably not the tool for you.

Geany

https://www.geany.org/

I hadn't heard of this one before but it looks like a contender. It has a pretty clean interface and it worked out of the box. I installed it using the package manager.

Class browser on the right, files on the left and console (terminal), compiler status etc on the bottom. It supports some level of autocomplete but it doesn't do everything. I'm not sure yet but it might hit the completion sweet spot.

It says it does snippets but I haven't figured that out yet.

IntelliJ

https://www.jetbrains.com/idea/

IntelliJ is fro JetBrains. They make a bunch of IDEs each focussed on a different toolset but all with the same look and feel. You can also add plugins to each to make them multi-modal. I believe the editor at the core is JEdit. I've used their IDEs in the past and as far as professional IDEs go I like them. They're more lightweight than say Eclipse and don't need the real estate.

Still, I think it's too much for a beginner. For example, you can in theory run your program from the build menu but, much like Eclipse, it takes you to a configuration screen. I was pretty lost and I'm not a beginner. Much like Eclipse it's made for projects not small class programs.

I found the Python version of JetBrains IDEs more approachable probably because the ecosystem is much simpler.

VSCode

https://code.visualstudio.com/

This one shocked me - I actually found myself liking a Microsoft product. I guess this really isn't your father's Microsoft.

Much like Geany it has a clean interface and like Geany you don't need a whole Java build system. It does more completions out of the box which you may or may not like as well as snippets. A single key will compile and run your program and on top of all that it has en "Emacs" setting for keybindings.

I'm not sure if I like Geany or VSCode better but I think both are really good options. I'd probably lean towards Geany due to the less robust completions. Were I writing code for real rather than teaching, I'd probably go the other way.

JGrasp

JGrasp feels much the same as the other contenders - Geany and VSCode but the interface just looks a bit clunkier to me. I know that's purely subjective.

The biggest difference I'm seeing out of the box is that JGrasp doesn't do completions so depending on where you fall with that you might want Jgrasp for none, Geany for some, and VSCode for all.

[EDIT] JGrasp has a very cool visualizer built in that will animate your proram. Here's a video of it in action. I'm going to have to play with this a bit and see if it pushes JGrasp up over the top for me.

Processing

https://processing.org/

I'm not going to talk about processing but I felt that it would be negligent not to mention it at all. Processing is a IDE, wrapper and graphical library that's essentially Java under the hood (although there are Processing bindings in many other languages probably the most well known now is p5.js). It's great if you want to do graphical work or base your class around the libraries that are available to processing which include ones for web cameras, hardware access, networking, sound and more but it's not the same as an IDE or editor for traditional Java development.

Notes

Just about all of these tools have multiple themes and are fairly customizable so don't go by the screenshots above, on the homepages or what they look like when you first install them.

All of the tools I liked installed right out of the box either by using the package manager or downloading and extracting from an archive. I can't say yet if they install as easily on a Mac or Windows box but since Linux is usually the unloved stepchild of sortware packaging and distribution my guess is that if anything it'll be easier on those platforms.

Conclusions

I'll always be an Emacs guy. Org-mode is too useful and I can get IDE like behavior for pretty much any language I want to work in. In some cases like Clojure, I haven't seen an IDE that can match Emacs and Cider, it's premier Clojure development setup. I also haven't a Git interface nearly as slick and powerful as Magit which works under Emacs.

For my teachers though, I'll probably start with Geany or VSCode, switch to Emacs for myself at some point in the program and make sure to spend time on the command line along the way.

If I missed any editors or IDEs or have something to add on one of the ones I mentioned, please share in the comments.