Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
User Journal

Journal Daniel Dvorkin's Journal: Lessons in scientific programming

I learned today -- or relearned, rather; it's one of those lessons that apparently I have to keep learning -- not to try to out-calculate the computer. What I mean by this is that math, real math, the kind of math that involves pushing symbols around, is hard; but calculation is easy, so easy that we build machines to do it for us. And in that limited realm, those machines are much better than we are. So we should concentrate on the math and let the machines handle the number-crunching, rather than molding the math to fit our idea of what we think the machines are doing.

Specifically, when formulating a mathematical model, formulate that model in a way that makes sense to you. Matrix transposition is trivial for a computer, but it can completely screw up a human's mental picture of the problem. That screw-up then propagates through the modeling process. You will end up with something that is neither good math nor good programming. It may work, but it will be less flexible, less maintainable, and -- here's where the lesson re-learning comes in -- probably less computationally efficient than it would be if you'd just written the math the way you wanted to in the first place and then turned the math into code.

Computers are really, really, really good at matrix algebra. It's pretty much what they were invented to do. Let them at it.

This discussion has been archived. No new comments can be posted.

Lessons in scientific programming

Comments Filter:

Suggest you just sit there and wait till life gets easier.

Working...