Dynadot

Basic Introduction to Programming - Vocab

Spaceship Spaceship
Watch
Impact
16
This is a tutorial that I wrote about a year ago. I remembered I had it, and figured it might be of some help to members here. I have generated a pdf file of this document, so you can download it, print it, etc...

Hope it helps!
- David

-----------------

Introduction to Programming – A Guide to Basic Vocab

In the process of teaching myself how to program, the most annoying thing I came across (and still come across) is that in all the tutorials I could find, they all used words and vocab that I didn’t understand. This tutorial provides very basic definitions to words used in other tutorials. I hope this helps someone, as I have looked far and wide for something as basic as this.
In beginning your programming experience, these are some very basic things you need to know, which are terms used in about every programming language tutorial. Compiled from 3 different sources, and edited a good bit, I have tried to put together an easy way to learn programming vocabulary.

To begin with, you need to know how to tell the computer to process the code as a certain language, and how to end the code. Remember that every line of code has to end with a semi-colon.
To tell the computer to begin processing commands in PHP, and ending it, for example, you would do this:
Code:
<?PHP
	This is the first command;
Notice how I told the computer to start and stop processing code as PHP;
	Notice the semi-colon at the end of every command, or code;
?>

Now, on to the vocab! Happy Programming!

Arguments – information that gives further clarification to a command.
Example: go (argument);
Commands – instructions that tell what to do, or how to do something.
Example: Go
Example: Sit
Comments – notes you as a programmer can place within a certain script that helps explain a certain statement, or provides other general information about a script.
Example:
Code:
/* This is the inside of a PHP comment that is typed on two or more     lines
    */
Conditional statement – statements in programming that allow you to test for conditions and execute commands based on those conditions.
Example: if ($A=1);
{ More commands go inside brackets like this, only if “A” is equal to 1. Make sure to close the bracket that comes after a conditional statement, like this:
};
Constant – data that never changes in a script – it has a “constant” value.
Example: You put a constant at the beginning of your script to make a definition.
Example: $A=1;

Expression – segment of code that results in a value. Expressions exist within statements.
Example:
Code:
 $A(1*1);
if ($A=1) { See the conditional statement example, and how I am implementing this. I expressed that $A = 1*1, before I set the “if” conditional statement. We all know that 1*1 is equal to 1. Therefore, the commands inside this set of brackets will be run, because I specified that $A is equal to 1. 
};
Function – provides information on a particular state or condition. It is a block of code that carries out a specific task. Remember that parentheses occur at the end of a function.
Example: $A(1*1);
Loops – the process of continually repeating a section of code, while a certain condition is true, or for a specified number of times.
Example:
Code:
for($A = 0 ; $A < 100; $A++) 
		{ 
echo "this message will echo 100 times, because $A starts at 0 and is less than 100"; 
		};
1. The computer will first see the statement for. As a result, it will move to the first argument, which tells us that $A is equal to 0.
2. It then looks at the middle statement to check if the condition is true. In other words, it looks to see if $A < 100.
3. Finally, it will move to the 3rd argument, which tells the computer to raise the value of $A by 1.
4. Therefore, the above example will be echoed 100 times.
Object-Oriented Programming (OOP) – A programming approach that groups together data and procedures into a single unit. PHP can be an OOP language.
Statement – one executable line of code. Don’t forget, statements end with a semi-colon.
Symbol – user-defined constant. In PHP, it always begins with a dollar sign ($).
Example: $A
Variable – holds data that can change while the program is running. Opposite of constant.
- A Boolean Variable is a variable which can have only two possible values.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
this is cool. ^^ can u also explain array?
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back