How to quickly learn a new programming language

Source: Internet
Author: User
How to quickly learn a new programming language? This article provides an effective method: read the program instructions on several pages and start to practice ~ Although you may already be able to work in many programming languages, work often requires a quick grasp of a new language. Instead of reading hundreds of pages of the program manual, you can quickly browse the tutorials from 10 to 15 pages and print the syntax reference instructions of the program language on a small card.

How to quickly learn a new programming language? This article provides an effective method: read the program instructions on several pages and start to practice ~

Although you may already be able to work in many programming languages, work often requires a quick grasp of a new language. Instead of reading hundreds of pages of program manuals, you can quickly browse 10 to 15 pages of tutorials (you can search for them on Google ), and print the syntax reference of the program language on the small card (search for language to learn + reference card in google ).

First, I will be familiar with the compiler, compilation options, editor, or the shortcut keys and tips for integrating the development environment of this program language, write a simple "Hello World" program, compile and run it, use the debugger for simple debugging, such as setting power failure, viewing variable values, and redirecting to a certain position.

To quickly master a new programming language, I will do the following exercises. Note that some programs are very difficult for beginners.

  1. Use an infinite loop statement to display a series of numbers (1, 2, 3, 4, 5 ......), And set the program to stop when the user presses a button (such as the ESC key;
  2. Fibonacci series, exchanging values of two variables, and finding the maximum and minimum values from a set of data;
  3. Users can enter numbers or strings in ascending or descending order;
  4. The formula for calculating the Renault number is (D * v * ROV)/mu, where D is the diameter, v is the speed, and the rock is the density, and mu is the viscosity. Write a program to receive a set of data and calculate the Renault number. If the value is less than 2100, "laminar flow" is displayed. if the value is between 2100 and 4000, "Transient flow" is displayed. if the value is greater than 4000, "turbulence" is displayed (if else then is used as the branch statement );
  5. Modify the above program and display "start new computing? "(Yes/no)". if "yes" is selected, a group of data is re-entered. if "no" is selected, the program is exited (using a loop statement ). If the mu value is 0, will the program prompt the "Division 0" error? Or is it a "program crash" prompt? How can this problem be solved? Does the program language provide such a mechanism? (Exception handling)
  6. Compile a scientific calculator, including addition, subtraction, multiplication, division, square, cube, square root, sine, cosine, tangent, factorial, reciprocal, modulo and so on;
  7. Output in different formats (for example, rounding to 5 digits, intercepting the first four digits, filling the left or right, and alignment with 0) (input and output operations)
  8. Convert a text file into a webpage File (file input/output operations and string operations)
  9. Time and Date: get the current system time and convert it into different formats;
  10. Create a file with time and date in the file name;
  11. Enter an HTML table and convert it to a file separated by commas or tabs;
  12. Implement the automatic line feed function (see how notepad works in Windows)
  13. Add or delete elements at the beginning, end, and center of the array;
  14. Does the program language support the following features: operator overloading, virtual functions, references, pointers, etc. does it have namespaces, packages, modules, etc.

This article is available at http://www.nowamagic.net/librarys/veda/detail/1246.

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.