One Each - Best Programming and Scripting Language

Hi all, I've had it in my head to try some programming, but outside of programming calculators 20 years ago, I have no experience. What I'd like to do is learn one scripting language, and one that's more dedicated to programming. This is all for personal amusement, but I'd like it to be useful also. My preferences are noted thusly..

Fairly easy for someone new to pick up.

Wide applicability. I primarily use GNU/Linux, and that's where my interests lie, but I'd like to be able to use what I do as much as possible. Windows and Android would be nice to add also. I'm not interested in Apple at all.

Able to use what I learn in a business environment. I'd like to get into IT in some capacity, and being able to use the skills I acquired would be a plus.

It would be a bonus if what I learned could easily apply to other languages also.

What I've come up with is Perl and Java, or maybe Python? Do any of you have ideas?

It totally depends on what you want to do. Java would cover all platforms, so that's not a bad choice.

For the scripting language, I would recommend PHP over Perl (and probably Python over both of those). You really don't see Perl too much any more and it's probably a little more difficult to pick up than PHP or Python. If you are more interested in client-side scripting, then Javascript is the obvious choice.

Moderator

I'd go with Ruby and maybe C#. Ruby can really do quite a lot of things. It does scripting on its own. It does web apps with Rails (though you also need to know HTML, CSS, and maybe JavaScript). It can even work with C# via IronRuby.

Python can do a lot of the same things, via itself, Django, and Iron Python respectively. But it isn't quite as popular IMHO.

Theevilsharpie may have a point about Java if you want to do mobile development, in which case you'll want to look into either JRuby or Jython.

Thanks guys. It looks like Java is a winner for programming, but there's no consensus for scripting. To answer a couple questions; in my head I differentiate between scripting and programming by use. Scripting to me is a quick, and sometimes dirty solution to a problem, where pretty and polish aren't immediately necessary. Programming OTOH is more fleshed out, with more thought going into the final product, which may have a fairly wide scope.

