Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
141 views

Computer Programming Lecture

This document provides an introduction to computing and programming. It discusses: 1. The history of computing from ancient counting tools to modern devices. 2. How technology has enabled advancements in fields like medicine, science, and agriculture. 3. An overview of hardware components like processors, memory, input/output devices and how they work together. 4. The differences between hardware, software, and platforms and how understanding these concepts is important for application development. The document aims to give readers foundational knowledge about computing in order to explore programming languages and development. It emphasizes understanding the roles and classifications of hardware, software, platforms and how they interact.

Uploaded by

Mollique Martin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views

Computer Programming Lecture

This document provides an introduction to computing and programming. It discusses: 1. The history of computing from ancient counting tools to modern devices. 2. How technology has enabled advancements in fields like medicine, science, and agriculture. 3. An overview of hardware components like processors, memory, input/output devices and how they work together. 4. The differences between hardware, software, and platforms and how understanding these concepts is important for application development. The document aims to give readers foundational knowledge about computing in order to explore programming languages and development. It emphasizes understanding the roles and classifications of hardware, software, platforms and how they interact.

Uploaded by

Mollique Martin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

“The future is always beginning now.


-Mark Strand.
Have you ever wondered about the ever-growing world? Have you been fascinated by the
massive field of Technology? This introductory module wil give you insights in the diversities
in the field of Computing and
Programming. We will explore the different paradigms in Sothvare Development and engage
you to concepts that will enable you to study, utilize and master any programming language you
will like in the future.
At the end of this module, you will be able to:
1. Identify the events that led to the development of computing and programming
2. Differentiate hardware, software and development
3. Identify the domains of computer development
4. Identify the features and developers of the infamous programming languages
Researching beyond the coverage of this module is highly encouraged to supplement your understanding of the topics
covered. Always, think and see beyond the box.
So, what are we waiting for? Let us now explore the world of Computer Programming.

Computers have a long history of progress from the creation of the Chinese-tool abacus at around 3,000 B.C. to the
current generations of gaming and enterprise peripherals that powers massive data centers and cloud servers. Handheld
devices are also now a necessity for modern life. Even Nano-scaled machineries and chips made its way to the market as
computer devices shrink in size throughout the years. What we then call a storage device the size of a refrigerator is now
just the size of a wallet. These amazing evolutions in technology leads the life of modern man.
Each year, papers about advancements in Physics, Medical Sciences, Agriculture and other sciences make their way to
publications and journals. These advancements are made possible because of technology. Stem-cell research, oncology,
artificial intelligence and hydroponics are some of the studies that were made possible using technology.
People cannot live without technology. Imagine a world without computers. Therefore, no televisions, mobile phones,
radios or anything which relies on electricity and circuits. Can you live a life of ease? People have become dependent on
technology. They cannot live with it

Now the question is what drives technology to prosper to have what we have now and will probably have soon? Is it our
demand to automate basically everything around us? Is it our need to communicate with one another? Is it our need to
entertain ourselves while being physically away from everything that can distract us including people? Is it our need to
solve problems that time proven difficult to solve?Nowadays these questions are a chicken-and-egg situation. The
questions are moot. It does not matter anymore what the answer is. We need technology, we all love it.
Hardware, Software, Development?!
When we talk about computers, we all deal with hardware, software, development and other jargons we probably do
not know how to answer if asked. It is sometimes confusing when people ask us about these things and all we have for
them are what we can observe in our environment. You have a mouse; that is a hardware. You have a copy of Microsoft
Office;that is a software. All but that. It is imperative that we settle these things and have a strong grasp on classifying
not only peripherals as hardware and application as software, but also which are peripherals, applications or utilities.
This knowledge will be our entry point to Computing and Programming.

In addition, equipping you with this knowledge will make you create critical decisions when you are about to develop an
application. Will you need to support x64 version of Microsoft Windows? Will you need to setup a port of your
application to support Macintosh? These and many more questions will be factored in once you know about your target
platform. A platform is any device on which an application was specially designed to run. A platform can be a personal
computer running Windows. It can also be a personal computer running Linux. Typically, when we speak of a platform,
we usually refer to a specific device running a specific operating system.

Hardware
Since you are taking this course in computing, you probably know already about the basic parts of computer. We
categorize those parts of computer into input-process-output-storage(IPOS). You need to know about the categorization
to better classify the parts of the computer which you will use in developing an application. You will use at least one
input device, one process device, one output and one storage device when running your application. This will let the
user be immersed in fully experiencing the capabilities of your application.
Input devices are the parts of the computer which allows the user to provide signals and information to the processor.
This includes the mouse, keyboard, scanners and sensors. The mouse is the part of the computer which allows the user
to easily navigate within an application. The keyboard is the part of the computer which allows the user to enter textual
values in applications. The scanner is the part of the computer which takes digital copies of any prints, usually texts and
images printed on a bond paper. The sensors are specialized devices attached or embedded in a computer to take
different information. We have fingerprint sensor to take fingerprint samples and optical sensor to take images of our
iris, microphone to take audio samples, and camera to take images.
Biometric sensors are sensors which takes biometric samples like our voices, fingerprints, iris scans and facial samples.
Included in this category are the fingerprint sensors and optical sensors. These are typically used in information security
to protect sensitive information or safeguard objects.

Process devices, processors as we call them, are the parts of the computers which performs massive calculations on our
entered data through the input devices. They maintain the central functions of the computer. We are all familiar with
the main part of the computer under this category - the central processing unit or CPU as we call it. The CPU oversees to
fully integrate all parts of the computers under all categories. It is also in charge of carrying out instructions sent by the
running applications. Because of its massive capabilities and functions, this part is called the brain of the computer by
which losing this will render the entire computer useless. Included also in this category is the part of the computer which
processes the graphical outputs - the graphics processing unit or GPU. The GPU enhances the capabilities of the CPU by
rendering graphical information to the output devices.
There is a common misconception with the term central processing unit What non-computer literate persons call the
CPU is the casing that houses the motherboard and its peripherals including the actual CPU, or the casing including the
peripherals within. However, the actual CPU is the small square chip found in the center of the motherboard housed by
a cooling unit that maintains optimal thermal condition for the CPU.

Output devices are the parts of the computer which presents intellectual displays to the user, both digital and in print
The monitor and printer belong in this category. The monitor displays the visual information processed by the CPU. The
GPU is often utilized as well to present displays in the monitor. The monitor can be installed as part of the computer, like
the case in laptops

and netbooks, or an external unit, like the case in Personal Computers and Mac. The printer converts the digital
information from the CPU and renders them on a physical object The typical printer and 3D printers are some examples
of printers. The main difference between the two is where the information is rendered; in a typical printer, the
information is rendered on a bond paper, whereas in a 3D printer, the information is rendered as a 3D object Cool,
right?

Storage devices are the parts of the computer which stores data and information for later use. These data and
information can be stored permanent or temporary. Included in this category are the hard drives, flash drives (or pen
drives) and the random-access memory (RAM). Hard drives and flash drives provide permanent storage. Hard drives
contain a specialized disk which is utilized as a by-fragment storage where data and information are stored in a sector of
the disk By-fragment means that the data and information stored in a hard drive are distributed in separate sectors. A
flash drive does not contain any disk component, but rather has a chip called flash memory. Since there is no physical
disk where the data will be stored or retrieved, flash drives run faster than hard drives. The RAM is the component
found in the motherboard that provides temporary storage for the CPU while the CPU processes instructions of different
applications. Think of the RAM as coin purse where you place coins of different sizes for future yet immediate use. In this
analogy, the coins are used within the day they are stored.
Familiarizing yourself with the different categories of the parts of computers and which parts belong to which category
will help you with determining in the future what libraries you will use. Libraries will be taught in these coming weeks.

