What is programming
Well, you may have heard something similar before. "A
computer program is a set of instructions." Here's the problem. This
sounds like one of those phrases that may be technically true and is a bit useless,
since the human brain is 80% water. Because you hear this phrase, but then you
see a complex program such as Photoshop or Flash or something playing HD video
or 3D game and think. "Yes, but it cannot be just a set of
instructions" But that's exactly what it is, to all of them. Each computer
program is a set of instructions, a sequence of small separate commands, and
one after the other.
Now there maybe five instructions contained in a program,
perhaps 5,000, perhaps 5,000,000. Each statement is telling the computer to do
something very small, but very specific and the art of programming is to take a
broader view and break in each of these phases, and the wonderful thing is that
everyone can already do.
A code must be Specific, individual, simple, clear,
self-contained instructions.
So with the programming that we are giving instructions to the
computer, it’s breaking apart a more complex idea, a more complex task, into best
individual instructions and then using a programming language to write these
instructions
Now, of course if you have never programmed, it's not clear
right now what those instructions might be. You know it's probably not turn
right and turn left like when you are guiding someone to a place.
So what are those basic fundamental instruction you give a
computer?
Well, they are often very basic. They are things like add two numbers together, or display a letter on the screen, check to see if the user just hit the spacebar, change the color of one individual pixel.
Well, they are often very basic. They are things like add two numbers together, or display a letter on the screen, check to see if the user just hit the spacebar, change the color of one individual pixel.
When beginning programming to complex games or applications,
well that's what you get when you have a hundred people writing these
instructions for sixty hours a week for several years, combined with the
ability of the computer to process them mind-bogglingly fast, means that we
could, if we wanted to, write the set of instructions that could calculate every
single individual pixel on the screen thirty times a second.
Computers do exactly what you tell, so the instructions that
give them a better sense. In programming languages that are writing these
instructions in writing what are called statements.
Statements in programming languages are kind of like
sentences in English. They use words, numbers, and punctuation to express one
thought, one individual piece. Most programming statements are pretty short,
just a few words.
Now, exactly what words, numbers, and punctuation you use
depends on the programming language. Some languages want each of your
statements to end with a semicolon, like ending a sentence in English with a
period, and others don't. You just go to the next line and start writing the
next statement. Some languages are all uppercase, some languages are all
lowercase, and some languages just don't care.
Now, understanding the rules of each language understands
the syntax of a programming language. So programming is the ability to take
this idea in your head, break it apart into its individual pieces, and know how
to write those pieces in the programming language you are using at the time,
writing your statements in the right order, using the right syntax, but what
language? Well, sometimes you get to pick a language and sometimes it's kind of
picked for you.


0 comments:
Post a Comment