Download Article Download Article

If you have an interest in creating computer programs, mobile apps, websites, games or any other piece of software, you'll need to learn how to program. Programs are created through the use of a programming language. This language allows the program to function with the machine it is running on, be it a computer, a mobile phone, or any other piece of hardware.

Part 1
Part 1 of 6:

Choosing a Language

Download Article
  1. You can start learning with any programming language (though some are definitely "easier" than others), so you'll want to start by asking yourself what it is you want to accomplish by learning a programming language.[1] This will help you determine what type of programming you should pursue, and provide you a good starting point.
    • If you want to get into web development, you'll have a whole different set of languages that you'll need to learn as opposed to developing computer programs. Mobile app developing requires a different skillset than machine programming. All of these decisions will influence your direction.
  2. Regardless of your decision, you may want to consider starting with one of the high-level, simpler languages.[2] These languages are especially useful for beginners, as they teach basic concepts and thought processes that can apply to virtually any language.[3]
    • The two most popular languages in this category are Python and Ruby. These are both object-oriented web application languages that use a very readable syntax.
    • "Object-oriented" means that the language is built around the concepts of "objects", or collections of data, and their manipulation. This is a concept that is used in many advanced programming languages such as C++, Java, Objective-C, and PHP.
    Advertisement
  3. [4] If you're still not sure which language you should start learning, read through some tutorials for a few different languages. If one language makes a bit more sense than the others, try it out for a bit to see if it clicks. There are countless tutorials for every programming available online, including many on wikiHow:
    • Python - A great starter language that is also quite powerful when you get familiar with it. Used for many web applications and a number of games.
    • Java - Used in countless types of programs, from games to web applications to ATM software.
    • HTML - An essential starting place for any web developer. Having a handle on HTML is vital before moving on to any other sort of web development.
    • C - One of the older languages, C is still a powerful tool, and is the basis for the more modern C++, C#, and Objective-C.
    Python is a great intro language. "This article helped me a lot. I have been dying to learn a programming language. I first started with the high-level ones, which were totally difficult for me to understand. Following this article, I started Python, which has been quite easy. Now I am learning it without any difficulty. Thank you!" - Piyush B.
    Once you learn one language, the others are easier. "This article really helped. I've graduated from high school and I wish to be a software engineer. Learning Python has been an excellent way to build my coding fundamentals and has set me up for success with other languages, too." - ASOGWA CHRISTOPHER (wikiHow Community Member)
    Have a story our readers should hear? Share it with 1 billion+ annual wikiHow users. Tell us your story here.
  4. Advertisement
Part 2
Part 2 of 6:

Starting Small

Download Article
  1. While the parts of this step that apply will vary depending on the language you choose, all programming languages have fundamental concepts that are essential to building useful programs. Learning and mastering these concepts early will make it easier to solve problems and create powerful and efficient code. Below are just some of the core concepts found in many different languages:
    • Variables - A variable is a way to store and refer to changing pieces of data. Variables can be manipulated, and often have defined types such as "integers", "characters", and others, which determine the type of data that can be stored. When coding, variables typically have names that make them somewhat identifiable to a human reader. This makes it easier to understand how the variable interacts with the rest of the code.
    • Conditional Statements - A conditional statement is an action that is performed based on whether the statement is true or not. The most common form of a conditional statement is the "If-Then" statement. If the statement is true (e.g. x = 5) then one thing happens. If the statement is false (e.g. x != 5), then something else happens.
    • Functions or Subroutines - The actual name for this concept may be called something different depending on the language. It could also be "Procedure", a "Method", or a "Callable Unit". This is essentially a smaller program within a larger program. A function can be "called" by the program multiple times, allowing the programmer to efficiently create complex programs.
    • Data input - This is a broad concept that is used in nearly every language. It involves handling a user's input as well as storing that data. How that data is gathered depend on the type of program and the inputs available to the user (keyboard, file, etc.). This is closely linked to Output, which is how the result is returned to the user, be it displayed on the screen or delivered in a file.
  2. Many programming languages require compilers, which are programs designed to translate the code into a language that the machine can understand. Other languages, such as Python, use an interpreter which can execute the programs instantly without compiling.
    • Some languages have IDEs (Integrated Development Environment) which usually contain a code editor, a compiler and/or interpreter, and a debugger. This allows the programmer to perform any necessary function in one place. IDEs may also contain visual representations of object hierarchies and directories.
    • There are a variety of code editors available online. These programs offer different ways of highlighting syntax and provide other developer-friendly tools.
  3. Advertisement
