Mike is currently… snowboarding in Banff |
||||||||||||||||||||||||||||||||||||||||||||
[ subversion book ] obligatory book plug [ syndicate ] rss 2.0 feed for boy meets world [ contact ] drop me a line [ about ] this is mike mason's weblog [ eskimoman.net ] original web pages |
Sat, 10 Apr 2004This is an archived blog post. I've switched to using WordPress as my blogging software and have not migrated all my old posts. I believe strongly in not letting an old link die, so this page continues to work. Please do visit mikemason.ca/blog to read newer posts. Sorting my (digital) life outI seem to have got carried away and ordered a 15-inch PowerBook from Apple. Josh, a friend from work, had his ludicrously lovely 17-inch PowerBook here this week, and battling crappy performance from my Windows laptop just pushed me over the edge. For a while now I’ve been saying I’d like to be able to afford Apple hardware, but it’s not really just about whether you’ve got the money for such a thing — more important is whether you think the extra features you get are worth the extra they cost. Buying the laptop in Canada using British pounds helps a little, but the bottom line is the Apple probably costs 20% more than an “equivalent” from, say, Dell. I say “equivalent” because I really have never seen anything close to the beautiful, sleek, impressive PowerBooks. I asked Josh to show me the killer feature that would convince me I needed an Apple. He sat there and looked at his PowerBook, all shiny metal with fancy glowing logos and said, “What? You want more?”. He demoed a few apps and then said, “Of course! Here we go.”. And he opened a Unix shell prompt and started fiddling around. For me, this is the feature I really wanted. I’ve used Linux for years, but it’s never cut it as a desktop operating system. Sorry, but it really doesn’t. It’s too hard to install. It doesn’t support all my hardware (wireless PCMCIA is a black, black art). The Apple is designed around its Open Source Unix core, and everything works great. Jon Chin had this to say: It’s a UNIX workstation laptop. Think about it: Sparc laptops are cool, if rare; SGI laptops would have been insanely wonderful except that they only ever existed in a film. In fact, better than any old UNIX laptop, it’s a NeXT laptop. The sleekest, funkiest, most ahead-of-its-time workstation in recorded history, and you could have its newest, shiniest incarnation throbbing gently on your thighs, with your strong fingers poised over its quivering keyboard, ready to pound its beautiful little shell prompt into submission. I think Jon got a litle carried away there… Maybe the PowerBook’s killer feature is that it’s an Apple. Last night I watched the Macworld 2004 Keynote and, if you can ignore the fawning applause from the audience, what comes across most is that Apple are all about making stuff that works. They’ve thought about how to make computers usable and absolutely beautiful on every level, and I really think I’m a convert. Weird — I’m usually dead cynical. Posted 01:15, 10 Apr 2004. [ permalink ] Wed, 07 Apr 2004This is an archived blog post. I've switched to using WordPress as my blogging software and have not migrated all my old posts. I believe strongly in not letting an old link die, so this page continues to work. Please do visit mikemason.ca/blog to read newer posts. IoC Taken Too FarReaders may be familiar with Inversion of Control (IoC), or as the technique is now known, Dependency Injection. Basically instead of a class allocating resources (the things it depends on) when it’s constructed, all its dependencies are created by an external “assembler” and passed to it. This helps a lot when creating testable code, because it’s easy to isolate and test single classes — simply pass in a bunch of mock or stub objects when you create the object under test. As with any pattern, good taste and judgement are required for it to be effective. I came across this example today: /** * A Log4J logger instance - initialised using IoC rather than * static logging to cut down on the number of Logger instances */ private final Logger logger; Log4j logger instances obtained through getLogger() are just references to a singleton managed by Log4j, so passing a reference to a logger to multiple classes doesn’t actually cut down on the number of instances. This mis-application of IoC has simply increased code complexity, without providing any actual benefit. As with any pattern or technique — including “Agile”, XP, TDD and Unit Testing — IoC or Dependency Injection should only be used when there’s a real benefit. As with much in life, there are no hard and fast rules about programming, otherwise you wouldn’t need something as complicated as a human being to write software. Posted 22:22, 07 Apr 2004. [ permalink ] |
[ tim bacon ] musings of an xp coach [ ian bourke ] enhancing core competencies since 1976 [ martin fowler ] a cross between a blog and a wiki [ alan francis ] agile != good [ paul hammant ] part of the problem… [ darren hobbs ] the blog formerly known as pushing the envelope [ mike roberts ] on life and technology [ chris stevenson ] skizz-biz [ joe walnes ] joe's new jelly [ rob baillie ] oracle |
||||||||||||||||||||||||||||||||||||||||||
Registered plugins: SmartyPants, antispam, bloglinks (v0.2), calendar (v0+6i), pluginfo (v1.0), and userstatus (v0.1) |