While reading Oliver Steele’s article on JavaScript Memoization this bit jumped out at me. function Angle(radians) {this.setRadians(radians)} Angle.prototype.setRadians = function(radians) { this.radians = radians; this.getDegrees.reset(); }; Angle.prototype.getDegrees = function() { return this.radians * 180 / Math.PI; } memoizeConstantMethod(Angle.prototype, ‘getDegrees’); The reason that jumped out is that getDegrees is a function that returns a number, but in the above code you see […]
-
About
My name is Peter Williams. I am a father and software developer. (I do a few other things, of course, but family and software are what I am most passionate about.) This blog is primarily a place where I can rant without scaring too many people, but occasionally I record things of interest to my family here.
more about » -
Projects
-
Recent Comments
- Dick Brodine on Homemade Yogurt
Just remebered. The town west of Peublo with the doves is Rock …
- Dick Brodine on Homemade Yogurt
How about fixing some dove chili? Of course, you'll have to sh …
- Dick Brodine on Will code for …
You're getting like me in terms of bouncing from job to job. G …
- Steven Hansen on RSpec Emacs Mode
Dude, you rock. I've been missing this feature from emacs for …
- Peter Williams on I’m one of the cool kids
Not going to happen. …
- Dick Brodine on Homemade Yogurt
People I know