Part 3
Part 3 of 6:

Creating Your First Program

Download Article
  1. One of the first programs taught for any language is the "Hello World" program. This is a very simple program that displays the text "Hello, World" (or some variation), on the screen. This program teaches first-time programmers the syntax to create a basic, functioning program, as well as how to handle displaying output. By changing the text, you can learn how basic data is handled by the program. Below are some wikiHow guides on creating a "Hello World" program in various languages:
    • Hello World in Python
    • Hello World in Ruby
    • Hello World in C
    • Hello World in PHP
    • Hello World in C#
    • Hello World in Java
  2. There are thousands of code examples online for virtually every programming languages. Use these examples to examine how various aspects of the language work and how different parts interact. Take bits and pieces from various examples to create your own programs.
  3. The syntax is the way the language is written so that the compiler or interpreter can understand it. Each language has a unique syntax, though some elements may be shared across multiple languages. Learning the syntax is essential for learning how to program in the language, and is often what people think of when they think about computer programming. In reality, it is simply the foundation upon which more advanced concepts are built.     
  4. Make changes to your example programs and then test the result. By experimenting, you can learn what works and what doesn't much quicker than by reading a book or guide. Don't be afraid to break your program; learning to fix errors is a major part of any development process, and new things almost never work right the first time.[5]
  5. When you're programming, you're invariably going to come across bugs. These are errors in the program, and can manifest virtually anywhere. Bugs can be harmless quirks in the program, or they can be major errors that keep the program from compiling or running. Hunting down and fixing these errors is a major process in the software development cycle, so get used to doing this early.
    • As you experiment with changing basic programs, you're going to come across things that don't work. Figuring out how to take a different approach is one of the most valuable skills you can have as a programmer.
  6. Nearly all programming languages have a "comment" function that allows you to include text that is not processed by the interpreter or compiler. This allows you to leave short, but clear, human-language explanations of what the code does. This will not only help you remember what your code does in a large program, it is an essential practice in a collaborative environment, as it allows others to understand what your code is doing.
  7. Advertisement
Part 4
Part 4 of 6:

Practicing Regularly

Download Article
  1. Mastering a programming language takes time above all else. Even a simpler language like Python, which may only take a day or two to understand the basic syntax, takes lots of time to become truly proficient at. Like any other skill, practice is the key to becoming more proficient. Try to spend at least some time each day coding, even if it's only for an hour between work and dinner.
  2. By setting attainable but challenging goals, you will be able to start solving problems and coming up with solutions. Try to think of a basic application, such as a calculator, and develop a way to make it. Use the syntax and concepts you've been learning and apply them to practical uses.
  3. There are lots of programming communities dedicated to specific languages or disciplines. Finding and participating in a community can do wonders for your learning. You will gain access to a variety of samples and tools that can aid you in your learning process. Reading other programmers' code can inspire you and help you grasp concepts that you haven't mastered yet.[6]
    • Check out programming forums and online communities for your language of choice. Make sure to participate and not just constantly ask questions. These communities are usually viewed as a place of collaboration and discussion and not simply Q&A. Feel free to ask for help, but be prepared to show your work and be open to trying different approaches.
    • Once you have some experience under your belt, consider attending a hack-a-thon or programming jam. These are events where individuals or teams compete against the clock to develop a functional program, usually based around a specific theme. These events can be a lot of fun and are a great way to meet other programmers.
  4. Try to do things that you don't know how to do yet. Research ways to accomplish the task (or a similar one), and then try to implement that in your own program. Try to avoid being content with a program that "basically" works; do everything you can to make sure every aspect works flawlessly.
  5. Advertisement
Part 5
Part 5 of 6:

Expanding Your Knowledge

