Advertisement

C++ to Java/C#

Started by September 10, 2014 05:02 AM
11 comments, last by Glass_Knife 10 years, 2 months ago

I've been in c++ for 8 years. I used Java to make a simple android game and one of the game I worked on professionally was partially C++ partially C#.

I'm wonder as a resume thing, when do I put C#/Java on my resume. They are all very similar languages to me. I recently picked up some books on the new languages and I'm on page 130 of a 700 page book (Programming C# 4.0), but I'm wondering what specifically makes you "know" C# (ie: put it on my resume). Is it simply more of knowing the .NET library classes vs c++ STL?

I would assume my c++ with reading this book and messing with the samples, I'd have C# fairly easily put on my resume and say I'm well versed in it, but then the same comes down when I brush up on Java. At what point am I well-versed in Java. I feel the general is you are a software engineer, period, but then you see jobs that as for specifically Java or C# or say Javascript. Now Javascript is obviously pretty different (at least from the little bit I know), so then it comes down to again: what makes you an 'A,B,C language' programmer. Is it really just you are a software engineer + you have worked in 'X' language enough to know the standard syntax + libraries/interfaces provided.

In other words, is just reading these books be enough to really say I'm well versed enough. Or even, if you are versed in C++, can't you almost by default put JAVA/C# on your resume, or at what point do you?

NBA2K, Madden, Maneater, Killing Floor, Sims


Is it simply more of knowing the .NET library classes vs c++ STL?

There are two aspects.

First, language difference. The syntax and most sematic is quite similar, but on the other hands you will find some major difference under the hood. Still, if you know C++ syntax, then you will have most of the time less issues writing some Java code. Still, there are major feature of Java/.NET you should learn (eg Garbage Collection, ByteCode,VM).

The other difference are the usage of the libraries. Java and C# is strongly defined by a standard library framework, whereas C++ is more defined by the language. A good knowledge of the basic framework should exists (Threading, Collections, Strings, IO are for example a good starting point).

Advertisement
It's up to you. If you feel comfortable that you could use a language for the particular job(s) you're applying for, then go ahead and put it on your resume. It's very difficult to (self-)evaluate programming competency. The only way to really know if you're experienced enough is to have your knowledge tested on-the-job or in an interview.

I've seen a lot of C++ developers pick up C# and they all have this fascination with creating lots of Enumerations and specifying the integer value of every element that is really rather unnecessary.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

I have been on job interviews for Java where they asked me if I have ever used "ObscureClassName", and what did it do. As suggested, C++ is all about the language. But Java, for example, isn't about the language so much as the tools. If you're doing server stuff, then you should have JBoss/Tomcat/Jetty experience (which is a pain). There is ANT/Maven build issues, Swing/AWT/JavaFX GUI problems, as well as your standard classpath issues and problems.

Long story short (too late), I don't think you should say anything that isn't true. If you haven't done a lot of Java, you don't really want to get hired for a job that thinks you're a Java expert, or a C# master. There is a lot more going on there than just the language syntax.

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

Like they say, the main difference between C++ and C#/Java is that the STL is tiny, and the .NET and Java class libraries are huge. With your C++ experience, you should be able to learn the various language features of Java or C# (which is a fair bit more advanced), or indeed any language, in a few days, Learning the frameworks, or even getting a coarse mental map of them, is a different matter. For example, the standard .NET framework is 300+ namespaces, 10.000+ classes with a total of 100.000+ members (each with 1-10 overloads).

Obviously no one memorizes a million function signatures, that would be meaningless, but anyone who calls themselves "well versed" should be roughly familiar with the majority of namespaces, and perhaps 1000 of the most used classes - and intimately familiar with a few hundred of the core classes.

Each platform will have a number of little design patterns and ways of doing things that you'll only become aware of (and make second nature) over time and by reading/writing a lot of code. Until then, you'll be writing the equivalent of a bastardized version of "C with classes" in any language :) The first thing that springs to mind about C# is proper use of events and callbacks and lambda expressions and asynchronous code (and they added some juicy stuff with C#5 that your book won't cover), and things like LINQ (not necessarily the language feature, but the extensions in the System.Linq namespace) and Rx (the System.Reactive namespace) for dealing with push/pull datastreams, and perhaps how reflection plays a central role in many parts of the framework. Dependency Injection and Inversion of Control is another pattern that's very common in the managed world, but (afaik?) not really used in C++.

Each platform will also have an ecosystem of tools, with the Java ecosystem being a nightmarish jungle because, like Glass_Knife writes, you have countless competing application servers and build systems and whatnot.

So to round it off, when you've read a couple of books on either platform, you'll still be an experienced programmer, but a novice in that particular platform. Kind of like how someone who'd read a "Beginning Game Development WIth OpenGL" would be a novice game/graphics programmer, no matter what other experience they had. And that's fine.

Advertisement

As people have pointed out, first, there is the semantic differences. The syntaxes, data types, constructs, all that stuff.

Then, there is understanding of the standard library. How you do hashes, trees, threads, data structures in Java. This is when C# starts to deviate a lot from Java. C# would have its own set of tools. So knowing Java, does not mean you'd know C#. Even though the syntax is similar, how you do things are different.

Then there's the API: Android, Spring/Hibernate.

On top of all that, someone who has at least 1-2 years of experience in a particular language would know how to do things efficiently in that language. Just because the syntax is similar, it doesn't mean the most efficient way to solve a particular problem is the same between Java and C#. One example is a candidate we interviewed knew Javascript really well. We asked him to write a solution in Ruby, and although he did it, but he did it in Javascript-way, resulting in 100-so lines of code, while the whole things could've been done in just under 20 lines.

In addition to the language differences and the API, I'd point out that there are idiomatic differences in the languages too.

Good code in C++ is not necessarily good C# or Java code. It's not necessarily bad, just different or unnecessary.

In fact, C# and Java are fairly different these days too.

All that said, in terms of your resume, as soon as you're comfortable writing a program of reasonable complexity*, put the language on your resume, with an honest appraisal of your level of expertise, e.g.

  • C++ - advanced
  • C# - intermediate
  • Java - novice

*completely arbitrary definition of "reasonable complexity": log10(LoC) > 3

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

You put it on your CV based on the extent you've used it in real projects. If you've used C++ for 8 years and are part-way through a book on C# I'd mention C# but only as "currently learning C#". If you used it briefly on one project then "slight experience with C#" would be reasonable.

Right, right now I don't even list it. I was just wondering as I learn it, and being that I already knew how to code, when I would be good at it. I wasn't sure how much was out there to know.

NBA2K, Madden, Maneater, Killing Floor, Sims

This topic is closed to new replies.

Advertisement