To clarify what I mean by "best"(wasn't the best choice of words) is more like a Swiss Army knife, rather than a surgeon's scalpel. Something that may not even be the best tool for any job, but has a wide range of application, and good functionality.

Thanks for the ideas. I'm gonna hit up Wikipedia, and try to get a feel for the languages mentioned. I have a little familiarity with Java and Python, but that's about it.

How about 2 each? Though, both the top two are equally good for serious programming as scripting, so long as you aren't ALU-bound in performance.

Python
+on about every distro
+easy to use ad-hoc polymorphism
+tons of libs
-not OO in the way languages made to be OO from the start are (no encapsulation, FI)
-requires too much work to apply type-checking, sometimes (GvR likes the idea of type decorations, so maybe one of these days it'll make its way to CPython)
-GIL in the standard implementation (need to go to Jython, Pypy, or use multiple processes, to gain speed from more CPU threads)
-no TCO (GvR still doesn't seem to get where, much less how, continuations can help, and it's unfortunately a good solution to complicated problems, that are hard to come up with simple contrived examples for)

Ruby
+code blocks (who needs explicit lambas/funs?)
+mixin-style ad-hoc polymorphism
+good string handling right out of the box (good, as in, "oh, it's that easy, huh...")
+Rails
+implements a good security model, almost by accident
-GIL in the standard implementation
-Often slower than even Python
-Less popular outside of Japan, but growing rapidly, thanks to Rails

Java
+runs everywhere
+sometimes performs well
+used everywhere
-inclusion-only semantic polymorphism
-parametric polymorphism implementation too focused on structural typing to be as useful as it aught to be (C++ templates > Java generics)
-every wheel has been re-invented 100 times in it, because they went with a, "primitives not solutions," mindset for the standard libs
-awkward iterator implementation
-checked exceptions
-GC can often cause temporarily hung programs, especially when throwing away a lot of strings

C++
+runs everywhere, after a fashion
+usually performs well
+good parametric polymorphism
+/-no integrated GC
-derived from C, has a lots of weird syntax
-sometimes too many options for doing something
-aliasing and/or not cleaning up your memory will come back to bite you. Not might, will.

C and C++ will give you a good background which can transfer to nearly any language. They make you do most things the hard way while being pretty popular.

Java and C# are both fairly popular languages. I prefer C# over java for niceties, however, java has a big more industry support (and a HUGE amount of 3rd party libraries/tools to play with).

Ruby and Python are good languages to learn. I personally like ruby's syntax and style over python, but choose whichever you like they both do a good job of high level abstractions. Python has a larger following, and ruby tends to have a somewhat smaller following with less experience (a large portion of ruby developers are RoR only and have a somewhat lacking knowledge of the language itself in my experience).

Javascript is a useful to learn language. I don't like it as a language, but it is pretty much all we have for the web. Its popularity is only going to grow as the web becomes further and futher ingrained. Sure, some techs allow different languages to be translated into javascript, however, I don't see them ever fully replacing the language. A caution, there are far too many ways to do the "wrong" thing in javascript. It would be helpful to pick up a good book on clean javascript ("Javascript: the good parts" comes to mind).

Dart and Typescript are both promising languages IMO. I personally think that Dart is taking the right approach towards web languages and I'm rooting for its success. Typescript looks good and should help to bridge the gap between emcascript 6 and 5.

Honestly, the only languages that I would not recommend are PHP and Perl. The two are poorly thought out languages with bizarre, confusing, and hard to maintain syntaxes. Perl has a pretty big following of zealots which will claim it has no faults (The only other language that I've seen with similar zealotry is python). Don't be fooled. Perl wasn't originally a programming language, it evolved into one... That is like having XML evolve into a programming language, it just isn't a good place to come from.

PHP isn't really loved by many except for the inexperienced. It is somewhat of a mismatched collection of ideas. Not to perls extent, but to a significant one none the less.

Google's Go is interesting. It has some nice ideas, and some not so nice ones. The Go community and team are extremely opinionated on what makes a good language, so if it lacks a feature you think would be nice there isn't much of a chance that it will be adopted.

There are certainly other languages out there (D, groovy, pascal, haskell.. etc) go exploring, see what is there. You'll only gain from exposing yourself to new languages and ideas. What ever you do, it is really more important that you program. The language is not all that important in the long run.

No one mentioned ksh/bash yet - these are the backbones of scripting, especially since you're into Unix/Linux - might even get you a high paying job in a Financial world as I've seen several large corporations using Unix systems for trading and backoffice accounting. Korn Shell is very powerful when used correctly.

No one mentioned ksh/bash yet - these are the backbones of scripting, especially since you're into Unix/Linux - might even get you a high paying job in a Financial world as I've seen several large corporations using Unix systems for trading and backoffice accounting. Korn Shell is very powerful when used correctly.

Click to expand...

I have a hard time recommending them. They do a lot of good one off stuff, however, they are less programming languages and more "Run a bunch of programs" things. Most scripting languages (python, ruby, and perl) have the ability to do the same thing in just about as clean a syntax as bash or ksh while providing lots of useful and interesting features.

I have a hard time recommending them. They do a lot of good one off stuff, however, they are less programming languages and more "Run a bunch of programs" things. Most scripting languages (python, ruby, and perl) have the ability to do the same thing in just about as clean a syntax as bash or ksh while providing lots of useful and interesting features.

Click to expand...

bash is a given since I run GNU/Linux exclusively. I haven't utilized it as much as I should due to lack of need, but I've been meaning to open a book, and look for creative ways to use it.

Thanks for the detailed replies guys. I still haven't read up on everything, but I'm leaning towards Java and Python. Java should be good for Android, and I have lots of examples to pull apart, and some things I'd like to do. Python seems robust, and popular. A good Swiss Army knife.

I have a hard time recommending them. They do a lot of good one off stuff, however, they are less programming languages and more "Run a bunch of programs" things. Most scripting languages (python, ruby, and perl) have the ability to do the same thing in just about as clean a syntax as bash or ksh while providing lots of useful and interesting features.

Click to expand...

Learning curve with perl vs learning curve with ksh is different (I think it is a natural progression to learn ksh, then learn perl)?

Scripting: Perl and Python (I put both for scripting. Python has clean syntax and it is easier to get up and running with it, but Perl can be extremely powerful if used properly and Modern Perl with things like Moose have cleared up a lot of things missing from Perl 5).

Compiled: C# or Go

Java is a terrible language, as is C++. Stay away from these as much as possible. They will ruin your brain. Java is plagued with a horrible implementation of generics, and C++ is a huge language that has all kinds of clunkiness and gotchas.

It replaced Perl for me, and is becoming the default scripting/admin language for most modern Linux distros post Perl. Many of the system admin tools have been written in python, and its usually installed by default.

It replaced Perl for me, and is becoming the default scripting/admin language for most modern Linux distros post Perl. Many of the system admin tools have been written in python, and its usually installed by default.

There is no magic right answer, there are so many languages. Picking something big and popular will ensure you can get lots of books and high quality tutorials which is the really important part for a beginner. So avoid languages outside of the top 10.

Beyond that it doesn't matter much, to be good you'll still need to learn them all.

No? Terrible generics? Yes if you're an academic writing your Ph.D on .. generics, then perhaps.. for everyone else who just want to build houses and cars, it's a wonderful language, a language that stretches sooooo far across platforms and frameworks.
Performance rocks too, the JVM is a rockstar. (and if you're gonna smoke that hippie crap, do it on something that lights up in the JVM, JRuby ex.)

No? Terrible generics? Yes if you're an academic writing your Ph.D on .. generics, then perhaps.. for everyone else who just want to build houses and cars, it's a wonderful language, a language that stretches sooooo far across platforms and frameworks.
Performance rocks too, the JVM is a rockstar. (and if you're gonna smoke that hippie crap, do it on something that lights up in the JVM, JRuby ex.)

Click to expand...

No? Terrible generics? Yes if you're an academic writing your Ph.D on .. generics, then perhaps.. for everyone else who just want to build houses and cars, it's a wonderful language,

Click to expand...

No, issues with generics do not just come up for people writing an PhD. I was working on a project at my previous job where we had to use Java and an issue with generics came up very quickly.

a language that stretches sooooo far across platforms and frameworks.

Click to expand...

How popular a language is has nothing to do with whether or not it is a good language. In fact, I would say that Java is probably a lot less popular outside of corporate environments. It is a terribly verbose language for one thing, and not very fun to program anything in outside of work. This is especially true since it is almost always used in some kind of heavily configured IDE like Eclipse.

Performance rocks too, the JVM is a rockstar. (and if you're gonna smoke that hippie crap, do it on something that lights up in the JVM, JRuby ex.)

Click to expand...

Java != JVM

What 'hippie crap' are you referring to?

I don't have a problem with the JVM, I have a big problem with Java. In fact, I'm quite interested in other languages that run on the JVM such as Clojure and Scala, but I haven't had time to investigate them.