The Five Principles of Programming

Dae Yeon Koh
2 min readOct 2, 2021

--

How to think like a computer scientist.

Thinking Procedurally

sub procedures — contains a series of instructions that perform a specific task. This is the most common way to break down a problem into smaller. individual tasks.

identifiers — a term used by programmers to uniquely identify a variable, an object, a sub-procedure, etc.

Thinking Logically

iteration — the process of repeating series of instructions. It can be expressed by using the FROM TO loop and the WHILE loop statements.

conditional statement — performs different instructions depending on a Boolean test. The IF-ELSE statement is comonly used.

Thinking Ahead

pre-planning — the process of planning something in advance

prefetching — getting data or instructions from memory into the cache before they are actually needed. For example, when a program requests data that was previously fetched, the program can use the cache data instead of taking from the slower main memory.

Gantt chart — a type of bar chart widely used for project schedule and management as a way of showing activities, tasks and events.

Core Computer Science For the IB Diploma Program by Kostas Dimitriou, Markos Hatzitaskos

Thinking Concurrently

concurrent processing — the execution of different instructions simultaneously by multiple processors.

Concurrent processing requires good planning and coordination of resource management. Without this, it may cause serious problems in the program.

Thinking Abstractly

abstract thinking — reflecting on events in a general manner that hides all unnecessary details of specific objects.

Object oriented programming (OOP) — uses abstraction, and is based on the principle of considering everything as an entity. These entities are objects, and OOP uses programming objects to describe the data (properties) and behaviour (methods) of real objects. It is a way of procedural programming, which uses procedures to exchange data as building blocks of programming.

Example 1:

Calculating the total highest temp. in the year, outputting the hottest temp. and the month it is in

Example 2:

Finding and printing the reverse of an array

--

--

Dae Yeon Koh
Dae Yeon Koh

Written by Dae Yeon Koh

I'm a student learning on how to write articles.

No responses yet