Skip to main content Accessibility help
×
Hostname: page-component-7479d7b7d-qs9v7 Total loading time: 0 Render date: 2024-07-13T02:27:47.424Z Has data issue: false hasContentIssue false

3 - Writing Programs – First You Walk, Then You Run

Published online by Cambridge University Press:  05 June 2012

Jim McKeown
Affiliation:
Dakota State University
Get access

Summary

VB Quip

I really hate this darn machine;

I wish that they would sell it.

It won't do what I want it to,

but only what I tell it.

Programmer's Lament

Think of a program as a play and you're the director. The actors are the controls and the code is your script. It's up to you to bring all of them together to make it work. Most actors can get the words right and learn to hit their marks, but there's far more to it than just memorizing lines and taking cues. As a developer you have to make your program – your play – flow and get all the parts to work together.

Most programs follow the same general path: declarations, input, processing, and output. That helps, but the hard part is getting a human to understand how the computer works. Usually, this understanding comes only from practice. To become a good programmer, you must write programs. To write good programs, you often must write lots of code. And the more code you write, the more mistakes you'll make. Mistakes are a good thing, though. Often, especially in programming, mistakes are a great way to learn. Just like a good director needs to rehearse lots of scenes and try them in many ways, a programmer has to learn what works and what doesn't. In programming, mistakes can be your ally. “OK, this worked, but what if I try this?” “What happens if…?”

Type
Chapter
Information
Programming in Visual Basic 2010
The Very Beginner's Guide
, pp. 68 - 104
Publisher: Cambridge University Press
Print publication year: 2010

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×