Everyday Programming

Cover of Everyday Programming, Volume I: Basics of Computer Programs, by Dr. Nobel Khandaker
Volume I · Basics of Computer Programs

You do not need to be a “math person” to program. You need tenth-grade arithmetic, a habit of thinking a problem through, and someone willing to explain the parts everybody else skips. This book is that explanation.

A first course in Python for people starting from zero — written by a lead engineer with a doctorate in computer science and twelve years shipping software, for the reader who has opened three tutorials and quietly closed all three.

  • 21chapters, in seven parts
  • 445Find the Bug exercises
  • 445full worked solutions
  • 400+pages, start to finish

Why most first programming books do not work

They start at line one of a program. print("Hello, world"), then variables, then loops — and somewhere around the third chapter the reader realizes they are copying symbols without knowing what any of it means. The book never said what a variable actually is, because the book assumed you already knew.

Everyday Programming starts two chapters earlier than that.

Part I barely touches a keyboard. It builds the small vocabulary that programming quietly assumes — logic, sets, remainders, variables, functions, sequences, counting, graphs, binary numbers — and it does so at the level of a tenth-grade classroom, with a wall clock for modular arithmetic and a seashell for the Fibonacci sequence. Chapter 1 contains no code at all. Chapter 2 then teaches you to take a problem apart on paper, in plain pseudocode, and only translates it into Python once the thinking is already done.

So by the time you meet your first real Python program, you already know what every line of it is for.

Learn to read code, not just type it

Here is the part that makes this book different from the shelf next to it.

Anyone can follow along while a book types a working program. That is not the skill. The skill — the one that separates people who can program from people who have finished a tutorial — is looking at code that is nearly right and seeing exactly where it goes wrong.

So the book contains 445 Find the Bug exercises. Each is a short, realistic program: a quiz score, a shopping list, a temperature conversion. Most run three to ten lines, and none runs to more than twenty-two. And each one hides exactly one mistake.

Exercise 5.1.1 — Total points. A quiz has 3 sections worth 20, 30, and 25 points. The program should print the total, 75.

section1 = 20
section2 = 30
section3 = 25

total = section1 + section2 - section3
print(total)   # 75

Found it? The worked solution names the bug as logical — the program is valid Python and runs happily; it just answers the wrong question. That distinction is the whole lesson.

Every solution names the bug as syntax, runtime, or logical, explains why the original misbehaved, and shows the corrected program. Learn to sort mistakes into those three bins and debugging stops being luck.

All 890 programs are on this site, as web pages and as .py files you can download and run.

Who this book is for

  • Absolute beginners. No prior programming. No calculus. If you can work out how much change you are owed, you have enough mathematics to start.
  • Self-taught learners who stalled. If you have done a video course and still cannot write a program from a blank file, the missing piece is usually Part I and the debugging habit — both are here.
  • Career changers. A structured path from first principles to writing, testing, and debugging real Python, without assuming a computer-science degree you do not have.
  • Students and teachers. Seven parts you can map onto a term, and an exercise bank of 445 problems with worked solutions, free to use under Apache 2.0.

Who it is not for. If you already write Python comfortably and want advanced material — async, type systems, performance work — this is the wrong volume. It is called Basics of Computer Programs on purpose.

What you will be able to do by the end

Read a Python program and say what it does. Write one from a blank file. Choose the right data structure and explain why. Break a problem into functions. Organize code into modules and packages. Write tests with pytest. Handle failures instead of crashing. And when something breaks — because it will — work out where, methodically, instead of changing lines at random.

The last two parts are about exactly that: quality, testing, debugging, the tools of the trade, and a catalog of the 26 mistakes that catch beginners most often, each one named and defused.

Start here

Everyday Programming, Volume I: Basics of Computer Programs — First Edition, published by Intramotev Press. Text and code licensed under the Apache License 2.0.

results matching ""

    No results matching ""