2011年4月10日星期日

Chapter 14 Programming and Language

About this chapter,it's talking about programming and languages.The programming and languages is important information in computing, the computer operation need this.
What is programming languages?
   programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication.
Syntax
  A programming language's surface form is known as its syntax. Most programming languages are purely textual; they use sequences of text including words, numbers, and punctuation, much like written natural languages. On the other hand, there are some programming languages which are more graphical in nature, using visual relationships between symbols to specify a program.
The syntax of a language describes the possible combinations of symbols that form a syntactically correct program. The meaning given to a combination of symbols is handled by semantics (either formal or hard-coded in a reference implementation). Since most languages are textual, this article discusses textual syntax.
Programming language syntax is usually defined using a combination of regular expressions (for lexical structure) and Backus–Naur Form (for grammatical structure). Below is a simple grammar, based on Lisp:
This grammar specifies the following:
§ an expression is either an atom or a list;
§ an atom is either a number or a symbol;
§ a number is an unbroken sequence of one or more decimal digits, optionally preceded by a plus or minus sign;
§ a symbol is a letter followed by zero or more of any characters (excluding whitespace); and
§ a list is a matched pair of parentheses, with zero or more expressions inside it.

How to learn programming language?

  • 1
    Decide what you want to do. Some programming applications with strong Web presence and good materials for beginners are game programming, Web site creation, automation of common tasks ("scripting"), text processing, and scientific problem solving. If you just think programming would be cool to learn and don't have any specific applications in mind, that's okay, but thinking about what you want to program in advance will help you make informed decisions during your learning experience.

    Get Study Tips For UPSR

    Sample Questions & Study Tips To Help Students Prepare For UPSR.
    www.Astro.com.my/TutorTV

  • 2
    Choose a programming language. Start with C to understand how exactly programs run and interact; then move on to C++. Python is a good general-purpose language, and it is easy to learn as well as being very powerful for all kinds of applications. Perl and Java are other popular languages for beginners. Research your target application to learn if there are languages you should definitely know (e.g. SQL for databases) or avoid. Don't be confused by jargon like "object-oriented", "concurrent", or "dynamic"; these all mean things, but you won't be able to understand them until you actually have some programming experience.

  • 3
    Find learning resources. Search the Web for good places to start on the languages mentioned above, and be sure to check the language's home page (if it has one) for an official guide or handbook. Also, find someone who already knows how to program. Online tutorials are nice, but they can be frustrating at times if you can't get answers to specific questions.

  • 4
    Start small. You can't expect to write a bestselling 700-page masterpiece if you have no practical writing experience; programming is the same way. Start with basic constructs and write small programs (10 to 30 lines) to test your understanding of the concepts. Stretch yourself, but don't try to run before you can walk.

  • 5
    Put in the time. It takes many hours of practicing problem-solving skills on different types of problems before you can call yourself an expert. Project Euler has many small programming assignments, ranked roughly by difficulty, that are useful for honing your skills and keeping in practice.

  • 6
    Keep at it. Programming can be very frustrating, but successfully completing a program can be intensely satisfying. Don't give up if you don't understand a concept; programming can be a very abstract thing to learn. When working on a particularly intricate problem, take periodic breaks to let your brain relax and relegate the problem to your subconscious mind.


  • 没有评论:

    发表评论