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

Com Prog 1 MODULES

The document is a learning module on computer programming, covering topics such as programming concepts, binary language, machine and assembly languages, and various programming languages including Python, Java, and C++. It also discusses the roles of different types of programmers, the importance of debugging, and the use of flowcharts in programming. Key properties of software quality, such as reliability, robustness, and maintainability, are also highlighted.

Uploaded by

Jonnel Bilaos
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)
75 views15 pages

Com Prog 1 MODULES

The document is a learning module on computer programming, covering topics such as programming concepts, binary language, machine and assembly languages, and various programming languages including Python, Java, and C++. It also discusses the roles of different types of programmers, the importance of debugging, and the use of flowcharts in programming. Key properties of software quality, such as reliability, robustness, and maintainability, are also highlighted.

Uploaded by

Jonnel Bilaos
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
You are on page 1/ 15

GRANBY COLLEGES OF SCIENCE & TECHNOLOGY

Naic, Cavite, Philippines


Telefax: (046) 412-0437

LEARNING MODULE
IN
COMPUTER
PROGRAMMING 1
BSIT
INSTRUCTOR: JONNEL BILAOS

E-mail Address:
[email protected]

NAME OF STUDENT:
“Introduction to Computer
Programming”
is the process of designing and building an executable computer
program to accomplish a specific computing result or to perform a specific
task. Programming involves tasks such as: analysis,
generating algorithms, profiling algorithms' accuracy and resource
consumption, and the implementation of algorithms in a
chosen programming language (commonly referred to as coding)

Binary
Binary number is a number expressed in the base-2 numeral system or
binary numeral system, a method of mathematical expression which uses
only two symbols: typically "0" and "1". The base-2 numeral system is a
positional notation with a radix of 2. Each digit is referred to as a bit, or
binary digit.
1 = True, Yes, On
0 = False, No, Off
Binary to leters
Ex:
A = 01100001
B = 01000010
C = 01000011
D = 01000100
Space = 00100000

Machine language
Machine code was the language of early programs, written in
the instruction set of the particular machine, often
in binary notation. Assembly languages were soon developed that let the
programmer specify instruction in a text format, (e.g., ADD X, TOTAL),
with abbreviations for each operation code and meaningful names for
specifying addresses. However, because an assembly language is little
more than a different notation for a machine language, any two machines
with different instruction sets also have different assembly languages.

Compiler Languages
High-level languages made the process of developing a program simpler
and more understandable, and less bound to the underlying
hardware. FORTRAN, the first widely used high-level language to have a
functional implementation, came out in 1957 and many other languages
were soon developed—in particular, COBOL aimed at commercial data
processing, and Lisp for computer research.
These compiled languages allow the programmer to write programs in
terms that are syntactically richer, and more capable of abstracting the
code, making it easy to target for varying machine instruction sets via
compilation declarations and heuristics. The first compiler for a
programming language was developed by Grace Hopper. When Hopper
went to work on UNIVAC in 1949, she brought the idea of using compilers
with her. Compilers harness the power of computers to make
programming easier by allowing programmers to specify calculations by
entering a formula using infix notation (e.g., Y = X*2 + 5*X + 9) for
example. FORTRAN, the first widely used high-level language to have a
functional implementation which permitted the abstraction of reusable
blocks of code, came out in 1957 and many other languages were soon
developed—in particular, COBOL aimed at commercial data processing,
and Lisp for computer research. In 1951 Frances E. Holberton developed
the first sort-merge generator, which ran on the UNIVAC I. Another woman
working at UNIVAC, Adele Mildred Koss, developed a program that was a
precursor to report generators. The idea for the creation of COBOL started
in 1959 when Mary K. Hawes, who worked for the Burroughs Corporation,
set up a meeting to discuss creating a common business language. She
invited six people, including Grace Hopper. Hopper was involved in
developing COBOL as a business language and creating "self-
documenting" programming. Hopper's contribution to COBOL was based
on her programming language, called FLOW-MATIC. In 1961, Jean E.
Sammet developed FORMAC and also published Programming Languages:
History and Fundamentals, which went on to be a standard work on
programming languages.

Source Code Entry


