Results 1 to 4 of 4
  1. #1
    maca is offline Member
    Join Date
    Jul 2014
    Location
    UK
    Posts
    13
    Rep Power
    0

    Default Going from C++ to Java

    I am currently a senior C++ engineer that is looking to become proficient with Java. I love C++ and I've spent a lot of time and effort learning the C++ standard, template programming, metatemplate programming and things like policy based design in addition to the standard design patterns. But, the market for C++ engineers is shrinking and the market for Java engineers is growing. Although my current company is saddened by my decision (since I'm their C++ expert), I've come to a point where I want to learn Java properly. My current company does not do much outside of C++, so this means that I'll be changing companies next month (I've recently accepted a job as a Java developer).

    The new company that I'll be going to know that I don't have any Java experience except at University aside from a small amount of dabbling recently, and therefore have assessed me based on my knowledge of general software engineering (OOA/OOD, agile development methodologies, etc). The thing is though, I want to hit the floor running as best I can when I start in with the new company in just over a month. I've bought Core Java volumes 1 and 2 and have been looking through volume 1 so far. I apparently need to get myself familiar with Spring too, but have been told the online documentation is pretty good.

    Anyway, there is nothing like practical experience, so I've thought up a little project that I can do in Java to get myself a bit more familiar with it, but ideally I want to get familiar with the tools I'll be using too. These are as follows:
    • IDE: Eclipse (I've been using Netbeans recently for messing around with Java, never really liked Eclipse tbh, but then, to be fair, I've only used it for C++ in the past which isn't it's original intent - I hear for Java it's very good)
    • Version control: git (currently use svn, but I'm sure git won't take long to get use to)
    • Continuous Integration: Jenkins (use this already)
    • Project Management: JIRA (use this already)
    • Build environment: Maven (never used this before - any pointers of things to look out for would be appreciated)
    • Unit test: forgot to ask, so don't know, assuming JUnit (use googletest for C++ which follows after CPPUnit, which I believe is a (partial???) C++ port of JUnit, so hopefully JUnit won't come across completely new)

    What do you all recommend for unit testing in Java? Is JUnit still the dominant unit test framework? I was planning on setting up a test build system at home that uses the above tools, but since it's not long till I start the new job, I'd probably be more productive getting use to Eclipse and Java. That said, I'm planning on using test driven development for my little project, so really want to get up to speed with a Java unit test framework. Is assuming JUnit sensible, or is there good reason to ask my new company exactly which test framework they use?
    Last edited by maca; 08-07-2014 at 11:42 PM. Reason: grammar

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,002
    Rep Power
    20

    Default Re: Going from C++ to Java

    Learn JUnit as it's pretty ubiquitous.
    Just pick a mocking framework to go with it (frankly any one will do as it's the concepts you want to pick up, and not so much the inner workings).

    You should be able to set up a straight Maven project with no trouble, and use that to learn Java.
    However, I will say, at least for the first couple of days, use something like Notepad++ and compile and run from the command line. Just so you grasp how the classpath functions in Java. Working straight from the IDE will hide all of that and if you hit classpath problems then it helps to understand the fundamentals.

    Any idea what sort of things you'll be working on? Web apps presumably (it's 90% of the market round here)?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    maca is offline Member
    Join Date
    Jul 2014
    Location
    UK
    Posts
    13
    Rep Power
    0

    Default Re: Going from C++ to Java

    Thank you for your advice, I'll take it all. :) I'll start off on the command line as you suggest with a simple text editor - I'm the kind of person that likes to know how stuff works anyway, so that suites me down to the ground. I'm guessing JMock is as good as anything to get me going on the the mocking framework in Java?

    With respect to what I will be working on, as far as I understand, it will be a mix of back end code and GUI based stuff, whether the GUI stuff is via an applet or otherwise I'm unsure. I should get a better picture the day I start. :)

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,002
    Rep Power
    20

    Default Re: Going from C++ to Java

    JMock's as good as anything, really.
    I've used that, Mockito, EasyMock...they're all much of a muchness.

    An actual non-HTML/Javascript GUI?
    Blimey...:)

    If you're doing back end then have (a brief) look at JDBC, and see if you can get something talking to the DB.
    The JDK comes with an in memory database that's quite handy for something like that (JavaDB, based on Apache Derby).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •