How to learn a programming language

Source: Internet
Author: User

As programmers, there is always the urge to learn a new programming language. Some of the features of the new language have touched you, or the need for a new job, or a fire at the moment, or a study plan that was set at the beginning of the year ... For whatever reason, you have decided to learn X language. Now let's talk about what to focus on when learning a new language.

Build the development environment

First of all, we have to prepare for the development environment. Usually the official website will have the detailed novice instruction, we only need to follow to do.

Module

Don't rush to write HelloWorld. First understand, if we are going to provide some functionality for others, what is the smallest unit released, such as C # DLL files, Java jar packages, and so on. Try to write a module that returns only one string.

Hello World

In your entry function, reference the previously written module and output the string returned in the module, compiling and running your program. Now that you have mastered how to accumulate wood, you can use your predecessors ' code.

It's pretty much.

The next step is something common to programming languages, such as basic data types, strings, arrays, lists, how to define variables, control flow, object-oriented (encapsulation, inheritance, polymorphism), and so on. These will resonate with the language you have learned before, and analogy learning may be more effective.

New features

The new language always has some different places, otherwise why learn it? such as Golang's goroutine, multiple return value functions ... List these features and learn from them.

Exception handling

Typically 1/3 of the code for the project implements the business logic, while another 2/3 of the code is blocking and handling exceptions. Therefore, it is equally important to understand the language's exception handling mechanism and learn how to implement business logic.

Standard libraries and third-party libraries

Familiarity with these class libraries is a lengthy process. Give yourself the opportunity to practice and accumulate in practice.

How to learn a programming language

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.