Software
The computer is not only composed of the hardware parts. Though when we refer to the computer, we usually refer to
its hardware parts, without its software counterpart, the computer is just a pile of electrical circuits. Software are the in
of the computer. They make the computer useful since the software is the reason why the computer does what it does.
People usually misunderstands software and application since they are used interchangeably in daily conversation.
However, you will find out that this is not the case regardless of how true the previous statement is.

The software is just a classification of all the intangible programmed components of the computer. In this group, we
have operating systems, firmwares, applications and utilities.
The operating system is environment that have the capability to run firmwares, applications and utilities to run. These
kinds of software have the direct access to the hardware components. Computers usually run only one operating
system. Microsoft Windows, Macintosh and Linux belong to this category.
It is possible for computers to run more than one operating systems through two methods. Dual Boot enables a
computer to run two different operating system by configuring the master boot sector of the BIOS. Virtualization
enables the user to run multiple operating systems within a parent operating system.

Firmwares are small-sized software that enables the different hardware components of the computer communicate with
each other. Think of these kind of software as translators. Each hardware has its own "language" that the operating
system does not know how to interpret. Firmwares enable the operating system to recognize the hardware components
and assign appropriate resources to fully utilize the capabilities of the hardware. Drivers can be classified under
firmwares.
When we talk about software, we usually mean an application. Applications are software that perform specific tasks for
the user. The term application is still a diverse classification of different specialized software categorized by the general
tasks they perform. Included in this classification are the word processing applications like Microsoft Word and
OpenOffice Writer, spreadsheet applications like Microsoft Excel and OpenOffice Spreadsheet, multimedia applications,
databases, and office productivity applications.

Utilities are small-sized application usually kilobytes to some megabytes in file size. These perform small-time tasks for
the user such as taking notes, setting an alarm, connecting to networks and retrieving specific information about the
computer. These kinds of software are directly tied to the operating system and usually comes as part of the operating
system.
You may learn more about hardware and software in any course about Computer Fundamentals.

Development
You probably enrolled in this course without knowing the difference between development and programming. There is a
subtle difference which people, even IT practitioners tend to disregard in their profession.
Computer Programming is the act of writing codes that the computer can run using a specific programming languages.
This may or may not include the compiling or interpreting process. Characteristically, programming is geared towards a
specific task such as calculating the Gaussian difference of pixels. The end products of programming are source codes
and executables. Source codes are files which contains the codes written in a programming language. They have the file
extensions of their respective programming language. Source codes written in Python have the file extension of .py; all
variants of C language use the file extension C. You may refer to the Table 1 for the complete listing of the common
programming languages.

Executables are the run able versions of the source codes. They are only available to all compiled programming
languages. Windows executables have the file extension of .exe like cmd.exe, while Linux executables typically does not
use any file extensions like update-grub.

Computer Development refers writing, building and deploying software under a domain. Domains under Computer
Development includes, but is not limited to, Web Development, Desktop Application Development and Mobile
Application Development. Computer Development is accompanied by Software Development Lifecycle, or commonly
referred to as SDLC. SDLC is a set of systematic routine in planning to maintenance of software applications. Computer
Development may utilize more than one programming language and a few frameworks.
The main difference between programming and development is their coverage. Programming normally involves small-
scale applications or modules, whereas development involves medium- to enterprise-scale applications. Computer
Development internally includes programming on the process, hence the former covers the latter.

Domains of Computer Development


Since we have talked about Computer Development, you also need to know about the different domains in Computer
Development Knowledge about the different domains of Computer Development shall open the doors for you to have
an initial idea of the paths you can take in your chosen academic program. Not only will you know the difference
between each domain, but you will also have grasp on what encompasses them through their covered platforms.
Web Development
Let us start with the most used domain, Web Development Web Development utilizes the internet, particularly the
World Wide Web. The World Wide Web (WWW) is a subset in the internet where documents are relating to other
documents using hypertext links. These documents can come in form of file documents, media files, markup language
documents, script files and others.
The most common of which is the Hypertext Markup Language, or HTML. HTML presents a simple information system
where the user browses for specific topics. They are accompanied by some scripting languages including JavaScript and
VBScripts. They are designed using Cascading Stylesheet, or CSS. However, HTML are static files which does nothing but
present information in form of texts and media.

To create dynamic versions of HTML, we have Front-end Web Development and Back-end Web Development Front-end
Web Development focuses on using client-side scripts to create interactive and dynamic user interface. The most
common front-end web development scripting language is the JavaScript through several JavaScript frameworks like
ReactJS and AngularJS. Back-end Web Development focuses on using server-side scripts which run on the hosting server.
These scripts provide database integration and file system management capabilities that cannot run on the user's
computer without compromising security. Some programming languages under back-end development are ASP.NET,
PHP, Ruby on Rails (RoR) and Java Server Pages (JSP).
The advantage of Web Development over other domains is its flexibility. Since majority of the platform can access the
internet, in turn, they can also access the by-product of Web Development It is platform-independent hence the "code
once, run all" ideal is applicable to this domain.

There exists a hybrid between Front-end Web Development and Back-end Web Development called Full-Stack
Development This hybrid domain covers both the front-end "stack" and the back-end "stack" of Web Development
mastering both the vast client-side script frameworks and diverse server-side scripts.
Back-end Development
Back-end Development deals with server configurations. A server is a specialized computer system that is oriented to
serve a lot of services to different client computers. A client computer can be your personal computer. Those scripts are
operating system-specific which instructs the server to perform a series of interconnected actions such as starting a
specific service, or even remotely shutting down client computers.
Microsoft Windows uses PowerShell scripts for Back-end Development. PowerShell is malleable enough to run even on a
client computer. PowerShell considers the access level of the current user. It also takes advantage of Active Directory, or
AD. AD is a service that provides server-controlled directory for Microsoft Windows domain networks.

Linux uses bash scripts. A bash script is a small script that uses the built-in terminal commands. Linux is well-known for
being programmer friendly since everything including the kernel is accessible to the user. A lot of configurations and
customizations are available. This makes it flexible for bash scripts to utilize and even exploit.
The advantage of Back-end Development over other domains is its direct access to the running operating system.
Though platform-dependent, scripts written for this can-do tasks that is available to the operating system with the least
restriction.

Mobile Development
Mobile Development is the blooming domain of Computer Development. This domain deals with the growing number of
smart devices which includes mobile phones, smart televisions and wears.Per Statista, a company that conducts
enterprise statistical study using open data and enterprise espionage, there will be about 2.32 billion smartphone users
worldwide in 2017, and about 2.87 billion in 2020. Considering this number of smartphone users alone, the
marketability of mobile application is totally open-entry. Mobile Development is normallyplatform-dependent meaning
your developed mobile application will only run on a specific range of smart devices.
For Android devices, we have Android Framework using Java as the base programming language. This includes
smartphones, car smart devices, smart TVs running Android-base operating system, and Android wears. For iOS devices,
we have xcode and Objective-C. This includes all variants of iOS devices including Apple wears.

