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.
wheeler jump1951 trick let code return to caller automatically
stack inventioncall stacks exist mainly to manage subroutine returns
also calledprocedures, functions, methods depending on language cult
for instance
apollo guidance code — 1969 lunar module software leaned on tight subroutines to save memory
sqrt function — nearly every language ships one so nobody hand-codes newton's method again