notesonly.in

One notebook for every subject — open it anywhere.

Log in

Debugging and program design basics

Programming Fundamentals · Engineering

Study notes

A program crashes on some inputs. Debugging process: 1) Reproduce with smallest failing input. 2) Add print/assert to isolate the faulty function. 3) Read the code aloud (rubber-duck) and spot the off-by-one error. 4) Fix, rerun all tests, confirm no regression.

← Back to topics for Engineering