The main purpose of computer science and programming is to solve problems. Problem solving can be defined as the the process of finding solutions to difficult or complex issues.
In computer science, we use algorithms. An algorithm is a sequence of instructions that is used to find a solution. Problem solving is about understanding the problem at hand and figuring out how to translate the problem into a solution suitable for the computer.
Once we understand the problem and devise a plan, we can begin implementing the solution. Implementation involves writing in a language that can be understood by both the computer and the human programmer. Testing is another important part of problem solving that includes verifying that your solution solves the original problem.
There are hundreds of programming languages, each with their pros and cons. Examples of programming languages are Java, Ruby and c++.
IDEs are Integrated Development Environments. They combine various useful programming tools into one software program. Examples of IDEs are BlueJ, Eclipse and Oracle Developer Studio.
There are four programming language levels:
All programs must be translated to a particular CPU's machine language in order to be executed (called compiling).
The CPU is the central processing unit. It is the hardware within a computer that carries out the instructions of a program by performing the basic arithmetical, logical and input/output operations of the system.
The CPU is on a chip called the microprocessor and it continuously follow the fetch-decode-execute cycle. Let's look at those 3 steps. Fetch means the CPU retrieves an instruction from main memory. Decode is when the CPU determines what the instruction is, and Execute is when the CPU carries out the instruction.
The main memory (or RAM) is the primary storage area for programs and data that are still in use. Main memory is volatile, and this means the information that's stored there is maintained only as long as electric power is supplied. Secondary memory devices such as a USB flash drive or hard drive provide long-term storage.
Information is stored on a computer digitally. It is broken down into pieces and represented as numbers. Every character is stored as a number, as well as digits, spaces and punctuation. This is called binary representation. A single binary digit is a 1 or 0, called a bit.
The syntax rules of a language determine how the vocabulary elements of a computer language can be combined to form statements.
The semantics of a program statement refers to the purpose and meaning of a statement - what will actually happen when a statement is executed.
A program that is syntactically correct is not always semantically correct, but remember that a program will always do what you tell it to do, not what you intended to tell it to do.
A program can have three types of errors:
Compiler errors. Compiler errors are errors that prevent your program from running. They are syntax errors picked up by the compiler. Most compiler errors are caused by mistakes you make when typing code.
Run-time errors. Run-time errors are errors that occur while your program runs. Run-time errors will cause your program to terminate abnormally. An example of this type of error occurs when you try to divide by zero.
Logical errors. Logical errors occur when the program runs but produces incorrect results. Your program did not do what you intended it to do, for example, you might have used an incorrect formula.
Thanks for reading this summary on computer basics, algorithms and other bits of programming information!
Nov 12, 18 08:30 PM
Gartner uses the concept of a maturity model to depict the maturity of an IT Organization. Let's look at how a maturity model works. We'll also consider an example of a maturity model that depicts the…
Nov 05, 18 11:43 PM
Today I'm letting you in on why I find time to read even when my schedule is super hectic. Even when I'm busy, there's certain benefits of reading that I just can't skip out on...
Oct 27, 18 02:01 AM
I wrote this poem called "My Happiness is My Choice", it touches on the ways our actions could imply that we think others control our happiness. Happiness is a choice we each have to make despite how…
If you can see this, please share this post with the buttons below :)