1. Computers and Computer Programming: Basic Concepts

   


Chapter 1. COMPUTERS AND COMPUTER PROGRAMMING: BASIC CONCEPTS

You will learn about the following in this chapter:

  • The fundamental nature of computers and computer languages and why this makes computer programming an exciting and creative activity

  • The fundamental computer hardware and software concepts necessary to begin learning about C#

  • How the computer hardware, despite its simple underlying bit operations, is able to stage sophisticated applications

  • Why modern computer languages like C# need compilers and why this makes programming much more enjoyable than with the early compiler-less languages

  • .NET and its significance when programming with C#

  • How C# and .NET solve some commonly encountered problems found with traditional approaches

  • How C# and .NET allows programmers using different computer languages to seamlessly work together on the same project

Just as a writer uses a spoken language to write stories, the computer programmer needs a computer programming language to write computer programs. A spoken language with many grammatical subtleties and a vast vocabulary is highly expressive, but it can be difficult to master and error prone. Accordingly, the evolution of a spoken language continuously strikes a balance between the expressive, complicated, and error prone on one hand, and the constrained, simple, and fool proof on the other.

Designers of programming languages face a similar challenge when they set out to design a new computer language. A powerful programming language can be difficult to learn and too complicated to use, leaving a trail of errors behind. On the other hand, an overly simple language is easy to learn and use, but can restrain the programmer's creativity.

C# (pronounced C sharp) is a new, exciting programming language aimed at striking an optimal balance between expressiveness and simplicity while allowing the programmer to construct sophisticated programs of high performance.

Generations of people are constantly adjusting their spoken language to reflect their current way of life. While the core parts of the English language change very little, many new words and expressions have emerged (the word software springs to mind) over the past hundred years, and many have been left behind.

In 1998, Anders Hejlsberg (designer of Delphi and Turbo Pascal), and his team at Microsoft began to design the first version of the C# language. C# was, like modern English, not created in a vacuum but is an evolutionary step forward from the previous languages that inspired its designers. This has resulted in a language firmly based on a solid core of features that has proven invaluable to most programmers over time. It also adds many new features to accommodate for the needs, possibilities, and challenges that today's programmers encounter.

Computers have been spreading through our society in the past twenty years like rings in the water. Most professions today rely directly or indirectly on computers to accomplish at least parts of their tasks. Even in their spare time, people are turning to the computer as an important source of entertainment. Why is the computer so useful and popular? One reason is the universal range of computer applications that can be created with a computer language such as C#. A light bulb is merely meant for emitting light, a chair is made for sitting, but a computer can be a word-processor one moment, a drawing tool assisting architects the next, and then suddenly turn into a weather forecasting tool utilized by a meteorologist.

The potential for what a computer can do, by tinkering with this universality, is limited only by the programmer's imagination, creativity, and programming expertise combined with the physical limitations of the computer (the screen, speed, and so on). This fact is one of the reasons why computer programming is an exciting and challenging undertaking, considered by many to be an art form offering the same aesthetic pleasures as those experienced by composers and poets.

After a program is finished and handed over to the end user, the universality accessed by the programmer is substituted by the relatively narrow set of features contained in this program which could be a chess game, an image processing application, or a human heart simulator. The artist's soft, malleable clay has been fired and turned into a rigid (hopefully) beautiful sculpture that can be enjoyed by its audience (end users).

In effect, computer programming is significantly different from merely using a computer. Programming a computer entails writing exact instructions for it to execute. The computer in return, blindly follows any valid instructions (no, "Wash the dishes!" is still an invalid instruction.). Even if instructed to do a seemingly illogical calculation like 2 + 2 over and over again a million times, the computer will not question the programmer's sanity. Instead, it will obediently perform the task exactly as described.


   


C# Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 286
Authors: Stephen Prata

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net