views:

3825

answers:

17

I have been thinking about participating in Project Euler (where one solves various problems presented as a "thinking exercise". However, I thought back to my college days in computer science, and remembered a class in "comparative programming" where we were made to solve various problems in different languages to contrast and compare them. Ahh... those were the days of COBOL, FORTRAN, Pascal, Assembly Language, and Ada!

Now, of the tons of languages available to learn (I won't bias this by telling you what languages I am already fluent in), what 10 languages would you recommend doing the Euler problems in (listed with top pick as number 1) with the following criteria?

  1. The language must be in relative high demand by a multitude of employers.
  2. A version of the language must be readily available to everyone (we can't learn it if it's not free / cheap).
  3. Reference material for the language is readily available.
+5  A: 

C# and ASP.NET is in high demand.

Kyle Trauberman
+15  A: 

You could do a lot worse than consulting the TIOBE Programming Community Index.

Kylotan
According to that, I should learn LUA instead of Objective-C?
Ubersoldat
Logo is #16 !! Seriously, after looking at the definition of the TIOBE programming index, it is based on search engine queries, which does not necessarily align with the "marketable" criteria or employers. Interestingly, Pascal/Delphi are separated and Flash is more common than ActionScript.
Ryan
Try keying the languages into a I.T. job website like Jobserve and see how many results you get for each of the keywords.
ConcernedOfTunbridgeWells
@Ubersoldat: Just because a language is more popular than another does not mean you should learn that more popular one. You should learn whichever one you think will suit best to your needs/objectives.
felideon
In my part of the industry, Lua is far more prevalent than Objective-C. So I can understand how it may have ranked highly. Some results are bound to look strange because few of us truly know the whole programming industry.
Kylotan
-1, toibe is not marketable, its results are bogus at least. According to it, D should be quite marketable (right next to ruby!!), but it's not.
hasen j
If you only look at rankings, sure. If you look at the actual rating percentage you'll see there's actually a large gap between the two, showing Ruby 3x as popular as D.
Kylotan
A: 

My top 5 picks:

  1. C#
  2. JavaScript
  3. Python
  4. Ruby
  5. F#
Larsenal
Since the question is marketable, I'd have to add Java. The supply of Java developers seems to be significantly smaller than demand currently. F# is not exactly marketable yet, but I think it does have potential.
Brian Knoblauch
I'm a big .NET person, but I do not believe that F# is very marketable. Good conversation starter if it is on a resume, but if you want to find a job doing that full time, you will not have many choices.
pearcewg
+1  A: 

I don't think Project Euler is the best teacher of languages. It's decent practice to learn the syntax of a language and maybe to get better at algorithms, but I wouldn't consider it a good way to learn a programming language. And some highly demanded languages are just plain inappropriate (though theoretically usable) for this task.

I'd be more apt to use a scripting language like Python than something more marketable like C# to solve those problems.

Brian
+1  A: 

This seems like a rather difficult question to answer. Your tagging it "Subjective" should have demonstrated that up front :) I would say that PHP and C# are two of the best, but then again that is Subjective. Both are in high-demand (I've developed with both professionally in the last 2 years on large projects), available, and extremely well documented.

Jonathan Sampson
From my experience, the big picture is that C# is much more lucrative than PHP. Exceptions to that rule, I'm sure...but that is a general true statement.
pearcewg
+1  A: 

(Can they be declarative?) C#, Java, PHP, C++, SQL, VB.NET, JavaScript, Ruby, Python, PowerShell

Robert Venables
+5  A: 

I'm not going to make a list in order, but I'll take a stab at it. You obviously don't need to do all the Euler problems in a single language - in fact, you should use the best fit for the problem.

Some problems you may want to solve with Brute Force or something that requires multiple, speed-dependent calculations. For those problems, I'd prefer C/C++, but anything that can compile to machine code would probably be fine.

There are some problems that are more thinking problems, and those would be a good fit for languages that are highly readable, and syntax-verbose. I'd list Ruby as such a language, but most interpreted languages such as Python would probably work as well.

A functional language is good to know as well, and I'd list one in this. I've learned the basics, but I've never actually used one for any serious problems. OCaml is the one I learned, but I don't know much about this category.

You should also learn Java and a .NET language - whether C#, C++, or Visual Basic. Those are high in demand, but I don't know how well they'll be suited to Project Euler.

There's also web development languages, such as ASP and PHP that are highly in demand, but I wouldn't recommend trying any of the Euler challenges with them.

For the most popular languages of the pick, C++ and C# are the most popular ones, and PHP is used in a very large amount of current websites, and looks very good if you know it.

Andrei Krotkov
+1  A: 

I wont rank them, because they all have their good and bad qualities depending on what you are using them for. I believe that every developer should try out any language that comes out to see what it brings to the table, it will help you become a better developer.

These are just some examples (not limited too):

Java, C#, Python, Ruby, Groovy, C++, C, any sort of Assembly

Josh Harris
I would say Python and C# are pretty much as powerful as all the rest together.
Mark
Python and C# are as powerful as C/C++ and Assembly? You have a weird definition of powerful...
Adam Peck
A: 

I agree with Jon's comment - most marketable are C#, Java, JS, PHP, Ruby and Python, depending on the intended target employer. If you intent to go into the banking business (;-) you may want to learn all about J2E, XML and UML, and solve the puzzles using Application-Services (just kidding).

In contrast, most useful to solve euler-like puzzles would be an interactive environment for rapid prototyping, short turn around, dynamic typing and a big library of already existing, easy to reuse stuff. Scripting like environments are usually better for that stuff. My choice (but I am biased) would be a Smalltalk, Common Lisp, ML or Haskell or Prolog environment. Of course, thats 180degrees the opposite of marketability.

A good compromise might be Python, which is used quite often for scripting these days, and can be seen as a subset of Smalltalk with a C-like syntax (but missing the IDE, though).

PS: I intentionally left out C++ - I think its more or less dead as a widely used platform and will only be useful if you plan to go into some very technical areas. But even those are moving away from C++ now.

PPS: I doubt that TIOBE is the best advice here. One thing to consider is if it is really useful to try to compete in a field where there are already another billion (rate-lowering) competitors. Instead, you could look for a higher-priced niche, where you wont find that many open positions, but also less competition in the market.

blabla999
Have to disagree with your comments RE: C++ and banking. Look at any quant job posting and C++ skills are among the most requested, unfortunately.
Scott
Yes, but if you start learning, you should look into the future; if you are already skilled in C++, thats fine. But if you start, you have to look 3years ahead. And all of the banking business I've seen recently was java (new stuff; not support of old things).
blabla999
+1  A: 

what 10 languages would you recommend doing the Euler problems in (listed with top pick as umber 1) with the following criteria?

  1. The language must be in relative high demand by a multitude of employers.
  2. A version of the language must be readily available to everyone (we can't learn it if it's not free / cheap).
  3. Reference material for the language is readily available.
  1. Perl
  2. Python (any extremely large computation)
  3. C++/C
  4. R
  5. Something your familiar with that has lots of libraries.

Perl is my #1 for serveral reasons.

  1. It is a dynamic language.
  2. I am most familiar with it.
  3. It hides most everything that doesn't have to do with math(types, namespaces, garbage).

Python reached #2 because I am less familiar with it, but tt has 1 advantage over Perl. Infinite sized numbers are built in. Basically if you got the Ram/Swap it can grow a long long time. Perl can emulate this by using a module(bigint i think), but it seems to compute slower than python does.

C++/C. Compiled programs can run faster! So if the math is taking too long in the interpreted language; use your code as a prototype and rewrite it in a compiled language.

J.J.
+7  A: 

I searched for jobs on Dice.com:

  1. java - 91948 results
  2. c++ - 4811
  3. c# - 4423
  4. javascript - 3777
  5. Perl - 2985
  6. VB - 2325
  7. PHP - 1438
  8. python - 966
  9. ruby - 515
  10. groovy - 28
  11. f# - 2

so, according to this unscientific search it should be Java, c++,c#, javascript

Raz
Java Is larger than any of the rest. ??Why did you not list Java as number 1?
WolfmanDragon
They're not in order, apparently.
Andrei Krotkov
Theres 2 F# jobs, but no C jobs? Bad source, I think.
mathepic
this search is now 19 months old, it might make sense to do a new search. also, c and c++ tend to be counted together.
Raz
+3  A: 
  1. Java
  2. Python
  3. Perl

Why I chose those three:

  1. They are all in high demand.
  2. They all are free.
  3. Tons of reference materials for any of those languages. Check out the O'Reily library.
  4. No OS lock-in like that you have with C#.
WolfmanDragon
your #4 reason is not exactly right, but it is true in the sense of using the latest .Net features.
siz
The fact that Mono and Moonlight exist shows that there are some strong merits to C# and the .NET platform, extending beyond Microsoft. Someone needs to build the nextgen platform without MS (not Java, not PHP, something new...)
pearcewg
Why something new? C is perfectly fine, Python is perfectly fine if you like whitespace syntax, Ruby if you don't... Java is fine too.
mathepic
A: 
  1. C# (any .net language) using LINQ
  2. Java
  3. Javascript
  4. C++
  5. SQL (TSQL / PSQL) etc..
JoshBerke
+1  A: 

Another point: Aside from the typical languages, you should learn a mathematical language. Things like MATLAB, Maple, or Mathematica are all software packages that let you do more mathematical tasks that may be needed for Project Euler.

Andrei Krotkov
+2  A: 

Marketable for high salaries or marketable for any salary?

The two probably go in opposite directions.

MSN

MSN
A: 

Remember todays high in-demand language is not yesterdays high in-demand language.

(Unless you don't mind working on legacy code that is)

JSmyth
+1  A: 

One way to determine market demand for programming languages is to search a job listing web site; even better search a site that aggregates job sites; and even better, search a site that aggregates job sites and shows historic trends over keywords. This is what http://www.indeed.com/jobtrends does. An interesting search term might be "java, c++, c#". Have fun!

Phillip Ngan