Intro To Programming
Intro To Programming
So, a programming language is used to program or to write code for all these
amazing software that you are using! There are three types of languages:
1) Machine languages
Instructions are encoded in numbers
The languages we use currently are mostly high- level languages so we'll mostly
be dealing with high-level languages. BYOB is also a high-level language known
as a visual programming language, since it makes use of graphical elements to
code!
Errors...errors....more errors!!!
Two types of errors:
Syntax error and Semantics error
Syntax error:
A syntax error is similar to a grammatical error in English. For instance, in
English, it would be wrong to say "He ARE a programmer." Also, in programming
languages, too, there are certain rules we have to follow, which differ from one
language to another. For instance, in Python, indentation is required when
writing the code.
Semantic error:
A semantic error is similar to an error in which the meaning of a sentence is
distorted. For example, in English, the sentence, "The sun rises from the west." is
grammatically correct, but the meaning is incorrect since the sun rises from the
east. In programming, such errors also occur. Let us look a program that adds
two numbers.
Here is the pseudo-code of an Addition program:
input num1, num2
sum= num1 - num2
display sum
From the pseudo-code above, we can see that even though we are supposed to
add the two numbers, we are in fact subtracting the two numbers. This is called
a semantic error.
Debugging
In the process of coding, debugging is a very important process. Simply
speaking, the act of fixing bugs(or errors) in a program is known as debugging.
Debugging is extremely important in that a program usually does not work 100%
correctly when the program is finished so bugs need to be fixed in order for the
program to work smoothly.
Introduction to BYOB
BYOB is a visual programming language that makes use of blocks of code to
program. Hence, you do not need to personally type the code, but drag and drop
the blocks of pre-written code to program. It is implemented from the
programming language, Scratch, but BYOB has additional features.
You might have seen the language called Snap!. It is basically the same as BYOB!
BUT...Snap! runs on your browser. For BYOB, you will need to download the
software onto your computer.
(From http://snap.berkeley.edu/)