A brief introduction to programming concepts

Forenote: The following is the first of what may become a series of posts about introductory and basic programming concepts. I would like to continue with more posts over time, but before I do make any commitment I wish to see if there would be enough demand for a series of writings such as this. If anybody feels there are some improvements that could be made on these writings, feel free to comment on them.

What is Computer Science?

The term ‘Computer Science’ actually can be somewhat deceiving, at least from my point of view. One of the best explanations that I have heard is that Computer Science is actually a study of various processes that achieve a useful result. For example, running a web browser actually utilizes numerous processes to achieve the useful result of being able to visit websites.

In its simplest form, what is a program?

A program is a series of instructions written out in code that result in the execution of a process. For example, a program can be made in a programming language such as Java to change the color in a picture on a pixel by pixel basis.

What is an algorithm?

An algorithm is a series of instructions that are written out that can be applied in various programming languages. The important aspect of algorithms though is that to me, an effective one should be written and planned outside of any one programming language.

What is a good example of an algorithm?

Well, one example that I can give is to change a picture to greyscale. When dealing with JPEG images, usually red, blue, and green (or RGB for short) levels control what color results with the lowest level being 0 and the highest level being at 255. One method of greyscaling an image is to average out the color level of each pixel and set all levels to that average. In other words, we are going through each pixel, adding together the red, blue, and green levels of a picture, dividing them by three, and changing the RGB to the average we get from doing this. Usually, algorithms can be made either through pseudocode or flowcharts. In the example below, I have given pseudocode that would greyscale an image.

Start of process
loop through each row one at a time until the last row is reached
loop through each column one at a time until the last column is reached
get pixel information by using the current location in row and column;
get red, green, and blue levels for pixel;
average color levels by adding red, green, and blue levels together and dividing the result by three;
change red, green, and blue levels for pixel to the result given by averaging levels;

Now, I will mention that in this example, I used loops in order to carry out this process. The basics of loops will be discussed more in detail at another point.

Why is Computer Science different from Computer Technology?

Computer technology, as instructed at college universities usually is about setting up and making computer systems work. As such, not very much knowledge of computer science is actually needed unless the system is being setup for a special purpose. Computer science on the other hand is about being able to understand how the processes in a program work and how to create our own working processes and programs.

Afternote: Should this series of writings continue, here's how I see the next few looking.
Basic programming concepts 1: Variables and Arrays
Basic programming concepts 2: Loops
Basic programming concepts 3: Classes and Inheritance
Basic programming concepts 4: Class constructors, accessors, and getters/mutators.