I. Algorithms always need Input to process


Definition of algorithms

“In mathematics and computer
science, an algorithm is an unambiguous specification of how to solve a class
of problems. Algorithms can perform calculation, data processing and automated
reasoning tasks.” (Wikipedia, 2018)

Algorithms always need Input to process and give the Output. So algorithms is the rule that can handling works that have same way to solve it. Usually
algorithms have these parts:

v Input:
Included all information that we have.

v Output:
Result taken from Input after processing the data.

v Processing:
This part is the way that it will processing the data from Input to Output.

Characteristics of algorithm

“The transition from one state to the next
is not necessarily deterministic; some algorithms, known as probabilistic
algorithms, incorporate randomness.

A step-by-step method of solving a problem
or making decisions, as in making a diagnosis.

established mechanical procedure for solving certain mathematical problems.
Properties of the algorithm:

v Finiteness: An algorithm must always
terminate after a finite number of steps.

v Definiteness: Each step of an algorithm must
be precisely defined; the actions to be carried out must be rigorously and
unambiguously specified for each case.

v Input: An algorithm has zero or more inputs,
i.e, quantities which are given to it initially before the algorithm begins.

v Output: An algorithm has one or more outputs
i.e, quantities which have a specified relation to the inputs.

v Effectiveness: An algorithm is also
generally expected to be effective. This means that all of the operations to be
performed in the algorithm must be sufficiently basic that they can in
principle be done exactly and in a finite length of time.

Complexity of Algorithm:

It is very convenient to classify algorithms
based on the relative amount of time or relative amount of space they require
and specify the growth of time /space requirements as a function of the input
size. Thus, we have the notions of:

v Time Complexity: Running time of the program
as a function of the size of input

v Space Complexity: Amount of computer memory
required during the program execution, as a function of the input size.”TTB1  (Gupta, n.d.)

For example with cook
rice. We have rice (Input) need it become food that we can eat (Output). So
clearly we need to wash rice first and filter rice husk from rice then put
water in pot then cook it with fire (Definiteness). After these steps we will
have rice cooked that we can eat. But when we cook rice with fire, we need the
exact time or rice may burn or not ripen (Finiteness). With all condition, we
can make rice without any problem (Effectiveness).

Algorithms need to
be optimized everytime to get better performance and lighter size for
application we made. Also it need to be debugged to fix the bug that caused
from wrong algorithm.

Define criteria to measure a good algorithm

dictionary’s definition, “any mechanical or recursive computational
procedure,” is not entirely satisfying since these terms are not basic

v Definition: An algorithm is
a finite set of instructions which, if followed, accomplish a particular task.

In addition every algorithm must satisfy
the following criteria:

v Input: there are zero or more quantities which are externally supplied;

v Output: at least one quantity is produced;

v Definiteness: each instruction must be clear and unambiguous;

v Finiteness: if we trace out the instructions of an algorithm, then for all cases
the algorithm will terminate after a finite number of steps;

v Effectiveness: every instruction must be sufficiently
basic that it can in principle be carried out by a person using only pencil and

It is not enough
that each operation be definite, but it must also be feasible.”TTB2  (Chandel, 2017)

Normally, we will
check that app after code it. We check every functions in app, try to find bug
in it. After that we need to check if it work without laggy, slow respond or
not respond. Also we need to see how it use device resource. If the app run
smoothy, no bug (maybe user will find it after long time use), no heavy effect
in device system so we can bring it to user.

Anyway, we can’t
say any algorithms is good or not if it doesn’t put it into program or
something that it based on those algorithms. But these criteria could
help us test first time to see it can be work or not.

For example,
Operating system (or OS) doesn’t need to be finiteness. Because OS need always run and it always wait for command from user
and it only stop when user send STOP command.

d.    The
7 steps of building an application

Basically, we have
7 steps to building an application:

1.    Defining or Analyzing the problem: Before we
make an application, this is step that we find what kind of app we will make,
why we make that app, which kind of user we force to, what OS that you want
your application to run, etc.

2.    Design (Algorithm): This step will need us
design how the application work. And the app after you make will work exactly
like you imagine.

