Hacker News new | ask | show | jobs
by Jtsummers 1594 days ago
It's from high school algebra, it's a specific instance of "factoring" where the equation has the form: ax^2+bx+c=0 and you want (x+r_1)(x+r_2)=0. "factoring" is the general process of finding what things multiply together to produce a term. Which is where we, in software, get the notions of "factoring" (described well in the context of Forth with Thinking Forth or Starting Forth, can't remember which, maybe both) and "refactoring".

Code refactoring and factoring in algebra are related in the sense that they aren't meant to change the system (that is, its meaning or behavior), but instead are meant to change its appearance. In particular, in the above, if you can factor it out you end up with the two roots (what I termed r_1 and r_2) of the equation, which are useful for various other things.