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!
Oct 10, 17 09:52 PM
How do you spend your Sunday evenings? Here are 7 Sunday night habits to make you more successful and set you up for a great week ahead!
Sep 29, 17 10:52 PM
Yes, it's true that your job influences you and the way you approach certain things in life. But your job doesn't define you completely. Here are good reasons why.
Sep 15, 17 09:27 PM
What thoughts enter your mind during the day? The stories we tell ourselves and allow ourselves to believe matter, and they affect everything we do.
If you can see this, please share this post with the buttons below :)