Skip to content

Programming - Notes

Table of Contents

  1. Introduction
  2. What's Programming?
  3. Key Concepts and Terminology
  4. Applications
  5. Fundamentals
  6. Programming Architecture Pipeline
  7. How Programming works?
  8. Types of Programming
  9. Programming paradigm
  10. Some hands-on examples
  11. Tools & Frameworks
  12. Hello World!
  13. Lab: Zero to Hero Projects
  14. References

Introduction

Programming is the process of creating instructions that a computer can execute to perform specific tasks.

What's Programming?

  • The act of writing code to communicate with machines.
  • Used to automate tasks, solve problems, or create software.
  • It is fundamental to computer science and software engineering.

Key Concepts and Terminology

  • Algorithm: A set of step-by-step instructions to solve a problem.
  • Compiler/Interpreter: Tools that translate code into machine-executable instructions.
  • Syntax: Rules that define the structure of programming languages.
  • Variables: Storage units for data in a program.

Applications

  • Web development (front-end, back-end)
  • Mobile app development
  • Data science and machine learning
  • Robotics and embedded systems

Fundamentals

Programming Architecture Pipeline

  • Source code is written using a programming language.
  • The compiler or interpreter processes the code.
  • The executable code interacts with the hardware or software environment.

How Programming works?

  • Programmers write code using high-level languages (e.g., Python, C++).
  • Code is translated into machine code.
  • The machine code is executed by the computer’s CPU.

Types of Programming

  • Imperative: Writing explicit instructions (e.g., C, Java).
  • Declarative: Describing what to do without detailed steps (e.g., SQL, HTML).
  • Object-oriented: Organizing code into reusable objects (e.g., Python, Java).
  • Functional: Focusing on functions and immutability (e.g., Haskell, Lisp).

Programming paradigm

  • Concurrent programming
  • Procedural programming
  • Oriented Object Programming
  • Object Based Programming
  • Modular programming

Concurrent programming (critical systems) - Issues: - deadlock(catching same spinlock twice) - starving - Solutions : - mutex, semaphores, atomic code, spinlock

Some hands-on examples

  • Create a simple calculator in Python.
  • Develop a web page using HTML and JavaScript.
  • Write a basic sorting algorithm (e.g., bubble sort).

Tools & Frameworks

  • IDEs: Visual Studio Code, PyCharm, Eclipse.
  • Version Control: Git, GitHub, Bitbucket.
  • Testing: PyTest, JUnit, Selenium.
  • Frameworks: Django (Python), React (JavaScript), Spring (Java).

Hello World!

print("Hello, World!")

Lab: Zero to Hero Projects

  • Build a personal website using HTML, CSS, and JavaScript.
  • Develop a to-do list app with Python and Flask.
  • Create a basic game using C++ and SDL library.

References

  • "Introduction to Programming" by John Zelle.
  • "The Pragmatic Programmer" by Andrew Hunt and David Thomas.
  • "Clean Code" by Robert C. Martin.
  • "Python Programming for Beginners" by Michael Hartl.