25-08-2017, 09:32 PM
1459709065-BeginningProgrammingforDummies.pdf (Size: 7.68 MB / Downloads: 8)
Introduction
First of all, anyone can learn to program a computer. Computer programming
doesn’t require a high IQ and an innate proficiency in advanced
mathematics. Computer programming just requires a desire to learn and the
patience never to give up.
Programming is a skill like swimming, dancing, and juggling. Some people are
naturally better than others, but anyone can get better with constant practice.
That’s why so many kids become programming wizards at such an early
age. The kids aren’t necessarily brilliant; they’re just willing to put in the time
to learn a new skill, and they’re not afraid of failing.
If you ever dreamed about writing your own programs, rest assured that you
can. Programming can be lots of fun, but it can also be frustrating, annoying,
and time-consuming. That’s why Wiley publishes this particular book — to
help you discover how to program a computer with the minimum amount of
inconvenience and the maximum amount of enjoyment.
Whether you want to pick up computer programming for fun, to start a new
career, or to help make your current job easier, consider this book your personal
guide through the sometimes scary — and initially intimidating —
world of computer programming.
After you finish this book, you can choose the best programming language to
accomplish a particular task, understand the tools that programmers use,
and even write your own programs for personal use or for sale to others.
And after you read Beginning Programming For Dummies, 3rd Edition, you
can find more detailed information about specific languages by reading Visual
BASIC.NET For Windows For Dummies, by Wallace Wang; C For Dummies, by
Dan Gookin; Visual C++ .NET For Dummies, by Michael Hyman and Bob
Arnson; C++ For Dummies and C# For Dummies, by Stephen R. Davis;
Beginning Programming with Java For Dummies, by Barry Burd; Windows
Game Programming For Dummies, by Andre LaMothe; or Perl For Dummies,
by Paul Hoffman (all published by Wiley Publishing).
Who Should Buy This Book
Everyone should buy this book right now because you know the importance
of stimulating the economy by spending as much money as possible so the
current President can stay in office another four years. But you should especially
buy this book if you want to know any of the following:
How to write a computer program
The best programming languages to use and why
Shortcuts for programming a computer as simply and quickly as possible
The evolution of computer programming languages
How to program a Macintosh, Palm handheld, Linux, Windows
98/Me/NT/2000/XP, or PocketPC computer
Whether to write your next computer program by using Visual BASIC,
C++, Perl, SmallTalk, C#, or some other programming language
To help you start right away, this book shows you how to use a programming
language by the name of Liberty BASIC, which is a shareware BASIC
compiler that you can download from the Liberty BASIC Web site at www.
libertybasic.com (or copy from the CD that comes with this book). By
using this book and Liberty BASIC, you can start programming right away,
and later, if you want, graduate to the other programming books in the popular
For Dummies series.
How This Book Is Organized
This book follows the time-honored tradition of the printing industry by organizing
consecutively numbered pages one after the other to form a book. To
help you find what you need quickly, this book consists of seven parts, where
each part covers a certain topic about programming a computer, as the following
sections describe. Whenever you need help, just flip through the book,
find the part that covers the topic you’re looking for, and then keep the book
at your side as you get back to work.
Part I: Programming a Computer
If computer programming seems a mysterious arcane science, relax. This part
of the book demystifies all the common myths about computer programming,
2 Beginning Programming For Dummies, 3rd Edition
02 549979 intro.qxd 11/4/03 12:21 PM Page 2
shows you exactly how computer programs work, and explains why programming
isn’t as difficult as many people think.
To help you better understand programming, this part also shows you how
programming has evolved, why so many different programming languages
exist, and how programming follows easy-to-remember principles so you can
start programming your own computer right away.
Part II: Learning Programming
with Liberty BASIC
Trying to pick up programming from a book is like trying to learn judo by
reading a pamphlet. In both cases, you may glean a theoretical understanding
of the subject, but until you actually practice your skill, you don’t know how
much you really picked up.
To give you practical, hands-on experience in using an honest-to-goodness
programming language, this part of the book explains how to install and use
Liberty BASIC so that you can write real computer programs by using the
BASIC programming language. Writing programs in Liberty BASIC helps you
to better understand how programming really works as you work with programs
and see the results right on your own computer.
Part III: Advanced Programming
with Liberty BASIC
Liberty BASIC provides plenty of advanced features for displaying graphics,
making sound, and debugging your programs. This part of the book shows
you how to take advantage of these special features and shows you the principles
behind writing programs in other languages at the same time.
Part IV: Dealing with Data Structures
As do people, computers need a place to store information. People usually
dump their information in wallets, purses, filing cabinets, or garages, but
computers don’t have that luxury.
Instead, computers must store information in something known as a data
structure. Every computer program uses data structures, and programmers
invent all sorts of different data structures for various uses. So in this part of
the book, I explain how every program uses data structures and provide
hands-on examples you can try using Liberty BASIC.
Part V: Algorithms: Telling the
Computer What to Do
Algorithms are a fancy way of telling a computer how to accomplish a specific
task, step-by-step. Think of an algorithm as a recipe that the computer
blindly follows without question.
One perfect algorithm doesn’t exist for writing all computer programs, just as
one perfect recipe doesn’t exist for making all dinners. To make programming
easier, programmers invent common algorithms for accomplishing certain
tasks. This part of the book explains how those algorithms work and why you
want to use them.
Part VI: Internet Programming
The Internet is an integral part of the computer world, so this part of the
book introduces you to the basics of various Internet languages, including
HTML (which designs the appearance of Web pages), JavaScript, and Java.
In this part, you also see how other people create cool Web pages that look
good and can display forms and respond to users. You can use this information
to create Web sites that interact with users.
Part VII: The Part of Tens
To help gently guide you toward writing your own programs, this part of the
book provides information that you may find useful to take your programming
education a step farther.
This part is where the book shows you many of the opportunities that a
career in programming can offer. In this part, too, you discover where to find
and use various free or commercial programming languages available on the
Internet or on this book’s enclosed CD. Many of these programming languages
sport common names such as C++ and BASIC — or bizarre names
such as LISP, Oberon, and Python.
How to Use This Book
Most people use this book to read, although a few are known to line their
bookshelves with copies to give the room a more literary appearance. You’re
most likely to use this book as a reference, a tutorial, or a weapon (if you can
throw it really hard at somebody you don’t like).
Ideally, you want to use this book along with your computer. Read some of
the book and then try what you just read on your computer so that you can
see with your own eyes how programming works.
Foolish assumptions
To get the most out of this book, you need access to a computer (because
trying to understand computer programming is tough if you can’t get near a
computer). To take full advantage of this book, you need a computer running
Microsoft Windows 98, Windows Me, Windows NT, Windows 2000, or
Windows XP.
If you don’t feel comfortable with Windows 98, Windows Me, Windows 2000,
or Windows XP, buy Windows 98 For Dummies, Windows Me For Dummies, or
Windows XP For Dummies, all by Andy Rathbone (and published by Wiley
Publishing). For more information about Windows NT or 2000, pick up a copy
of Windows NT 4 For Dummies or Windows 2000 Professional For Dummies,
both by Andy Rathbone and Sharon Crawford (also published by Wiley
Publishing).
Icons used in this book
Icons highlight useful tips, important information to remember, or technical
explanations that can amuse you for a moment before you forget all about
them. Keep an eye open for the following icons throughout the book:
This icon highlights useful information that can save you time (as long as you
remember it, of course).
This icon reminds you to do something or emphasizes an important point
that you don’t want to forget.