C++ or Java?

I ahve been a passive member of this community a while, but greatly inspired by knowledge and igenuity of the members on this forum. I am gearing up to go for Grad school and do MS in Computer Science hoping to specailize in AI. Its been years since I finished undergrad and that was the last time I worked with programing languages. I am now trying to sharpen my programming skills and get them to speed and am wondering which programming language I should develop proficiency in. Iam thinking of C++ or Java. Anyone knows what the trends are and which programing languages are most common within the AI community?
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • I work at Intel Research, where we do a lot of machine learning research, AKA AI. We are closely affiliated with the University of Washington, which is an excellent school for CS. BTW, what schools are you considering for graduate studies? I am a fan of python with scipy and numpy libraries for algorithm development. When more speed/efficiency is needed, I like C++.
  • It has already been said, but if you take this seriously you will learn all of them. I know quite a few people that are fluent in more than 10 languages, and typically switch between them on a daily basis.

    Start with C# or Java, they are simpler and more forgiving.

    If you go into ‘low-level’ or low resource programming you will learn to respect good old C.

    On the other hand if you build complex middle-tier systems that are part of an SOA you will exploit the advanced features and OO aspects of C++.
  • You'll probably end up learning both anyway, a single language programmer is like a carpenter with only a hammer. I think Java is a bit easier to learn than C++.
  • A small note about library interoperability in .NET. You can import flat C libaries into .NET very easily. If you have C++ libraries that you want to import into .NET you'll need to create C++ CLI bridging classes (basically a managed C++ class that wraps the native class), but thats not a complicated process at all. I do it almost daily and its very quick. From there on you can use those native classes in any .NET language (C#. VB.NET, C++CLI, IronPython, etc).
    VB.NET Shop
  • For people who want to get into the hardware side...running servos off of pin outs, grabbing serial lines, etc I'd recommend C/C++. But you said you're going to be doing AI research, for something like that, where it is removed from the hardware, and the need for low-level control, I'd recommend a higher level language. You mentioned Java, a good choice for that. Someone else mentioned C#...I'm not sure I'd recommend that for a new project, I'd only recommend C# if you're going to be connecting with existing C# stuff, or if you're at a company that has standardized on C#. I'd also look hard at Python, its a very easy to program language, that would let you quickly get to the meat of your AI research. It has the benefit that (unlike java) it can be made to quickly and easily use C/C++ libraries, should you want to include something like OpenCV or a Neural Network library.
  • Really, I would brush up on the language the school you are considering going to uses, if you know where you plan to go. If you don't know where you might like to go, but want to brush up anyway, C++, Java or C# would be great choices. If you have any background with one of those more than the other, you would probably be well served to stick with what you already know. That aside, most real research and development in the field of AI is being done in functional languages. If you have never used a functional language, it can be quite a jolt to get used to. Look at Lisp, Clojure, Scheme or any other of your choice. Look here for a list of functional languages.
  • As someone who works as a software developer for a living, and a holder of both a BS and MS in Comp. Sci., I'd reccomand C#. There are a lot of similarities between C# and Java, but the main advantage of C#, and .NET, IMHO is having Visual Studio for your IDE. And thanks to Mono, .NET code (C# or VB.NET) is portable to any POSIX platform as well.

    On the other hand C/C++ (as a language) gives you more freedom to what you want to do, and scales to pretty much any platform from a Cray supercomputer to an 8-bit microcontroller.

    Personally, I find that it takes me 3-4 days to complete the same task in C++ that would take me about one day to do in C#.

    Just my two cents...
    VB.NET Shop
  • For a career in programming working for a large company, learn Java. For your own enjoyment learn C++. For an academic career learn Ruby.
  • The Arduino is programmed in what is basically C++. There's a load of custom commands for getting data to and from the various pins, and stuff like that, but when you compile, the IDE compiles it as a C++ program by adding the relevant #include to the top and sticking a main() on the bottom that just runs setup() and then uses while(1) to do loop() over and over as long as the board has power. I program in C++ myself, since before I even heard about Arduinos, and I like it.
This reply was deleted.