Geeks With Blogs
Liam McLennan hackingon.net February 2011 Entries
JavaScript Class Patterns Revisited: Endgame
I recently described some of the patterns used to simulate classes (types) in JavaScript. But I missed the best pattern of them all. I described a pattern I called constructor function with a prototype that looks like this: function Person(name, age) { this.name = name; this.age = age; } Person.prototype = { toString: function() { return this.name + " is " + this.age + " years old."; } }; var john = new Person("John Galt", 50); console.log(john.toString()); and I mentioned that the problem with this ......

Posted On Thursday, February 17, 2011 10:01 AM

What ‘enterprise’ doesn’t understand about risk
Enterprises (large bureaucracies) obsess about risk. I think it is because of the inertia generated by the process and politics that they have to deal with. The trouble is that they respond to risk in precisely the wrong way: by adding complexity. Need to call a method? Better wrap it in WCF service. Need to talk to another application? Better hook a message queue to a service bus connected to a biztalk sharepoint – on Oracle. Here is a simple guide: Complexity increases risk. Simplicity reduces ......

Posted On Monday, February 14, 2011 10:17 PM

JavaScript Class Patterns
To write object-oriented programs we need objects, and likely lots of them. JavaScript makes it easy to create objects: var liam = { name: "Liam", age: Number.MAX_VALUE }; But JavaScript does not provide an easy way to create similar objects. Most object-oriented languages include the idea of a class, which is a template for creating objects of the same type. From one class many similar objects can be instantiated. Many patterns have been proposed to address the absence of a class concept in JavaScript. ......

Posted On Sunday, February 6, 2011 8:42 PM

JavaScript Class Patterns
To write object-oriented programs we need objects, and likely lots of them. JavaScript makes it easy to create objects: var liam = { name: "Liam", age: Number.MAX_VALUE }; But JavaScript does not provide an easy way to create similar objects. Most object-oriented languages include the idea of a class, which is a template for creating objects of the same type. From one class many similar objects can be instantiated. Many patterns have been proposed to address the absence of a class concept in JavaScript. ......

Posted On Sunday, February 6, 2011 8:38 PM

Stoicism
Recently I have been reading about the ancient Greco-Roman philosophy Stoicism, which I encountered via Derek Sivers, Tim Ferriss and my reading of the New England transcendentalists. The book I read is called A Guide to the Good Life: The Ancient Art of Stoic Joy by William B. Irvine. I liked it a lot, and I don’t want to lose what I have learnt, so I prepared the cheatsheet below ......

Posted On Tuesday, February 1, 2011 8:11 PM

The Fast Way to Rebuild a Computer – Ninite.com
Dear Future Me, The next time you need to repave a Windows computer the link that you can never remember is ninite.com. Ninite is an online service that lets you select the free tools that they like to have on their computer (Firefox, 7-zip, notepad++, skype etc) and builds a custom installer that will install them all. It will save you hours. K. Thanks. Bye ......

Posted On Tuesday, February 1, 2011 4:00 PM

Copyright © Liam McLennan | Powered by: GeeksWithBlogs.net | Join free