Programs were mostly still entered using punched cards or paper tape.
See Computer programming in the punch card era. By the late
1960s, data storage devices and computer terminals became inexpensive
enough that programs could be created by typing directly into the
computers. Frances Holberton created a code to allow keyboard inputs
while she worked at UNIVAC.
Text editors were developed that allowed changes and corrections to be
made much more easily than with punched cards. Sister Mary Kenneth
Keller worked on developing the programming language BASIC while she
was a graduate student at Dartmouth in the 1960s. One of the first object-
oriented programming languages, Smalltalk, was developed by seven
programmers, including Adele Goldberg, in the 1970s.
MODERN PROGRAMMING
Quality requirements
Whatever the approach to development may be, the final program must
satisfy some fundamental properties. The following properties are among
the most important:

 Reliability: how often the results of a program are correct. This


depends on conceptual correctness of algorithms, and minimization of
programming mistakes, such as mistakes in resource management
(e.g., buffer overflows and race conditions) and logic errors (such as
division by zero or off-by-one errors).
 Robustness: how well a program anticipates problems due to errors
(not bugs). This includes situations such as incorrect, inappropriate or
corrupt data, unavailability of needed resources such as memory,
operating system services, and network connections, user error, and
unexpected power outages.
 Usability: the ergonomics of a program: the ease with which a person
can use the program for its intended purpose or in some cases even
unanticipated purposes. Such issues can make or break its success
even regardless of other issues. This involves a wide range of textual,
graphical, and sometimes hardware elements that improve the clarity,
intuitiveness, cohesiveness and completeness of a program's user
interface.
 Portability: the range of computer hardware and operating
system platforms on which the source code of a program can
be compiled/interpreted and run. This depends on differences in the
programming facilities provided by the different platforms, including
hardware and operating system resources, expected behavior of the
hardware and operating system, and availability of platform-specific
compilers (and sometimes libraries) for the language of the source
code.
 Maintainability: the ease with which a program can be modified by its
present or future developers in order to make improvements or to
customize, fix bugs and security holes, or adapt it to new
environments. Good practices during initial development make the
difference in this regard. This quality may not be directly apparent to
the end user but it can significantly affect the fate of a program over
the long term.
 Efficiency/performance: Measure of system resources a program
consumes (processor time, memory space, slow devices such as disks,
network bandwidth and to some extent even user interaction): the
less, the better. This also includes careful management of resources,
for example cleaning up temporary files and eliminating memory leaks.
This is often discussed under the shadow of a chosen programming
language. Although the language certainly affects performance, even
slower languages, such as Python, can execute programs instantly
from a human perspective. Speed, resource usage, and performance
are important for programs that bottleneck the system, but efficient
use of programmer time is also important and is related to cost: more
hardware may be cheaper.

Debugging
Debugging is a very important task in the software development
process since having defects in a program can have significant
consequences for its users. Some languages are more prone to some
kinds of faults because their specification does not require compilers to
perform as much checking as other languages. Use of a static code
analysis tool can help detect some possible problems. Normally the first
step in debugging is to attempt to reproduce the problem. This can be a
non-trivial task, for example as with parallel processes or some unusual
software bugs. Also, specific user environment and usage history can
make it difficult to reproduce the problem.
After the bug is reproduced, the input of the program may need to be
simplified to make it easier to debug. For example, when a bug in a
compiler can make it crash when parsing some large source file, a
simplification of the test case that results in only few lines from the
original source file can be sufficient to reproduce the same crash. Trial-
and-error/divide-and-conquer is needed: the programmer will try to
remove some parts of the original test case and check if the problem still
exists. When debugging the problem in a GUI, the programmer can try to
skip some user interaction from the original problem description and
check if remaining actions are sufficient for bugs to appear. Scripting
and breakpointing is also part of this process.
Debugging is often done with IDEs. Standalone debuggers like GDB are
also used, and these often provide less of a visual environment, usually
using a command line. Some text editors such as Emacs allow GDB to be
invoked through them, to provide a visual environment.

The first known actual bug causing a problem in a computer was a moth,
trapped inside a Harvard mainframe, recorded in a log book entry dated
September 9, 1947. "Bug" was already a common term for a software
defect when this bug was found.
“Programmers”
Computer programmers are those who write computer software. Their
jobs usually involve:

 Prototyping
 Coding
 Debugging
 Documentation
 Integration
 Maintenance
 Requirements analysis
 Software architecture
 Software testing
 Specification

Types of a Programmer
System Programmers
The system programmer installs, customizes, and maintains the
operating system, and also installs or upgrades products that run on
the system.

 CAD Engineer
 System Engineers
 DevOps Developer
 Software Developer

