I'm coding in Java this week and next! …and I'm a bit uncomfortable. The problem isn't really Java per se, it's mostly unfamiliarity with the existing architecture and the different toolset. Here's what I think so far:
- The language difference is… …not worth talking about. I haven't coded in Java since 2001 and I'm not having any particular problem with the language because…
- Jumping from ReSharper to IntelliJ and vice versa goes a long ways towards smoothing the transition. ReSharper shortcuts don't entirely map 1 to 1 with IntelliJ, but close.
- I spoke too soon. I'm definitely slower in Java.
- IntelliJ is the Cadillac/Lexis/Mercedes of IDE's. This pretty well follows for any JetBrains product, but IntelliJ is the flagship. There's a heckuva lot of stuff packed in there out of the box that you have to piece together with VS. The Visual Studio team has heard this before, but one more time — "just make it like IntelliJ." I know VS's feature set is primarily driven by the Mort persona, but I bet Mort would want IntelliJ stuff if he/she were familiar with IntelliJ's feature set.
- More accurately, I don't care about a lot of the stuff that VS has that IntelliJ is missing, but the reverse is not true.
- I think Visual Studio looks better though. Considering the fact that we stare at those things all day, that's not trivial.
- JUnit 3 sucks in comparison with NUnit 2+. Not even getting into the expanded stuff in MbUnit, just the basic mechanics are clumsy to me. I've heard that the newest version of JUnit brings them into parity with NUnit.
- Unfortunately, the architecture of the code is not conducive to using TDD. I'm actually driving the Java service through .Net FitNesse tests running from NUnit that go through the .Net gateway classes on the client. Ouch. It's easy to get the Java service up in debugging mode, but this isn't an ideal way to develop. The green bars are farther and fewer in between. I'm getting uncomfortably familiar with the IntelliJ debugger. Yes Virginia, TDD is faster — even in the short run.
- I don't particularly like CVS. Not the out and out disdain I feel towards Visual UnSafe, but I still want Subversion. More accurately put, CVS doesn't like me.
- We're doing some interoperability between .Net and Java by sending xml messages (don't ask). Xml serialization from Data Transfer Objects on our (.Net) end and JAXB on the Java server side both working off shared XSD's. I'm gonna call this one a draw. JAXB seems to give us more control over the XSD compliance, but it's clumsy to use.
- To the guys who built JAXB, would you please go read up on the Law of Demeter?
- My client's naming convention calls for private members to start with "_" like "_doSomething(arg1, arg2)." My VB background pokes out here as I sometimes struggle to stop capitalizing everything in code. I use upper case for publics and lower case for private and protected members in C# (with underscores for class fields). No big deal.
- I've always thought that you can look at C# code and tell whether the developer came from a VB or Java background pretty easily by their capitalization in the code. Of course, you can spot a COBOL (insanely long monolithic methods) or a Fortran (didn't get the memo that output parameters are evil) guy in any language. You don't have to spot Smalltalkers because they'll always let you know on a near daily basis.
- The declared exception thing is annoying. I really don't see it doing anything but cluttering up the code personally. It's what you're used to I guess, because my client's Java guys think that C# not having checked exceptions is a shortcoming. I suspect that declared exceptions lead to using exceptions as a flow control device and I think that's mildly evil.
- Could we please get an industry standard for the shortcut keys for "step into", "step over", and "step outside"? I swear that every IDE built starts by saying, let's take the debugging shortcut keys from product X and move them all over one key to the left.
- Everytime I see GregorianCalendar or JulianCalendar in Java I want to start chanting. And what's up with having a dozen different classes for dates and times? One class too simple?
- I'm going to ask for a raise now that I'm multilingual;)
I'm happy to stick to .Net & C#, but it's been fun just to do something different and see how the other half lives. Now, if I could just get on a Ruby or Python or Squeak or Haskell or Erlang project…