Though normally platform-dependent, due to the high demand of porting, there have been a multi-platform versions of
development environment for mobile development. The big name for this is mono develop which is a framework that
works on all well-known platforms like Microsoft's, Apple's and Linux's desktop, mobile, and wearable devices. To easily
integrate mono develop in writing codes, Xamarinis also big name to consider. Xamarin is an integrated development
environment (IDE) which houses mono develop as its base framework
Data Science
Going away from the typical development domains, Data Science deals on presenting data in a user-understandable
manner. This includes charts, nodes and maps. This domain aims to present data in which the user can

dynamically change the perspective like from local business perspective to worldwide coverage.This domain is typically
not open source so looking for a place to start on your own without any enterprise support is virtually difficult
Under this domain we have Tableau and Salesforce Wave to name some environments.
Application Development
The bread to the crumbs of this entire course is Application Development. This domain deals with the creation of various
applications for desktop and server computers. Though we are talking about applications for desktop and server
computer, we are not limited to local connectivity between them. We are also talking about the involvement of the
internet to provide various services to other users.Under this domain we have Desktop Application Development, Game
Development and Cloud Application Development.
Desktop Application Development deals with the creation of discrete applications for desktop computers. This
subdomain has a lot of categorization based on their general use like word processing, spreadsheet and multimedia as
mentioned in the previous topics. Programming languages

used in this subdomain varies depending on the target interface - Graphical User Interface (GUI) and Command-line User
Interface (CLI).
GUI Desktop Applications present the users with easy to navigate and manipulate controls for convenience since they
support keyboard and mouse interactions. Programming languages used under this subdomain include, but is not
limited to C++, C# (read as C Sharp) and VB.NET. CLI Desktop Applications present the user with stream-line experience.
Clear majority of CLI Desktop Applications only support keyboard interactions which gives the users all the flexibility
he/she needs to control the actions of the application continually. Programming languages used under this subdomain
include, but is not limited to, C, C++ (read as C plus plus), C#, VB.NET, Python and Ruby.
Game Development deals with the creation of computer games as means of entertainment and sometimes education.
This subdomain deals heavily with the integration of various scripts to manipulate objects called models and sprites.
Given its extensive coverage, Game Development usually involves more than one person - the developer, the model
artist, the sprites artist and the sound artist. Programming languages used in this subdomain include, but is not limited
to, C++ and C#.

Cloud Application Development deals the hybrid between Web Development and Desktop Application Development.
This subdomain breaks the barrier between the interaction with the web application and the server and clients running
instances of the web application. With a click of a button in the web application, the server can execute local tasks such
as turning on a client computer connected to it, scheduling shutdown timeout for a running service, and automate
various service calls. Programming languages used in this subdomain include, but is not limited to, JavaScript, PHP,
ASP.NET and C4*.
The advantage of Application Development over the other domains is the utilization of a computer's resources to
perform process-heavy tasks and calculations.

API Development
Application Program Interface Development, or referred easily to as API Development, deals with the creation of
libraries and modules to help developers create applications that can interact with a specific application created by
other developers. This breaks the barrier of using the existing utilities of a well-known application to expand the
capabilities of an application being developed. To make this clearer, APIs are used to reuse services from web
applications like the social media giant Facebook and the search engine giant Google. API developers create a linkage for
their

applications for other to exploit like using Google API to login in your application using your Google account, or
Facebook API to automatically post pictures to your Facebook timeline directly from your created camera application.
This domain is developer-friendly and is geared towards developers. Think of this as a module or library created by
developers for developers. Programming languages used in this domain vary on the base programming language of the
hosting application. However, heavy knowledge in JavaScript Object Notation (JSON, read as Jay-son) and Extensive
Markup Language (XML, read as ex-em-el). The advantage of API Development over the other domains is its being
developer-friendly and capability to exploit existing services of running applications.

Embedded Systems Development


The last domain under Computer Development is the Embedded Systems Development Embedded Systems
Development deals with programming instructions to readily-made hardware components, typically a microcontroller.
Developing firmwares can be considered as part of this domain since firmwares are developed for hardware
components. This domain is continually growing since a lot of major companies and startups are moving towards the
Cloud and Internet of Things (IoT). The Internet of Things is a network of interconnected embedded systems through the
internet This includes basic analysis of data coming from different sensors to advanced tracking of various sentries to
create viable predictions.
This domain is probably the most interactive among the rest since not only are you dealing with the software side of the
development, but you will also be engaging in the hardware aspects of the development In addition, a lot of automation
can be done through Embedded Systems Development. Familiar with Home Automation, Automotive Automation and
Industrial Automation? They are all made possible thanks to Embedded Systems Development The programming
languages used primarily in this domain are C, C++, C# and Java.

Infamous Programming and Scripting Languages


Since you are now familiar with the different domains of Computer Development, let us now talk about the specific
programming and scripting languages used across those domains. We are going to talk about the top and commonly
used programming languages in the Open Source community.

The data that will be presented from this point came from GitHub - the top open source repository in the IT industry as
of 2017.
JavaScript
JavaScript is a scripting language used for Web Development. It was first introduced by Brendan Eich in 1995 as an
attempt to add interactive user experience to static web pages in the Netscape Navigator browser. His attempt paved
the way to modern web applications where modules within the application can directly interact with each other without
requiring the page to reload for every action committed.

JavaScript is datatype independent, meaning you can insert any value of varying datatypes to its variables. There exists
no restriction in the usage of its variables hence its flexibility. Though many would argue that such thing presents
problematic consequences, this shortcoming was overcome by JavaScript because of its being lightweight having no
resource checking for its variables. Some developers impose naming convention for JavaScript to exploit its variant
datatype.

Because of the cleverness that JavaScript displayed during its time, various demands for adaptation have risen. Ecma
International Organization presented a standardization of Netscape JavaScript for other browsers which was called the
ECMAScript.
Since 2000, JavaScript has been seen to have dominance over other languages present especially in Web Development.
Until now, JavaScript holds the Top 1 place in language usedat GitHub for 2016.
JavaScript the scripting language is not, in any way, related to Java the programming language. When JavaScript was
created in 1995, Java is already the most used programming language for client-side applications. This famous scripting
language was named JavaScript to capture the same success that Java has during those times.

Java
Java is a programming language developed by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike
Sheridan at Sun Microsystems in 1991. During this time, the internet and the World Wide Web have made its way to
conventional market where static web pages were used to present various information to their users. Java was the
successful attempt to bring dynamic forms in web pages.

Java was originally designed with a simple idea in mind - to create a portable platform capable of running under different
operating systems - which was promoted by their original slogan 'Write once, run anywhere".
Suns Microsystem's original slogan is 'Write once, run anywhere". However due to the different issues that surrounds
Suns Java platform, which eventually refuted their claim of portability, Suns riposted "Write once, debug everywhere".
Now, Java has made its way to different platforms including the original World Wide Web, enterprise solutions, mobile
devices and smart devices. Java ranked as Top 2 in the most used language in GitHub as of 2016.

Python
Python is the first interpreted programming language covered in this module. Python was designed by Guido van
Rossum at Python Software Foundation in 1991. It was designed with the idea of readability focusing on whitespace
indentation to definecode blocks, going against well-known programming languages like C and C++ that use curly
brackets.

