the.com/subroutine

a chunk of code you write once so future-you stops copy-pasting like an animal.

means a named block of instructions you can call repeatedly from elsewhere in a program instead of rewriting it.

from coined in the 1940s-50s as computers moved from one-off wiring to stored programs; mathematicians like maurice wilkes and david wheeler needed a way to reuse chunks of code, and the 'jump to subroutine, then jump back' trick became one of programming's founding tricks.

for instance

apollo guidance code1969 lunar module software leaned on tight subroutines to save memory

sqrt functionnearly every language ships one so nobody hand-codes newton's method again

the.com/
what’s happening now · the.com · generated