How to write computer programs

Author: Ellen Moore
Date Of Creation: 12 January 2021
Update Date: 1 July 2024
Anonim
How To Learn Programming for BEGINNERS! (2019/2020)
Video: How To Learn Programming for BEGINNERS! (2019/2020)

Content

As technology becomes more and more available to the general public, so does the need for programmers. Writing computer codes and programs, or coding (from the English "coding") is a skill that has been acquired and improved over time, but even the most experienced programmer was once a beginner. There are a wide variety of programming languages ​​that are great for beginner programmers, no matter what field you want to apply your skills to (for example, JavaScript is quite complex, so it's best to start with HTML or CSS). Learn how to learn how to write computer programs by reading this article.

Steps

Method 1 of 2: Learn a Programming Language

  1. 1 Don't worry too much about which language you should choose to study. Many novice programmers find it difficult to choose a language when they are just starting to learn how to write program codes. The actual language you choose does not matter when it comes to studying the structures and logic of building information. These skills are much more important and can be learned with any programming language.
    • When choosing a language, concentrate on the purpose for which you want to create program codes, and only then choose the starting language. For example, if you want to do website development, you should start by learning HTML5 and then supplement it with CSS, JavaScript, and PHP. If you want to create computer programs, then start learning C or any other mainstream programming language.
    • If you become a professional programmer, you may find that you never use the language you originally learned for your work. Instead, you'll keep learning new languages ​​all the time through documentation and experimentation.
  2. 2 Find free online resources dedicated to your chosen language. The Internet is a treasure chest of free tutorials, courses and videos about the language you choose to learn. You can learn the basics of almost any introductory language in literally a day.
    • Here are just a few popular sites: Bento, CodeAcademy, Code.org, html.net, Khan Academy, Udacity, W3Schools, and many more.
    • WikiHow also provides a variety of instructions for beginners to learn programming languages.
    • You can find tutorial videos for almost any language on YouTube.
    • Stack Exchange is one of the most popular forums where professional programmers answer any questions from users.
    SPECIALIST'S ADVICE

    Archana Ramamoorthy, MS


    Workday CTO Archana Ramamurthy is Workday CTO (North America). High-profile product specialist, advocate for security, advocate for greater integration on a level playing field in the technology industry. She received her BA from SRM University and her MA from Duke University. Has been working in the field of product management for over eight years.

    Archana Ramamoorthy, MS
    Workday CTO

    Our specialist shares his story:: “I came to coding without knowing anything about computer design or programming. When I wanted to learn how to write programs, I started by reading books on the language and using information from the Internet.There are so many resources available in the world today that it is very easy to learn new skills! "


  3. 3 Download a good text editor. Many programming languages ​​allow you to use external text editors to write programs. Find a text editor that will display indentation and code markup.
    • Popular programs include Notepad ++ (Windows), TextWrangler (OS X), and JEdit (any system).
  4. 4 Download any compilers you need. Some programming languages ​​require a compiler to display the source code that you wrote. Compilers translate the source code into an equivalent low-level language program, which is then processed by the computer. Many compilers are free and open source. Languages ​​that require the use of compilers include:
    • C;
    • C ++;
    • C #;
    • Java;
    • BASIC;
    • Fortran.
  5. 5 Start your first project. Pick a good introductory project that allows you to try out your new skills. There are many suggestions and tutorials on this topic on the Internet. For example, you can start by creating simple HTML websites, simple PHP databases and functions, or simple programs in any of the languages ​​that require compilers.
  6. 6 Comment out all your code. All programming languages ​​have a comment function that allows you to enter text that is ignored by the compiler. Thus, you can leave comments to the code. These comments are extremely important, both to let others know how your code is working and to remind yourself of what the code is doing.
    • The comment function can be used to quickly remove part of the code from the program for testing purposes. Add tags for both comments at the beginning and at the end of the code that you want to temporarily exclude from the program, and then remove those tags to return the code.
  7. 7 Consider details of other programs or web projects. When you learn code on the go, don't be ashamed to look for clues on the Internet and watch other people solve similar problems. Take the time to understand how the code does what it does.
    • Read this article to learn how to view the source code of any website.

Method 2 of 2: Expand your knowledge

  1. 1 Sign up for courses. Universities, colleges, and Internet programs offer programs and courses that will not only teach you programming, but also help you find a job. While a university degree in computer science is not always needed, it can help you find a full-time job as a computer programmer.
    • There is also undeniable benefit from direct communication with a teacher or a programming specialist, which is not always available through online courses.
    • Learning to become a programmer can be quite expensive, so think carefully if it's worth it. If you are fond of writing computer programs only as a hobby, then you should not waste time and money on professional courses. If you are looking to build a career in this area, then getting a professional education can help you a lot in this (but, again, it is not necessary if you have talent).
  2. 2 Expand your knowledge. You will benefit not only from learning programming languages, but also from courses in mathematics and logic, as these subjects are often required for high-level programming. You do not need to teach them in school, although an academic setting can be helpful.
    • Programming involving physics and simulation requires a good understanding of algorithms and models.
    • Logic is fundamental to programming, so understanding logic and processes can help you solve problems when writing code.
    • Knowledge of advanced mathematics is most often not required for programming, but it can be used for optimization and other benefits.
  3. 3 Learn more languages. Once you have a good understanding of your first language, you can start learning other programming languages ​​as well. Find a language that complements the one you already know, or choose a language that is required for a specific project. Additional languages ​​like HTML and CSS are usually the easiest to learn.
    • Java is one of the most popular languages ​​and Java developers are always in high demand. Java is used on a wide variety of systems and has countless uses. Java is used to write applications for Android, one of the fastest growing markets.
    • C ++ is highly recommended if you want to join the ranks of video game developers. Learning how to program in Unity (a widely used and cheap game engine) and UDK (code for the popular Unreal engine) will open some doors for you, but they are not as useful outside of the gaming industry.
    • If you want to create iPhone apps, Xcode and Objective-C will be your first choice. You will need a Mac, since Xcode can only be compiled on a Mac.
    • Python is a language for writing server-side code, one of the easiest to learn. Python is used for internet services like Pinterest and Instagram, and it's simple enough to learn the basics in just a few days.
  4. 4 Be patient. While programming, you will often run into problems, especially when looking for bugs or applying new ideas. You will need to learn to be content with achieving small results instead of solving the whole problem at once. Patience will help you create better code, which means your program will function better and your colleagues will be happy.
  5. 5 Learn to work in a team. If several people are working on a project at the same time, they may have a different vision of how the project should proceed. Teamwork is almost inevitable in the business world, so be prepared to work with other people, unless of course you intend to develop the entire project yourself.
  6. 6 Find a job where you can practice your programming skills. Create websites and computer programs on a volunteer basis. Working a part-time job at a small company can also open up coding opportunities for websites and simple programs.
  7. 7 Chat with other programmers. There are countless developer communities where you can find support and inspiration. Look for programming conventions, participate in hackathons or gamejams (developer gatherings to create programs or games in a limited time), register on several programming forums to start making your name and growing connections.
  8. 8 Practice, practice and practice. By some estimates, it takes about 15,000 hours of programming before you can be considered a true master. This means years of constant practice. You will truly master the skill of programming only when you invest a lot of time in practical work and become an expert in your field.
    • Try to program every day, even on weekends. Leisure programming can lead to breakthroughs and new ideas.