views:

409

answers:

10

I'm looking for some input, but let me start with a bit of background (for tl;dr skip to end). I'm an IT major with a concentration in networking. While I'm not a CS major nor do I want to program as a vocation, I do consider myself a programmer and do pretty well with the concepts involved. I've been programming since about 6th grade, started out with a proprietary game creation language that made my transition into C++ at college pretty easy. I like to make programs for myself and friends, and have been paid to program for local businesses.

A bit about that- I wrote some programs for a couple local businesses in my senior year in high school. I wrote management systems for local shops (inventory, phone/pos orders, timeclock, customer info, and more stuff I can't remember). It definitely turned out to be over my head, as I had never had any formal programming education. It was a great learning experience, but damn was it crappy code. Oh yeah, by the way, it was all vb6.

So, I've used vb6 pretty extensively, I've used c++ in my classes (intro to programming up to algorithms), used Java a little bit in another class (had to write a ping client program, pretty easy) and used Java for some simple Project Euler problems to help learn syntax and such when writing the program for the class. I've also used C# a bit for my own simple personal projects (simple programs, one which would just generate an HTTP request on a list of websites and notify if one responded unexpectedly or not at all, and another which just held a list of things to do and periodically reminded me to do them), things I would've written in vb6 a year or two ago. I've just started using Qt C++ for some undergrad research I'm working on.

Now I've had some formal education, I [think I] understand organization in programming a lot better (I didn't even use classes in my vb6 programs where I really should have), how it's important to structure code, split into functions where appropriate, document properly, efficiency both in memory and speed, dynamic and modular programming etc. I was looking for some input on which language to pick up as my "primary". As I'm not a "real programmer", it will be mostly hobby projects, but will include some 'real' projects I'm sure.

From my perspective: QtC++ and Java are cross platform, which is cool. Java and C# run in a virtual machine, but I'm not sure if that's a big deal (something extra to distribute, possibly a bit slower? I think Qt would require additional distributables too, right?). I don't really know too much more than this, so I appreciate any help, thanks!

TL;DR

Am an avocational programmer looking for a language, want quick and straight forward development, liked vb6, will be working with database driven GUI apps- should I go with QtC++, Java, C#, or perhaps something else?

+3  A: 

Between the three languages you mentioned - go with what you are most comfortable. Those three are pretty comparable so it comes down to your comfort and preference.

Daniel Bingham
+7  A: 

I'd use Java over C++, simply because it's stupid fast to create a project that manipulates a database with JDBC and Maven. I haven't used C# much, but I have used quite a bit of Qt and Java, and between the two, I'd use Java. The development environments are nicer, and more importantly, you can do a lot more faster if you learn how to use the right tools (Netbeans/Eclipse, Maven).

Stefan Kendall
Also, Java is much more helpful when you mess up. Worst error message ever? "Segmentation fault"
Brendan Long
Nah, that's not the worst message. The worst message is the random one that pops up when you corrupt your stack by indexing a local array with a negative number.
kyoryu
+6  A: 

I may not be the best guy to answer this, as I am immersing myself in Haskell at the moment, but of the choices you give, I would have to go with Qt and C++ over Java and C#. Although they all have their own strengths and weaknesses, I believe that the costs of Qt + C++ are the smallest. Like Java, this combo can enable your application to be ported to a wide array of platforms. There are versions of Qt you can get for certain cell phones, as well as the more traditional desktop OSes.

Unlike what I have seen of Java interfaces, Qt GUIs look and feel very native to me on the platforms that I have used it on (Linux and Windows; OS X people may have different experiences). The Qt framework also covers many of the things that the .NET framework and Java libraries cover; it goes far beyond merely graphics. There are sound APIs, networking APIs, file access APIs, a SQL API IIRC. The major downside to this choice is that the Qt people have their own template library. Although it works decently with the STL in most cases, there are times where there are differences that make them incompatible. Also, Qt apps have to run a separate tool to convert all the Qt stuff into actual C++ code before compiling. This can make the build process somewhat longer (depending on the app) and somewhat more complicated (though not really).

In defense of C# and Java, I feel that they have somewhat of a smaller learning curve than C++ for most people. I feel that C# is the "better" language in terms of syntax, but because I jump from platform to platform I need something more portable. I have not investigated the Mono project to any real depth, so if you want to move to other platforms and still use C#, that may be a way to do so.

ZachS
OS X actually depends on the underlying engine being used, but that depends on the OS X version and compile time switches, so this is no big deal...
penguinpower
+1 because I've seen way too many unnatural java UIs
Earlz
+2  A: 

I am primarly devloping in C++/Qt but also embedded C and, as counterpart or the Qt framework, also with boost and gtk

For Qt speaks (from your pov) that it has tight and nice integration with SQL databases. The GUI experience is smooth (see netbeans for a delayed JavaUI responvieness example) and extendable in any way (I often use QtOpenGL module to visualize a lot of data)

