This website requires javascript. Programming Basics for Outsourcers
Home
Outsourcing Articles
RECOMMENDED: Today's HR Outsourcing Solutions News http://www.justoutsourcing.com/wp/?p=19384
Find
Tools
just outsourcing
sacramento, ca usa
253.595.0700
Just OutsourcingDownload our press kit, brochure, and news releases.
Blog |   25 Users Online | Latest | Newsletter | [FAQ] | FavoriteLoadingAdd to favorites | | LogIn/Out
Follow us on LinkedIn Find us on Facebook Follow us on Twitter

Programming Basics for Outsourcers

Programming Basics for Outsourcers Register to win a free book!

Important DocuMaker Note
 Entered: Sunday, January 9th, 2011 11:43 AM

Programming Basics for Outsourcers

If you haven’t already, register a username for yourself so you can discuss this topic in our Development forum.

Just because you outsource software development to a pro, that doesn’t mean you have to be in the dark about the entire process. Here, you can learn the most basic For recent events, check our Newsprogramming jargon section, and start to understand the direction in which your software is being built. 

Recommended Reading: Programming for the Absolute Beginner (No Experience Required)

This guide is not language specific, nor is it comprehensive enough to engage into a long discussion with your developer. It is, instead, a brief overview designed to give you an understanding of what programming entails and what your programmer is building.

Program and Programming Definitions

  • program – (n) An organized list of instructions that, when executed, causes the computer to behave in a predetermined manner.
  • programming – (v) The act of writing a list of organized instructions that, when executed, causes the computer to behave in a predetermined manner.
  • programming language – (n) A language in which computer programs can understand the instructions it is ordered to follow. The programming language that programmers use determines how problems can be solved and what types of computations are available through the software that it produces.
  • Programmers write these types of instructions to assist computer users solve a problem.

Basic Elements Common To All Programs

Although there are many different programming languages, almost all of them use things called Commands, Data, Variables, If-Then Conditions, Labels, Loops, Branching, Routines, and Parameters to give computer instructions. And they all have a way to get Input – as well as produce Output.

Commands are the instructions that a computer follows in order to perform an action.

Example: PRINT (tells the computer to print something – either to the computer screen or on a piece of paper).

Data is what the commands act on. Data can be words, numbers, colors, shapes, etc. Commands can accept, change, create, delete, copy, and print data.

Example: “Hello” (tells the computer that the word, “Hello” is a form of data.).

Output is data that the computer displays on the screen, or prints to a sheet of paper.

Example: PRINT “Hello” (tells the computer to print the word “HELLO” onto the screen or on a piece of paper.).

Input is data that the computer gets from use of the keyboard or mouse.

Variables are temporary place-holders for data (temporary because they hold different kinds of data at different times throughout the use of a program). Variables are usually represented by a letter (“a” for example).

Example: LET a=1 (tells the computer to let the letter “a” represent the number “1″ for a moment).

If-Then Conditions allow a computer to perform an action based on the outcome of a previous command.

Example: IF INPUT=a THEN PRINT “Correct!” (tells the computer to print the word, “Correct” if the user pressed the “1″ key.).

Loops cause a computer to repeat an action as long as the outcome of a previous command is the same (or different – you choose!).

Example: IF INPUT <> a DO PRINT “Incorrect!” (tells the computer to print the word, “Incorrect” every time the user presses a number that’s NOT “1.” The symbol “<>” is a common way to instruct the computer to look for an inequality.).

Labels name a place for a computer to jump to. Under each label is a set of commands that the computer is instructed to follow.

Example: HERE (tells the computer that there is a set of commands under the label, “Here”).

Branching allows a computer to jump and perform a set of commands in a different area of a program.

Example: GOTO “Here” (tells the computer to jump to and follow the commands under the area of a program that’s labeled “Here”).

Parameters (a.k.a. arguments) are a group of variables that are replaced with data. The data that replaces the variables give the computer additional details about how to perform a task.

Example: PRINT Here (tells the computer to print whatever words, numbers, or shapes that are located under the area of a program labeled “Here”).

Routines are a group of commands that perform a single task. Subroutines are commands that other parts of the program jump to, use, and then return to the place where it came from.

Structuring Procedural Programs

To structure a program is to build it in some kind of order. A procedural programming language, such as BASIC or C for example, requires that the instructions a computer follows be placed in the order that its events occur. When writing a procedural program, programmers:

1. First, determine which section of the program the computer should jump to if parameters are used. For example:

  • IF PARAMETER 1 = [Label 1] GOTO [Label 1]
  • IF PARAMETER 2 = [Label 2] GOTO [Label 2]
  • IF PARAMETER 3 = [Label 3] GOTO [Label 3]

