Edit: 2 other replies were posted while I was writing this, so some points may be repeats of theirs.Definitely learn C or a C-based/related language. If you learn one, then learning the others is a snap.
Many of the basic commands and syntax are identical across C based languages.
If (x==1)
{
Do_Something();
}
Else
{
Do_Something_Else();
}
While (x==1)
{
Do_Something();
}
Do
{
Do_Something_Else();
}
While (x!=1);
For (Int X=0; X<100; X++)
{
Something_That_Needs_To_Happen_100_Times();
}
Those basic pieces of code are identical or almost identical in C, C++, Objective C, C#, Java, JavaScript, Arduino, PHP, Perl, PowerShell and several more languages.
Minor differences:
PHP, Perl and Powershell use a $ in front of variables
PowerShell does not use the standard logical operators like =, !=, >, <, >=, <=, it uses things like -eq (equals), -ne (not equals), -gt (greater than), -lt (less than)
My story:
I learned Basic as a kid, Pascal in high-school and in college about 18 years ago, Pascal, VB 4, C. None of which I ever used after class was over. But 2 year ago or so when I started playing with Arduinos, and watching Dave's videos, the C stuff came in handy.
When I returned to college to attempt to finish my degree, I took an MS Access class and later another intro to programming class that was C#, and it all just clicked into place after a few weeks and the instructor had commented that he was concerned that I might have been paying someone to do my assignments for me since I was excelling far better than anyone else he had seen. I explained my previous programming experiences in school (who seemed much more strict about stuff like formatting) using the form and report designer made working with the C# Windows Forms easier since the toolboxes were similar.
I was also taking a HTML5/CSS/JavaScript class at the time. The HTML5 made working with and using XML much easier. The C# made picking up the JavaScript much easier.
C# took my familiarity with C and brought me into the understanding of object oriented programming and also to the .NET framework in Windows. It sharpened my brain with C in general and now find Arduino and C for Microcontrollers easier to understand and create.
After those classes, I was able to teach myself PowerShell in a few weeks. (Since PowerShell uses a lot of C syntax and also a lot of .NET methods.)
Then next semester I had a Java class and it was like "This is almost exactly like C# with different capitalization and slightly different method names." I could immediately read and understand Java without having ever programmed in it before.
Then also I had a PHP class and it had portions of the base language that were nearly identical to PowerShell.
While taking the HTML5 class I was also taking an SQL class. The understanding of SELECT x FROM y WHERE z ORDER BY x helped a lot in PowerShell since you create a lot of variable list objects that you select from using commands like select and where.
I have never taken Assembly but I've heard similar stories about Assembly that some what mirror mine when it comes to C and C-related languages. If you can learn one processors assembly instructions, picking up more processors is fairly easy.
So definitely I say, learn C first if possible, and then one object oriented language based on C (C#, Java, C++). If C is not available, then pick C#, Java or C++ based on availability. I prefer C# because I find Visual Studio far more "newb friendly" than Eclipse or NetBeans.
Others may differ.
If you will be doing some of this stuff outside of an IDE, I highly recommend Notepad++. It supports nearly every language you can think of and has syntax highlighting.
Learning a markup based language would be greatly of help as well. HTML5, or just general XML. Since well, most things seem to have web connectivity today and XML is heavily used in configuration files for many applications. Tweaking program options or just using XML to store data is very useful.
No, I'm not trying to turn you into a full fledged programmer, but I find even knowing some PC programming to be very valuable when working with electronics programming and debugging.
I once whipped up a powershell script that captured output from a digital scale via a virtual serial port over TCP/IP, then modified it and then passed that data to the program that was supposed to be receiving the scale data in order to test general functionality and try some scenarios that we couldn't easily replicate. (The scale was not physically located in our area)
I've said a mouthful, but that's how I see things.