For straight forward devel, I think that rather depends on your knowledge than on the language itself. The longer you work with a language the straighter the answer gets.

I personally disklike C#, as it's crossplatform is dependant on Microsoft to patent infrig the Mono developers or not. Java... well I have no big experience with that. I never even started trying to lrean Jave when I saw how poor Netbeans UI performance was and the requirement of having an abstract pseudo-virtual machine running.

That said: C++/Qt ftw! ;) [don't take that too serious]

Edit: Forgot to mention the exquisite Qt Documentation

penguinpower
And Netbeans has a relatively fast GUI IMHO. See Eclipse for a Java app that's really really poor on that.
Billy ONeal
For me it always had like 0.3 to 0.5sec delay (and that feels like an infinite amount of time)Note: I am running on 64 bit linux with the nativ SUN Java JRE.. maybe this is the guilty one :> But in the end, if it's Java or the VM Machines implementation doesn't matter. If it has delay it has delay (→ user experience is somewaht awfull).
penguinpower
A: 

Performance isn't really an issue these days, and all three have some form of cross platform functionality, so there isn't really anything there to make a decision on - it all comes down to what is easier to work with.

I'd go with C# or possibly java, simply because you get better results when searching to solve a problem - if you find a solution searching for c#, it is almost certain to have been written for the framework you are working on.

Tom Clarkson
A: 

Personally I'd go with Qt and c++ especially if you're already comfortable with c++. The relatively recent addition of Qt Creator makes it easier than ever to get started.

In terms of distributing your completed app, on Linux you should be fine distributing just the sources for people to compile themselves. On Windows you can distribute a binary with a few dlls. As I've never used a Mac I'm not sure what the standard method of distribution would be.

Definitely go with Qt and c++.

Amos
+3  A: 

My advice is to consider Java as the primary language.

  1. The Java language is architecture neutral, so java applications are ideal for diverse environments, offering portability across different computer platforms, and not only. C++ is very system dependent by nature, still projects like Qt are trying to overcome this disadvantage (or advantage :P).
  2. The standard library for Java is huge (some would even say "bloated"), and very well documented. And even if you don't find something useful in the standard API, I am sure you will find some helping (free) libraries on the internet.
  3. Smaller learning curve comparing to C++ (somewhat similar with C#).
  4. Ease of development for Database applications using JDBC / Hibernate.
  5. Ease of development for Swing (GUI Based) apps, using Netbeans GUI Builder.
  6. Ease of development for web-based applications using Java EE technologies stack in the conjunction with an advanced IDE like Netbeans (Visual JSF editor) or Eclipse. Conclusion: Java (& friends) is a proven and mature technology.

NOTE: Even though the whole Java Ecosystem can be overwhelming at the beggining, after a while you will get used to it, and you will see, that you've become very productive.

NOTE: Have you ever considered python for writing small apps (I wouldn't go too far, and recommend python for something big)?

Example: Writing a Twitter client in Java Swing.

Andrei Ciobanu
Amos
A: 

I'd recommend C++, because it's more powerful, substantially faster, and has a lot less redists associated. C# may not run in a VM, but it's hardly native performance, and the compilers are very bad. Your code can run very slow or very fast due to processor cache effects that you don't understand and really don't want to know about - the C++ compiler will do it for you, but the C# compiler won't.

Ultimately, in C++, it's much easier to directly end up with what you want. Java and C# both add a lot of things, some you want, and some you almost certainly won't.

DeadMG
Very sweeping generalised statements with no evidence provided as to why the c# compiler is 'very bad' and why it's more likely to suffer from cache performance than c++ ( btw which? d-cache, i-cache?).
zebrabox
+2  A: 

I prefer Qt. Because it's not only a GUI. It's a GUI library bundled with many other things -- like network, sql, file operation... and they are all cross-platform and the GUI have a native look!

For the programming language, I'm not mean to hijack this thread but I suggest you to use Python which is a easy-to-learn and powerful language that can save your life in programming. There is a Python binding for Qt -- PyQt link text. I write GUI with it and quite happy.

Grissiom
A: 

You're in a very similar position as I am, currently. I have some basic (book learning) experience in C++ and had made some small programs in VB6 in the past. I ended up going with C# because the syntax was familiar and made more sense to me. I actually like the curly brackets and semicolons. I'm also pretty fluent in PHP so I suppose that figured into it also.

At any rate, I wanted to be productive and since I'm just a hobbyist going deeper into C++ wasn't a good idea as I'd probably never be "good" at it. So it came down to either using Java, VB.NET or C#. I've never used Java, so it came down to the other two. I probably would be more productive in VB.NET but since C# felt more intuitive I went that route. Still learning, but don't regret my choice and would do it over again.

mdvaldosta