Web Programmers
A web developer is a programmer who engaged in, the development
of World WideWeb applications, or applications that are run over HTTP,
CSS OR HTML from a web server to a web browser.

 Frontend Developer
 Backend Developer
 Full stack web developer

Game Programmers
A game programmer is a programmer who develops codebases for
video games or related software, such as game development tools. Game
programming has many specialized disciplines, all of which fall under the
“game programmer”.

 Game Designer
 Audio Engineer
 Lead-Programmer(Games)
 Animators(Games)
Application Programmers
The application programmer is a programmer who is responsible for
designing and testing program logic, coding programs, program
documentation and preparation of programs for computer operations.

 SDE1
 SDE2
 Software Engineer

TYPES OF COMPUTER PROGRAMMING


MACHINE AND ASSEMBLY LANGUAGES
This is a low-level programming language. It is a group of languages. It
implements a symbolic representation of the machine code.

ALGORITHMIC LANGUAGES
Algorithmic languages are used to design mathematical or symbolic
computations. It is used to express algebraic operations. This is the first
high-level language.

BUSINESS-ORIENTED LANGUAGES
It is a high-level programming language that is used for business
applications. It is used to design the operating system agnostic and in
many business applications today.

EDUCATION-ORIENTED LANGUAGES
There are some Education-oriented languages like BASIC, Pascal, Logo
etc.
SCRIPTING LANGUAGES
A scripting language can be defined as a programming language is used
for integrating and communicating with other programming languages.
JavaScript, VB Script, PHP, Perl are the most used scripting language.

DOCUMENT FORMATTING LANGUAGES


This language is used to specify the organization of printed text and
graphics. This markup describes the intended function of portions of a
document.

DECLARATIVE LANGUAGES
This is very high-level programming languages. It is also known as
the non-procedural programming language.

OBJECT-ORIENTED LANGUAGES
The term object-oriented itself says that it is a computer programming
language that revolves around the concept of an object.

COMPUTER PROGRAMMING LAGUAGES


Python
is an interpreted high-level general-purpose programming language.
Python's design philosophy emphasizes code readability with its notable
use of significant indentation.

Java
is a high-level, class-based, object-oriented programming language
that is designed to have as few implementation dependencies as possible.

Ruby on Rails
is the most popular open-source web application framework. It's
built with the Ruby programming language. You can use Rails to help you
build applications, from simple to complex, there is no limits to what you
can accomplish using Rails!
HTML (HyperText Markup Language)
is the standard markup language for documents designed to be
displayed in a web browser. It can be assisted by technologies such as
Cascading Style Sheets and scripting languages such as JavaScript.

JavaScript
often abbreviated as JS, is a programming language that conforms
to the ECMAScript specification. JavaScript is high-level, often just-in-time
compiled, and multi-paradigm. It has curly-bracket syntax, dynamic
typing, prototype-based object-orientation, and first-class functions.

C Language
is a general-purpose, procedural computer programming language
supporting structured programming, lexical variable scope, and recursion,
with a static type system. By design, C provides constructs that map
efficiently to typical machine instructions.

C++
is a general-purpose programming language created by Bjarne
Stroustrup as an extension of the C programming language, or "C with
Classes".

C#
is a general-purpose, multi-paradigm programming language
encompassing static typing, strong typing, lexically scoped, imperative,
declarative, functional, generic, object-oriented, and component-oriented
programming disciplines.

Objective-C
is a general-purpose, object-oriented programming language that
adds Smalltalk-style messaging to the C programming language. It is one
of two main programming languages supported by Apple for macOS, iOS,
and their respective application programming interfaces, Cocoa and
Cocoa Touch.
PHP (Hypertext Preprocessor)
is a general-purpose scripting language especially suited to web
development. It was originally created by Danish-Canadian programmer
Rasmus Lerdorf in 1994. The PHP reference implementation is now
produced by The PHP Group.

Program Flowchart
A flowchart is a graphical representation of various logical steps of a
program. These expressions use several shapes, including the geometric
ones, to show the step-by-step process with arrows while establishing a
data flow. There are 21 different types of flowcharts, and a programming
flowchart is one of them.

The program flowchart is a data flow that shows the data flow while
writing a program or algorithm. It allows the user to explain the process
quickly as they collaborate with others. These programming flowcharts
also analyze the logic behind the program to process the code of the
programming. The programming flowcharts can serve in different ways.
For example, they can analyze the codes, visualize and work on them.
They can also help figure out the application's structure to realize how a
user navigates in a tool.

