4 ms·
There is a joke/saying/anecdote I heard a long time ago that may or may not be relevant "Programmers are mathematicians that solve all their problems by Induct
by dstola 6y ago
There is a joke/saying/anecdote I heard a long time ago that may or may not be relevant
"Programmers are mathematicians that solve all their problems by Induction"
After being a software engineer for over half a decade now, that still rings strangely true to me
- dmak 6y agoI don’t understand this. Could you elaborate on it?
- dstola 6y agoFrom Wikipedia [1] "Mathematical induction proves that we can climb as high as we like on a ladder, by proving that we can climb onto the bottom rung (the basis) and that from each rung we can climb up to the next one (the step)." For-loops are a discrete form of mathematical induction and is a basic concept to do any kind of programming, hence the joke (of course its more nuanced than that but is true in a tongue-in-cheek kind of way) [1] https://en.wikipedia.org/wiki/Mathematical_induction https://en.wikipedia.org/wiki/Mathematical_induction
- GnarfGnarf 6y ago"Induction" means you prove it's true for 1, then you prove that if it's true for 'N', then it's true for N+1.
- AnimalMuppet 6y agoI'm not sure I agree with that outside of functional programming.
- newen 6y agoFor loops, while loops, and recursion are all induction. Functional programming is just a style of programming, as in, algorithms which are designed and proven using induction can be implemented in imperative or functional styles.