0% found this document useful (0 votes)
3 views15 pages

Topics in Computer Programming

The document discusses the concepts of data, information, and knowledge, highlighting their interrelationships and definitions. It outlines the characteristics of valuable information, the value of information in decision-making, and the role of information systems in organizations. Additionally, it covers program development stages, programming languages, data types, and components of a computer program.

Uploaded by

elya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views15 pages

Topics in Computer Programming

The document discusses the concepts of data, information, and knowledge, highlighting their interrelationships and definitions. It outlines the characteristics of valuable information, the value of information in decision-making, and the role of information systems in organizations. Additionally, it covers program development stages, programming languages, data types, and components of a computer program.

Uploaded by

elya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

INFORMATION CONCEPTS

Information can be thought of as the resolution of uncertainty; it is that which


answers the question of "What an entity is" and thus defines both its essence and nature
of its characteristics.

Information is associated with data, as data represent values attributed to


parameters, and information is data in context and with meaning attached. Information
also relates to knowledge, as knowledge signifies understanding of an abstract or
concrete concept. Data, information and knowledge are closely related concepts, but each
has its own role in relation to the other, and each term has its own meaning

Data, Information and Knowledge

What is data?
Data consists of raw facts, such as an employee number, total hours worked in a
week, inventory part numbers, or sales orders. When facts are arranged in a meaningful
manner, they become information.
Data Representation refers to the form in which data is stored, processed, and
transmitted.

Data Presented by
Alphanumeric data Numbers, letters, and other characters
Image data Graphic images and pictures
Audio data Sound, noise, or tones
Video data Moving images or pictures

What is information?
Information is a collection of facts organized and processed so that they have
additional value beyond the value of the individual facts, or a data that has been
processed into a form that is meaningful to recipient
What is Knowledge?
Knowledge is the awareness and understanding of a set of information and the
ways that information can be made useful to support a specific task or reach a decision.
Turning data into information is a process, or a set of logically related tasks
performed to achieve a defined outcome. The process of defining relationships among
data to create useful information requires knowledge
Professor Ray R. Larson of the School of Information at the University of California,
Berkeley, provides an Information Hierarchy, which is
 Data − The raw material of information.
 Information − Data organized and presented by someone.
 Knowledge − Information read, heard, or seen, and understood.

The Characteristic of Valuable Information


Characteristics Definitions
Information should be easily accessible by authorized users so they
Accessible can obtain it in the right format and at the right time to meet their
needs.

Accurate information is error free. In some cases, inaccurate


Accurate information is generated because inaccurate data is fed into the
transformation process. (This is commonly called garbage in,
garbage out [GIGO].)

Complete information contains all the important facts. For example,


Complete an investment report that does not include all important costs is not
complete.

Information should also be relatively economical to produce.


Economical Decision makers must always balance the value of information with
the cost of producing it.

Flexible information can be used for a variety of purposes. For


example, information on how much inventory is on hand for a
Flexible particular part can be used by a sales representative in closing a sale,
by a production manager to determine whether more inventory is
needed, and by a financial executive to determine the total value the
company has invested in inventory.

Relevant information is important to the decision maker.


Relevant Information showing that lumber prices might drop might not be
relevant to a computer chip manufacturer.

Reliable information can be trusted by users. In many cases, the


Reliable reliability of the information depends on the reliability of the data-
collection method. In other instances, reliability depends on the
source of the information. A rumor from an unknown source that oil
prices might go up might not be reliable.
Secure Information should be secure from access by unauthorized users.

Information should be simple, not overly complex. Sophisticated


and detailed information might not be needed. In fact, too much
Simple information can cause information overload, whereby a decision
maker has too much information and is unable to determine what is
really important.

Timely information is delivered when it is needed. Knowing last


Timely week’s weather conditions will not help when trying to decide what
coat to wear today.

Information should be verifiable. This means that you can check it to


Verifiable make sure it is correct, perhaps by checking many sources for the
same information.

The Value of Information


The value of information is directly linked to how it helps decision makers achieve
their organization’s goals. Valuable information can help people in their organizations
perform tasks more efficiently and effectively.
Consider a market forecast that predicts a high demand for a new product. If you
use this information to develop the new product and your company makes an additional
profit of ₱10,000, the value of this information to the company is ₱10,000 minus the
cost of the information.

Information System

An information system (IS) can be defined as an integration of components for


