Re: Dumbing down?



Ken Tilton wrote:
Jeff Rollin wrote:
A better question might be, "what are the arguments for and against a
>> good understanding of maths being necessary to programming?

The better question definitely is: where the h*ll do you (and a friend who should know better than I) even /see/ maths in programming?!

And this coming from a guy who is writing software to help teach algebra?! For shame, Kenny. Put your head down on your desk for the rest of this thread.

Suppose I hack up a little finite state machine to help me come to grips with a hairy little bit of functionality (IPC over a mechanism where either party can be expected to go South at the most awkward of times). Is that math? Asking, not arguing.

It seems to me that the unifying concept is algorithms <http://en.wikipedia.org/wiki/Algorithm>: "In mathematics, computing, linguistics, and related disciplines, an algorithm is a finite list of well-defined instructions for accomplishing some task that, given an initial state, will terminate in a defined end-state."

Look. See? The words mathematics and computing are right next to each other in that sentence. What? Not convinced by this compelling use of the proximity agrument? I think that the etymology of the word is interesting, too:

<blockquote cite="ibid">
Al-Khwa-rizmi-, the Persian astronomer and mathematician, wrote a treatise in Arabic in 825 AD, On Calculation with Hindu Numerals, which was translated into Latin in the 12th century as Algoritmi de numero Indorum[1], which title was likely intended to mean "Algoritmi on the numbers of the Indians", where "Algoritmi" was the translator's rendition of the author's name; but people misunderstanding the title treated Algoritmi as a Latin plural and this led to the word "algorithm" (Latin algorismus) coming to mean "calculation method". The intrusive "th" is most likely due to a false cognate with Greek ??????? arithmos = "number".
</blockquote>

So I think that mathematics called dibs on algorithms quite a long time ago. Of course, I doubt that an intimate knowledge of Hindu numerals is going to help one cough out some PHP for that online store web-site. Touché.

Still not convinced by proximity and etymology? "The concept [of the algorithm] was formalized in 1936 through Alan Turing's Turing machines and Alonzo Church's lambda calculus, which in turn formed the foundation of computer science." [ibid] Come on! Slam dunk! Lambda calculus. This is comp.lang.lisp. You can't see the math, little fish, because you're swimming in it!

But word proximity in sentences on Wikipedia, etymology, and aquatic arguments aside, I seems to me that mathematics comes up in programming in realms other than just numerical analysis, cryptography, digital signal processing, financial software, physics engines for gaming, rocket science at the JPL, programs to teach algebra, etc. Most good SPAM filters these days use the so-called Bayesian approach. Unless I'm mistaken, computer simulations and mathematical modeling feed off each other quite a bit. I remember, back from college, helping one of my professors (you know, I got him coffee and stuff) work on his publication of S.J. Merrill and J. R. Cochran, "Markov chain methods in the analysis of heart rate variability", Fields Institute Comm., 11 (1997) 241-252. I really just ran data through Mathematica programs of formulas he had spoon fed to me. But I remember that he had hopes that one day such mathematical analysis could be used to create a new kind of heart rate monitor, the programming of which would certainly entail the use of the mathematics from the modeling work. And from my copy of _Artificial Intelligence: A Modern Approach_ (I'm not claiming to understand or to have even read hardly any of this book), one finds the following from chapter 1.5, "Summary":

<blockquote>
Mathematicians provided the tools to manipulate statements of logical certainty as well as uncertain, probabilistic statements. They also set the groundwork for reasoning about algorithms.
</blockquote>

This book is chock full of all kinds of "traditional" mathematics. I'm flipping through the chapter on image processing right now and find all kinds of "convolution with linear filters", "one possible measure of similarity is the sum of squared differences", "one can maximize the cross-correlation", etc.

Of course, all of this is coming from a professional programmer who couldn't pass a college calculus course anymore unless he had Mathematica or Maple or Xah Lee or some other program feeding him the answers. Is it just me or do Jon Harrop and Xah Lee seem to agree with each other <pause> well, at all <http://tinyurl.com/ynngpa>. I mean, who the fsck else ever agrees with Xah? Did Jon write Xahbot in OCaml? Have we ever seen them together in the same room at the same time? I realize that it could just be some confederacy of trolls but...

So it seems to me that, as always, theoretical mathematics leads the way. Long after the theoreticians have moved on to something else, somebody comes up with a practical application for the theory. For example, somebody makes a working heart rate monitor using Markov chain methods to figure out when it should beep to warn the surgeon that the patient has been given too much anaesthesia. After the first few successful practical applications of that theory are working, these techniques become part of the common tool chest of that branch of application. In programming terms, people start developing libraries or writing down design patterns or have written down detailed descriptions of the big-O properties of the, for example, beam-search or A* or whatever algorithm.

So, yes, I think that maths can help one be a better programmer but I don't think that there is some kind of cause-effect relationship whereby maths implies programming. And I also think that somebody could probably code the next great killer application web-client display whatever without even knowing basic arithmetic as long as they had access to some library to take care of the things that he or she did not know how to do. But I do think that maths and programming go together like <pause> chocolate and peanut butter.
.