How to Learn a programming language and a programming language

Source: Internet
Author: User

How to Learn a programming language and a programming language
Select a language

Determine the fields you are interested in

You can start learning any programming language (although some of them are described to be easier to learn than others "), you have to ask yourself what kind of work you want to do by learning the language. This will help you determine the programming method you should pursue and provide a good start.

If you want to enter the Web development industry, you will have a bunch of languages to learn, which is opposite to developing computer programs. Mobile App development requires more skills than PC development. All these decisions will influence your development direction.

Consider starting with a "easy to learn" Language

No matter what kind of decision you make, you may only want to start with a high-level and easy-to-learn language. These languages are very useful for beginners because they teach basic concepts and are applicable to thinking processes in almost any language.

The two most popular languages are Python and Ruby. They are all Object-Oriented Web application development languages that use easy-to-read syntaxes.

"Object-oriented" because this language is built around the concepts of "object", data collection, and operations. This concept is used in many advanced programming languages, such as C ++, Java, Objective-C, and PHP.

Basic tutorials for reading a large number of languages

If you are not sure which language you should start learning, read some basic tutorials for different languages. If a language is more interesting than other languages, let's take a look at whether it is true. There are countless basic tutorials for all programming languages online.

Python-a very suitable language for beginners, and it becomes more powerful when you master it. It is used to develop many Web applications and even some games.
Java-used by countless projects, from gaming to Web applications to ATM software.
HTML-an essential starting point for any Web developer. It is very important to master HTML before engaging in other Web development.
C-one of the oldest languages, which is already a very powerful tool and ancestor of some more modern languages, such as C ++, C #, and Objective-C.

From a simple start

Learning the core concepts of Language

While the appropriate part of this step will depend on the language you select, all programming languages have basic concepts that are essential to building useful programs. Learning and mastering these concepts as soon as possible will make it easier for you to solve problems and create powerful and effective code. The following are some core concepts in different languages:

Variable-a variable is a way to store and apply code fragments. Variables can be operated and often defined as "integers" and "characters". There are other types of data that can be stored. During encoding, variables usually have names that give us some meaning. In this way, we can easily understand how the variable interacts with other codes.

Condition Statement-a condition statement is an action based on whether the condition is true. The most common form of a Condition Statement is "if-then ". If this condition is true, one thing will happen. If the condition is false, another thing will happen.

Function or subroutine-the actual name of this concept may depend on different languages. It may also be called a process, a method, or a return unit ". It is essentially a small program in a large program. A function can be called multiple times by other programs to run programmers to effectively create complex programs.

Data input-this is a broad concept used in almost all languages. It involves processing user input and storing the data. How the data is collected depends on the program type and the available input methods for users. It is closely related to the output that is displayed on the screen or printed on the file.

Install necessary software

Many programming languages require compilers designed by programmers to convert code into languages that machines can understand. Other languages, such as Python, can be converted to programs immediately without compilation.

Some languages often contain code editors, debuggers, and/or IDEs for translation and debugging (integrated development environment ). These programmers execute any necessary functions in the same place. IDEs may also contain visual interfaces that contain object hierarchies and directories.

There are many code editors available on the Internet. These programs provide syntax highlighting in different ways and provide other developers' friendly tools. (Emacs is recommended for translators)

Create your first program

Focus on one concept at a time

The first program to be taught when learning almost any language is "Hello World ". This is a simple program that only displays "Hello, World" on the screen. This program teaches beginners some simple syntaxes to create a basic program that can run and how to handle the display output. By changing the text, you can also learn how the basic data is processed by the program.

Learning Through online sample clips

On the Internet, almost every programming language has an online code example recorded by example. Use these examples to learn how different parts work together with the language, and the differences before each part. Use these fragments obtained in continuous examples to create your own programs.

Check syntax

Syntax is a method in which a language is written to make the compiler or interpretation right understandable. Each language has its own unique syntax, although some elements may be shared in different languages. Learning grammar is very important for learning how to program. In reality, it is only the foundation for more advanced concepts.

Tentative changes

Modify your sample program and test the result. By experimenting with what you can learn is useful and useless, it is much faster than reading a book or guide at any time. Do not be afraid to destroy your program. Learning to fix errors is the most important step in any development process, and new things will never run correctly for the first time.

Start exercise debugging

When you are programming, you will always encounter bugs. They exist in the program and may appear anywhere at any time. The vulnerability may damage the program, or make the program unable to compile/run. Capturing and fixing these errors is a major process in the software development cycle, so you should get used to it early.

When you are about to modify programs, you may encounter situations where they cannot work. Finding a way to figure out and solve it in different ways will become one of your most valuable skills as a programmer.

(It's already half past two. Translate it tomorrow .)

Add comments to all codes

Almost all programming languages have a "comment" function that allows you to include texts not processed by interpreters or compilers. This allows you to leave a short but clear explanation of what this code is used for in human language. This will not only help you remember what your code is doing in this large program, but also allow others to understand what your code is doing in a collaborative environment, this is also a very important practice.

Continuous exercise

Coding is required every day.

Spending a lot of time is the most important thing to grasp a language. Even for a simple language like Python, it may take a day or two to understand its basic syntax. It takes a lot of time to be truly proficient. Exercise is the key to becoming more skillful, just like any other technique. Try to spend some time coding every day, even one hour after work and before dinner.

Set goals for your program

By setting goals that can achieve but are challenging, you will be able to start solving the problem and get a solution. Try to imagine a basic application, such as a calculator, and then find a way to do it. Use the syntaxes and concepts you have been learning and then apply them to reality.

Programs for communicating with and reading others

There are many programming communities dedicated to specific languages or disciplines. Finding and participating in these communities will create miracles for your learning. You will get a variety of sample code and tools that can help you learn the process. By reading other people's program code, you can not only inspire you, but also help you recall concepts you have not yet mastered.

Find a forum or online community for your selected programming language. Make sure that you are actually involved rather than constantly asking questions. These communities tend to look at areas of collaboration and discussion, not just simple questions-answering questions. Please feel free to ask for help, but prepare your program and try different ways.

Once you have some experience, you can participate in some programming activities. These activities are programs used by individuals or teams to compete for time to develop functions. They usually focus on a specific topic. These things are fun and a good way to know other programmers.

Challenge yourself and have fun

Try to do something you don't know yet. Study how to complete this task and add them to your program constantly. Be sure to avoid programs that can barely run as much as possible. You should make all aspects perfect.

Share your knowledge

Attend some training courses

Many universities, community colleges, and community centers offer programming courses and studios that you can attend without having to register at school. This is very helpful for novice programmers, because you can get help from other experienced programmers, or you can communicate with programmers in other places through the Internet.

Buy or borrow a book

There are thousands of teaching books in all languages you can imagine. Although your knowledge should not come from a book, they will provide you with a lot of reference and often contain a lot of friendly examples.

Learning Mathematics and logic

Most programming involves basic arithmetic operations, but you may want to learn more advanced concepts. This is important if you want to write complex simulation or algorithm-level programs. For most daily programming, you do not need much advanced mathematical knowledge. However, learning logic, especially computer logic, will help you understand the best way to handle complex problems with more advanced programs.

Never stop Programming

There is a popular theory that it takes at least 10000 hours to become an expert. Although this theory is still under debate, the principles it contains are always correct: Being proficient requires time and dedication. Don't expect you to learn everything overnight, but if you stay focused and keep learning, you will soon become an expert in your field.

Learning another Programming Language

Although you can be proficient in only one language, many programmers can improve their chances of success in their field by learning multiple languages. Their second or third language often complements the first language, which helps them write more complex and interesting programs. Once you have mastered your first language, you have time to learn the second language.

You may find that the second language is faster than the first one. That's because many core concepts are the same for multiple languages, especially if these two languages are closely related.

Apply your skills

Take a four-year course

Although this is not absolutely necessary, four years of study at a college or university can help you understand different languages and communicate with professionals or other students on the Internet. This method may not be suitable for everyone, and many successful programmers have not studied in a four-year organization.

Create your own code library

When you are creating programs and constantly expanding your knowledge, make sure that all your best programs are saved in your own code library. You can show this to the signboard and the interviewer about your work. Make sure that this includes all your work time and that you can use these programs to do anything for another company.

Some outsourced part-time jobs

For programmers, there is a very large free career market, especially mobile App development. Take a few outsourced part-time jobs to feel how commercial programming works. In general, you can use an outsourced part-time job to help you build a code library, and this will be useful for new works.

Develop your own free programs or commercial software

You don't have to exchange money for a job. If you have the ability, you can develop software independently and make it free of charge through your own website or other markets. Prepare technical support for your business software because your customers want them to work well.

Free Software is a popular way to publish applets and applications. Developers will not receive any money, but it will help you build a reputation and gain a certain reputation in the community.

(Translator's note: After the translation is complete, we can feel many differences in the software industry between China and foreign countries. At the same time, we also welcome exchanges .)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.