Because of the extensive library that Python has, it is generally used in machine learning algorithms and application
development Several extensions have been created for Python to extend its features including the ability to create
graphical user interface.By far, Python ranks as the Top 3 most used language in GitHub as of 2016.
Ruby is another interpreted programming language alongside Python.Ruby was designed and developed by Yukihiro
"Matz" Matsomoto in 1990 and was publicly released in 1995. Ruby is completely open source. Developers not only
receive free use of Ruby in their development, but also they have the right to copy, modify and distribute any part of
Ruby as they like provided they keep it free-of-charge.
The idealization behind Ruby is "a scripting language that was more powerful than Perl, and more object-oriented than
Python," as said by Matsomoto in "An Interview with the Creator of Ruby" in the late 2001. Ruby sports its characteristic
as a flexible language allowing the users to alter any of its part Unfortunately, Ruby is known to feature a single
inheritance so classes made cannot have more than one parent
But even though this small shortcoming, Ruby has a lot of implementations including Ruby on Rails framework made for
Web Development

PHP
PHP is a server-side programming language written for Web Development. It was designed by Rasmus Lerdorf and
developed together with The PHP Development Team of Zend Technologies in 1994. The abbreviation PHP originally
meant Personal Home Page, but was changed to PHP Hypertext Preprocessor.

PHP is an easy-to-use programming language in Web Development. It easily creates dynamic pages ideal for time-
constrained development It also supports dynamically and programmatically generated images. In addition, PHP has vast
number of functions that include file interactions, uploading files, sessions and cookies, and remote file handling. PHP
remained Top 5 of the most used language in GitHub as of 2016.
C++
C++ is a general-purpose high-level lightweight programming language mainly used for Application Development C++
was designed by Bjarne Stroustrup in 1979. It can be called an extension of C programming language equipped with
object-oriented development paradigm, which was originally called C with Classes. C++ became its name in 1983 when
the original C with Classes programming language was added with derived classes, strict data typing, inlining and default
parameters. The "++" in its name served as an indicator that C++ is the successor of the original C programming
language.

C++ still uses pointers and references which are originally available to C. In addition, a lot of code optimization is present
in C++ which kicks in during the compiling stage of the source code. Also, C++ supports both imperative paradigm and
object-oriented paradigm.

The person credited for naming C++ as such is Rick Mascitti. He intended to use "++", an operator in the original C
programming language that means 41", in the naming. His thoughts are that C++ is the newer version of C.
C#
C# is one of the programming languages that is both imperative and object-oriented. Released by Anders Hejlsberg's
team in 2000, Ot is well-known programming language versatile for Application Development, Web Development and
Game Development. It is also now conquering the domain of Mobile Development through Xamarin, to name one.

C# made its first appearance in Microsoft's Visual Studio.NET 2002. Its name was a wordplay like C++, wherein the "#"
indicates further increment of the value of C++; "tt" is four (4) plus "+" signs.
Go
Go, sometimes referred to as golang, is an open source programming language created at Google by Robert Griesemer,
Ken Thompson and Rob Pike in 2007. Go is a compiled programming language having the same syntax as C. Go has been
made a public open source project in 2009.

Go is ideal for Web Development and Application Development. Go sports its concurrency, ease-of-use, fast compilation,
extensive security and efficiency features. Go also sports its HTTP/2 Server Push which is more secure and efficient that
the previous versions HTTP/1.
Go programming language is currently growing in number usage which currently stands at Top 10 most used languages
in GitHub. GitHub is seeing a 93% growth in the number of pushes in their repositories.
Shell
Shell is a language for Linux operating system which is run in the terminal of the system. Shell is a CLI language capable
of extending the running services by committing timely executed commands in the terminal. There are a few versions of
Shell including, but is not limited to, the Bourne Again Shell (or bash), the C Shell (or csh), the remote shell (or rsh), the
Korn Shell (or ksh) and the secure shell for SSL telnet connections (or ssh).

Shell is used primarily by Linux Administrators and Network Administrators to manage the instances of Linux distros over
an enterprise architecture. Shell ranks Top 11 in GitHub's most used languages as of 2016.
Objective-C
Objective-C is another variant of the original C programming language with a new twist, addition of Smalltalk-style
message passing between processes. It was designed by Tom Love and Brad Cox in 1980.
Objective-C is an object-oriented programming language like C++ however it sticks to adopting the ideologies of the
original C language. Objective-C ranks Top 12 of the most used languages in GitHub for the year 2016.

Objective-C is used by Apple as the main programming language that compiled to OS X and iOS operating systems, and
Cocoa and Cocoa Touch APIs.

Abacus: A simple non-electrical device used for calculating values using beads.
Central Processing Unit (CPU): a processor that carries out the instructions of an application. Client-side [scripts]: scripts
that run in the user's web browser which provides interactive user experience. Concurrency [programming]: a feature in
programming languages which allows to run several tasks simultaneously without any dependency in the number of
processors. Development: act of writing, building and deploying applications which may involve more than one
computer programming language. Extensive Markup Language (XML): a specially crafted message digest to deliver data
between to different applications regardless of platform using Markup Language (using user-defined markup tags like
those used by HTML). Flash drives: a storage device that utilizes the use of flash memory to store permanent data and
information. Graphics Processing Unit (GPU): a processor that enhances the capabilities of the central processing unit
through rendering graphical information.

Hard drives: a storage device that utilizes the use of disks to store permanent data and information. Hardware: an
electrical component of any computer built with circuits. Internet of Things (IoT): a network of internet-connected
devices, vehicles, establishments and other embedded systems. Input [devices]: parts of a computer that takes data for
the computer to process.

JavaScript Object Notation (JSON): a specially crafted light-weight message digest to deliver data between to different
applications regardless of platform using JavaScript notation (using curly brackets). Microcontroller: a small credit card-
sized programmable computer using integrated circuits that has input and output pins for general-use. Output [devices]:
parts of the computer that displays information to the users.
Platform: any Personal Computer, Macintosh, Android Wear or other devices where an application can run. Port [of an
application]: a specialized version of an application designed for a specific platform which originally not supported.
Porting: act of rewriting existing working codes of a specific platform to support other platforms which is not supported
by the current codes. Process [devices]: parts of the computer that performs calculations which then are presented to
the users as intellectual information. Programming: act of writing codes using a specific computer programming
language. Server-side [scripts]: scripts that run in the hosting server which provides database integration and heavy data
crunching.

