How to Code

As technology becomes more and more accessible, the need for programmers is always increasing. Coding is a skill learned and perfected over time, but everyone has to start somewhere. There are a variety of languages that are perfect for...
Method 1 of 2:

Learning a Language

  1. How to Code Picture 1How to Code Picture 1
    Don't worry too much about what language you pick. Many beginning coders struggle with what language to pick when they first start learning. (Because they don't know where to start with their first code). The actual language that you start learning on doesn't make a big difference when it comes to learning about data structures and logic. These are the skills that matter most, and they can be honed with any language.[1]
    1. When picking a language, just focus on what kind of development you want to start with and pick an introductory language from there. For example, if you want to learn web development, start with HTML5, supplemented with CSS, JavaScript, and PHP. If you want to want to do desktop applications, start with C++ or another basic programming language.
    2. If you make coding a career, you will find that you may never use the language that you first learned to code. Instead, you will be learning languages as you go through documentation and experimentation.
  2. How to Code Picture 2How to Code Picture 2
    Find free resources online for the language you choose. The internet is a treasure trove of free tutorials, classes, and videos, all tailored towards the language of your choice. You can start getting a basic grasp of just about any introductory language in a day.
    1. Popular sites include Bento, CodeAcademy, Code.org, html.net, Khan Academy, Udacity, W3Schools, Code School and many more.
    2. There are a variety of language-specific starter guides available right here on wikiHow.
    3. You can find how-to guides for almost any programming scenario on YouTube.
    4. Stack Exchange is one of the more popular Q&A sites for any programming questions you may have.
    EXPERT TIP
    How to Code Picture 3How to Code Picture 3

    Archana Ramamoorthy, MS

    Chief Technology Officer, Workday
    Archana Ramamoorthy is the Chief Technology Officer, North America at Workday She is a product ninja, security advocate, and on a quest to enable more inclusion in the tech industry. Archana received her BS from SRM University and MS from Duke University and has been working in product management for over 8 years.
    How to Code Picture 4How to Code Picture 4
    Archana Ramamoorthy, MS
    Chief Technology Officer, Workday

    Our Expert's Story: "I came to coding with zero background in either computer design or programming. When I wanted to learn to code, I started by reading Java books and using online information. In today's world, there are so many resources available, so it's very easy to learn new skills!"

  3. How to Code Picture 5How to Code Picture 5
    Download a good text editor. Many programming languages allow you to use external text editors when you write your code. Find a text editor that will allow you to see indentations and code markup.
    1. Popular programs include Notepad++ (Windows), TextWrangler (OS X), or JEdit (any system).
  4. How to Code Picture 6How to Code Picture 6
    Download any necessary compilers. Some programming languages require a compiler in order to run the code that you create. Compilers translate the code you write into a lower-level language that the machine can process. Many compilers are open-source and free to use. Languages that require compilers include:
    1. C
    2. C++
    3. C#
    4. Java
    5. BASIC
    6. Fortran
  5. How to Code Picture 7How to Code Picture 7
    Start your first project. Pick a good introductory project that will help you get your feet wet. There are a variety of suggestions and tutorials online, but some places to start are basic websites for HTML, basic database and form functions with PHP, or simple programs with any of the compiler languages.
  6. How to Code Picture 8How to Code Picture 8
    Comment all of your code. All programming languages have a comment feature that allows you to enter text that is ignored by the compiler. This allows you to add comments to your code. These comments are crucial, both for letting others know how your code works and for reminding yourself what your code does.
    1. You can also use the comment function to quickly remove code from your program for testing purposes. Put comment tags around the code you want to exclude and then remove the comment tags to return the code.
  7. How to Code Picture 9How to Code Picture 9
    Pick apart other programs or web projects. When you're learning as you go, don't be ashamed to look things up and see how others have tackled the same tasks. Take time to understand why the code is doing what it does.
    1. See this guide for details on how to view the source code of websites.
Method 2 of 2:

Expanding Your Knowledge

  1. How to Code Picture 10How to Code Picture 10
    Take classes. Community colleges, tech schools and online programs offer certifications and classes that will help you get a job as well as teaching you programming. An advanced degree like Computer Science is not always necessary, but could help to get a full time programming job.[2]
    1. (A lot can be said for having one-on-one time with a teacher or programming expert, something that isn't always available with online sources.)
    2. Classes can get expensive, so weigh the benefits. If programming is just a hobby, classes may not be worth the time and money. If you want to turn programming into a career, classes can give you a big boost (but again, it's far from necessary if you have the talent).
  2. How to Code Picture 11How to Code Picture 11
    Expand your knowledge. Beyond simply learning programming languages, you will benefit a lot from logic and mathematics classes, as these are often required for advanced programming. You don't necessarily need to learn this at school, but classroom settings can help.
    1. Programming involving physics calculations and other simulations requires a strong understanding of algorithms and models.
    2. Logic is the fundamental basis of programming, so understanding logic and processes will help you problem-solve when you are coding.
    3. Knowing advanced math isn't required for most programming, but the knowledge can lead to benefits and optimizations.
  3. How to Code Picture 12How to Code Picture 12
    Learn more languages. Once you've got a good grasp on your initial language, you can start to branch out. Find another language that complements the one you know, or pick a language for a specific job that interests you. Complementary languages, such as HTML and CSS, are often the easiest to learn.
    1. Java is one of the most popular languages, and there are often lots of opportunities for Java developers. Java can run on a huge variety of systems and has innumerable applications. Java is used for Android applications, one of the fastest growing markets.
    2. C++ is highly recommended for budding video game developers. Learning how to code in Unity (a widely used, low-cost game engine) and UDK (the code for the popular Unreal engine) can help open some doors, though they aren't as useful outside of the video game industry.
    3. If you want to make iPhone apps, Xcode and Objective-C are going to be your primary tools. You'll also need a Mac, since Xcode can only compile on a Mac.
    4. Python is a server scripting language that is one of the easier languages to learn. Python is used for web services such as Pinterest and Instagram, and is simple enough to learn the basics in just a few days.
  4. How to Code Picture 13How to Code Picture 13
    Be patient. You will often be faced with challenges while programming, especially when it comes to hunting for bugs or implementing a new idea. You'll have to learn to be satisfied with achieving small results rather than solving a whole puzzle at once. Patience leads to more effective code, which will lead to better-performing programs and happier colleagues.
  5. How to Code Picture 14How to Code Picture 14
    Learn to work with others. If you have multiple people working on a project, you get multiple viewpoints on how to go about it. Working on teams is virtually unavoidable in the business world, so unless you're planning to develop everything independently, be prepared to work with others.
  6. How to Code Picture 15How to Code Picture 15
    Get a job where you can practice your coding skills. Work as a volunteer designing websites or writing desktop applications. A part time job with a small company can lead to opportunities to write code for websites or simple applications.
  7. How to Code Picture 16How to Code Picture 16
    Connect with other programmers. There are countless communities and gatherings of developers that can help support and inspire you. Look up local programming conventions, participate in a hack-a-thon or game jam (timed events with a common theme), and sign up on some programming forums to start expanding your exposure and network.
  8. How to Code Picture 17How to Code Picture 17
    Practice, practice, practice. It is estimated that it takes about 15,000 hours before you can be considered an expert in computer programming.[3] This is years of applied practice. True mastery of programming will come only after you put the time in to practice and become proficient.
    1. Try to spend time programming every day, even when you're not working. Programming in your free time can lead to breakthroughs and new ideas.
5 ★ | 2 Vote