- •About the Author
- •Dedication
- •Author’s Acknowledgments
- •Contents at a Glance
- •Table of Contents
- •Introduction
- •Who Should Buy This Book
- •How This Book Is Organized
- •Part I: Programming a Computer
- •Part II: Learning Programming with Liberty BASIC
- •Part III: Advanced Programming with Liberty BASIC
- •Part VI: Internet Programming
- •Part VII: The Part of Tens
- •How to Use This Book
- •Foolish assumptions
- •Icons used in this book
- •Why Learn Computer Programming?
- •How Does a Computer Program Work?
- •What Do I Need to Know to Program a Computer?
- •The joy of assembly language
- •C: The portable assembler
- •High-level programming languages
- •Database programming languages
- •Scripting programming languages
- •The program’s users
- •The target computer
- •Prototyping
- •Choosing a programming language
- •Defining how the program should work
- •The Life Cycle of a Typical Program
- •The development cycle
- •The maintenance cycle
- •The upgrade cycle
- •Writing Programs in an Editor
- •Using a Compiler or an Interpreter
- •Compilers
- •Interpreters
- •P-code: A combination compiler and interpreter
- •So what do I use?
- •Squashing Bugs with a Debugger
- •Writing a Help File
- •Creating an Installation Program
- •Why Learn Liberty BASIC?
- •Liberty BASIC is easy
- •Liberty BASIC runs on Windows
- •You can start using Liberty BASIC today
- •Installing Liberty BASIC
- •Loading Liberty BASIC
- •Your First Liberty BASIC Program
- •Running a Liberty BASIC program
- •Saving a Liberty BASIC program
- •Getting Help Using Liberty BASIC
- •Exiting Liberty BASIC
- •Getting input
- •Displaying output
- •Sending Data to the Printer
- •Storing Data in Variables
- •Creating a variable
- •Assigning a value to a variable
- •Declaring your variables
- •Using Constants
- •Commenting Your Code
- •Using variables
- •Working with precedence
- •Using parentheses
- •Manipulating Strings
- •Declaring variables as strings
- •Smashing strings together
- •Counting the length of a string
- •Playing with UPPERCASE and lowercase
- •Trimming the front and back of a string
- •Inserting spaces
- •Yanking characters out of a string
- •Looking for a string inside another string
- •Using Boolean Expressions
- •Using variables in Boolean expressions
- •Using Boolean operators
- •Exploring IF THEN Statements
- •IF THEN ELSE statements
- •Working with SELECT CASE Statements
- •Checking a range of values
- •Checking a relational operator
- •Boolean expression inside the loop
- •Looping a Fixed Number of Times
- •Counting with different numbers
- •Counting in increments
- •Anatomy of a Computer Bug
- •Syntax Errors
- •Fun with Logic Errors
- •Stepping line by line
- •Tracing through your program
- •Designing a Window
- •Creating a new window
- •Defining the size and location of a window
- •Adding color to a window
- •Putting Controls in a Window
- •Creating a command button
- •Displaying text
- •Creating a check box
- •Creating a radio button
- •Creating text boxes
- •Creating list boxes
- •Creating combo boxes
- •Creating group boxes
- •Storing Stuff in Text Files
- •Creating a new text file
- •Putting stuff in a text file
- •Adding new stuff to an existing text file
- •Retrieving data from a text file
- •Creating a new binary file
- •Saving stuff in a binary file
- •Changing stuff in a binary file
- •Retrieving stuff from a binary file
- •Creating a Graphics Control
- •Using Turtle Graphics
- •Defining line thickness
- •Defining line colors
- •Drawing Circles
- •Drawing Boxes
- •Displaying Text
- •Making Sounds
- •Making a beeping noise
- •Playing WAV files
- •Passing Data by Value or by Reference
- •Using Functions
- •Defining a function
- •Passing data to a function
- •Calling a function
- •Exiting prematurely from a function
- •Using Subroutines
- •Defining a subroutine
- •Passing data to a subroutine
- •Calling a subroutine
- •Exiting prematurely from a subroutine
- •Writing Modular Programs
- •Introducing Structured Programming
- •Sequential instructions
- •Branching instructions
- •Looping instructions
- •Putting structured programming into practice
- •The Problem with Software
- •Ways to Make Programming Easier
- •Breaking Programs into Objects
- •How to use objects
- •How to create an object
- •Creating an object
- •Starting with a Pointer
- •Defining the parts of a linked list
- •Creating a linked list
- •Managing a linked list
- •Making Data Structures with Linked Lists
- •Stacks
- •Queues
- •Trees
- •Graphs
- •Creating a Record
- •Manipulating Data in Records
- •Storing data in a record
- •Retrieving data from a record
- •Using Records with Arrays
- •Making an Array
- •Making a Multidimensional Array
- •Creating Dynamic Arrays
- •Insertion Sort
- •Bubble Sort
- •Shell Sort
- •Quicksort
- •Sorting Algorithms
- •Searching Sequentially
- •Performing a Binary Search
- •Hashing
- •Searching by using a hash function
- •Dealing with collisions
- •Picking a Searching Algorithm
- •Choosing the Right Data Structure
- •Choosing the Right Algorithm
- •Put the condition most likely to be false first
- •Put the condition most likely to be true first
- •Clean out your loops
- •Use the correct data types
- •Using a Faster Language
- •Optimizing Your Compiler
- •Programming Computer Games
- •Creating Computer Animation
- •Making (And Breaking) Encryption
- •Internet Programming
- •Fighting Computer Viruses and Worms
- •Hacking for Hire
- •Participating in an Open-Source Project
- •Niche-Market Programming
- •Teaching Others about Computers
- •Selling Your Own Software
- •Trying Commercial Compilers
- •Windows programming
- •Macintosh and Palm OS programming
- •Linux programming
- •Testing the Shareware and
- •BASIC compilers
- •C/C++ and Java compilers
- •Pascal compilers
- •Using a Proprietary Language
- •HyperCard
- •Revolution
- •PowerBuilder
- •Shopping by Mail Order
- •Getting Your Hands on Source Code
- •Joining a Local User Group
- •Frequenting Usenet Newsgroups
- •Playing Core War
- •Programming a Battling Robot
- •Toying with Lego Mindstorms
- •Index
- •End-User License Agreement
Chapter 26: Ten Cool Programming Careers 365
For more information about encryption, visit one of the following Web sites. Many of these sites offer C/C++ source code to various encryption algorithms, so you can practice both your programming and encryption skills at the same time.
CypherNet (at www.cypher.net) is a grass-roots organization dedicated to helping individuals use encryption to protect themselves against their own governments.
Central Intelligence Agency (at www.cia.gov) is the most famous intelligence agency in the world, responsible for spying on other countries.
North American Cryptography Archives (at www.cryptography.org) offers plenty of encryption programs and encryption algorithm source code to help you learn as much as possible about encryption.
International PGP Home Page (at www.pgpi.com) is the home of the most famous personal encryption program in the world, Pretty Good Privacy (PGP).
RSA (at www.rsasecurity.com), the name of which derives from the first names of its founders, Rivest, Shamir, and Adleman, is the numberone encryption company providing encryption technology for many programs that rely on the Internet.
Internet Programming
Besides Internet companies gobbling up programmers, many old-fashioned companies also need programmers to help them create interactive Web sites. With so much activity revolving around the Internet, the increasing demand for Internet programmers is no surprise.
To get involved in this field, spend some time mastering the intricacies of HTML so that you know the basics of designing Web pages. (A little bit of training in graphic design and layout doesn’t hurt either.)
Although HTML can create pretty Web pages, companies really want to take advantage of the Internet to sell products online. To create interactive Web sites, programmers use a variety of languages, including Java, XML, JavaScript, VBScript, Perl, C#, and Python.
To get a start in Internet programming, teach yourself HTML; start playing around with an Internet programming language (such as JavaScript); sharpen your Windows XP, Linux, or Unix operating system skills; learn more about accessing databases by using SQL; and play with Web servers such as Apache (which often comes free with Linux).
366 Part VII: The Part of Tens
(Coincidentally, Wiley publishes many books about the preceding topics, including Java and Linux. To learn more about these books, visit www. dummies.com.)
Visit one of the following Web sites to see how quickly you can start working (and earning a lot of money) in an Internet programming position:
Career Moves (at www.computerweekly.com/careermoves) lists various Internet programming jobs, along with advice to help you find the best job for you.
GeekFinder (at www.geekfinder.com) provides plenty of jobs for a wide variety fo computer-related jobs all around the world.
Web Jobs USA (at www.webjobsusa.com) is dedicated to helping Internet professionals find jobs practicing their Web-page and Internetprogramming skills.
Java Jobs (at javajobs.com) provides tutorials, training, and Javarelated job listings.
Fighting Computer Viruses and Worms
Every month, malicious programmers release hundreds of new computer viruses into the wild. Fortunately, many of these computer viruses contain bugs that keep them from working correctly: They don’t spread; they’re too easy to detect; they don’t do anything other than take up space . . . and so on.
Still, every year, a few new computer viruses manage to cause immense headaches to computer users throughout the world. Some of the more infamous superviruses that made headlines include the Slammer worm, the CIH virus, the Melissa virus, and the LoveBug worm.
Although most virus writers create viruses for their own amusement and entertainment, a small minority actively write destructive viruses as an intellectual challenge. Because malicious programmers, such as virus writers, are always around, programmers who can create and update antivirus programs can always find work.
To learn more about computer viruses, study assembly language along with VBA (Visual Basic for Applications), the macro programming language that Microsoft uses in its Office suite. Most viruses and antivirus programs use assembly language to create small, fast programs that can directly access the actual computer hardware. To learn more about different antivirus companies and what type of positions they have available, visit any of the following Web sites:
Chapter 26: Ten Cool Programming Careers 367
Network Associates (at www.nai.com) publishes the popular VirusScan antivirus program.
Sophos (at www.sophos.com) publishes the popular Sophos AntiVirus program.
Symantec (at www.symantec.com) publishes the popular Norton AntiVirus program.
Trend Micro (at www.trend.com) publishes the popular PC-cillin AntiVirus program.
F-Secure (at www.datafellows.com) publishes the well-regarded F-Prot antivirus program.
Hacking for Hire
Hackers are often extremely skilled (or extremely patient) people who enjoy the technical challenge of breaking into computers. Although breaking into computers is technically illegal, your chances of getting caught increase immensely the moment that you start causing damage.
Rather than risk getting thrown in jail because you can’t resist playing around with computers, consider the alternative challenge of trying to outwit the hackers themselves. As a computer-security expert, you can work for the government to help track down malicious hackers, or you can work for a corporation and help keep hackers out of a company’s computers.
By working as a “good” hacker, you get to face all the technical challenges of hacking while getting paid. Plus you get to experience the thrill of working on the side of law-enforcement agencies to track down hackers around the world.
To learn more about using your hacking skills on the side of law enforcement, visit the following Web sites:
Federal Bureau of Investigation (at www.fbi.gov) is the agency in charge of United States law enforcement on a national level, including investigating and prosecuting computer hackers.
AntiOnline (at www.antionline.com) provides news and hacking tools, along with a network of computers on which hackers can safely and legally expand their skills.
2600 (at www.2600.com) is a quarterly hacker magazine that provides hacking-related articles and information.
BlackCode (at www.blackcode.com) provides the latest news about computer hacking.
368 Part VII: The Part of Tens
Participating in an Open-Source Project
To get a job, you need job experience, but you can’t get job experience unless you have a job. Given this paradox, the most reliable way to solve this problem is to demonstrate your abilities by working for free.
To get valuable programming experience that impresses big companies, consider participating in an open-source project. The whole idea behind an opensource project is to get programmers to contribute to the development of a single project, such as the Linux operating system or the GNOME user interface for Linux.
Working on an open source project not only gives you instant credibility (providing that you actually contribute something useful), but it also gives you valuable experience in working with a real-life programming project. While other programmers may get shuffled into entry-level positions working on boring projects that nobody really cares about, you get to work on something that can give you pride and a sense of accomplishment.
The prestige of contributing to an open-source project can later help you find a better-paying job, or it can serve as an amusing hobby. Either way, opensource projects give you a chance to prove to the world what you can actually accomplish with your programming skills.
To get involved with an open source project, visit one of the following Web sites and start programming:
Open Source (at www.opensource.org) provides news and information about the value of open source projects.
Free Software Foundation (at www.fsf.org) offers information about open-source projects in general and the GNU C compiler in particular.
Perl (at www.perl.com) is the home page of the Perl programming language, which is quickly becoming the most popular programming language for the Internet.
Apple Open Source (at http://developer.apple.com/darwin) is the place for information about Apple Computer’s open-source operatingsystem projects.
GNOME project (at www.gnome.org) guides the development of the GNOME interface, which aims to put a friendly graphical user interface on Linux.
Mozilla (at www.mozilla.org) is the open-source project for Netscape Navigator, the second most popular Web browser in the universe.
Linux (at www.linux.org) is the premier Unix-clone operating system that worries even Microsoft.