The programming flowcharts improve the condition and efficiency of work.


The tool has four basic symbols that have code written on them for
programming. They give commands like start, process, decision, and end,
and these symbols are the crucial part of the programming flowcharts.
They help in forming a relationship between various elements to describe
the data flow.

Benefits and Drawbacks of Programming Flowcharts

To easily understand and analyze a program, flowcharts are handy.


Though the use of programming flowcharts is increasing day-to-day, there
are some advantages and disadvantages of using a flow chart. On
occasions, the designs say that the most common drawback of
programming flowcharts is their complicacy, and hence they are difficult
to create. This hindrance has decreased as there are several online tools
like EdrawMax, making it easier to produce programming flowcharts.

The Benefits of Programming Flowcharts:

 When it comes to understanding programming or a logical structure,


programming flowcharts are the best way of working.
 When a designer is creating a program, there can be certain
loopholes that can hinder the progress. To avoid that, they can
design the app or website with programming flowcharts before
working on them.
 The engineer working on the debugging process can look at the
programming flowchart, making it easier to debug the program.
 For reviewing a program, the designer may need to look at the
programming flowchart.
 They can analyze the program with the help of the logical diagram
of the flowchart and then modify it as per their requirement.
 The engineers can also use flowcharts as a way of documenting
their program correctly.
 As the programming flowcharts work as blueprints, it is time-
efficient while creating a new program or application.

The Drawbacks of Programming Flowcharts:

 When it comes to complex programming, drawing the programming


flowchart can be difficult for designers.
 As there is no standard of using details, the programming flowchart may
confuse the individuals working.
 If the designer is trying to make a pre-existing programming flowchart or
application, they may find it tough to reproduce.
 If an engineer tries to modify a flowchart based on modifying the said
application or website, it can be challenging.

Flowchart Symbols:
For creating a programming flowchart, the user needs programming
flowchart examples. The flowcharts use diagrams to express an algorithm,
and hence flow charts are very helpful in creating and analyzing the
details of a program. The flow charts use some symbols that can explain
the logic of programming connected with the flowchart elements. Here are
some widely-used programming flowchart symbols
 Flow Line: This symbol works as a connector in a programming
flowchart. This line shows the logical flow and relationship among
the various steps or elements of the programming flowchart. The
flow lines run between each step starting from the two terminals to
denote the flow of logic.
 Terminal (Start/ Stop): The terminal symbols present in every
programming flowchart as the process starts with a "start"
command, and a "stop" command shows the end of the whole
process on the flowchart. The example also has both the start and
end symbols represented by a rectangular sign with curved edges to
signify the beginning and end of a programming flowchart
procedure.
 Input/ Output: The commands of Input and Output in operation are
most crucial. To get a logical flow to go through the processing, the
user needs to give input. The system reads the inputs to give an
output. The symbols for inputs and outputs are parallelograms.
 Processing: For a process to complete successfully, the method
must include the function of processing. The processing part occurs
between the input and the output. The rectangle shapes represent
the processing work.
 On-page connector: When there is a need to connect different
flowlines, on-page connectors are present at the junction.
 Off-page connector: The off-page connectors connect different
flowlines when they are present on separate pages.
 Decision: When there is a need to decide between true or false,
this function gets used. The diamond-shaped symbols are useful
when the function is taking a series of decisions to get the result.
 Predefined process/ function: When a group of some statements
performs a predefined work, its representation occurs with this
symbol.
 Document: This symbol denotes the printout or report
Hiring Flowchart:
Here is a programming flowchart that shows the hiring process that starts
with "identifying staffing needs." The flowchart defines the job description,
sending personal requests, which are a part of processing. In the diagram,
several processings works land on the decisions with yes, no answers. For
example, the decision to select suitable candidates continues to a yes and
a no. If the answer is yes, then the process continues with arranging
meetings and then having meetings. For the no answer, the company
needs to look into the other resumes to find another suitable candidate.
The whole flowchart ends with rejection or acceptance of the references
or the candidates.

Project Flowchart:
The process starts and then continues with the concept, which is a part of
processing. There can be two decisions. If it is a yes, then the project
continues with validating the feasibility and creation of documents like
project charter and risk assessment; with the project's continuation, the
document like budget, project plans, communication plan develop. With
the implementation of the project and benefits realization report, the
project gets its "closure." The whole procedure completes with an "end"
terminal.

You might also like