3.    Coding: This step is simply turn your
algorithm into code that you need. Important that each OS will have different
program language so you need to make the code that we can transfer to other
language easily.

4.    Documenting: We need make some document to
help user can understand how to use our app. Also other developer or we can see
it again in future.

5.    Compiling and running the program: This step
will make our code become an app that we need. Also the app can run but it can
have some bug.

6.    Testing and Debugging: We need test all app
to find bugs and fix it before we publish it.

7.    Maintenance: We need to fix any bugs and add
feature in future. So we need user feedback to make our app become better and

We can clearly know
that algorithm is the important step to make an app. But there is still have
something that different between to of these. Algorithm is friendly for human,
easy to write, can use for any program language, etc. But with the code variant
we only can make it specific program language. That

Programming paradigm

a.     Procedural programming

programming is basically just a list of commands, and it nicely suited to the
way that a computer works at a low level. It is, in essence, just telling the
computer “do this, then do this, then do this,” and so on. The other
types of programming are all based on a framework written in procedural terms.

b.    Even driven programming

Even driven
programming is all about responding to events. An example of an event would be
pressing a key on your keyboard. It is convenient to say “when a key is
pressed, do X then Y then Z, but when the mouse is moved do P then Q then
R.” In this way you don’t really know what order things are necessarily
going to be executed in when you write the program (i.e. X could happen before
P or after P), but you write the program in such a way that it doesn’t matter.
Actions X, Y, and Z are appropriate in response to a key being pressed so you
just do those things when a key is pressed. Even driven programming is ideal for
programs that interact with a human user.

c.     Object Oriented Programming

Object Oriented Programming is more complicated, but using it makes a
lot of complicated problems easier. In OOP it’s all about the objects. An
object is a cluster of data where all of the data is related (e.g. all of the
information about a customer could be stored in a Customer object; information
about a window on your screen could be in a Window object. You can have an object
for just about anything). OOP then goes and associates actions (i.e. functions)
with those objects, so you would put functions that deal with Windows with your
Window Objects (this is the OOP concept of Encapsulation, roughly). Another
thing that OOP allows is for you to describe one object in terms of another–if
you have described a Rectangle object then you can quickly go in and describe a
Square as a new type of object that shares many features with the Rectangle
object (which may have been defined as a special case of Shape object). This is
the OOP concept of Inheritance. Finally, OOP lets you work with objects without
really knowing exactly what they are. For example, you could
have something that you know you can do to Shapes and OOP will let you do that
to a Square, since a Square is a Rectangle and a Rectangle is a Shape. This is
the concept of Polymorphism (at least one example of it).” (Koooooj,

As we have seen above, program will work different with each type of programming
paradigm. With procedural
programming, code will be like a book. Mean that which code we want run first
will be written first and which code we want run later will written after. It
will go on until last code and program will stop.

Even driven
will be different than procedural
programming. Even driven will have group of code for each even driven. Mean
that one of them will run when user use even driven that need it. Due to its
limited, even driven programming isn’t popular in coding.

Most popular programming paradigm
is Object Oriented
Programming (OOP). OOP also use group of code to run a function that user
needed. But each code can share their data to other. Mean that program can run
many group of code at same time. This is the thing that make OOP better than
even driven programming.

Integrated Development Environment

Development Environment is a type of computer software that helps developers in
software development. Example is Visual Studio, Xcode, Android Studio, ect.
Normally, IDE have some feature that very useful:

v Auto fill: This will save a lot of time in
software development. We only need to type few word then IDE will suggest some
command that we need.

v Error alert: When we are programming, we
can’t make a program without any mistake in code. IDE will help we found those
error then alert to us. And furthermore, it can suggest we how to solved that

v Rename: IDE can help us rename any variable,
name, ect easier. Just need to selected one and can rename all.

v Debugging: IDE can make break point and run
each code line. This will help us to find the bug in code we made and find
solution to fix it.

v Build an application: IDE can help us to compiler
code to complete application.

v Group code: IDE can group code that we can
see or shorten it when needed.

v Run an application in visual machine: IDE
can build an application and run it in environment that app need to run. Also we can test the app in
specific device.