Dear Fellow Mathematica Faculty,
I'm interested in developing various demonstrations for my students where there are some cells in the notebook that run, but that the students can't see. The idea would be to define some Mathematica functions which the students could run, but not examine the source code for. For example,
1) a function for which they can get values, but can't see the formula (they have to use Taylor series to predict values)
2) code from a past student which accomplishes the goal of the project that they can run, but not inspect (to compare their results)
3) code that gives them the average density of material in a disk along a slice at any angle, but doesn't let them see the density function itself (a tomography problem)
In all of these cases, the idea would be to make the students work with a function using the power of Mathematica but with access only to the limited data they'd actually have available in a real-world application. A clunky way to do this would be to write the hidden stuff in C or something, compile it, distribute the executable, and call it with MathLink. But that runs into a bunch of the kind of irritating cross-platform issues that Mathematica is usually so good at avoiding. (Do I distribute windows and mac binaries? How do I test them without both platforms available to me? etc)
So another version of this would be something like "Password-protected cells". They would be encrypted somehow in the .nb file and forced to be not "visible" in the notebook display unless you typed in a password. After entering the password, they would revert to being standard input cells that you could edit at will. But when you saved the worksheet and reopened it, you'd have to enter the password to view/edit again. Then you could distribute worksheets with some protected content and some open content.
Does anybody know if there's an existing feature similar to this (or another clever idea for doing this) in Mathematica 8? If not, how about considering it as a feature request for a future version?
All the best,