These instructions tell the computer that if the user types the program name and “Label” plus number 1, 2, or 3 as its parameter, then jump to the label number in the program and follow the instructions there.

2. Second, define the variables that will be available throughout the use of your program. For example:

  • LET VARIABLE a = Harry
  • LET VARIABLE b = Hugo
  • LET VARIABLE c = Hans

An appropriate example would be to let a variable equal the result of some kind of equation: LET VARIABLE c = (e(8/y))

3. Third, begin to write down descriptive labels of the routines that the program will use, and under each label, write the commands that will enable the computer to perform a single task. Routines that are used over and over by other parts of the program are made into subroutines. For example:

[LABEL 1]

  • Its ROUTINE (A bunch of commands…)
  • Possible BRANCH to a SUBROUTINE

[LABEL 2]

  • Its ROUTINE (A bunch of commands…)
  • Possible BRANCH to a SUBROUTINE

[LABEL 3]

  • Its ROUTINE (A bunch of commands…)
  • Possible BRANCH to a SUBROUTINE

4. Fourth, label subroutines and include a command for each that will return the computer to the routine that it jumped from. For example:

  • Labeled SUBROUTINE 1 (And COMMAND to RETURN to [LABEL A] Routine)
  • Labeled SUBROUTINE 2 (And COMMAND to RETURN to [LABEL 2] Routine)
  • Labeled SUBROUTINE 3 (And COMMAND to RETURN to [LABEL 3 Routine)

Structuring Event-Driven Programs

Unlike a procedural programming language, an event-driven language (such as Visual Basic) requires that computer instructions are made available to the user at one time, through graphical objects. Some graphical objects are the boxes and buttons you see on the screen now. Some parts of the programming language also changes from:

  • commands to statements
  • routines to procedures, and
  • subroutines to subprocedures

This immediate availability of all instruction may at first seem impossible to organize, but it really isn't. Event-driven languages use the same type of structure as procedural languages do - it's just hidden behind objects.

When writing an event-driven program, programmers write the instructions to display objects on the computer's screen, starting with the first object in the top left corner and ending with the last object in bottom right corner.

Returning to the top left corner, programmers then write the instructions that each object will give the computer when the object is clicked. The instructions that make the objects "do" something follow the same layout as procedural languages.

Luckily, most event-driven languages allow programmers to drag and drop objects onto the computer's screen, so writing the instructions to display them is not necessary. The event-driven language does it automatically. All that's left to do is to write the instructions that each individual object will perform.

Source Code and Compilation

The entire list of instructions becomes a program's source code, and when saved to disk with a compiler, it becomes an executable program (file.exe). Compiling a program does three things:

  1. Transforms the source code into machine language so that the computer can read it...
  2. Protects the source code from being copied and/or modified, and...
  3. Allows the program to run faster than if it were run from an interpreter (a program that reads and runs the commands of a program line-by-line).

The programming language you choose to write a program should have come with a compiler. The QBasic development program installed on most IBM compatible machines is an example of a programming language that doesn't come with a compiler. That means that you won't be able to compile the programs written with QBasic.

Programming Errors To Watch For

Programming can be mentally taxing, especially for the beginner. But rushing through it will guarantee at least three types of errors:

  • Syntax Errors - violations of basic rules of grammar and punctuation.
  • Run-time Errors - mistakes that cause a program to stop during its course of running.
  • Logic Errors - mistakes that cause a wrong result.

Syntax and Run-time errors will halt the program immediately so that the error can be corrected while it's being developed. A program containing logic errors, however, will continue to operate even though the information that it processes is incorrect.

To catch these types of errors, programmers spend a lot of time resolving these errors, a.k.a. debugging the program before it's compiled and distributed to others.

Our Sponsors
Goodie Bag

One More Thing

Our Ordering Outsourcing Through RentACoder page explains how to get your hands on our 418+ page paperback book through Payoneer. It also explains our returns and cancellation policy. Please consult it before making a purchase.

Written by Written by | Leave a Comment
Cite this page APA style: . (). On Just Outsourcing.
Retrieved from

Nicole Miller is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.

Notes

NotesRegister to win a free book!

Important DocuMaker Note
 Created: Monday, May 21, 2012

Notes

Use this area to record your thoughts while perusing the Just Outsourcing blog. Notes are stored on your hard drive via cookies. That means no matter what page you're on, your personal annotations will remain accessible as long as your cookie file stays intact. You could leave this website, in fact, return... and still access your remarks. It's a great research tool! Easy copy and paste functions are available to paid subscribers only. (Back)

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Content

Got Questions?

Get free help and support when you need it through our online community, email, or by phone.