2015-12-28

Dust Mites and Bad Science Journalism

My friend John W. Scott makes a very perceptive takedown of a bad-science story from a few months ago. In 2015, a list of two-dozen international news sites report that leaving beds unmade helps fight dust mites; all refer back to a speculative BBC article from 2005; no confirmation or testing was ever made on the original speculation. Read more here:

2015-12-21

Short Response to Flipping Classrooms

A short, possible response to the proponents of "flipping classrooms" (as though it were really a new or novel technique): Presumably we agree that students must do some kind of work outside the classroom. Then as the instructor, we might ask ourselves if we are more fulfilled by: (a) leading classroom discussions about the fundamental concepts of the discipline, or (b) serving as technicians to debug work on particular applications of those principles.

Personally, in my classes I do manage to include both aspects, but the time emphasis is more heavily on the former. If forced to pick either one or the other, then I would surely pick (a).


2015-12-14

Why m for Slope?

Question: Why do we use m for the slope of a line?

Personally, I always assumed that we use m because it's the numerical multiplier on the independent variable in the slope-intercept form equation y = mx +b.

Michael Sullivan's College Algebra (8th Ed., Sec. 2.3), says this as part of Exercise #133:
The accepted symbol used to denote the slope of a line is the letter m. Investigate the origin of this symbolism. Begin by consulting a French dictionary and looking up the French word monter. Write a brief essay on your findings.
Of course, "monter" is a French verb which means "to climb" or "to go up".

But others disagree. Wolfram MathWorld says the following, along with citations of particular early usages (http://mathworld.wolfram.com/Slope.html):
J. Miller has undertaken a detailed study of the origin of the symbol m to denote slope. The consensus seems to be that it is not known why the letter m was chosen. One high school algebra textbook says the reason for m is unknown, but remarks that it is interesting that the French word for "to climb" is "monter." However, there is no evidence to make any such connection. In fact, Descartes, who was French, did not use m (Miller). Eves (1972) suggests "it just happened."
The Math Forum at Drexel discusses this more, including a quote from J. Miller himself (http://mathforum.org/dr.math/faq/faq.terms.html):
It is not known why the letter m was chosen for slope; the choice may have been arbitrary. John Conway has suggested m could stand for "modulus of slope." One high school algebra textbook says the reason for m is unknown, but remarks that it is interesting that the French word for "to climb" is monter. However, there is no evidence to make any such connection. Descartes, who was French, did not use m. In Mathematical Circles Revisited (1971) mathematics historian Howard W. Eves suggests "it just happened."
The Grammarphobia site takes up the issue likewise, citing the above, and mostly knocking down the existing theories as lacking support. They end with this witticism by Howard W. Eves (who taught at my alma mater of U. Maine, although before my time):
When lecturing before an analytic geometry class during the early part of the course... one may say: 'We designate the slope of a line by m, because the word slope starts with the letter m; I know of no better reason.'
To bring things full circle, I would point out that the English word "multiplication" is spelled identically in French (and nearly the same in Latin, Italian, Spanish, Portuguese, Danish, Norwegian, and Romanian), so lacking any other historical evidence, I don't see why m for "multiplication" isn't considered as a theory in the sources above. (Compare to k for "koefficient" in Swedish textbooks, per Wolfram.)


2015-12-07

That Time I Didn't Get the Job

Here's a story that I occasionally share with my students. Back around 2001, I had left my second computer gaming job in Boston, and was still interviewing for other jobs in the industry. I had an interview at a company based in Andover, and it was mostly an hour or two in a conference room with one other staff member. I have no recollection who it was now, or if they were in engineering or production. At any rate, part of it was some standard (at the time) "code this simple thing on the whiteboard" tests of basic programming ability.

One of the questions he gave me was "write a function that takes a numeric string and converts it to the equivalent positive integer". Well, it doesn't get much more straightforward than that. I didn't really even think about it, just immediately jotted down something like the following (my C's a bit rusty now, but it was what we were working in at the time; assumes a null-terminated C string):

    int parseNumber (char *s) {
        int digit, sum = 0;
        while (*s) {
            digit = *s - '0';
            sum = sum * 10 + digit;
            s++;
        }
        return sum;
    }


Well, the interviewer jumped on me, saying that's obviously wrong, because it's parsing the digits from left-to-right, whereas place values increase from right-to-left, and therefore the string must be parsed in reverse order. But that's not a problem, as I explained to him, with the way the multiples of 10 are being applied.

I stepped him through an example on the side: say the string is "1234". On the first pass, sum = 0*10+1 = 1; on the second pass, sum = 1*10+2 = 12; on the third pass, sum = 12*10+3 = 123; on the fourth pass, sum = 123*10 + 4 = 1234. Moreover, this is more efficient than the grade-school definition; in this example I've used only 4 multiplications; whereas the elementary expression of 1*10^3 + 2*10^2 + 3*10 + 4 would be using 8 multiplications (and increasingly more multiplications for larger place values; to say nothing of the expense in C of finding the back end of the string first, before knowing which place values are which).

But it was to no avail. No matter how I explained it or stepped through it, my interviewer seemed irreparably skeptical. I left and got no job offer after the fact. The thing is, part of the reason I was so confident and took zero time to think about it is because it's literally a textbook example that was given in my assembly language class in college. From George Markowsky, Real and Imaginary Machines: An Introduction to Assembly Language Programming (p. 105-106):


Postscript: Elsewhere, this can be looked at as an application of Horner's Method for evaluating polynomials, which is provably optimal in terms of minimal operations used (see texts such as: Rosen, Discrete Mathematics, 7th Edition, Sec. 3.3, Exercise 14; and Carrano, Data Abstraction & Problem Solving with C++: Walls and Mirrors, 6th Edition, Sec. 18.4.1).

However, that wasn't the only time I got static for using this textbook algorithm. As of 2019 I've shared this anecdote online at least a handful of times, and every single time, inevitably, someone argues that they wouldn't allow this solution in their codebase because it's too opaque for normal programmers to understand and maintain. (Ironically, I'm writing this postscript on the 200th anniversary of Horner's paper being presented to the Royal Society of London.)

As it turned out, I never worked in computer games or any kind of software engineering again.