Ask a question

How can I learn programming?

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?

6 Answers by Expert Tutors

Tutors, sign in to answer this question.
Jameyson M. | HTML, CSS, Microsoft Word, Microsoft Excel, WordPress, OpenCartHTML, CSS, Microsoft Word, Microsoft Exc...
"Java is the foundation for virtually every type of networked application and is the global standard for developing and delivering mobile applications, games, Web-based content, and enterprise software. With more than 9 million developers worldwide, Java enables you to efficiently develop, deploy and use exciting applications and services.

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

Java is completely free and can be downloaded and installed on your computer as a bundled Development Kit with Net Beans from

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!


Michael U. | Web and Software Development TutorWeb and Software Development Tutor
5.0 5.0 (4 lesson ratings) (4)
Based on my understanding that you want to build your own devices, these types of custom devices are typically programmed using C. I would recommend using C++ if it is possible. If you learn C++, you are learning C at the same time. To learn C/C++ you will want to get the free version of Windows Visual Studio Express 2013 for Windows Desktop. Usually small embedded systems require you to maintain certain memory limits, and require you to compile 32 bit code targeted for specific CPUs. Visual Studio is a great place to learn C/C++, but the book mentioned below will walk you through doing embedded programming using the GNU C++ tools which have no user interface. I recommend you download both and use the Visual Studio environment to program and get your code compilable/running, and then use the instructions in the book to compile your source code via GNU and put it onto the embedded system. Visual Studio has intellisense, which shows you mistakes as you type your code and suggests solutions.
You will need the Visual Studio 2013 for Windows Desktop edition:
and when you create a New Project, you will want to select C++ as the language (its a list at the top of the new project window) and then select Console Application as the project type. The Console Application is going to be the closest to what you will actually be using to build an embedded system. It has one function called Main() that is the entry-point to your program.
Here is a book that goes step by step in buying a small board and programming it. However, this book uses the free GNU C compiler which has no user interface. Visual Studio mentioned above has a better user interface for learning how to program, whereas the gnu tools have no user interface (but the book will step you through using them).
Denise C. | Computer ProgrammingComputer Programming
5.0 5.0 (3 lesson ratings) (3)
You mentioned that you wanted to learn programming for the purpose of building electronic devices.  If this is your goal, I would recommend Arduino.  
With some very inexpensive hardware and books that you can easily purchase online, you can begin writing simple programs that will blink LEDs (light emitting diodes) and sound buzzers among other hardware-related activities.  Auduino is great for beginners since it is based on the C programming language but abstracts some or the complexities of the hardware.
If developing intelligent machines is your passion, Audino is the place to start.  From there, you can progress to C and C++ as both are the most common languages for micro controllers and microprocessors.  Good luck and have fun!
Jerry F. | Jerry - Improve your skill setJerry - Improve your skill set

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! :)


Good answer!  But don't stop with the article itself.  I think there's a lot more useful info in the comments if you're trying to decide what to do.

Gene G. | You can do it! I'll show you how.You can do it! I'll show you how.
5.0 5.0 (255 lesson ratings) (255)

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.

Look here:

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!

Grigori S. | Certified Physics and Math Teacher G.S.Certified Physics and Math Teacher G.S.

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!