I don't know anything about it but I want to learn it so I can build any electronic devices I want with the knowledge. Can I learn it online for free? What programming language must I choose?
How can I learn programming?
From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
- 1.1 billion desktops run Java
- 930 million Java Runtime Environment downloads each year
- 3 billion mobile phones run Java
- 31 times more Java phones ship every year than Apple and Android combined
- 100% of all Blu-ray players run Java
- 1.4 billion Java Cards are manufactured each year
- Java powers set-top boxes, printers, games, car navigation systems, ATMs, lottery terminals, medical devices, parking payment stations, and more." - from http://www.java.com/en/about/
Java is completely free and can be downloaded and installed on your computer as a bundled Development Kit with Net Beans from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
There are an abundance of free resources for learning Java. Simply Google something like "Free Java Programming Tutorial for the Complete Beginner" and you'll find many awesome resources to help you learn.
Because Java, like most other programming languages, assumes a certain amount of mathematical cognizance, I'd recommend you first spend some time studying mathematics for programming. It can be pretty tedious and time consuming to learn any programming language. You will run across many technical concepts like OOP (Object Oriented Programming), Loops (a sequence of instructions that continually repeat until a certain condition is reached), and algorithms (step-by-step procedures for calculations). Installation of your Java software can also be problematic, as it must be configured in a certain way to work properly on your computer. Many people never get past these nuances, but if you study and persist despite the complications and confusing terminology, you'll find a rewarding hobby and an even more rewarding career (most Java programmers make $50 + an hour). Best of luck to you!
I know this isn't exactly answering it the way the other two guys did, but this article on lifehacker gives great tips on how to learn programming on your own time and for free! :)
You will need a programming platform, which can be quite expensive, but Microsoft has an "Express" version of their Visual Studio that is free. This is what used to be called a "compiler", but it provides much more help than compilers did a couple of decades ago. It's surprisingly powerful, with only some of the really fancy bells and whistles disabled. You probably won't miss them.
You will get the capability to do Windows applications (Windows 8 is also included but different from earlier versions), Visual Basic, C++ and Windows Phone apps. C++ is the most powerful, but more difficult to learn. Visual Basic is a quite powerful language that will probably meet all of your needs, and it's easy to interface with Microsoft Office products like Word and Excel. Both of these are "object oriented" languages. While you can write programs without using the capabilities of the "object oriented" structure, you'll want to learn those principles as you start to write more involved programs. It will really save a lot of effort and trouble as you get into programming. (This is for more complex programs that may have multiple modules. Relatively simple calculations or data manipulations don't need it.)
I'm not a web programmer, so I can't advise you about Java, but as Grigori said, that is the primary language for web apps, and PHP is starting to make inroads too. HTML is for web pages and you CAN find free online tutorials for that. HTML is not a programming language. Rather, it what tells your browser what to display. You do use HTML in conjunction with web apps.
You can't find much in the way of really detailed tutorials about programming online, so Grigori is right about needing a good textbook. Bookstores have a computer programming section. Decide what language you would like to program in, then look for a book for that language and the version you have. I now mostly use VBasic 2010 and I have a book titled "Mastering Visual Basic 2010". I miss a few of the features in C++, but VBasic can also be used in writing macros within Excel, although some of the details are different.
While there aren't any good free textbooks online, there is a lot a help available if you can figure out what to ask for. Include the language and version in your search query. That might be something like "Visual Basic 2012 open a file".
The training pretty much always starts with a simple program to display a dialog box on the screen with a message, so you can make a program that runs and does something almost immediately. Then you can build from there.
I also wish you good luck!
If you want to go through self-training (this is what I perceive) you better to find appropriate textbooks about programming languages, such as FORTRAN, VISUAL BASIC (last versions) or C++ (for calculations), or JAVA and HTML (for website design). You can start with simple problems to check for learning. Learn how functioins are named (library of installed functions), how to store and arrange variables, how to organize cycles, etc. You can start programming problems in a week if you have a well organized textbook.
Good luck to you!