collection, storage, and processing of data of which the data is used to provide
information, contribute to knowledge as well as digital products.
Business firms and other organizations rely on information systems to carry out
and manage their operations, interact with their customers and suppliers, and compete in
the marketplace.
Information systems are used to run interorganizational supply chains and
electronic markets. For instance, corporations use information systems to process
financial
accounts, to manage their human resources, and to reach their potential customers with
online promotions.

Figure 1. Information System


Source: [Link]

Types of Information Systems


There are several major categories of information systems, each with specific
characteristics that make them unique. Here’s a look at the five used systems.

1. Transaction Processing Systems

Transaction processing systems provide a way to collect, process, store, display


modify, or cancel transactions. Most of these systems allow multiple transactions to
take place simultaneously. The data collected by the system is in the databases that
can use to produce reports such as billing wages, inventory summaries,
manufacturing schedules, or check registers.

2. Process Control Systems


Process control systems are used to monitor and control physical processes. An
example would be to test the temperature of food as it’s being prepared. Unlike
transaction processing systems, process control systems take their input data from
sensors to generate reports that are analyzed by an operational manager to adjust the
business process.
3. Decision Support Systems
Decision support system helps make decisions by working and analyzing data
that can generate statistical projections and data models. This system give support
rather than replacing a manager’s judgment while improving the quality of a
manager’s decision. A DSS helps solve problems while using external data.

4. Management Information Systems

Management information systems are built on data provided by transaction


processing systems. They extract their data from databases located in different
departments to compile reports such as analysis, inventory level reports, or financial
statements. They typically have little or no analytical capability and are used to
provide reports on the firm’s past or current performance rather than the future
performance of an organization.

5. Executive Information Systems

Executive information system helps executives and other senior managers


analyze the environment in which the organization operates to identify long-term
trends and plan appropriate courses of action. The information in such a system is
often weakly structured and comes from both internal sources, such as its own
databases or data warehouse, and external sources, such as data from customers,
suppliers, or other government databases.

Executive information systems tend to be highly individualized and are often


custom-made for a particular client group. However, many off-the -shelf executive
information systems packages do exist. And many enterprise-level systems offer a
customizable executive information system module. An easy to use digital dashboard
with a real-time view of the performance of an organization is a common feature of
an executive information system.

What is Program Development?


Program Development is the art of preparing and designing necessary structures to
come up with computer instructions that enables the computer to solve a problem or
perform task.
In order to develop computer programs, a programmer has to go through the
following stages:

1. PLANNING
This stage involves identifying the problem and defining the problem in simpler
terms, identifying the program requirements (inputs, outputs the formulas needed), and
finally, planning for the solution.
2. PROGRAM DESIGN
This stage deals with the flow of the program, the way it should produce output
and gather inputs, the interface or the working environment of the program, and how it
should be used. The software developer makes use of tools like algorithms, pseudocodes
and flowcharts to develop the design of the program.

