debugging

The Stack Trace

A junior developer ran the program, and a stack trace fifty lines deep appeared. The junior cried, “There are so many places where this went wrong!” The senior developer asked, “Did the error happen in fifty places, or in one?” The junior pointed to the topmost line. The senior smiled. “And from where did that […]

The Infinite Loop

The senior developer asked, “When does the loop begin? When does it end?” The junior replied, “It never stops!” The senior smiled, “Then where is the beginning you speak of?” Later, she added, “If there is no exit condition, what enters the loop?” The Teaching Unfolds On the surface, this koan addresses a common programming […]