What scripting and programming language would you choose?

Chris M. wrote in to ask: "What 2 scripting and what 2 programming languages would you recommend learning first?"

The answer is complicated not just because I do DevOps programming on both Mac, Linux and Windows.  I feel that you should master one of each.  Then if you find a need it will be easy to pick up anything else you need.  If I have to choose I do have a few recommendations on each platform.

Scripting languages vs. Programming languages
Let's get this out of the way first, it's difficult to make a clear distinction between these.  The old rule of thumb was whether you compiled the code you wrote or was it interpreted.  Compiled Languages were Programming Languages.  Compiling code means taking the text that you write and producing a working application using a combination of programs and steps depending on the language. Assuming that all the steps worked without errors you should be able to run that application on any machine with the same OS version. With an Interpreted language you use a program to read the text you write and do what you have defined.  So if your programs interpreter is not installed you can't run the program.  Interpreted languages were considered scripting languages.  There is a lot more to it than this but it gives you the basic idea.  Because your shell interprets the scripts you write all languages.

While I have learned both Compiled(ex. Java,C/C++) and Interpreted(ex. Perl,Python) languages I no longer see enough of a difference to get hung up on whether a language is either.  There are rare occasions when compiling something makes it better or faster but they do exist.

After all that, here are my choices for Linux and the Mac.   For a Shell scripting language I would recommend BASH.  For a programming language I would start with Python and then learn C/C++ if you want to learn how to compile stuff.

My recommendations for Windows is Powershell because it isthe best answer for a shell programming language.  The cool thing about PowerShell is that you can use some C functions and objects in it directly. The only issue with Powershell is that support before Windows 7 is more complicated, but everyone is on at least Windows 7 right?  Python on Windows also works well but C# is what you need to get heavy lifting done on Windows. This will help you ease into the transition. UPDATE:  As of Windows 10 you can program in BASH on Windows.  This make BASH almost universal across all OSes.  It's also really simple to use and learn.  Simple scripts can easily grow over time to become more complex.  Most of git is written in BASH as an example.

Here are some learning sites both free and paid that we recommend:
http://code.org/learn - *FREE* Whether you are 6 like my son or 60 they are out to help you learn to code for free.

http://www.codecademy.com/‎ - *FREE* Cool site for learning all kinds of Languages

http://www.diveintopython.net/ - *FREE*  on-line Python book

http://lynda.com - *Paid* - Fantastic training site

There are a lot more just use your Google Foo and you will probably find a free resource for what ever language you decide to learn.