Pages tagged

Whatever happened to programming? « The Reinvigorated Programmer

http://reprog.wordpress.com/2010/03/03/whatever-happened-to-programming/

quotes Mike Taylor: "I want to make things, not just glue things together." http://bit.ly/9Yxm1V

In a recent interview, Don Knuth wrote: 'The way a lot of programming goes today isn't any fun because it's just plugging in magic incantations — combine somebody else's software and start it up.' The Reinvigorated Programmer laments how much of our 'programming' time is spent pasting not-quite-compatible libraries together and patching around the edges.A Sudoku Solver in Java implementing Knuth’s Dancing Links Algorithm

http://www.ocf.berkeley.edu/~jchu/publicportal/sudoku/sudoku.paper.html

Dr. Donald Knuth’s Dancing Links Algorithm solves an Exact Cover situation. The Exact Cover problem can be extended to a variety of applications that need to fill constraints. Sudoku is one such special case of the Exact Cover problem.

See also the references, esp. Knuth's original paper.Accurately computing running variance

http://www.johndcook.com/standard_deviation.html

The most direct way of computing sample variance or standard deviation can have severe numerical problems. [...] There is a way to compute variance that is more accurate and is guaranteed to always give positive results. Furthermore, the method computes a running variance. That is, the method computes the variance as the x's arrive one at a time. The data do not need to be saved for a second pass.

"This better way of computing variance goes back to a 1962 paper by B. P. Welford and is presented in Donald Knuth's Art of Computer Programming, Vol 2, page 232, 3rd edition. Although this solution has been known for decades, not enough people know about it. Most people are probably unaware that computing sample variance can be difficult until the first time they compute a standard deviation and get an exception for taking the square root of a negative number. It is not obvious that the method is correct even in exact arithmetic. It's even less obvious that the method has superior numerical properties, but it does."

A simple way to compute running sample variance (standard deviation).

Computing mean, variance and standard deviation on a stream of data.