3. CODING
Once the design process is complete, the actual computer program is written, i.e.
the instructions are written in a computer language. This stage of program development
requires following the rules of format and syntax (vocabulary, grammar and punctuation.
It also requires an extensive knowledge in the programming language he will use.

4. DEBUGGING
At this stage the errors in the programs are detected and corrected. This stage of
program development is an important process. The process of correcting mistakes in a
program is called debugging.

5. TESTING
In this stage, the program is tested on a number of suitable test cases. A test plan
of the program has to be done at the stage of the program design itself. This ensures a
thorough understanding of the specifications.

6. DOCUMENTATION
Documentation is a very essential step in the program development. Documentation
help the users and the people who maintain the software. This ensures that future
modification if required can be done easily. Also it is required during redesigning and
maintenance.

7. MAINTENANCE
The final stage in programming is in maintaining or updating the program. This is
the stage where the programmer is tasked to keep the program running smoothly and
updated with the developments and changes in the field where it is used.

Programming Language
Programming Language is a special language used to write computer programs.
Programming languages can be used to create programs that control the behavior of a
machine. Moreover, a programming language is a set of words, symbols and codes that
enables humans to communicate with computers.
Name of some popular recent programming languages are shown in Table 1.1.
This list is only small sample since there are thousands of programming languages.
Programming
Description
Language
Visual Basics, C# Popular programming languages for building Windows and Web
applications. Use a graphical user interface
C/C ++ Powerful advanced programming languages that emphasize
flexibility and fast running times. C++ is also object-oriented.

Java, JavaScript Java-Flexible and powerful programming language that runs on


many different computer systems. Often used to teach object-
oriented programming.
JavaScript-Scripting language used in Web applications that
provides rich user interfaces for Web browsers.
Python Simple, yet powerful programming language used for graphics and
small applications.
PHP Programming language used for creating interactive Web sites.

Table 1.1 Popular Programming Languages

What is a Data Type


A Data Type is an attribute of data which tells the computer on how it will be handled
during execution.

Basic Data Types


1. The data that human beings use.
2. The data used solely by the computer and its I/O devices
As human beings, we are using two types of data:
1. Character data
2. Numeric data

Character Data
Character data includes any character that can be input to the computer. It can be
anything accepted by the computers. Character data is usually defined as a string of
words. A word is a contiguous set of characters and a string is a combination of multiple
words. Character data is generally used as:

1. Strings - A string can consist of multiple words.


Represents a sequence of characters

Examples: “ Hello World ! “


2. Memo or Long Text Matter – Used to store documents or long explanations inside a
database.
3. Special Strings - The URLs (Uniform Resource Locators) used for website addresses
and email addresses form part of this data type.
Numeric Data
Numeric data is numbers expressing the value of some attribute of an entity.
Computers subject numeric data to arithmetic manipulation, and it is possible to perform
all arithmetic operations on numeric data. Numeric data is further classified into the
following types:
1. Integers - Integers are whole numbers without any fractional part
Examples: -5,0,123
2. Real number - Real numbers are those that have a fractional part
Examples: -87.5, 0.0, 3.14159
3. Date - Dates contains three distinct parts, namely the day of the month, the month,
and the year.
4. Time – Time Contains three numbers for the hour, the minute, and the second
5. Currency - A special number whose fractional part is restricted to 2 digits after
the decimal point
6. Counters - integers and is used to count the number of iterations
7. Auto Incremented Number - These are used in database tables to form a primary
key for the table.

Special Data Types


There are data types that are used for special purposes in programs, especially in
developing system software.
1. Arrays - Arrays are tables of data. Usually, arrays are used in solving
mathematical problems in matrix algebra.
2. Pointers - Pointers are a special type of integer data. Pointers can hold the address
of any location inside the RAM.
3. Union - Union is a special data type used in the C family of programming
languages.
4. Boolean - This data has only two states, namely, 0 (true or yes) or 1 (false or no)

Components of Computer Program


A program would have the following components, normally:
1. Headers
These are statements placed above the program code and can be used in the entire
program. Examples are the header files to import package, class or interface.

2. Program beginning and ending


Every program has an identifiable beginning and an identifiable ending. These
contain specific sets of actions to be performed when the program begins execution and
ends the program. Program starts executing codes at its entry point like the main method
or main function header with its open curly brace and ends with its corresponding closing
brace.

3. Data definitions
These are definitions of the data proposed to be used during the program
execution. Each definition results in the allocation of RAM as required. This is done by
specifying the size and type of values that can be stored in an identifier or variable.

4. Input operations
These operations bring in data from the outside world into the RAM for
processing. Input or scanner functions of a programming language are used to take input
from the user.

5. Output operations
These operations deliver the processed information to the outside world using the
print functions of a programming language.

6. Computational operations
These operations perform mathematical operations and produce results.

7. Decision making operations


These operations make programmed decisions and control the program flow with
the use of control flow statements of a programming language.

8. Program documentation:
These statements explain the logic of the program statements, which assist other
programmers in maintaining the program. Comments can be used to explain the parts of
a programming code.
SAMPLE CODES:
Sample HTML program with javascipt
Sample Java program that automatically add two numbers from the user

The Process of Program Execution


All computer programs were created to solve problems. These programs are very
useful to human to ease some burden especially on their work.

Process of program execution are the following:


 Define the problem to solve
 Design a solution
 Draw a flowchart
 Create a pseudo-code
 Write the program
 Test the program
 Document the program

I. Define the Problem


A programmer creates program to solve a problem. So, it is very important to
know first the problem to work on. And also, the requirements of the client on how it will
appear, display, and work. Another thing to consider is the ability of the end-users to
operate the program.

II. Design a Solution


After identifying the things required to solve a problem, then the next step is to
design a solution. A design is a description of steps of a program. It doesn't have to be
written in any special programming language - English will do.

And also, a programmer should be able to take a design and write the program
from it without having to think too hard. It's looks like an architect's drawing: it
contains all the important structures without showing every bit of brick and mortar.

III. Draw a Flowchart


A flowchart is a pictorial representation of a sequential process of a program to
solve a problem. It comprises of arrows for the direction, boxes and other symbols
representing actions. It serves as a map of the program on what and how to do it. This
will be discussed in the future module.
Example from [Link] :

IV. Create a Pseudo-code


Pseudocode is an English-like nonstandard language used in informal way of
programming description that does not require any strict programming language syntax
or underlying technology considerations. It is used for creating an outline or a rough draft
of a program. Pseudocode summarizes a program’s flow, but excludes underlying details.
It permits the programmer to focus on the program logic without having to be concerned
about the precise syntax of a particular programming language. However, pseudocode is
not executable on the computer.
Example from
[Link] :
Place 0 in sum
Place 0 in counter
Enter first number
DOWHILE the number is not equal to 999
Add number to sum
Add 1 to counter
Enter the next number or 999
ENDDO
Divide sum by counter to get average
Write the average

V. Write/Code the Program


In writing or coding a program, the programmer will use his chosen programming
language. There are many programming languages: BASIC, COBOL, FORTRAN, and C
are some examples. A computer code is a list of instructions that can be run by a certain
program. Most code contains plain-text documents where the programmer can write code
using a basic word processor or text editor. A code editor is also called an integrated
development environment (IDE). An IDE is a software application for formatting your
code, checking syntax, as well as running and testing your code. Some IDEs can work
with multiple programming languages, while some are very specific for only one
language.
On this stage, the programmer has to sit and type the command lines of a program.
Coding is the act of translating the design into an actual program, written in some form
of programming language. It is like writing an essay. And, like essays, there are things
needed to include in the program such as titles, introductions, references etc.).

