2. Definition Of Programming
Computer Programming (or simply “programming”) is the process
of writing the source code of a computer software (computer
program) using a particular programming language.
Many people also consider activities before and after it, such as solving
the problem, designing, testing, debugging and maintaining the source
code are also part of a programming activity
16. Computer Software
So can you give your own definition about computer software?
In short, computer softwares are created by human to enable
computers to do something (usually to solve our problems).
17. Source Code
What is “Computer Source Code” ?
◦ Software is built from a Source Code.
◦ Source code is a sequence of very basic (and sometimes primitive)
instructions, each of them tells the computer to do a specific task.
◦ Even modern sophisticated softwares are all composed of those
primitive instructions.
20. Programming Language
What is “Computer Programming Language” ?
◦ Instruction in the software’s source code must be understood by
both the creator(human) and the computer
◦ Programming Language is created to enable “communication”
between human and computer
◦ Several well known programming languages are: Java, C, C++, C#,
PHP, etc
◦ Sometimes, several other languages (related to computer) are
mistakenly regarded as a programming language: HTML, XML, SQL, . .
.
21. Programming
Finally, what is ”Programming”?
◦ Programming is the process of writing . . .
◦ Technically speaking, programming is a three-phase progress:
1. Problem-Solving Phase
1. Analysis and specification: understand and define the problem
and identify what the solution must do
2. Design and develop a general solution/algorithm: specify step-
by-step procedure that solve the problem
22. Programming
◦ Technically speaking, programming is a three-phase progress:
2. Implementation Phase
1. Create the source code: translate the algorithm into a
programming language
2. Testing and debugging the program: run the program and check
the result. If errors are found, analyze the source code and the
algorithm to determine the source of error, and then make
corrections
3. Maintenance Phase
23. The Implementation Phase
In the implementation phase, the computer creates the software from
the source code.
Example: From C’s source code language to Executable/Software.
Remember, this process is vary between different programming language,
but the idea is the same.
24. An Analogy
The act of programming shares many similarities with our regular
activities: cooking.
The process of both activities are somewhat the same:
◦ You must know exactly what the result you are expected (the output)
◦ You must prepare all necessariy logistics needed to create the expected
result (the input)
◦ You must know how (and be able) to transform the input into the ouput (the
process)
25. A Small Example
Suppose we have a mug of beer and a glass of orange juice. How can we
exchange the fillings, so in the end we have a mug of orange juice and a
glass of beer?
The process :
1. Prepare an additional container, for example: a goblet
2. Pour the orange juice into the goblet. Now the glass is empty.
3. Pour the beer into the empty glass. Now the glass is filled with
beer, while the mug is empy.
4. Pour the orange juice form the goblet into the empy mug.
5. Throw away the goblet, because we do not need it anymore.
26. The Role of an Algorithm in
Programming
In order to solve a problem (using a computer), we need to specify the
algorithm:
◦ it should contains a step-by-step task that the computer has to do to
solve the problem
◦ it should be precise enough for the computer to “understand” (no
ambiguity)
◦ the order of the task is important because each task is irreversible
◦ for every given input, the algorithm should yield a correct output
After we have a correct algorithm, we finish the first phase of the
programming progress
27. Object Oriented Programming
The second phase is to translate the algorithm into the programming
language (coding).
There are two ways to do that
◦ Specify what procedures/actions are required to accomplish a
specific task.
◦ Identify all objects which involved in the process of solving the
problem
The latter is known as Object Oriented Programming
28. Some Remarks
This course is focusing on the coding part, using object oriented
programming.
We will use relatively easy algorithms and you will be forced to create
you own algorithms.
More advanced algortihms will be covered in details on other courses.
We will only create (very) small-scale programs. Hopefully, you will be
skilled enough to start creating medium-large scale programs or
involved in team programming project.
What the difference between this course and any other short-course
(kursus) ? In short-course, you were taught to use a specific tools,
whereas in this course, you will be taught to solve a problem.
29. So, What Programming is All
About?
Programming is about controlling the computer
Programming is teaching computer how to do things
Programming is problem solving (try to make computer do something
useful)
Programming is creative, you must find the best solution out of many
possibilities
Programming is concrete, you must provide detailed instructions to
complete task (computer is dumb)
Programming is about creating a computer software, not about how to
use it
30. Why programming is very
extremely important ?
Programming is a gateway to the world of computer (and also the study
about computer science)
Programming helps you to understand how computer works
Programming (and problem solving skill) are extremely useful in ALL
computer science disciplines
btw, wouldn’t it a bit disgrace for us, if you were graduated from a
computer science/informatics department without having an adequate
skill in computer programming ?
31. Finally
What do you need to master the skill of programming (and of course, pass this
course) ?
◦ pay attention in all of our course meetings, write down useful notes
(do not depends on your friends’)
◦ do all the exercises by yourself, be honest
◦ patient, there might be no immediate result ...
◦ diligent, Singapore F1GP-alike is absolutely not applicable in this
course
◦ ask questions, you do not have that opportunity during the exam
◦ do not give up yet, every person has a different learning curve
◦ careful: group-study might not be as helpful as you think
◦ in my experience: lot of practices on your own is the most important
factor