I saw this article about Dell and ideas that people are posting about how to best revive it. The number one idea was to offer Linux pre-installed. I think the market for pre-installed Linux will be minuscule for some time to come. Instead, I think Dell should consider following Apple's lead and develop their own operating system, custom tailored to their hardware. It should be highly polished and easy for users. A DellOS could be built on Linux, BSD or even on Darwin. It would be a tough row to hoe, but once there, Dell could innovate in much the same way Apple is free to do today.
In fact, I think the Apple model may well be the future of computer manufacturers with Microsoft ultimately being forced into building its own hardware to remain competitive with the likes of Apple (and Microsoft will ultimately also have to wrestle with the enormous propriety code base that is Windows...that model simply doesn't scale in the long run). Of all the computer manufacturer's out there, I think Dell is probably the best positioned to pull off something like that. They already have the direct sales channel, good brand recognition, and they have been putting their toe in the water with Linux for a while now. They just need to assemble the right software team and someone with a fanatic attention to detail to make it happen. Or, maybe they should buy a Linux vendor.
Wednesday, February 21, 2007
Saturday, February 10, 2007
Object initialization
In Smalltalk, it is a common pattern to create new objects in a class method called "new" as follows:
The typical initialization pattern does not accommodate initialization for a variety of needs. For example, I might want to instantiate MyClass where foo is set to 'bar', or I might want to initialize my new instance with foo set to 'baz'. The bar/baz decision is entirely dependent on the context in which my new instance is to be used. The simple and typical "super new intialize" pattern is not accommodates and results in unnecessary post initialization initialization.
I think I would prefer a solution where any class can have one or more pre-initialized "prototypes" that you simply copy. In this simple example, we would have one prototype that has foo set to "bar" and another with foo set to "baz" and we would simply copy the appropriate one.
Then, the "initialize" method on the instance side of the class performs some measure of instance variable initialization as follows:
MyClass class>>new
^super new initialize
This pattern is so common that some have argued (audio link) in favor of making it the default behavior for for the instantiation of all objects in the system. I find this a bit distasteful. One of the things I like about the Self language is its concept of creating new objects by cloning existing ones. I find that approach to have a certain Zen like quality. In that environment, one would find some object that most closely matches the desired behavior and clone it. Then you would mutate it as necessary to fit your purpose. Such objects are often called "prototypes" (not to be confused with the use of the term "prototype" in Javascript where the prototype of an object specifies inherited behavior).
MyClass>>initialize
foo := 'bar'.
The typical initialization pattern does not accommodate initialization for a variety of needs. For example, I might want to instantiate MyClass where foo is set to 'bar', or I might want to initialize my new instance with foo set to 'baz'. The bar/baz decision is entirely dependent on the context in which my new instance is to be used. The simple and typical "super new intialize" pattern is not accommodates and results in unnecessary post initialization initialization.
I think I would prefer a solution where any class can have one or more pre-initialized "prototypes" that you simply copy. In this simple example, we would have one prototype that has foo set to "bar" and another with foo set to "baz" and we would simply copy the appropriate one.
Subscribe to:
Comments (Atom)