VI. Test the Program


After coding the program, you must prepare to test it on the computer. This step
involves these phases:
1. Desk-checking
This phase is similar to proofreading that sometimes avoided by the
programmer who looks for a shortcut and eager to run the program on the
computer once it is written. With careful desk-checking you may discover several
errors and possibly save time in the long run. In desk-checking you simply sit
down and mentally trace, or check, the logic of the program to ensure that it is
error-free and workable. Some organizations take this phase a step further with a
walkthrough, a process in which a group of programmers-your peers-review your
program and offer suggestions in a collegial way.

2. Compiling

Compilation is the process of turning the program written in some


programming language into the instructions made up of 0's and 1's that the
computer can actually follow. This is necessary because the chip that makes your
computer work only understands binary machine code like 01110110.

Compilers are translators that can read a programming language, translate


it and write out the corresponding machine code. A translator is a program that
(1) checks the syntax of your program to make sure the programming language
was used correctly, giving you all the syntax-error messages, called diagnostics,
and (2) then translates your program into a form the computer can understand.

The translator produces descriptive error messages. For instance, if in


FORTRAN you mistakenly write N=2 *(I+J))-which has two closing parentheses
instead of one-you will get a message that says, "UNMATCHED
PARENTHESES." (Different translators may provide different wording for error
messages.) The translation involves your original program, called a source
module, which is transformed by a compiler into an object module.
3. Debugging
Debugging is the process of detecting and removing of existing and
potential errors (also called as ‘bugs’) in a software code that can cause it to
behave unexpectedly or crash. To prevent incorrect operation of a software or
system, debugging is used to find and resolve bugs or defects. It is the task of
looking at the original program, identifying the mistakes, correcting the code and
recompiling it. In this phase also, the programmer run the program using test data
that you develop. You must plan the test data carefully to make sure you test every
part of the program.

It is not necessary to write the entire program before you start to compile
and debug it. It is better to write a small section of the code first, get that to work,
and then move on to the next stage. This reduces the amount of code that needs to
be debugged each time and generally creates a good feeling of "getting there" as
each section is completed.

VII. Document the Program


Documentation is a written detailed description of the programming cycle and
specific facts about the program. Typical program documentation materials include the
origin and nature of the problem, a brief narrative description of the program, logic tools
such as flowcharts and pseudocode, data-record descriptions, program listings, and
testing results. Comments in the program itself are also considered an essential part of
documentation.

The wise programmer continues to document the program throughout its design,
development, and testing. Documentation is needed to supplement human memory and to
help organize program planning. Also, documentation is critical to communicate with
others who have an interest in the program, especially other programmers who may be
part of a programming team. And, since turnover is high in the computer industry, written
documentation is needed so that those who come after you can make any necessary
modifications in the program or track down any errors that you missed.

You might also like