10 ways to learn a programming language

Source: Internet
Author: User

1. Compare it to a similar language
When you first watch the first tutorial or read the code for that language, try to guess what each part of the language will do and check if your judgment is correct. If taking notes can help you integrate information, pick up a piece of paper and write down three lists:
Something that looked familiar and did what was expected;
Something that looked familiar, but did something unexpected;
It looks like something completely new.

For example, if I use Rust code from the Python and C backgrounds for this exercise, then in the first list I'll put the curly braces that represent the range, (which looks like a Boolean type of non, but actually a macro definition in Rust) and put it in the second list, type signature syntax Signature syntax) placed in the third list.
If you keep a copy of the initial list, once you're more proficient, use it to reflect on your progress through the language and remind yourself of the concepts that look unfamiliar when trying to teach the language to someone else.

2. Official documents for Reading languages
If you want to absorb a lot of information before use, you may benefit from reading language references.
Don't worry that they will hypnotize you, references are often used to find and use, not to memorize.

3. Use Internet search
Searching the web is a great way to provide information about specific errors and general best practices. When you receive an error message, you should search for a unique part of the information that appears to be wrong, but not the only part of the code.
For example, if the error says "error on the line 53:invalid argument exception (Error in row 53rd: Invalid parameter exception)", search for a combination of language name and string "Invalid argument exception" To find the best results. Remember to include all references in the error message.
You can also search the Web for blog posts about best practices for solving specific problems in your language.
When evaluating the quality of blog posts displayed in search results and deciding to take their recommendations seriously, review the author's public code mix and release date.

4. Contact with the Community
While blogs and news articles have a lot of useful information, the specific code snippets you try to write are always subtle. Don't be afraid to post in your mailing list, or join IRC and Slack channels for help. To ask a helpful reply, make sure to ask questions in the right place. Many languages have a "beginner" mailing list or chat channel, which is created specifically for questions that may be frequently asked. When you ask questions, be sure to summarize what you are prepared to do, what has been done, and what happens. Try to provide the experts with enough context to understand the problem, but don't need trivial details. After asking a question, be sure to stick with it for a period of time to listen to suggestions or answer questions that may arise from your questions.
Write a "production ready" code that uses the language to write "production Ready (Production-ready)" code
The toy program is a good first step, but using a language in a more realistic environment can help you explore the advantages and challenges of its real-world use.
Consider porting a familiar, relatively small, well-tested program to a new language to explore its use in real-world applications.

5. Read a book about the language
If there are several useful books, compare their comments and consider which author's background is most similar to yours. Many e-books are available for free online reading.
Before you buy a book about that language, check the date that the book was published and the language version of the sample it covers.
If you are using an older book, be sure to use an example of the language version that you are using. Also check online to see how the language has changed since it was published.

6. Watch lectures and Courses
If the language you are learning is taught in an online classroom, then the video should be public. In addition to academic lectures, you may also consider looking for recording lectures, meeting conversations, and blogs about the language. When watching TV, talking about your new language is a great way to integrate learning into everyday life.

7. Read the sample code
Most books on programming languages contain snippets of code. You can also find the sample code on the blog and on Rosetta code. Run the sample code, modify them, and try to predict what happens after the modification.

8. Read the Production Code
One way to find items for all types and sizes in that language is to search for it on GitHub. Sort by the most popular or most influential, your popular search will include the most popular open source tools. If you want to understand the design of an open source project, you can interact with the community through mailing lists or IRC. You may even find some bugs.

9. Find a good tool
When using new languages, ask their more experienced users for their development environment. You may find that a particular text editor or IDE supports the new language better than you would normally use. Investigate options for managing dependencies, formatting, blurring, and unit test code in the new language ecosystem.

10. Keep your Passion
Getting started with a new language is easy, but becoming truly proficient in it is usually a journey that takes years. Celebrate your success along the path and share what you've learned with learners who follow your footsteps, keeping an interest in programming.

10 ways 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.