tags:

views:

332

answers:

14

Hello, I've been thinking of making a desktop program but I have no experience in that. I've been programming in PHP, ASP and JavaScript before. Java seems to be nice since you can run it on all OS. But what I really want is result, I do not really care what language makes me a good programmer (I'll take that later in college :P). I've tried both C# and Python before but it was only console applications.

So, what programming language do you recommend to me?

A: 

If you were comfortable in PHP you will feel right at home with Perl, better yet, pampered. You could even turn around and use Perl on the web with your former languages via CGI.

If GUIs is what you're after, C# is your best bet for Windows and Java for other platforms.

John T
+5  A: 

If you want Windows results, C#. If you want cross-platform results, Python.

You could also just pick randomly. Or you could try them all. Or look at the 16 trillion previous questions on this exact same topic.

UPDATE:

To find those questions, I mentioned, try some Google fun:

"what language" OR "which language" learn site:stackoverflow.com

Daniel Straight
I tried to search on it but didn't find anything relevant, got any links?
See updated answer.
Daniel Straight
+3  A: 

I've found that making desktop applications in C# / VB.NET (I'd strongly recommend the former) can be much easier than other languages, particularly with a good IDE such as Visual Studio (or the free Express editions) or Sharp Develop. It will be much easier to get it going on Windows, of course (I don't know much about Mono + WinForms), but I think the easier transition is worth the tradeoff.

PatrickJ
kenny
+1 for VB.NET (since he's a newb to programming). I prefer C# personally (after a couple years of VB.NET), but VB.NET is where it's at for cutting your teeth in .NET if you're starting pretty much from scratch.
STW
A: 

I picked up Objective-C fairly easily. Java is horrible. Not Java... please, not Java.

In my experience Java doesn't provide a very pleasant experience for the user. Java is made to work the same on every OS. Which means UI elements dont fit in with the rest of the OS.

Keyboard shortcuts are different across operating systems. Cntrl + A for Windows. Cmd + A for Mac.

If you were to build a Mac app with Xcode, its going to work like Mac OS X does. Same for Windows.

Java is different. Its going to be the same on every OS. Keyboard shortcuts don't always work correctly and UI elements are ugly.

Java has its place. But my experience with Java hasn't been pleasant.

Brandon Schlenker
Upvoted to remove the unjustified downvote.
Coding With Style
I don't suppose you know what saying something like that makes you look like to programmers who've actually worked with different programmers and languages and understand the reasons why a language like Java might be made? I realize you're young and all, but this stuff sticks around for a long time and you might want to consider that at some point you may come across this and find yourself pretty embarrassed. Or not... Anyway, I didn't vote you down :)
Bill K
Downvoted to remove the unjustified upvote. ;) (just kidding, but I didn't really like the flaming style... learning Java is certainly not harmful)
jsight
Downvoted for lack of any explanation as to why Java is horrible.
tschaible
+1 to cancel the downvote(s). That he likes Objective-C over Java is *very* clear.
kenny
Downvoted because it not only rags on Java without explanation but because it also praises Obj-C without explanation.
jmucchiello
Sounds like, "Radiohead is horrible. Not Radiohead... please. not Radiohead." Would love to hear WHY. Can you edit your answer so it's not just famboyism?
Nosredna
-1 for random Java-hate. It's nice that you learned Objective-C fairly easily, but did you ever try Java? I learned to wiggle my ears easily, but you don't hear me ranting about how badminton is utter crap.
STW
Upvoted - because it's nearly the weekend
Joe
Java doesn't offer a very pleasant experience to the user. In my experience anyway. Sure, it works on all platforms, but its not very user friendly.
Brandon Schlenker
Its a personal preference. I don't care for Java. If you like it sorry, its just not for me. I didn't mean it in an offensive way.
Brandon Schlenker
I don't like Java, but I'd like to hear why you don't. I'd be glad to vote up if I hear a reason.
Nosredna
A: 

If you want result and GUI and you don't care if it's windows only, you probably want C#.

If you want to run on different platforms, you might check out any language on the JVM since they all have access to a pretty powerful GUI toolkit. (Jython, Groovy, Java, ...)

Bill K
kenny
A: 

Don't bother with the desktop just yet. Hit the command line.

Get the K&R book and really learn C. You don't know how much you've missed out on if your background is 100% high-level (PHP, Python, Ruby, JS) web dev.

Learn the fundamentals, then raise the bar by going into C# or Objective C.

rooskie
@rooskie Why give him the pain....just because we did? Though I've used C for decades, I would never choose it. C#!
kenny
+4  A: 

My personal bias would be towards learning functional programming (Scala or even lisp would be nice). But, honestly, any language could improve your skills pretty dramatically at this point. Just take a look at a few of the mainstream ones, and pick the one that suits your interest the best.

For some ideas (not in any particular order):

  • C - Learning the low-level details of memory allocation can be useful background. If you use Linux, there's tons of sample code in Gnome apps to show you how to write reasonably elegant code in the language.
  • C++ - C on steroids... there's lots of complexity here if you want to learn it, but it can also be a great language to have in your arsenal.
  • C#/Java - Nice, high-level, reasonably portable languages. I prefer the C# language over Java, but there are advantages and disadvantages to each (Java portability is better). In the end its just a matter of preference, and external factors (legacy codebases may swing you one way or the other).
  • Scala - Java on Steroids - Really nice language, but the learning curve can be a bit steep, IMO.
  • Python/Ruby/Lisp/etc - Nice scripting languages, most of which are easy to learn, and all of which will lead to new ways of thinking about problems.

Honestly, in the end, the most important rule is just to have fun. Look through the basic "hello world" tutorials and just pick the one that looks the most pleasant. Learning never hurts.

jsight
Nice summary, but Lisp...scripting? easy?
kenny
(+ 2 2) -- What could be easier than that? Ok, I'll grant you that one is a bit harder for most than the others. :)
jsight
A: 

You can go easy or go hard, go fast or go slow.

Many people say C#, it's nice and can also be used on Linux through mono. On the other hand you can go with C/C++ and maybe Java. You'll have fun with C/C++, learn something and be a better programmer; but it will take time. Java is simpler but "needy". If you want the easiest way to develop a desktop application, you can go with VB or Delphi. Delphi has some advantages over VB which I'm not going to go into here.

My advice would be, if you have time, are willing, and just want to experience GUI, go from low to high, slow to fast, hard to easy. Try assembler, know C/C++, use Java, crack open C# and browse thought VB and Delphi.

In the end maybe you will not create a powerful application, but you will be prepared for college, be experienced and generally "know stuff".

Secko
A: 

For someone with HTML and Javascript skills Adobe AIR could be the way to go. It allows you to create a desktop application using HTML/DHTML or if you are familiar with Flex you can also use Flex.

See http://www.adobe.com/products/air/

Guillaume Gros
A: 

Go through K&R C. Learn C and you should have a great foundation for learning other languages.

Chet
+2  A: 

Many people have been suggesting low level languages such as C, C++, but frankly I'm not certain that it would be a worthwhile investment of your time. The first programming language I learned was C, from the K&R book, but if I were to teach my son how to program today I would introduce him to python or ruby.

Both python and ruby are very expressive, sophisticated languages that are easy to learn and have an intuitive, english like syntax. By all means do learn about structured programming, and older compiled languages, but initially you'll reap more benefit from learning OO concepts in a high level language.

Java and C# are excellent languages, however they are very tightly coupled with their frameworks, and you may run the risk of getting bogged down learning a framework instead of programming fundamentals.

Bayard Randel
A: 

i would say that Java would give a good introduction to desktop apps. I havent had any experience with some of the other languages mentioned here.
You can do some simple stuff in Java with very little headache, as compared to some other languages that require hundreds of lines of code.
Just depends if you have been exposed to OO programming in your web experience

A: 

Consider VB.NET (not "classic" vb!) as an easy-to-start-with high-level language that can help you get your foot in the door; then get up to speed with C# as well. The two are interchangable--VB.NET and C# are really just different dialects of .NET.

There's three things VB.NET has going for it over C# for beginner programmers:

  • VB.NET tends to be a more descriptive (some would say chatty) language
    • Where C# uses symbols VB.NET will use (slightly) more descriptive words. After a while VB.NET will probably be chatty to the point it annoys you, but by then you should be quite comfortable with .NET and switching to C# will be fairly trivial
  • Slightly more relaxed syntax
    • C# will gripe if you leave off parenthesis on method calls, and gripe if you add them to Property accessors--VB isn't quite as picky. It won't let you go haywire with bad syntax (like HTML) but it won't gripe and complain over every little detail
  • Better pre-compilation parsing
    • If you work with Visual Studio in both languages you'll notice it will show most compiler errors and warnings for VB.NET right away. C# will wait until you try to compile to tell you that there's errors in your code. The difference isn't huge (C# will warn you for most errors after a delay) but it can be a concentration buster to think you've just pulled off a method and found out it's 10 errors away from compiling (4 of which are because you left the () off a method call).

Once you learn the main features of .NET it's easy to learn the C# equivalency and transition if you want to; and at some point you might decide that VB.NET is a bit too chatty and opt for C# (pretty much what I did).

The only catch to VB.NET is that you should get in the habit of always adding two lines to the top of your code files; they'll help you out immensely in terms of not letting you do stupid things :)

Option Strict On
Option Explicit On

Here's a real short example of the "words vs. symbols"... you'll see there's not much difference other than some brackets in C# and some extra words describing what's happening in VB.NET

Option Strict On
Option Explicit On

Imports System
Imports System.Windows.Forms

<Serializable> _ 
Public Class MyClass
 Inherits SomeBaseClass
 Implements SomeInterface

 Public Shared Sub DoSomething()
  For each item as Object in SomeCollection
   Debug.Writeline(item.ToString)
  Next
 End Sub

 Public Sub SomeInterfaceMethod() Implements SomeInterface.SomeInterfaceMethod
  MessageBox.Show("Grrblah!")
 End Sub

End Class


using System;
using System.Windows.Forms;
using System.Diagnostics;

[Serializable]
public class MyClass : SomeBaseClass, SomeInterface
{
 public static void DoSomething()
 {
  foreach(Object item in SomeCollection)
  {
   Debug.WriteLine(item.ToString());
  }
 }

 public void SomeInterfaceMethod()
 {
  MessageBox.Show(@"Grrblah!");
 }
}
STW
A: 

Try not to fall in the 'must-be-cross-platform' trap. If you're just beginning, that shouldn't be what's on your mind. I can't speak for everyone, but I myself, and I have seen this happen to others, got caught in this early on and didn't get anywhere because I was always trying to find things that were cross platform, and just because they are cross platform doesn't mean they are the best suited for your situation, especially early on.

When you become proficient at a language, you will know how to port and make things cross platform. Don't choose something solely because it is advertised as being cross platform, despite the fact that most languages today are, don't feel the need to ignore other languages that, while not necessarily platform specific, seem to be better on certain platforms, such as C# for Windows and Objective-C for Mac, which are both great languages in my opinion.

If you want to learn something that benefits you in web development as well as in desktop development, I would go with Ruby. You can look into Ruby on Rails for web development. Ruby is also pretty cross platform and you can develop desktop applications with it. There are also various bindings, so for example you can write Mac apps with it and even have access to .Net with Iron Ruby, if need be.

Python is also a possibility.

Jorge Israel Peña