Com Prog 1 MODULES
Com Prog 1 MODULES
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.
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
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.
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.
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.
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.