Download Article
  1. Many universities, community colleges, and community centers offer programming classes and workshops that you can attend without having to enroll in the school. These can be great for new programmers, as you can get hands-on help from an experienced programmer, as well as network with other local programmers.[7]
  2. There are thousands of instructional books available for every conceivable programming language. While your knowledge should not come strictly from a book, they make great references and often contain a lot of good examples.
  3. Most programming involves basic arithmetic, but you may want to study more advanced concepts. This is especially important if you are developing complex simulations or other algorithm-heavy programs. For most day-to-day programming, you don't need much advanced math. Studying logic, especially computer logic, can help you understand how best to approach complex problem solving for more advanced programs.
  4. There is a popular theory that becoming an expert takes at least 10,000 hours of practice. While this is up for debate, the general principle remains true: mastery takes time and dedication. Don't expect to know everything overnight, but if you stay focused and continue to learn, you may very well end up an expert in your field.[8]
  5. While you can certainly get by with mastering one language, many programmers help their chances of success in the field by learning multiple languages. Their second or third languages are usually complementary to their first one, allowing them to develop more complex and interesting programs. Once you have a good grasp on your first program, it may be time to start learning a new one.
    • You will likely find that learning your second language goes much quicker than the first. Many core concepts of programming carry over across languages, especially if the languages are closely related.
  6. Advertisement
Part 6
Part 6 of 6:

Applying Your Skills

Download Article
  1. While not strictly necessary, a four-year program at a college or university can expose you to a variety of different languages, as well as help you network with professionals and other students. This method certainly isn't for everyone, and plenty of successful programmers never attended a four-year institution.[9]
  2. As you create programs and expand your knowledge, make sure that all of your best work is saved in a portfolio. You can show this portfolio to recruiters and interviewers as an example of the work you do. Make sure to include any work done on your own time, and ensure that you are allowed to include any work done with another company.
  3. There is a very large freelance market for programmers, especially mobile app developers. Take on a few small freelance jobs to get a feel for how commercial programming works. Oftentimes you can use the freelance jobs to help build your portfolio and point to published work.
  4. You don't have to work for a company to make money programming. If you have the skills, you can develop software yourself and release it for purchase, either through your own website or through another marketplace. Be prepared to be able to provide support for any software you release for commercial sale, as customers will expect their purchase to work.
    • Freeware is a popular way to distribute small programs and utilities. The developer doesn't receive any money, but it's a great way to build name recognition and make yourself visible in the community.
  5. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    Can a self taught programmer get a job?
    Stephen Cognetta, MBA
    Stephen Cognetta, MBA
    Computer Engineer
    Stephen Cognetta is the co-founder and CEO of Exponent, a learning platform that helps people prepare for and ace their tech interviews. Stephen specializes in coaching for product management, software engineering, product marketing, management, technical project management, and data science interviews. Stephen holds a BS in Computer Engineering from Princeton University, where he graduated Summa Cum Laude, and an MBA from Stanford University. Prior to founding Exponent, Stephen worked as a Product Manager for Google and co-founded HackMentalHealth.
    Stephen Cognetta, MBA
    Computer Engineer
    Expert Answer
    There are a lot of different opportunities for software engineering education, and a mix of all these approaches can be very effective in finding a job. There are a lot of resources online that can be great to prepare for a coding interview. You can also try coding bootcamps, reaching out to a mentor, and even working in a customer service role in a tech company to learn more about the field and make the transition easier.
  • Question
    Can I learn programming by myself?
    Stephen Cognetta, MBA
    Stephen Cognetta, MBA
    Computer Engineer
    Stephen Cognetta is the co-founder and CEO of Exponent, a learning platform that helps people prepare for and ace their tech interviews. Stephen specializes in coaching for product management, software engineering, product marketing, management, technical project management, and data science interviews. Stephen holds a BS in Computer Engineering from Princeton University, where he graduated Summa Cum Laude, and an MBA from Stanford University. Prior to founding Exponent, Stephen worked as a Product Manager for Google and co-founded HackMentalHealth.
    Stephen Cognetta, MBA
    Computer Engineer
    Expert Answer
    Teaching yourself programming is one of many avenues to gain an education in software engineering. If you'd like to start learning, find resources online like Free Code Camp. These can help you practice coding questions and programming skills.
  • Question
    How can I improve my programming concepts?
    Community Answer
    Community Answer
    Practice as much as possible!
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

  • If you are interested in game programming, investigate Python, C++, and Java. Of the three, C++ is probably the best performer, Python by far the easiest to learn, and Java best able to run on Windows, Mac OS, and Linux without change.
  • Learn about Free software. Study the source code of the programs available at the Free software directory. Why re-invent the wheel when you can make it better? Just make sure you understand what you're programming.
  • For most people, programming something that interests them or that they can use is more interesting than textbook examples. Use a search engine to find out about projects that interest you.
