CHAP I: PROGRAMMING LOGICAL STRUCTURE
1. What is Computer
Programming ?
• Programming is the process of creating a set of instructions or
commands that a computer can understand and execute.
• These instructions are written in a programming language and are
used to create software applications, websites, games, and other
computational tasks.
• Programming allows you to give the computer specific tasks to
perform, data to manipulate, and decisions to make based on certain
conditions.
1. What is Computer
Programming ?
• Programming is about solving problems and automating tasks through
the creation of algorithms and code.
• It involves breaking down complex tasks into smaller, manageable
steps that a computer can follow.
• Programming languages provide a way for humans to communicate
with computers, enabling them to carry out tasks efficiently and
accurately.
• Programmers use programming languages to write code that instructs
the computer on what actions to take and how to perform them.
1. What is Computer
Programming ?
• This code can encompass a wide range of activities, from basic
arithmetic calculations to complex simulations and data analysis.
• By using programming languages and following programming
paradigms, developers can create software that serves various
purposes and meets specific user needs.
2. Categories of Computer
Programming
• Programming can be categorized into several different domains or
categories based on the type of applications being developed, the
platforms they target, and the specific goals of the programming task.
Here are some common categories of programming:
1. Application Development:
Desktop Applications: Creating software that runs on personal computers,
such as word processors, photo editors, and video players.
Mobile Applications: Developing apps for smartphones and tablets using
platforms like Android and iOS.
Web Applications: Building interactive applications that run in web browsers,
often using technologies like HTML, CSS, and JavaScript.
2. Categories of Computer
Programming
2. Systems Programming:
• Operating Systems: Developing the core software that manages hardware
resources and provides services to other software.
• Device Drivers: Creating software that enables communication between
hardware devices and the operating system.
• Embedded Systems: Writing software for embedded devices like
microcontrollers, used in products such as appliances, automobiles, and
industrial machinery.
2. Categories of Computer
Programming
• Game Development:
Game Engines: Designing game engines that power video games and
interactive simulations.
Game Logic: Implementing the gameplay mechanics, graphics, sound, and
user interactions in video games.
• Scripting and Automation:
Scripting Languages: Writing scripts to automate tasks, manage files, and
manipulate data. Examples include Python, Ruby, and PowerShell.
Automation Tools: Creating scripts or programs that perform repetitive tasks,
such as batch processing or system maintenance.
2. Categories of Computer
Programming
• Scientific and Data Analysis:
Data Science: Using programming to analyze and interpret large datasets,
draw insights, and make predictions.
Scientific Computing: Developing software for simulations, modeling, and
scientific research in fields like physics, biology, and engineering.
• Artificial Intelligence (AI) and Machine Learning:
Machine Learning Algorithms: Implementing algorithms that allow computers
to learn from data and make predictions or decisions.
Natural Language Processing (NLP): Developing software that enables
computers to understand and generate human language.
2. Categories of Computer
Programming
• Web Development:
Front-End Development: Creating the user interface and user experience for
web applications using HTML, CSS, and JavaScript.
Back-End Development: Building the server-side logic, databases, and APIs
that power web applications.
• Security and Ethical Hacking:
Security Tools: Writing software to detect vulnerabilities, secure networks,
and protect against cyber threats.
Ethical Hacking: Simulating cyberattacks to identify and fix security
weaknesses in software and systems.
2. Categories of Computer
Programming
• Networking and Network Programming:
Network Applications: Developing software that facilitates communication
and data exchange between computers over a network.
• Database Programming:
Database Management: Writing code to create, query, and manage
databases, ensuring data integrity and efficiency.
3. What is Programming
Language ?
• A programming language is a formalized set of rules and syntax that allows
humans to communicate with computers and give them instructions to perform
specific tasks.
• It serves as an intermediary between human-readable instructions and machine-
executable code.
• Programming languages are used to write software applications, scripts,
algorithms, and more, enabling developers to create a wide range of
computational solutions.
• Programming languages provide a structured way to express algorithms and logic,
making it easier for programmers to convey their intentions to computers.
3. What is Programming
Language ?
• They come with a defined set of keywords, syntax rules, and conventions that
must be followed to create valid and functional code.
4. Categories Of Programming
Language
• Programming languages can be broadly categorized into several types:
High-Level Languages: These languages are designed to be more human-
readable and abstracted from the underlying hardware. They provide a level
of abstraction that makes programming more intuitive and efficient. Examples
include Python, Java, C++, and Ruby.
Low-Level Languages: These languages are closer to the machine code that
computers understand, and they provide finer control over hardware
resources. They are less human-readable and require more detailed
knowledge of computer architecture. Examples include Assembly languages.
Scripting Languages: These are interpreted languages often used for
automating tasks, quick prototyping, and developing web applications.
Examples include JavaScript, Python, and Ruby.
4. Categories Of Programming
Language
Compiled Languages: In these languages, code is transformed into machine-
readable binary code before execution. This can lead to faster execution but
requires an additional compilation step. Examples include C, C++, and Swift.
Interpreted Languages: In these languages, code is executed directly by an
interpreter, which converts the code to machine instructions on the fly.
Examples include Python, Ruby, and JavaScript.
Domain-Specific Languages (DSLs): These languages are tailored for specific
tasks or industries, such as SQL for database queries, HTML/CSS for web
development, and LaTeX for typesetting documents.
4. Categories Of Programming
Language
Functional Languages: These languages emphasize the use of functions as the
primary building blocks of programs. Examples include Haskell, Lisp, and
Erlang.
Object-Oriented Languages: These languages focus on representing data and
behavior as objects, allowing for better organization and modularity. Examples
include Java, C++, and Python.
Procedural Languages: These languages focus on specifying procedures or
routines that manipulate data step by step. Examples include C, Pascal, and
Fortran.
4. Categories Of Programming
Language
Functional Languages: These languages emphasize the use of functions as the
primary building blocks of programs. Examples include Haskell, Lisp, and
Erlang.
Object-Oriented Languages: These languages focus on representing data and
behavior as objects, allowing for better organization and modularity. Examples
include Java, C++, and Python.
Procedural Languages: These languages focus on specifying procedures or
routines that manipulate data step by step. Examples include C, Pascal, and
Fortran.
5. Programming with
Pseudocodes
• Pseudocode is a way to plan and outline a program's logic and
structure using a mixture of human-readable language and simplified
programming constructs.
• It's not an actual programming language, but rather a tool for
designing algorithms and expressing ideas before implementing them
in a specific programming language.
• Pseudocode makes it easier to understand and communicate the
algorithm's flow without getting bogged down in the syntax details of
a particular programming language.
5. Programming with
Pseudocodes
• Keep in mind that pseudocode is not standardized, and you can adapt it to your
needs and preferences.
• The goal is to communicate the algorithm's logic clearly without being
constrained by the syntax rules of a specific programming language.
• When using pseudocode, focus on expressing the overall logic, control structures
(if-else, loops), and the sequence of steps involved in solving the problem.
• Once you have a well-defined pseudocode algorithm, you can then translate it
into a specific programming language of your choice.