Software: any intangible computer file or group of files that performs tasks and computations collectively. Storage
[devices]: parts of the computer that stores temporary and/or permanent information. Variant [datatype]: a datatype
that does not restrict the kind of values stored to the variables.
"Creativity is the process of having original ideas that have value. It is a process; it's not random."
-Ken Robinson.
Have you encountered challenges before? How did you solve it? Were you successful in overcoming those challenges? If
not, do you attribute your failure in your lack of planning and visualization of the situation? Those questions are our
focus for these two consecutive modules about Problem Solving through Flowcharts.
In this first of the two-part modules, you will learn about the art of problem solving, particularly in Computer
Programming. To aid you with the conceptualization of your soon-to-be instructions that you will command the
computer to do, you will create a visual aid called flowcharts. In addition to that, you will be exposed to the Research-
standard syntax called Pseudocodes.
At the end of this module, you will be able to: 1. Identify the characteristics of problem solving in computer
programming 2. Identify and describe the symbols in flowcharting 3. Identify the conventions in pseudocodes 4.
Organize a day-to-day process using flowcharts and pseudocodes 5. Deduce the benefits and shortcomings of flowcharts
and pseudocodes
Again, researching beyond the coverage of this module is highly encouraged to supplement your understanding of the
topics covered. And as always, think and see beyond the box.
So, what are we waiting for? Let us continue our explorationof the world of Computer Programming.
In the previous module, we talked about the field of Computing and Programming in general. We also enumerated the
domains under Computer Development, namely: a. Web Development b. Back-end Development c. Mobile
Development d. Data Science e. Application Development f. API Development, and g. Embedded Systems Development
Lastly, we went through an overview of the infamous programming languages as of 2016: a. JavaScript b. Java c. Python
d. Ruby e. PHP f. C++ g. C# h. Go i. Shell j. Objective-C
Problem Solving is defined as the systematic approach in searching for a solution or set of solutions to a specific
problem. This approach can be in any form such as by listing the possible options and choosing the most efficient of
them, providing weights to all possible scenarios and choosing the most significant scenario, or applying small-scale to
massive calculations to incorporate values to challenges and optimally solve those smaller challenges to complete the
main problem. With addition of several other characteristics, in the context of Computer Science, this can be called
algorithms.
In this module, we will be taking the concept of Problem Solving in the context of Computer Programming; how to come
up with the right solution to a given problem.
Problem Solving is the most essential skill that anyone venturing the field of Computer Programming needs. It basically
says whether a specific challenge is worth solving given a finite time. However, what makes problem solving in Computer
Programming different from the conventional problem solving are the characteristic that a solution to the problem
should have met. Problem Solving in Computer Programming should satisfy the following characteristics:
1. Solvable 2. Goal-oriented 3. Verifiable 4. Quantifiable 5. Doable in finite steps 6. Doable in current technological
limitations
Problem solving in Computer Programming requires the problem to be solvable. This characteristic might seem to be an
obvious requirement, but is tend to be overlooked in several ways. A famous quote from a 2009 American comedy-
drama film "Up in the Air" says "It's only a problem, if it has a solution." This presents one aspect of solvable that focuses
on the problem -there should exist at least one probable solution. It is unthinkable to process problems that pose no
direct solutions. It is like playing NBA-sized basketball with tigers. That situation is designed for humans-only convention,
whereas the subjects involved cannot in anyway be altered to satisfy the need of the situation in this very moment.
Problem solving also requires the problem to be goal-oriented. A goal focuses the solutions to meet a specific one-path
ending. Setting a goal to the problem-at-hand lets you identify several approaches and solutions. It also set a few
limitations to which possible solutions are subjected to determine accept-reject criteria.
Problem solving also requires the problem to be verifiable. It is impractical to provide solutions for problems where you
cannot even verify the validity of your solutions. In addition, there is also the need to certify that there exist manyother
criteria to make the solution fail and succeed. For example, we can have a slot machine that accepts only 5-peso and 1-
peso coins be subjected to tests wherein you can attempt to insert 10-peso, 5-peso, 1-peso and 5-cent coins into the slot
machine. The slot machine should then reject
the 10-peso and 5-cent coins in some defined way but accept the 5-peso and 1-peso coins.
Problem solving also requires the problem to be quantifiable. It is unworkable in Computer Programming if the problem
cannot be quantified in any scale possible. For instance, we have a problem which is about determining the acceptance
rating of a proposed Thesis title. This problem can be solved through Computer Programming provided a qualifying
criterion is provided. However, if tasked to provide solution for a problem to classify which of the given inputs is fake
and which is real.
Problem solving also requires the solution to be doable in a finite number of steps. We live in a world of limited
resources. One of those resources concerned in Computer Programming is time. It is highly impractical to provide a
solution that takes a million of hours to complete. In addition to time, computers have a limited amount of allocated
resources, namely: RAM, storage and processing power. Maxing out these resources just for a solution is not only
impractical but also useless.
Lastly, problem solving also requires the problem and solution to be doable within the limits of the current technology.
In computer programming, we simply reuse the resources currently at hand. Relying on other resources that either does
not yet exist or is impossible to get our hands on is proven to be unintelligible. We do not concern ourselves with what
will probably be available in the future since Computer Programming aims for practicality over theory. We have
Computer Science for those regards.
Flowcharts Essentials
Now that we have a set of characteristics which we can use to determine the viability of problems and possible solutions
in terms of Computer Programming, we now should be able to present our solution in a visual format called flowchart.
Flowchart is a visual aid showing a sequence of actions or operations involved in Computer Programming. Flowchart
helps computer programmers in visualizing their thought solution which helps them visually relay their low-level solution
and helps to identify key aspects of the solution which can pose problems given a specific combination of inputs and
outputs. Figure 1 shows a sample of a flowchart which illustrates the process of going to school using one of the two
transportation systems available, the bus and the subway.
The flowchart in Figure 1 shows almost all the fundamental elements used in flowcharting. That flowchart solves the
problem of going to school by choosing an appropriate transportation system based on time.
Let us go through the process in the flowchart. The flowchart starts with the student leaving home. After leaving, the
student needs to choose the best transportation system he will take to arrive at his school.
Based on the given flowchart, we can assume that there is a heavy buildup of traffic past 7AM. It is therefore a better
choice to take the subway if the time is past 7AM.
The student then needs to check the time whether it is already past 7 AM. If not, he can still choose bus as his
transportation vehicle. If it is already past 7 AM, he needs to take the subway to arrive at school on time. After taking
the best transportation system, the flowcharts end with the student arriving at school on time.
You might have noticed that the flowchart uses two distinct symbols for checking the time and deciding what action to
do. This is essential in Computer Programming. You need to learn how to identify distinct actions. The act of checking
the time is totally different from deciding which action to do. Although it is tempting to simply combine the two actions,
the computer will still read them as two distinct actions. Hence as a promising computer programmer, you need to be
able to personally identify such easily missed distinctions and act accordingly as how the computer will interpret those
instructions. Knowing this will not only make your codes easy to read, but also optimize your codes.
Symbols used in Flowcharts Flowcharts use a defined set of symbols to represent a specific action performed. Those
symbols are used like how you will use Lego bricks to build something. In Computer Programming, those symbols are
combined in a specific manner to build an application, for example. One thing to note for the symbols is like a set of Lego
bricks, symbols should be used in a manner that fits the requirements of the solution to create a logical flow of actions
(i.e. instructions for the computer).
The symbols in Table 1 are connected by a line with one and only one arrow head, usually called arrow. In Mathematics,
this is a ray with no suggestive prominent endpoint. The arrow head determines the flow of the process, where next
symbol to read is.
Figure 2 shows the progression of symbols using the arrow. In the figure, Process 2 is executed first before Process 1
despite their naming. The arrow is the sole indicator of the progress.
Figure 3 shows a more complex progression using arrows. In this figure, Process 1 is executed first, followed by Process
2, then Process 3. In Process 3, the arrow points to Process 4 which is pointed back to Process 1. This specific example is
a non-terminating process which should be avoided in actual programming design.
Standards in Flowcharting
Now that you know the different symbols used in creating your flowcharts, you need to adhere to the standards used in
writing flowcharts. In this section, you will learn the different standards in flowcharts which should aid you also in
writing your codes in the future. These standards were set not to limit you with the usage of the symbols, but to give
you freedom in setting your logic for writing computer instructions through computer programming.
Flowcharts should always have two (2) and only two terminator symbols, namely the Start terminator and the End
terminator. The Start terminator always starts the entire flowchart sequence. It should always be the first symbol found
at the top-most of all flowcharts. If the flowchart sequence is multi-paged, the Start terminator is found at the first page.
The End terminator always ends the entire flowchart sequence. It should always be the last symbol found at the bottom-
most of all flowcharts. If the flowchart is multi-paged, the End terminator is found at the last page.
Decision symbols always have two (2) possible scenarios, the YES and NO. Since the Decision symbol contains a specific
condition, that condition should always be answerable by YES or a NO. If the condition is not answerable by a YES or a
NO, the condition should be rephrased to adhere to standard regardless of the number of nested Decision symbols to be
made. This is the case for the Decision symbol since the computer can only process one
condition at a time. For example, if you asked "which color did the user pick?", the computer will process that with a
series of question like "Is it Blue?", "Is it Red?", and so on. The computer will not directly check for the answer like "The
user definitely chose Red" without checking for the rest of the possible answers.
Flowchart symbols can have any number of in-going arrows. Since most symbols can start from any of the other
symbols, it is logically accurate to allow any number of in-going arrows. However, there is only one (1) symbol that does
not allow any in-going arrow - the Start terminator. The Start terminator marks the start of the entire flowchart;
therefore, there is no logical reasoning to connect other symbols to the Start terminator. Should there be a need to
restart the entire flow, the symbol should connect to the symbol with an in-going arrow from the Start terminator.
Flowcharts are written from top to bottom. With the Start terminator at the top, the next symbols should be placed
below the Start terminator, and the next below the previous symbol. There exist some symbols beside a symbol, which
is the case for the Decision, On-page Connector and Off-page Connector symbols.
Flowcharts should not have any out-going arrow pointed upwards. This is for creating a seamless flow process. For
complex flowcharts supporting upward out-going arrows, determining the connection between the symbols will prove
to be difficult Hence, there is the need for this standard. Should there be a need to connect to other symbols found at
the top of the sequence, you can use On-page and Off-page Connector symbols.
Lastly, flowcharts should not have any overlapping arrows. This is for emphasizing clarity. Having overlapping arrows
creates ambiguity in the direction of the arrows intersecting and their respective symbols.
Pseudocodes are not Academe-standard for expectant undergraduate students. However, there is a growing demand in
the usage of pseudocodes not only in the Academic sector, but also the Research sector.Pseudocodes are
high-level description of the processesin Computer Programming.Their format varies by writer. Some are English-like to
accommodate non-technical audience. Some are written close to the actual syntax used in the source code to
accommodate technical audiences and Research critics.
DECLARE name SETnameAS "Charlotte" APPEND " Queens" TOname APPEND " B.A." TOname OUTPUT name Figure 11.
Sample Pseudocode
Pseudocode are generally user-centric and no defined standard for writing them. However, for the ease of the codes to
be written in the future modules and for the ease of understanding for your peers, we will set a convention in writing
pseudocodes. This should enable us, together with your peers and mentors, to talk using only one language.
For you to understand pseudocodes better, let us use the sample flowchart at Figure 1. Remember that in the sample
flowchart, the problem being solved
is how to reach school in the most efficient and travel-wise method. Following the flowchart, we will have the following
as its pseudocode equivalent.
CALL LeaveHome() SETtimeAS GetCurrentTime() IF time< 8:00 AM THEN CALL RideBus() ELSE CALL RideSubway() END
CALL ReachSchool() Figure 12. Pseudocode of the Sample Flowchart
Algorithm: a systematic quantifiable methodology in Computer Science where there is a finite set of feasible solutions to
solve a specific problem or to achieve a specific condition or series of conditions. Arrow (Flowchart): a line with one and
only one arrow head pointing to the next symbol in the process. End Terminator (Flowchart): an "END"-labeled
Terminator symbol in flowcharts that marks the end of the entire flowchart.
Finite: has a limit or constraint.
Flowchart (Computer Programing): a visual aid showing a sequence of actions or operations with only one entry and one
exit points. Low-level Solution: a specific solution which presents all the detailed information and processes involved
within. Single-threaded Flow: a concept in flowcharting wherein there is only one allowed flow for the sequence of
processes. Start Terminator (Flowchart): a "START"-labeled Terminator symbol in flowcharts that marks the start of the
entire flowchart
Problem Solving: systematic approach in searching for a solution to a specific problem. Pseudocode: an English-like high-
level description of the processes in Computer Programming.

