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
- Mark Nottingham on Versioning REST Web Services
Very well said. The only thing I'd add is that new ver …
- Jennifer on Homemade Yogurt
That looks delicious! I've never tried it over peaches before …
- Dick Brodine on Why I am voting for Obama
From years ago, McCarthy. "Are you or have you ever been a mem …
- Dick Brodine on Why I am voting for Obama
Barack is saying that he will encourage companies to hire Amer …
- Chris on Java Daemon
Thanks for this introduction brought light to my missing knowl …
- Mark Nottingham on Versioning REST Web Services
People I know