Show More Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Thanks for submitting a tip for review!
Advertisement

You Might Also Like

Create a Program in C SharpCreate a Program in C Sharp
Install Java on LinuxInstall Java on Linux
Write PHP ScriptsWrite PHP Scripts
Secure Your PCSecure Your PC
Learn Any LanguageLearn Any Language
Create Loops in PythonHow to Create Loops in Python
Change Code on Schlage LockHow to Change 4-Digit User Codes on Schlage Locks
Format Text as Code in Discord2 Simple Ways to Format Text Into Code on Discord
Reset Schlage Keypad Lock Without Programming CodeHow to Factory Reset a Schlage Lock & Restore the Default Programming Code
Delay a Batch FileHow to Delay a Batch File: Timeout, Pause, Ping, Choice & Sleep
Run a Program from the Command Line on LinuxRun a Program from the Command Line on Linux
Convert from Binary to DecimalConverting Binary to Decimal: Positional Notation & Doubling
Write PseudocodeLearn to Write Pseudocode: What It Is and Why You Need It
Make an Exe FileMake an Exe File
Advertisement

References

  1. Stephen Cognetta, MBA. Tech Interviewing Coach. Expert Interview. 21 July 2020.
  2. Stephen Cognetta, MBA. Tech Interviewing Coach. Expert Interview. 21 July 2020.
  3. http://regulargeek.com/2009/02/11/what-programming-language-should-i-learn/
  4. Stephen Cognetta, MBA. Tech Interviewing Coach. Expert Interview. 21 July 2020.
  5. http://www.softwarebyrob.com/2007/03/20/advice-on-how-to-become-a-programmer/
  6. http://norvig.com/21-days.html
  7. Stephen Cognetta, MBA. Tech Interviewing Coach. Expert Interview. 21 July 2020.
  8. http://healthland.time.com/2013/05/20/10000-hours-may-not-make-a-master-after-all
  9. Stephen Cognetta, MBA. Tech Interviewing Coach. Expert Interview. 21 July 2020.

About This Article

Stephen Cognetta, MBA
Co-authored by:
Computer Engineer
This article was co-authored by Stephen Cognetta, MBA. Stephen Cognetta is the co-founder and CEO of Exponent, a learning platform that helps people prepare for and ace their tech interviews. Stephen specializes in coaching for product management, software engineering, product marketing, management, technical project management, and data science interviews. Stephen holds a BS in Computer Engineering from Princeton University, where he graduated Summa Cum Laude, and an MBA from Stanford University. Prior to founding Exponent, Stephen worked as a Product Manager for Google and co-founded HackMentalHealth. This article has been viewed 1,708,797 times.
How helpful is this?
Co-authors: 123
Updated: December 19, 2023
Views: 1,708,797
Categories: Programming
Article SummaryX

To learn a programming language, consider starting out with a simpler language, like Python or Ruby, to introduce you to basic programming concepts. Regardless of the programming language you want to learn, use online tutorials to guide you when you're first getting started. Also, try to set aside time every day to practice since regular practice will help you pick up on the language faster. You can also participate in online programming forums to meet other programmers and learn helpful tips and tricks. To learn how to create your first program with the programming language you're learning, scroll down!

Did this summary help you?

Thanks to all authors for creating a page that has been read 1,708,797 times.

Reader Success Stories

  • ASOGWA CHRISTOPHER

    ASOGWA CHRISTOPHER

    Jul 18, 2017

    "This article really helped. I've graduated from high school and I wish to be a software engineer. Learning..." more
Share your story

Is this article up to date?

Advertisement