views:

411

answers:

8

Possible Duplicate:
Which Programming Language Should I Learn?

I'm sure you guys get a bunch of these Q's on stackoverflow, but perhaps you guys have some insight tailored to my needs.

I'm both a web programmer, and a desktop app programmer. I use PHP for the web, and C++ for performance-intensive desktop apps and games. As much as I love C++ though, I think I'm slowing myself down when I could be using a more modern/friendlier language. I use C# when I need a nice GUI. I've used Java for GUIs before too, but I'm a little more comfortable with Visual Studio and I like the way they do things. I tend to think Java is a bit slow, and the non-native feel really turned me off, but that doesn't seem to be the case anymore.

Anyway, I'd say I'm quite proficient with both C++ and PHP, I'm still learning C# but it's non-cross platformness concerns me (I hear mono isn't quite up to snuff yet), I'm a little bit rusty with Java, I've used Python for about 4 months and really didn't like how "loose" it was but people keep raving about it, so I'm starting to think I should take it a little more seriously. I've used MATLAB a bunch, but I think that's only really good for research. The D programming language intrigues me, but it's still in its infancy, I found there to be a lack of IDEs, and the split between Tango and Phobos is also concerning.

So, it looks like a toss up between Python and Ruby. Both can be used on or off the web, and both are widely supported on both Windows and Linux, AFAIK. Any thoughts?

+1  A: 

Your question is quite similar to this popular one and probably belongs in the community wiki.

More specifically, here's a recent discussion of Ruby vs. Python that might prove helpful.

DOK
I disagree. He's asking what other people are going to learn next which isn't really answerable. I'm asking what *I* should learn next which is very answerable.
Mark
+8  A: 

Between the two I'd personally suggest going with Python. Though there are a few flaws with the language, its big advantage is in the library support it has. Though Ruby can (and is) used for things other than web apps, you won't find nearly as many libraries for it.

However, if you're open to new experiences, I'd suggest learning a language with a whole different paradigm. My personal recommendation would be a Lisp like Scheme, Common Lisp, or Clojure, but Haskell, Prolog, and Erlang are also good. The reason behind learning one of these languages is to introduce you to different techniques for programming. With Lisp you have an incredibly simple, consistent syntax, first-class functions, and state maintained with closures. This enables a radically different style of programming than you'd get with PHP or C++ (and, to an extent, Python and Ruby).

Kyle Cronin
+1  A: 

x86 assembly programming

I've done some assembly too... but the idea is to move to a higher level language, not lower.
Mark
I think that you know enough programming languages as it is. It's better to sharpen the sword you already have. But if you want to learn something cool and useful, I recommend learning Autohotkey scripting (Windows)http://www.autohotkey.com/
May be even you can have autoit. Autoit gives you lower level of autohotkey. These are the languages that motivate me to do silly things
Enjoy coding
+3  A: 

Instead of just looking at what different programming languages can and cannot do, take a look at what you need. You seem to have tried a number of different languages over the years, and you seem to have written code for a wide variety of situations. Thus, if you need something else in five years, you'll be able to learn that then.

Take a look at what you need right now - do you want to write code for the web or for desktop? Do you really need platform-independence? You get my point. When you have decided, then you can figure out which language suites your needs.

Tomas Lycken
Both. My clients demand web work which is kinda how I got snookered into the web world, but I still have a bunch of pet desktop projects. I guess one goal is to be a little more versatile and employable, and another is to be able to rapidly produce desktop apps so I can actually complete some of my personal projects.
Mark
+3  A: 

Between the fantastic community resources and the fact that Google uses it, it's hard to go wrong with Python. If nothing else, it looks great on a resume.

Electrons_Ahoy
+1  A: 

What's your next job/project? If you can influence the environment and/or language do a proper analysis and work out which one is most suitable and go with that.

I don't think that there's much mileage in learning anything - particularly a language (be it computer or real world!) if you're not going to apply it straight away. Also if you need it later you might be tempted to think you know the language when you don't - it could have moved on or you could have forgotten the important stuff.

ChrisF
Next "job" will likely be another web app but I'm not sure I should try doing it in a language I'm not very familiar with... this project will likely ride entirely on my shoulders and there won't be anyone to help me :\ I would like to slowly learn a language though so that when I'm comfortable with it, I can tackle a real project.
Mark
I'd still go with the language that's most suitable. If you're getting paid for the job then you want to get it done in the most efficient manner.
ChrisF
Well, the thing is, PHP, Python and Ruby could all get the job done. It's hard to say which is most suitable... I guess I'm just looking for something a little more 'elegant' than PHP.
Mark
+3  A: 

Ask a hundred programmers what language you should learn next and you'll get a hundred answers, all of which are correct. Take anyone's advice and you might fall into the Blub Paradox.

You've indicated that you're primarily a web and desktop programmer and the languages you've selected to work with (C++, PHP, C#) address your needs nicely. The IDEs you use are well-suited for those languages, too. It's easy to, say, whip up a nice-looking GUI and hook it into a database.

When you start looking at other languages, your first instinct is to compare them to what you already know. And you may be dismayed. Can you build a database-backed web page with, say, Standard ML? Sure. Is it easy? Um, no. You might conclude that since there are no books titled Building Dynamic Web Sites With Standard ML in the bookstore, it's not a very powerful or worthwhile language.

On the other hand, if you dig around enough in that same bookstore, you might stumble across Modern Compiler Implementation in ML.

You've already dismissed MATLAB as a "research tool," and the lack of IDEs to support non-mainstream languages scares you. Unless you're willing to start from Square 1 with a new language, I don't think you'll find it beneficial to look very far outside your comfort zone. Explore languages that are just outside your bubble.

Of the two that you mentioned (Ruby and Python), my one-of-a-hundred suggestion is Ruby. It lies just outside your circle of languages, but not so far outside that you can't leverage what you already know. It's much more of an object-oriented language than C++, Java, or C#. You'll learn some new things -- like the number 12 is an object, with its own methods -- and you'll be able to build many of the same kinds of apps you're used to.

Barry Brown
I'd like to give you +2. This post, that Blub paradox especially, made me think. Another reason I want to learn a new language isn't just so I can have a new tool in my belt, but to learn a new mindset. I don't want to get stuck thinking a certain way and get outdated. That was one of the interesting things about MATLAB... it got me thinking in terms of vectors and matrices which was very different, and a bit of a struggle. I had very nearly decided on Python, but I'll have to give Ruby a second
Mark
Great! Now that you understand the Blub Paradox and the position it puts programmers in, you are ready. When you tackle Ruby, keep an open mind. The syntax and semantics of Ruby allow you to do some things that are not quite as easy in C++/PHP/C#. If you dabble with some tutorials, you're likely to find that it doesn't do much more than C++/PHP/C#. But if you work all the way through a good textbook, you might find it can do a whole lot more.
Barry Brown
Python is good, too, but I personally think it's a bit too close to what you're familiar with to expand your horizon much. Python is certainly *useful*, but not challenging enough.
Barry Brown
+1  A: 

I like Ruby, perhaps more than Python. However, it only really shines with Rails.

Ruby is very slow, has poor library support, and is always a version number away from that feature that I'd love.

Right now Python is your best bet. Asking the same question again in a few years might yield completely different results.

adolfojp