Module 003 Problem Solving through Flowcharts 2


"Knowledge is a process of piling up facts; wisdom lies in their simplification: -Martin H. Fisher.
Now that you are equipped with the necessary knowledge revolving around Flowcharts and Pseudocodes, how about
taking them to the next level by writing your own flowcharts and pseudocodes, and applying to them technical skills you
will soon use in writing your very first computer programs.
At the end of this module, you will be able to: 1. Generalize word problems into technical work items necessary to write
workable solutions 2. Convert work items into workable solutions and interpret solution by steps 3. Write flowcharts and
pseudocode equivalents of the solutions and explain the design flow 4. Argue whether a provided flowchart and/or
pseudocode is appropriate for the given problems and their underlying solutions
Again, researching beyond the coverage of this module is highly encouraged to supplement your understanding of the
topics covered. And as always, think and see beyond the box.
So, what are we waiting for? Let us continue our exploration of the world of Computer Programming
Introduction
In the previous module, we talked about the problem solving in general and how flowcharts and pseudocodes come into
play. We enumerated that Problem Solving in Computer Programming should satisfy several characteristics, namely: a)
Solvable b) Goal-oriented c) Verifiable d) Quantifiable e) Doable in finite steps Doable in current technological limitations
We also enumerated the symbols used in composing flowcharts, namely: a) Terminator b) Process c) Preparation d) Data
e) Decision f) On-page Connectors g) Off-page Connectors Lastly, we enumerated various keywords that we will be using
throughout the course when writing pseudocodes.
Understanding the logic applied to flowcharts is easy, but writing one that complies to all the standards, and have a
sound and efficient design does not come as easy as any would think It often requires a low-level understanding of the
problem and all relevant implications surrounding it.Given that we understand the problem, we will still need to
generalize the identified solution to cover all iterations of the problem in such a way that our solution will always return
our expected result back to the user - whether in form of visual stimulior a readable error. The flowchart design should
also consider all possible inputs based on the scope of the problem regardless if the scenario implied was covered in the
initial given. These considerations will be made dear throughout the module.
Understanding the Problem
Understanding the problem is the first step in composing an efficient and working flowchart design. Before considering
to solve the problem-at-hand, the problem should satisfy the characteristics covered in the previous topic,

Problem Solving through Flowcharts 1. Always keep in mind those characteristics before understanding the problem.
To understand a given problem in Computer Programming perspective, it is essential to identify, keywords and
categorize them into steps as technical work items. Technical work items are short keyword-driven phrases which
summarizes all the essential parts of the problem we put into consideration. They are guided using the following
characteristic: a) Concise b) Unambiguous c) Classifiable as either INPUT, PROCESS or OUTPUT d) Specific
Technical work items should be concise. Having a shortly written work item help us identify exactly what needs to be
accomplished. This will enable us to not only work directly on the solution, but it will also discourage us not to divert
from our identified solution.
Technical work items should also be unambiguous. Though as obvious as it seems, this characteristic emphasizes on one
important thing - the simplicity of how the work item was written. The work item should guide you to complete your
identified solution without compromising on too many variables such as the number of steps for the solution. In
addition, the work items should be, like being concise, direct to the solution itself.
Technical work items should also classifiable in one of the three, namely: INPUT, PROCESS and OUTPUT. INPUT work
items are those that require user intervention and asks for some actions from the user. PROCESS work items are those
that the computer itself will do like perform some series of computations. OUTPUT work items are those that requires
the user to recognize a result coming from our program. OUTPUT work items could also be a computer-interpretable
result on which the computer will read it, and not the user.
Lastly, the technical work items should also be specific Each work item should point to only one thing that needs to be
accomplished. may it be to ask the user for his firsmame or lasmame but not both. In case there is the need to ask for
the two information, there should be one of each; one for the firsmame and one for the lasmame. There should not be
more than one task for one work item.

Sample Problems
Let us take this simple problem as our initial example:
Write a program that displays 'Hello World? Muni Problem 2 - Hello wodd
The above problem is simply asking us to display a series of specified text to the user. It does not include any requests
for the user to enter values to our program. The solution to this problem lies on outputting the text 'Hello World' to the
user then our program ends.
Not much of a challenge yet The next problem will cover asking the user to enter values for our program to execute.
Write a program that adds two numbers from the user? rig= r. Problem - Addmor.
This second problem is more complicated compared to the first one. Let us dissect first what the problem is all about
The phrase "add" suggests that we will be needing to ask the computer to perform some calculations. These calculation,
however, is limited to addition and nothing more.
This is supplemented by the phrase two numbers" which suggests that we are only to perform the said calculations on
two specific numbers. In addition to this, we are assured that the inputs are all numerical values.
Though, the problem is vague in one thing - the kind of number that we are to deal with. Do we need to accept only
integers? Do we need to accept only floating points? Since the problem is vague, we should interpret it as if the problem
requires all kinds of numerical inputs - integers and fioatlng points
Lastly, the phrase "from the user" suggests that the two numerical values will be coming from the user. We do not need
to concern ourselves with inputs using parameters (which will be discussed in future modules), and file inputs.
Let us have another more complicated example.
"Write a program that reverses a string input from the user." Mural Problem 3 - snug 31.mmulmoon
This problem does not look to much complicated in functional sense. However, in the computer's perspective, this
requires a lot of work. This is because of how the computer processes strings. Computers do not read strings like how
we read them. Computers see them as a series of precise characters and nothing more. That is why, to reverse a sting.
the computer needs to read each character of the string starting from the last character until the first character and
storing them to display to the user.
Not yet making sense? Let us look at an analogy of this. Let us image you have a purse hidden in your pocket containing
various denomination of coins. You need to categorize them by denomination. How do you do this? You take the purse
out of your pocket and start to take one coin at a time Upon each take, you check the value of the coin and categorize
them accordingly. Notice how you need to take one coin at a time to accurately categorize them? That is like how the
computers treat stings.
Now back to the problem. Our main objective is to reverse a given sting as suggested by the phrase "reverse a string'.
And as discussed previously, reversing a string means we read each character from the end to the beginning of the sting.
And, as suggested by the phrase 'suing input from the user, the suing will be coming from the user. We need to support
user inputs. Like the previous problem, the input will be solely governed by user inputs and not file inputs.
Sample Technical Work Items
Now that we have our set of problems with accompanying discussion on how to interpret the problem, we now need to
work out our technical work items we will follow to accomplish our identified solution. Do note that this process can
become purely a mental procedure without the need of outlining the work items. However, to guide you on how to
correctly formulate your work items and in doing so we are avoiding compromises on the limitations of the computer,
we will need to outline them point-by-point

Let us begin using Problem 1. We argued that Problem 1 is solely about displaying the string "Hello World' to the user.
Hence, we have a simple work item:
1. To display "Hello World" Nun< Tschracal WM; Ins I - W.113 World
Simple, S not it? Since we do not need any input coming from the user, we do not place any work item for inputs. Since
we do not have anything to process computationally, we do not place any work item for process. We only allotted one
work item and that is for displaying a fixed string 'Hello World'.
Let us look at Problem 2. We argued that we will need to ask the user to enter some values; two number to be exact In
addition to asling inputs, we need to perform a simple calculation over the two entered numbers. We need to add the
two entered numbers and display them back to the user. Take note that since we are displaying a simple calculation
back to the user, we can combine the two as one single process.
Creating the work items for Problem 2 will result into something like this:
1. To ask user for the first number 2. To ask user for the second number 3. To display the sum of the two numbers
Figurcl tecluualt Cork turas - Adam
As you can notice we dissected the request for user input into two since our solution will need two numbers from the
user. The third and last work item will display the sum of the two numbers. Since the output does not require any
complex operations, we have combined the actual displaying with the summation of the two numbers.
Familiarizing yourself with the limitations of computers will warrantyou to create a more fluid and efficient program in
the future.
This gem more complicated as we tackle Problem 3. In Problem 3, we argued that we will look at each character of the
entered swing of the user. This is how we can take each character and reverse them by displaying the characters of the
string using the last character first

1. To ask user for a string 2. To determine the length of the string as x 3. To check if xis greater than 0 4. To end
processing if Work Item 3 is a no S. To display the xth character 6. To subtract 1 from x 7. To return to Work Item 3 to
continue 8. processing the rest of the characters izturat rechracal Watic:Darra 3- sumptanapulaton
As you can see, we have added a rather complicated setup to our previous solution. Work Item 1 is simply asking the
user to enter a string that our program will process. Now to display the last character, we will need to know how long
the entered string as covered in Work Item 2 was. This step is seemingly tedious but you need to understand that this is
how computers work. Computers cannot directly determine the position of the last character. We need to direct it.
Work Item 3 is simply a conditional to determine whether it is logical or still logical to continue. This is supported by the
succeeding Work Items after it. Work Item 4 ends our program execution since by then we will be having our
determined length x to be zero. And the zeroth character of a string is nothing, Make sense?
Work Item 5 is about the actual displaying of the character. As discussed previously, we will be displaying the last
character of the string with the help of the determined length x. Work Item 6 is to prepare for the next character to
display. Lastly, Work Item 7 is just instructing us to repeat the steps starting from Work Item 3.
Does not make sense? Let us look at this closer through an example. Let us say we have a string 'computer% The length
of the string is 8. Now, the 8th character of the string is -Y. We then display 'r" back to the user. We subtract our
determined length by 1 to get 7. Now, the 7th character of the string is "t; we display "C. Is it a little bit clearer? Now we
again subtract 1 from our determined length and get 6. Display the 6th character Y. We do this until let us say we have
our determined length reduced to 3. The 3rd character is "m". By this tine, we already displayed the suing "retupm- to
the user. If we continued until we get 1, we have already displayed "retupmoc".

As you will see, since our determined length is reduced to 1. Because of Work Item 6, we reduce it again, so we now
have 0. Work Item 7 instructs us to repeat Work Item 3 which checks if our determined length S O. Since it is already 0,
Work Item 4 takes over and end our execution.
Beginning from Work Item 3 until Work Item Z we repeatedly executed the work items until our condition in Work Item
3 is not anymore satisfied. This in computer programming is called on "iteration". One pass through the sets of Work
Items 3 to 7 is called 'one iteration:

Flowcharting
After identifying a set of Technical Work Items that we need to do for every problem that we are given, we can now
create our flowcharts. Flowcharts are our way to visualize the solution that we come up through the technical work
items. In comparison to the technical work items as the written logical side of our solution, we can look at flowcharts as
the visual side. We focus on diagrams and symbols to represent our logic
Let us take our Problem 1 as our primary example. Figure 1 shows one version of our Technical Work Items 1 if visualized
as a flowchart
C)
/Display Hello World/
END ) ngurc 7. Ouplapag Viceir
Remember that we begin and end our flowchart with the START and END terminator. In between the two is our actual
logic by utilizing the different symbols used in flowcharting. Following the START terminator, we have a display symbol
which we used to materialize Work Item 1"To display 'Hello

World". We do not have any other symbols in between since Problem 1 does not ask for any other things for us to do.
Our Technical Work Items 2 contain 3 work items within. Let us look at Figure 2, a version of a flowchart for the Problem
2 solution.

/Accept num2

CISplay nuni 4 nun2


( ENO r‘ure t Duplaytng the Sum of Two Numbers
After our START terminator, we ask our user to enter a number and we store it as numl. Remember that when we ask a
user for an input we immediately store it to a temporary container we call vanOble Variables will be further discussed in
the future modules, but for now just think of variables as a temporary container for values; whether entered by the user
or added by ourselves.

Following that is we again ask the user for another number. We then stored it again to another variable named num2.
We used a separate variable to avoid ovenvriting our previously created variable numl. Think of it this way, we have two
different drinks. Let us say a water and a soda. We need to pour those drinks to a cup. However, it is illogical to use only
one cup for both drinks. We can place the soda in the same cup if we empty it first But by emptying the cup. we lose the
previous drink. And we do not want that in our program. We need to keep the value until the end of our program.
Therefore, we use two different variables, num 1 and num2.
Lastly, we have a display symbol which contains the sum of numl and num2. Notice here that we did not anymore create
a third variable num3. This is because we do not need the sum anymore after displaying its value. We only use variables
if we intend to keep them for future use. In this instance, we do not need num3 because as soon as we displayed the
sum, we terminate the program through the END terminator of flowchart.
There is a special ldnd of variable called "arrays-. Arrays contain vector values' hence they can store more than one value
Typically, they are used as a one-dimension figure. However, there are cases when two-dimension and three-dimension
arrays are more applicable. Arrays will be discussed in Mafia:ire modules
This is getting interesting!
Let us get to the last problem. The last problem covers reversing an input string. And as we have previously argued. this
is not as simple as we read it Figure 3 shows a version flowchart version of our Technical Work item 3.

Sao m Nebo numbn of cha:Nan at WI


END
w &now ye x-I Clisrlay the/
Figure 9 0:splaraz the Reversed a Sing
Figure 3 starts with accepting input from the user. Like Figure 2, we store the string input to a variable named sal. After
which, we determine the length of 5E72 and store it to another variable named x. By this time, we have two different
variables; a string variable strl and a numerical variable x.
The fourth symbol, the conditional tests our variable x of its value. Since we will retrieve only the existent characters of
the string, we will proceed to END terminator if the length is now zero. While it is yet to be zero, we will retrieve the xth
character of the string sal. Once we have retrieved the character, we display it to the user then proceed to the next
operations.
The next symbol is a process symbol. Since we are only to perform Mathematical computation against the variable z we
use process symbol. We subtract one from the value of x to get the next character. After this, we return to the fourth
symbol and repeat the entire iteration again.

You may think of sample problems and have them posted at the course forum to challenge yourseljand your peen. This
could also help you veriftyour Salida!: through the advice of the course instructor.
Now that we have a flowchart at hand, we can also create its equivalent pseudocode representation. The pseudocode
will be your closest tool to writing the actual codes itself.Let us get vaned!
Pseudocode for Flowchart 1
Flowchart 1 is devised to display the suing 'Hello World". So, we will only use the OUTPUT keyword of our pseudocode
convention.
OUTPUT 'Hello World' ngure 10.Paxioco31 for Hdb World
Noticed how we enclosed the string 'Hello World' in quotation marks? This is to convey that the Hello World is a string
literal and not anything else (i.e. variable). This practice is prevalent to all programming languages and hence we also
adopted this practice even in writing our pseudocodes.
Pseudocode for Flowchart 2
Flowchart 2 is devised to display the sum of two numbers from the users. For this we will use an additional keyword
INPUT.
DECLAREnum.l. num2 INPUT num.! INPUT num2 OUTPUT numl + num2 nen II Pt' for Adthuon

In this translation, we used the keyword DECLARE to define our variables. This is a necessity when we use variables It is
advised to declare all variables as our first line in our pseudocode. You might argue why we did not anymore separate
the two variables in two distinct DECLARE codes. This is because of our convention. We defined earlier that we can
declare more than one variable in one line. This practice is almost like actual programming. The only difference is that
this practice is applicable only for variables of the same types which will be discussed in the future modules
The next two INPUT keywords are expected. We ask the user for values, which is limited by the problem to be numerical
in nature, and store them to their corresponding variables. The last keyword is solely to display the sum of numl and
num2.
Ps e u doco de for Flowchart 3
Flowchart 3 is devised to reverse a given string and display it back to the user. We are taken aback by the number of
operations we need to do for this problem. Good thing we already have a flowchart to guide us Flowchart 3 would have
an equivalent pseudocode as follow:
DECLARE strl,x INPUT sal SET xTO GetLength(str) WHILEx > ODO OUTPUT sulx - 1] SETxT0x - 1 LOOP Figure IS fl decode
for Stnr.plampulmar.
In this pseudocode, we have used to WHILE ... DO ... LOOP keyword which is used for iterations, As discussed before, the
behavior of the Technical Work Items and Flowchart for Problem 3 which return to a specific point in the design is called
an iteration. This is ahead of the coverage of this module. However, for the sake of argument, we used the WHILE ...
DO ... LOOP keyword since that section is an iteration.

The pseudocode started with the declaration of the variables stri and x. We then populate the variable stri with the
value from the user. Then we populate the variable x with the value from GetLength0 which retrieves the length of str.I.
After which, we proceed with the iteration where we check first if the value of x is greater than zero. Since initially that
statement is eye, we proceed to the OUTPUT keyword which displays to the user the last character of the sting.
Nodce we used sr* - 1jand not strjxj. This is because the computer counts characters from 0 and not 1, wherein the nth
character is the firstcharacter of the series.
Lastly we deduct 1 from the value of x and store the difference back to x. Here, we are recycling the variable x since we
are only tracking the changing character of the sting strI. The iteration repeats to the WHILE ... DO ... LOOP keyword until
after the first character of sal has been displayed.
Floating Point: A number that does include the use of a decimal points; they are usually precise only to a specific number
of decimal places. Iteration: A series of repetitions wherein each set is usually provided with different inputs compared
to the previous sets. Integer. A number that does not include the use of decimal points; commonly referred to as "whole
numbers". Low-level [Understanding]: Understanding the technical aspects of a specific topic or focus point Scalar
[Value]: A single value (e.g. 1, 123, V or "abe). String: Any number of characters enclosed by quotation marks that is
treated as a single value. Technical Work Items: A set of short keyword-driven phrases which summarizes the things to
consider in each problem. Variable: A temporary storage of a scalar value.

Books and Journals Simon Withers; 2017; Pseudocode; United States of America Mary Colson; 2017; Light (Flowchart
Science); United States of America
Online Supplementary Reading Materials Introduction to Pseudocode;
II • it• • • • • • • • • -
16,2017
Online Instructional Videos Planning with Pseudo-code; httPti/www,Ithanmearlemy,nrg/romptlingirompirer-
• 111. :4 - 4 I - • h.• If
April 16, 2017
April

You might also like