fortypoundhead.com

Introduction to Programming

Posted On 2008-08-01 by FortyPoundHead
Keywords:
Tags: General Tip 
Views: 1441


Controlling Your Computer with a Programming Language

In a previous article, we introduced automating some tasks with MS-DOS batch files. In this article, we're going to introduce programming and describe how it can be used to control the way your computer works. Normally, computer novices aren't interested in controlling the computer. New computer users are typically interested in learning more about how the thing works. However they may be surprised to learn that programming increases computer knowledge as a whole and it can help to diminish the fear associated with using a new computer.

Programming a computer is creating a sequence of instructions that enable the computer to do something.1 The people who program computers (called programmers) use a programming language to communicate with a computer. You might have heard of some of these languages in the past such as Visual Basic, C++, or Fortran. There are hundreds of other programming language and neither one is better than the other. Most of them are capable of performing the same tasks and achieving the same goals. A programmer chooses one language by a simple preference.

Each of these languages differ by the way they communicate with a computer however, and the commands that they follow are very specific. Not a single command of one language can be interchanged with the commands or language of another. But all of them can be used to control a computer.

Now it would be impossible to teach you how to program any language in a single article. But we can still introduce you to some of programming's most basic concepts - starting with the commands we talked about earlier. Commands are the instructions that a computer follows to perform an action. 2 To make them work inside of a program, programmers assign commands to objects like buttons for example.

The commands in a program are pretty useless unless they have some data to act on so programmers either give the programs some data to work with (list of names or numbers for example) or they make the program generate it's own data. Sometimes, the data comes from an outside source like the Internet or the computer that the program runs on. The data that a program receives is called input and data that the program generates is called output.

Other times, the data is unknown. If the program were working with a simple algebra equation like, "x + 5 = y," the variables "x" and "y" would be unknown pieces of data. Or if a program were to calculate a date "x" days from now, the variable "x" would be an unknown piece of data until we tell the program what "x" is. In programming, it's sometimes required to work with unknown pieces of data.

That's when conditions come in handy. Conditions allow a program to perform an action based on the outcome of a previous command.3 Using this type of instruction, we could instruct a program to do one thing if the "x" variable in our latter example turned out to be 7 days, and then do different thing if the variable turned out to be 3 days.

Commands, data, variables, and conditions help build the most simple programs and there are certainly many more components of any programming language. But when they're typed into a programming language and compiled to create a an executable file (a file ending with the .exe extension), they turn into a software application.

As we mentioned earlier, you can use a programming language to control your computer. By using simple commands, you can program your computer to perform mathematical tasks, fill out web forms, compose an email message and send it off, or any number of other things. If you're interested, you may find Visual Basic is one of the most easiest programming languages to learn. Visual Basic is an object-oriented programming language and it automatically codes much of a program the minute a programmer drags a button onto a screen.


About the Author

FortyPoundHead has posted a total of 1974 articles.

 


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.81.195.240

Before you can post, you need to prove you are human. If you log in, this test goes away.




Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers