The length-based scoring system for Cody has a few well-known loopholes that allow clever programmers to hide complex code inside certain functions so that it doesn't register in the score. This problem represents an attempt to generate a fairer Cody scoring function. It doesn't try to replace the length-based criterion with something more elegant; merely to eliminate places where longer code can be hidden and remain undetected by the scoring function.
I have included a few examples that I consider abusive to start with. These are just my own opinions. Please feel free to add your suggestions for others in the comments section for this problem, and I will add good ideas to the test suite when I have the time. Thanks for playing!
Using this scoring function, it might even be possible to allow use of eval.
Other possibilities -- should str2num count the numbers inside its argument? Suggestions welcome! And if you support the idea of changing the scoring function along these lines, please 'like' this problem. Thanks!