19 Dec 2009 @ 7:27 AM 

—- OBLIGATORY SPOILER ALERT! —-

I’m not going to go over the movie’s plot point by point, but some things will get mentioned that, if you don’t want to know anything about the movie before you see it, you won’t want to read.

—- SPOILER ALERT OVER —-

So I went to see Avatar tonight with a buddy of mine and my 9-year old son.  We went to the local Carmike movie theater, which isn’t anywhere near as nice as the Regal 24 20 minutes away that we usually go to.  But, it was a good choice because (a) the theater was only about half-full so there was plenty of seats and plenty of buffer space between people, which I like, and (b) this theater actually has better projectors and sound systems than the Regal does!  So, you trade a much better concession stand, arcade, stadium seating and an otherwise nicer facility for an overall better movie experience.

And for Avatar, that was the right choice.

So, as the title here says, I think the movie is fantastic, put simply.  No, I don’t think it changes cinema as we know it, as some have claimed.  No, it’s by no means perfect.  Is it Jim Cameron’s best?  Maybe.  It certainly doesn’t rise or fall too far above or below his other work (I still think The Abyss might be singularly his best work, but Avatar isn’t too far off and, after I give it some thought, it might jump out ahead).

But in any case, man, it’s damned good!

Now, let me give you the reaction of my friend… he didn’t like it much at all.  I *think* his main problem was just that it didn’t have enough action and was a bit too, I don’t know, wishy-washy maybe?  There’s no question that a big part of the story is a love story, and I’m not sure he’s the type of guy that ever allows himself to like a movie like that.  It’s also definitely “slow” in parts.  This isn’t a criticism of him at all… everyone gets to decide for themselves what they think of a movie, and whatever his reasons, he didn’t like it much.

My son?  I think he’s mixed on it.  He was generally well-behaved throughout, which is usually a sign that he doesn’t hate what he’s seeing.  I’m not at all sure he totally got the movie, but I know he picked up at least some of the key points because he talked about them a bit afterward.  Still, for him, there wasn’t enough action for sure.  I think because the action that was there was really good, it was passable for him.  But yeah, overall I think he’s mixed.

Me though?  I loved it.  Start to finish, I thought it was excellent.  The story, in one sense, is pretty simplistic, and really isn’t anything too original (maybe the idea of the avatars themselves is at least somewhat original, but in a way it’s not a hugely important aspect, as weird as it is to say that given the title of the movie!).

No, at its core, this is a high-minded, new-age-themed movie.  Creatures in perfect equilibrium with their environment, who commune with it and are connected at a fundamental level to it?  A global consciousness that all the inhabitants of the planet are a part of?  The ability to store the memories and “spirit”, in some sense, in that global consciousness?  Yeah, that’s some left-wing hippy crap right there for sure!

But, it’s an incredibly positive idea.  The whole world of Pandora is so beautiful, and not just in a visual sense.  The way these creatures live in perfect harmony with each other, that’s a beautiful thing.  It’s something we can only wish and hope for here on Earth.

Now, that theme leads to one or two bad moments in the film.  There’s practically a dance number (repeated twice in fact) that I groaned a bit during.  It was a little *TOO* hippy-influenced!  It really did look like a few thousand people at Woodstock who got a hold of some bad acid while some happy-happy-joy-joy music played in the background.

But, it’s over pretty quick, so I can cope.

The love story angle, again, was a really nice thing to watch unfold.  Everyone’s always looking for that “soul mate” connection, and that’s what we wind up with here.  It didn’t feel like two creatures hot for each other that just wanted to snog; it really felt like it was much deeper than that.  At the same time, it’s not an overpowering, wimpy kind of romance thing… you know, the kind of love story guys generally HATE to watch.  No, it was very much in service of the overall story and worked well.

The journey the main character takes is really what makes the movie work IMO.  Like I said, it’s not a complex story, and there’s no twist to speak of, it all plays out pretty much exactly as you expect it to.  If you’re looking for a movie full of surprises story-wise, this most definitely is NOT it.  But, a straightforward story doesn’t mean it’s *simplistic*.  There’s a subtle difference.  You can have a story with complex themes that plays out straight as an arrow, and that’s what this is.  How Jake Sully evolves over the course of the story is really the key here.  It’s the journey of someone overcoming his own narrow-minded view of things.  It’s the journey of a man awakening in a mental and spiritual sense in a way he never dreamed of.  It’s the journey of a person becoming at peace with the world around him.

In short, it’s the journey we all ultimately want to take, even if we don’t know it.

Simple exploration is also a big theme here, and that’s a concept that is near and dear to me.  One of my favorite activities is simply going for a drive somewhere I’ve never been.  I absolutely LOVE that sense of discovery.  I’m also a person who loves the feeling of learning something new, not because it’s new information I can make use of, but just that simple moment of discovery when something I didn’t understand or know before now is suddenly clear in my mind.

That’s the reason Star Trek: The Motion Picture, which most people seem to think isn’t so great, I think is one of the best ST movies.  It’s all about the unknown, about discovery and exploration (yeah, it’s about those things under the threat of imminent destruction, but still!).  The act of exploration and discovery, whether anything comes of it afterward, is worth it in and of itself.

Throughout this movie, the main character Jake is exploring an alien environment, discovering about it and its inhabitants and learning about things he had never been exposed to before.  There are times when the simple joy of this comes through clear as a bell, and I absolutely loved being along for the ride!  The fact that Pandora doesn’t exist doesn’t matter because it exists in Jim Cameron’s mind, and now on the screen, and exploring it is effectively as real as exploring a real planet.  He’s also learning about himself, which is one journey of discovery we’re all on whether we want to be or not.  Discovering our fears, exploring our limitations and learning about our motivations and values is the very definition of the human experience, whether it’s on Earth or Pandora.

What about the FX you ask?  Simply stated, magnificent.  Is it the best-looking movie I’ve ever seen?  Well, if not, it’s damned close.  There’s so much detail here, and the blending of the practical and CG is just unbelievable.  I still think the shot of the alien ship floating of Johaanasburg in District 9 is the best reality/CG blending I’ve ever seen, but there’s some of that here as well.

Over the past few years we’ve seen some amazing advances in blending computer-generated graphics with the real world, and this is certainly a big step in that direction in terms of characters.  The expressiveness of the CG Na’vi really can’t be understated.  This most definitely is the next level of motion-capture.  It’s really is amazing in parts and you’ll absolutely forget you’re looking at creatures that don’t actually exist at times (it’s not perfect though… every now and again you notice something that’s not *quite* right, and it jars you for a moment… which is really telling you how good it is the rest of the time!)

I was also struck by the quality of the sound.  Like I said, this theater has a killer sound system, and that most definitely helps, but especially during the scene when the humans first attack the Na’vi in force, the explosions were truly magnificent.  You could feel them force of them from the sound coming out… just the right volume and tone, and of course perfectly matched to the visuals.  And frankly, that really helped heighten the emotional experience of this scene.  It’s a truly sad moment, and if you’re at all empathizing with the characters at that point then I think you’ll notice that the sound plays a big role in getting you there.

Now, there’s definitely some parts that aren’t as good as others here.  There’s a few lines of dialog that are groan-worthy.  There’s a few logical problems here and there (My biggest one: no Na’vi thought of the trick Jake does to get the big flying creature???  Really?!?  They’ve been doing that for like 100′s or 1000′s of years and THE MOST OBVIOUS SOLUTION IN THE WORLD NEVER DAWNED ON THEM?!?).  But, if you are willing to not nitpick, you’ll be fine (and nothing really knocked me over the head and threw me for a loop, I only saw relatively minor things).

Cameron also hits you over the head more than a few times with an obvious left-wing agenda.  Now, I’m OK with this because I agree with most of the agenda… but there’s a few instances were it’s *SO* obvious, and more than a little preachy, that it’ll pull you out for just a second.  I think you’ll recover quickly though.  But, if you’re of a right-wing mentality, be prepared: you’ll probably want to blow up Hollywood after this.

Some people will see this movie as something of an anti-technology movie, and I think that’s wrong.  Technology isn’t the enemy, its our usage of it that is.  It’s forgetting that life without technology is possible and that what’s really important in life isn’t your iPhone or your PS3 or your Audi.  Those things can enhance an otherwise good life, but they can’t make a life good, and if you’re one of those people that thinks they can… I don’t know how else to say this except: you’re wrong.  Conversely however, giving up technology altogether isn’t a ticket to instant happiness.  There’s got to be a balance.

So, overall, great movie.  It’s definitely NOT for everyone though… if you’re expecting 2 1/2 hours of non-stop action, you’ll be disappointed.  If you can’t allow yourself to enjoy a love story, you’ll hate it.  If you aren’t accustomed to thinking about “meaning of life” sorta stuff, you won’t get it and won’t like it.  If you’re bothered by beings that don’t look exactly like you (i.e., you’re a bigot) you’ll probably hate it.  But, this isn’t a movie for people like you.

This is a movie for people who believe the world would be a better place if we got along with each other better, and everything in our environment too.  This is a movie for people who realize that a simpler life is often-times a better life.  This is for people who are capable of caring about others and allow themselves to feel emotions based on a story.  Too many people these days see emotion as weakness, and that’s a load of shit.  If you can’t or won’t allow yourself to be emotional based on nothing but ideas, if you can’t put yourself in a hypothetical situation and feel the emotion of it, then this isn’t a movie you’re going to like.  And if all you want is explosions up the wazoo, well, you’re going to be happy for only about half this movie (you’ll totally LOVE that half though).

And, while I haven’t bought a Blu-Ray player yet, I definitely imagine this is the movie that will make me do so.  If you see Avatar and think it’s anything but one of the top three best-looking movies ever made, I frankly question your sanity.  And if nothing else, you’ll enjoy the audio/visual aspects of it for sure, story aside.

But if that’s the ONLY aspect of it you enjoy, I’d say you completely missed the point.  This is a good story, even a great story I think, even if it’s very predictable and not overly complex… but it’s a movie that definitely isn’t for everyone.

And, come to think of it, that’s very sad because it really SHOULD be for everyone.  The story really SHOULD affect everyone in a similar way and it really SHOULD make you realize that the human race probably isn’t on the best path right now… I like to think we’re not doomed or anything quite that drastic, but when you look at the Na’vi and Pandora in this movie, you’ve GOT to realize how far we really do have to go.

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 19 Dec 2009 @ 07:27 AM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 15 Dec 2009 @ 7:08 PM 

Hey all… just a quick note that my book, “Practical Palm Pre webOS Project” is now available at Amazon, and I presume, other retailers.  For info you can go here:

http://apress.com/book/search?searchterm=zammetti&act=search&submit.x=0&submit.y=0

Hope you enjoy it and Happy Holidays… eh, screw that politically correct crap: MERRY CHRISTMAS!

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 15 Dec 2009 @ 07:08 PM

EmailPermalinkComments (3)
Tags
Categories: Uncategorized

 07 Oct 2009 @ 5:33 PM 

Over at PreCentral.net, there was a recent post talking about the app install limit most Pre owners, including me, have encountered.  I thought the post summed up my own thoughts pretty well.  In the feedback on the post, there were suggestions to let Palm know what we’re thinking on this matter, and I felt compelled to do so.  As someone who likes their Pre overall quite a bit, and as an author writing about webOS, and as a developer with an eye towards making some money on the platform soon, it’s a big concern for me.

I thought folks might be interested to see what I submitted to Palm via their feedback page.  I absolutely encourage anyone else with an interest in this to do the same, but of course, be respectful!  It never advances the cause if you “get loud” on companies.

That being said, here’s what I wrote (in typical author form, it’s wordier than it probably needed to be!)…

———-

Hello.  Let me start by saying I think you guys have done a fantastic job with webOS and the Pre thus far.  I’ve seen almost nothing but good things coming from Palm of late!  In fact, I am in the final stages of writing my book on webOS development for the Pre (scheduled for release this December) and I have become more and more excited with the platform as that process has progressed.  I use my Pre on a daily basis and definitely love it!

When the book is complete, I have quite a few applications planned that I anticipate can bring some revenue my way, not to mention make webOS more attractive to end users.  However, there is a massive gorilla in the room at the moment, a hurdle that I’m looking at and thinking “oh boy, this could be a deal-breaker”.  I’m referring to the application install limit.

As I understand it, the /var partition where applications are installed is sized to 253Mb.  I know that in my case, this amounts to ~30 applications installed.  Unfortunately, there are at least a dozen more I really want installed, but I simply can’t.  This represents a huge problem for me.

I understand that a lot of the issue comes down to how developers design their applications.  Those that have large data sets that don’t “live in the cloud”, or those that don’t make efficient use of compression techniques (CSS sprites and image optimization for example) make the situation worse.  That being said, 253Mb seems to me to be far too small a space for the amount of applications I believe a typical user would want to have installed.

Especially having coming from a WinMo background where I could install apps to my spacious 8Gb memory card, it’s an unacceptable limitation.

I understand there are security considerations, and especially as a developer with an eye on making money on the webOS platform, I’m in agreement with that generally.  I’ve sold WinMo applications in the past, and I also know that those applications were pirated along the way.  It’s always debatable whether that sort of activity really costs someone in my position sales, and I’m very strongly against copy protection that inconveniences customers in any way, shape or form.  But, simply installing applications to a hidden partition that isn’t (easily) accessible, especially when the user doesn’t really know or care about that, seems perfectly fine to me.

Except that the user DOES effectively know about it as soon as that “not enough space” alert popups up trying to install a new app.

Palm has followed the Apple model by, conceptually at least, mimicking the “there’s an app for that” motto.  There’s nothing inherently wrong with that model, but it does necessitate a very high limit on the number and size of applications that can be installed.  I view this limitation as it currently stands as the single biggest detriment to the long-term success of the webOS platform and I believe it *NEEDS* to be your #1 priority above all others.

It is a bit bizarre to me to see Palm spending time and resources constantly re-enabling iTunes sync, a feature I firmly believe most end users don’t care much about, instead of  fundamental limitation like this.  Especially given the advent of paid apps in the App Catalog, I think Palm is setting itself up for a huge failure by not addressing this issue ASAP.  I know I personally could care less about iTunes sync, and while I completely understand if your market research indicates otherwise and you therefore think it deserves attention, that’s fine with me, but I think it’s a real mistake if that is ever prioritized over addressing this limitation.

Obviously, if a fix is in the works already then by all mans, ignore this entirely :)   However, if that is the case, please take my recommendation and make that work public knowledge as quickly as possible!  One of the things I’ve liked about what Palm has done over the past few months is there has been a good feeling of transparency overall.  You guys seem to very much “get it” in terms of communicating with your customers and especially the developer community.  I know that during the course of writing my book I’ve been very fortunate to get some help from some Palm employees that, without a doubt, made it possible for me to even start the book.  For the most part, we know what you’re thinking and doing all the time, which is great, and in stark contrast to some other companies I could name.  You’ve built up some good will to be sure, and I for one want to see that continue.  Obviously we don’t expect or need to know every nuance of your plans as customers *OR* developers, but on something like this, where there’s no competitive advantage to be concerned with giving away, it can only help the good-will that you currently enjoys from us Pre owners and developers to continue.

In conclusion: thank you for a great product in the Pre, I love the direction you’re going with webOS, but please don’t overlook this, in my opinion, very significant problem!  Palm has shown a lot of forethought and intelligence, and I think it’s fair to call it a resurgence in the relevance of your company, but I firmly believe this is an issue that has the potential to derail your efforts ultimately, to at least some degree.  If a fix is on the way, please let us know that!  Declare it from the rooftops as loudly as you can!  If one is NOT on the way, please, adjust your priority list and move this straight to the top ASAP!

Thank you very much,
Frank

Frank W. Zammetti
Author of “Practical Palm Pre webOS Projects” (coming 12/2009)
and “Practical Ext JS Projects with Gears”
and “Practical Dojo Projects”
and “Practical DWR 2 Projects”
and “Practical JavaScript, DOM Scripting and Ajax Projects”
and “Practical Ajax Projects with Java Technology”
(For info: apress.com/book/search?searchterm=zammetti&act=search)
All you could possibly want is here: zammetti.com

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 07 Oct 2009 @ 05:33 PM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 31 Aug 2009 @ 10:23 PM 

So, a bit over a month ago I got a brand new Palm Pre, and I’ve been playing with it ever since (in fact, it’s for a project I’m knee-deep in, it’s not just a toy, I actually needed it!).  This phone has been out for something like three months or so now, and the press has been overall I think pretty positive, and in general I’d say for good reason.

The question to ask though is whether it’s truly a viable competitor to Apple’s venerable iPhone?  Is it just another competitor that will eventually be left by the wayside?  Is it really the savior of Palm itself, as some have claimed?

Well, you didn’t think I’d be with an opinion on all of this, did you?

I’ve been compiling a list of things I’ve noted about the device, and perhaps more importantly, its operating system, webOS.  Really, when you get right down to it, they are two separate products, which quite conceivably might have very different fates.

In any case, here are some of my thoughts:

  • Overall, I like the Pre, and I like webOS more.  I don’t love either by any stretch, but I definitely see the potential, particularly of webOS.  I think that Palm has put forth a great concept: the idea of developing web applications using standard web application technologies.  This to me is a far better situation than Windows Mobile or the iPhone or all the phones that use Java ME.  This technology stack means that, potentially, Palm is opening up the platform to a much wider audience of developers.  It’s a gamble to be sure: can you really exploit the full power of a modern smartphone with just web technologies?  Time will tell of course, but I for one am enthusiastic.
  • Seeing the potential is one thing, but the current state of affairs is another, and I think my overall impression is that the Pre, and webOS itself, have a lot of rough edges.  Some people have said it’s a beta effort, and I don’t think I’d go quite that far, I think they are better than that.  But, there’ s definitely rough edges, and even some very legitimate gripes, and that’s what most of the remainder of my bullet points are.
  • The keyboard is actually a bit better than I thought, and frankly, the more i use it the more I like it.  I didn’t have much hope to begin with, it looks extremely small and uncomfortable, and certainly it is small.  Palm has however made some smart choices that makes it tolerable, if not pretty darned good.  First, the keys are raised.  This makes finding your mark easier.  Second, the keys are rubberized, so your fingers aren’t slipping all over the place.  Third, the spacing is a little better than I expected.  All put together, it’s a decent experience.  The one big downside though is a simple mistake I think: the top row of keys is far too close to the screen housing, making them difficult to get.  It’s more of a nuisance than a real problem, but that’s really my only complaint.  That, and that it’s a little awkward to slide open, especially with one hand.
  • Having to use my PC to delete a video, or music file, or anything else, is lame.  The Pre does not come with any sort of file manager, even the most basic one.  In fact, until just a few weeks ago, when the vibrant homebrew community produced one, there was nothing even on the horizon.  What’s worse is there’s not even a way to delete a video in the video player!  I could have lived with the idea of an application can delete the types of files it works with in the absence of a proper file manager, but you don’t even get that.  Lame, and really one of my biggest complaints.  All I can say is thank Jebus for the homebrew scene!
  • The inability to delete, or at least hide, the built-in application is a big annoyance.  I understand there must be a deal with Sprint for things like Nascar and Sprint TV, but in the end it’s *MY* phone and I should be able to get rid of them.  I’m not asking to be able to uninstall them, or reclaim the space they use, I just want to be able to hide the icons (without hacks I mean… there are in fact ways to do this, but it’s not what you’d call end-user accessible).
  • This thing gets hot!  I mean, it’s not exploding like an iPhone, but the bottom back of it gets quite warm just surfing the web.  I think I’m also seeing some slight discoloration on the bottom of the screen as a result of this, but nothing I’m worried about.
  • The sound out of the built-in speaker is, in a word, awful.  Now, don’t get me wrong, I’m not expecting a Bose Wave Radio experience here, but it’s quite bad.
  • Overall the Pre is fairly snappy, although there definitely are occasions when I notice slowdowns.  Launching apps is maybe a little slower than I’d like, but nothing I can’t live with.  Still, a slightly beefier CPU wouldn’t hurt I think, but mostly I think there just needs to be some good software updates.
  • I totally love the wall charger that Palm packages with the Pre.  I especially love the fact that I can use it to charge other USB devices (of which I have fewer now because of the Pre, but still).  I don’t know why I never bought a wall charger like that before… oh wait, yes I do: they run about $50 by themselves!  Kudos to Palm for including one.
  • The Pre by default can’t sync with Outlook on my desktop, and that sucks.  This is one symptom of something many are saying about the Pre that I sort of agree with and that’s that there are some relatively basic (for a smartphone) functions that the Pre, and/or webOS, doesn’t yet include.  Now, it’s one thing to say they will be taken care of with future updates, and I suspect that’s the case.  But it’s another to be missing this functionality on day one.  I personally count Outlook syncing in that category.
  • The overall build quality of the Pre feels so-so.  To be sure, it’s not poor, doesn’t feel like a toy, nothing like that.  It generally feels pretty solid.  There is one nagging problem though: there is a TON of play between the upper half (the screen) and the lower half (the keyboard).  It’s pretty disconcerting, and some people have experience what’s been dubbed “the Oreo effect”, which is where a Pre owner can literally twist the top half something like 90 degrees from the lower half, but somehow without breaking it!  I haven’t had this happen, but it certainly feels like I could do it without much force.  I’d say that’s the only build “issue” I’ve seen with mine, but it really needs to be rectified (oh yeah, and that USB cover… pretty crappy… fortunately, that’s not a big deal).
  • By default, the web browser (which is otherwise extremely good) doesn’t let you download files.  Umm… WHAT?!?  You mean I can’t download a PDF to read later?  Oh, and by the way, it doesn’t even recognize that it IS a PDF and so won’t open it with the included PDF viewer.  That is just outright broken in my mind on both counts.  Problem association of file types (and let me modify them please!) is a must, and so too is downloading of files.  Thankfully, the homebrew scene is here to help with the downloading part at least.
  • Battery life.  In a word: it’s practically got none!  I can get from about 9am to around 6pm before I start seeing low battery warnings, and that’s with what I consider average use (no GPS, an hour or two of wi-fi, not using it as a music player, some web browsing).  It’s poor by any measure.  I have an extended battery on the way that, from what I read, will alleviate this, but out of the box it’s quite poor.  Just because there is the cool Touchstone charger available doesn’t justify an obviously underpowered battery.  Credit for making the battery easily swappable at least, that’s definitely a good thing.
  • I’ve found multiple UI usability problems throughout webOS.  Just one example: the Palm apps like to have little circle icons along the bottom that there’s no way to know what they’ll do until you try them.  Really, why can’t I tap-and-hold and get a tooltip?  It’s a pretty basic usability tenant: icons without text are a bad idea in general, but they need to be 100000000% obvious to EVERYONE if you’re going to go that route.  I’m no idiot, and there were some icons I couldn’t figure out.
  • The gesture-based UI is very nice and I find it intuitive and easy to use.  One caveat here is that they kind of broke that paradigm by including the center button right in the middle of the gesture area.  I see no real point in that button at all, and certainly not where it is.  I’m not entirely sold on the gesture area in general frankly, but it would be a lot better without that button in the middle.  Especially when there’s a simple gesture (swipe up from the gesture area) available all the time that does exactly what that button does, I think it’s a completely superfluous piece of hardware.  Get rid of it and drop the price by a quarter!
  • There is no way to delete all, or even multiple, eMails at one time.  Oh, now THAT is annoying!  This again is one of those basic functions that you can’t believe is missing.  There is already homebrew solutions for this, and I fully expect a future update will include this, but there’s ZERO reason it wasn’t there day one.  In fact, the whole “swipe to delete” idea works fine when you’re only deleting one or two items, but when you have more than that it VERY quickly becomes a big hassle.  This applies to all apps it seems, unless they specifically go out of their way to do things differently than the Palm-supplied apps do.
  • The Synergy concept, that is, combining all your contacts and other PIM information from multiple accounts into one view, is neat.  However, there’s some hiccups here and there.  For example, in the calendar, events are not color-coded in the month view based on the account it came from.
  • Universal search is anything but.  It doesn’t search calendar entries, so right of the bat it’s usefulness is greatly decreased.  Still, it’s a nice idea, and being able to jump out to the web to do a search instantly is definitely nice.
  • Not having a simple detail list in the memos app is something I miss from my previous Windows Mobile device.  Sure, the corkboard and sticky note interface looks hella-cool (one of the neatest things about the Pre out of the box IMO), but it’s usefulness is diminished by not being able to switch to a simple view.
  • I’ve heard many complain about the lack of apps in the App Catalog, and while it’s true that the number isn’t too high, the quality so far has been pretty good.  I can live with that.  Especially when there’s a very vibrant homebrew community out there, it’s not so bad.  I don’t think apps are a problem, so long as they keep coming, even if only at a trickle.

so, again, overall I have a relatively positive impression of the Pre, and more so of webOS.  I think Palm is on the right track.  Whether they are more successful, or just as successful, as Apple, I don’t know.  I think they have a horse in the race though for sure.  But, there are without question some rough edges, and some are a lot rougher than others.  So long as updates come fast and furious and incremental improvement is made then you can count me a happy Pre customer.  There’s definitely a lot to like here!

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 31 Aug 2009 @ 10:23 PM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 26 Jul 2009 @ 5:21 AM 

A question that gets raised a fair bit in my line of work is that of animations in UIs.  Nowadays, most UIs have some sort of animation going on in them: windows expanding and contracting, menus fading in and out, comboboxes that slide open, that sort of thing.  As someone who spends a great deal of his work day, and beyond, thinking about and dealing with UI design issues, more than once I’ve had someone suggest such animations are superfluous and ask my thoughts on the matter.

I have to admit, for a very long time, I whole-heatedly agreed that animation was pointless.  That was until I did some research and began to understand the reasoning behind why people were starting to do more and more of it.  Contrary to what you may think (and what I frankly thought), it’s not just about a “coolness” factor (although that undoubtedly plays a role sometimes).  No, there is some very good reasons for doing it.

It all comes down to some interesting facts about cognitive science, that is, understanding of how the human brain processes information.  You see, the human brain, more specifically, how it deals with visual input (although it’s true to some extent of your other senses too), doesn’t react too well to sudden changes in the environment.  You can of course convince yourself of this pretty easily just by thinking about what happens when someone sneaks up behind you and throws a hand in front of your face suddenly.  You get startled, most of the time at least, right?  There is of course some basic survival instinct at play here: it stems from the fact that sudden changes in the environment are interpreted immediately as being potentially life-threatening and steal your attention suddenly, jarringly.

However, the more interesting fact is that your brain has trouble believing itself, in a sense, when things just suddenly appear, once it determines there’s no actual danger (which, unless you’re working on a nuclear submarine is usually true of computer interfaces!).  You see, your intellect knows that things, generally, don’t happen that way.  Things don’t usually appear out of nowhere (unless they appear suddenly on the periphery, which is expected, but here we’re talking about things suddenly appearing in your primary field of focus, i.e., right in front of your face).  So, when your brain receives such a signal from your vision subsystem, it basically goes “WTF?!?”  And, it’s jarring, which is the problem.  Your brain has to do a massive context-switch at that point, and context-switching is bad, m’kay?

Now, imagine sitting at your desk and thinking to yourself, “Self, I gotta write a note, so go pick up the pencil”.  Your hand moves, grabs the pencil, and it gradually moves into your field of view (we’ll assume you grabbed it without having to look at it).  There is a gradual motion here, the pencil moving from the position in space it occupied before you moved it, to the position it ends up occupying when it’s in position to write.

Your brain has no problem with that, you see, because it happened over time and your brain was able to track it.  Or, to put it in a way that fits the context of the post: its position in space was animated!  It moved, gradually over some period of time that was above the minimum threshold at which your brain has that “where the hell did that pencil come from?!?” reaction.

Now, going back to UIs… if a window just suddenly appears, even if you don’t perceive it, your brain will be taken aback a little bit by that.  True enough, working on a UI that works that way long enough will minimize the effect to the point where it’s more or less irrelevant, but it’s always there.

That’s why animation is a helpful thing and not superfluous eye candy: it effectively helps your brain comprehend what’s happening in the UI faster, easier and with less cognitive dissonance, which is a term that refers to the mental gymnastics your mind has to do when confronted with two seemingly contradictory ideas (in this case, the fact that the window wasn’t there one moment and now suddenly is).

The other important factor here is that animation actually helps you use the UI more effectively.  When something happens in an animated way, your brain can track the change far more effectively and your reaction times improve.  It’s pretty easy to understand really: the amount of time it takes your brain to overcome the cognitive dissonance of a non-animated change can often times be greater than the amount of time the animation itself would have taken if implemented, plus the time it takes you to literally react to the change, thus you respond faster.

To boil this all down to something succinct: animations in UIs help the user to experience less cognitive dissonance, comprehend and even notice changes more effectively and ultimately lead to faster, smoother UI interaction responses.  They are by no means superfluous and aren’t just something pretty to impress your friends with!

We have seen over the past few years a lot more animation in UIs.  Partly this is because the necessary hardware power became available to support it, but also because the basic understanding of its benefit were realized.  Apple has probably done more than most others to demonstrate this.  Virtually every UI Apple has done for some time has some form of animation, from the iPod to the Mac to the iPhone, they all have it.  Very often it’s so subtle that you barely notice it, but that’s exactly the point.  And isn’t it true that most people agree Apple produces some “smooth” UIs?  Guess what?  Animation plays a key role in that judgement!

Now, all that being said, it’s also 100% true that you can royally screw up animations and wind up with a large negative impact.  Animations need to be quick, in fact just quick enough to be perceivable, and also need to be fairly mundane, in a way, or you might even say realistic in some way.  Those windows that explode in a million pieces when minimized may look hella-cool for instance, but they aren’t really helping the user any, certainly not as much as a simple shrink-to-the-taskbar kind of animation, because it’s not something anyone typically expects a window in any context to do!  So, it can do a lot more harm than good in the end.

Also keep in mind that the term “animation” isn’t limited to motion.  For instance, you can animate the color of an element across some range, say highlighting a message in yellow briefly and then fading gradually back to the standard background color.  This is a very common UI trick referred to as the Yellow Fade Effect, and it is also a form of animation!  Animation just means a gradual change of some property of an object over time (usually a visual property, but not necessarily).

So, the next time you’re working on a UI design, and you want to impress your boss by putting in some cool-looking animations, you can sell her on the fact that it’s not just something cool and isn’t just pointless work to make your little programmer heart be into the project.  No, there are legitimate, scientific principals at work there that, when done right, will have a positive impact on the human-machine interactions you’re building.

But yeah, they can *still* be cool too!

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 13 Feb 2010 @ 05:06 AM

EmailPermalinkComments (1)
Tags
Categories: Uncategorized

 19 Jul 2009 @ 6:05 AM 

Well, it took me long enough, that’s for sure, but I finally got around to redesigning Zammetti.com.  Now, all things me can be found there.

Check it out

(Yes, that’s really the entirety of this blog post!)

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 19 Jul 2009 @ 06:06 AM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 19 Jul 2009 @ 6:02 AM 

You know, programmers love to build layers, especially us (primarily) Java guys. For some reason, a language named after a caffeine-heavy beverage brings out the need to abstract away everything from everything else, to extend this and that, to build parts on top of parts on top of yet other parts.

The CIA uses layers to hide the truth. They tend to “abstract out”, so to speak, the field agents from the analysts, make it so that the truth is at least ten levels of indirection away. I guess the spooks are developers at heart!

I’ve known people who take the simplest of programming tasks and turn it into a monumental task, complete with implementation of 10 different patterns, 20 different interfaces because God knows we might need to implement a whole other way to add two integers together some day, and build delegates and DAOs and DTOs and VOs and Cheeri-o’s and O-rings and O MY GOD JUST STOP ALREADY!!

You know, layer cake is good. It’s real damned good actually. Look at my gut these days and that fact becomes obvious. But too much will clog your arteries and make your heart explode at age 35. Thus it is with software engineering (I’m not really sure what that means, but it sounded good as I typed it).

Then there’s loose coupling. It’s great to have small parts with very fine-meshed interfaces that can be connected in new and exciting ways to do all sorts of whiz-bang things. I’m all for that.

And then, there’s love and marriage.

You see, love, and most especially marriage, is a WHOLE lot software architecture, at least the type I’ve described here:

  • Of course, there’s the KISS principal in software design (Keep It Simple Stupid, for those living under the proverbial rock, a principal more and more developers and architects seem to either forget or just don’t get these days). There’s of course a “kiss” in marriage, but unlike the KISS principal, which can lead to elegant, easy-to-maintain software, the “kiss” in marriage usually leads to a creation that sucks the life out of you, is anything but elegant, and is a bitch to maintain.
  • Marriage is an exercise in bad SOA (Service-Oriented Architecture): the interface between the two entities is highly unknown, constantly changing and very confusing. I’m not talking about the PHYSICAL interface of course. No, that’s pretty simple for most people. Trying to get the two objects in a marriage to communicate however is an exercise in frustration under the best of circumstances. A wife’s interface changes constantly, is prone to blow up if you feed it the wrong information, and is unusable for about a week out of every month. A husband’s interface is usually easily distracted by anything that can be thrown, or can be shown on television, tends to not remember values from one request to the next (which is how HTTP works, but men don’t remotely as well as the protocol does) and usually have too simple a data type collection (grunt, groan, hmrph, that’s about it). No, husbands and wives, like a client calling a service with a poorly-documented external interface don’t communicate very well on most occasions.
  • In a marriage, as in a poorly-designed system, there isn’t enough separation of layers. Now, of course above I was saying how too many layers is a bad thing, but on the other hand, if there’s not quite enough abstraction between layers, that’s just as bad. Components that know too much about each other are difficult to maintain separately. Translation for the married crowd: no time apart from one another leads to nothing good. There has to be some degree of separation, some degree of space, some degree of personal freedom, or things won’t work, much like a change in one function can break an entire system if not abstracted quite enough.
  • Like in a lot of software written today, love and marriage has terrible error handling. When something goes wrong, it isn’t usually handled gracefully, the whole system just falls apart. Statistics say that 50%+ of all marriage ends in divorce, which means the system couldn’t be rebooted. I suppose modern computers have an edge there because a reboot tends to fix just about anything, at least in the Windows world.
  • Marriage in general, like so much software written today, is an exercise in anti-patterns. The whole point of sex is to perpetuate the species. As such, the seeds should be spread around as much as possible (this isn’t an argument for being promiscuous; it’s just a statement of biologic imperative and evolutionary truth). So whose bright idea was it exactly for two people to stick themselves together and never do right by their species by ensuring genetic diversity?!? I submit that’s an anti-pattern! Love, and certainly marriage, is exercises in two people giving things up to be together. That’s an anti-pattern! Of course, software engineering isn’t ENTIRELY like marriage:
  • The user interface of most software stays pretty static over the years. There are tweaks, sure, but most UI’s don’t change drastically over time, barring a complete rewrite of the application (which you can liken to getting divorced and then re-married). Husbands and wives, on the other hand, have interfaces that change drastically over time, and unlike software that can be re-written to have a prettier look for the marketing folks, married people don’t have it so easy. You got what you got, that’s the simple way to put it. When the hair, when the teeth fall out, when the fat hangs and the smells get more stringent, sorry, that’s the software you bought all those years ago, be happy with it!
  • When big development projects fail, lots of money is lost. There’s always plenty of blame to go around too. When a marriage fails though, it tends to be a lot less fair on one party or the other, and it tends to be the fault of one person or another. It’s nice to know where the blame should go I suppose, but not if you’re that target!
  • A successful development effort usually leads to someone wanting you to do more, better projects. With marriage, once you have that first success, so to speak, that tends to be it, no more come down the pipe. Not without running into the last point at least!
  • Aside from TurboTax, not many software projects will help you get more money back from taxes. Marriage does.

So you see, software development, love and marriage are all different sides of the same coin… a weird-ass three-sided coin I grant you, but the same coin none the less. So the next time you’re writing some software, think to yourself “hey, if I can do this, I can be in love and have a good marriage!” And always remember as you work through your marriage: “this is no harder than that trend analysis algorithm I wrote last week!” I think you’ll be a happier person for it.

(Disclaimer: I am a happily-married man, and a happily-employed software developer… any relation to your job or marriage, or anything resembling sanity here, is strictly a coincidence)

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 19 Jul 2009 @ 06:02 AM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 17 Jun 2009 @ 5:36 AM 

Recently I had a discussion with some online colleagues about JSON-P web services.  There was a post on Ajaxian about how Microsoft Bing wraps their JSON-P results in a try..catch block.  I thought this was a neat little addition to JSON-P, which I’ve felt for a long time is an extremely interesting little hack.

Now, the point I made was that while the try…catch thing was a nice addition, it of course didn’t address what I see as the biggest problem with JSON-P, and that’s having no way to really know if the request completed or not.  We tossed around some ideas and a couple of us pretty quickly and independently come up with the idea of having a concurrent timeout with the in-flight request.

Before I go any further, I’ll qualify this all by saying I strongly suspect this isn’t an original idea, but I do know that, at least in my case (I can’t say what goes on in the head of others, I can barely make sense of what goes on in mind!) that I thought it up on my own.

Be that all as it may, the point is that it’s a viable approach, but it needed some refinement.  So, I threw together some code today.  First, a JavaScript file:
[code lang="javascript"]

/**
 * JSONP makes JSON-P requests and do so with a timeout mechanism so you'll
 * always know whether the request was successful or not.
 */
var JSONP = {

  /* Amount of time in seconds before a request is considered timed out. */
  timeoutSeconds : 5,

  /* Reference to the document's head tag. */
  headTag : document.getElementsByTagName("head").item(0),

  /* Collection of objects, one for each in-flight request. */
  requestObjects : { },

  /**
   * Call this method to fire off a JSON-P request.
   *
   * @param inConfig An object containing whatever parameters are needed to
   * make the remote call.  The attributes of this object are used to construct
   * a query string.
   */
  request : function(inConfig) {

    // Create unique ID for request.
    var requestID = "req_" + new Date().getTime();

    // Create request object and populate with internal data.
    var requestObject = { };
    requestObject.requestID = requestID;
    requestObject.callback = function(inResponse) {
      JSONP.callback(requestID, inResponse);
    };
    requestObject.realCallback = inConfig.callback;
    requestObject.onTimeout = inConfig.onTimeout;
    inConfig.callback = "JSONP.requestObjects." + requestID + ".callback";

    // Add query string to URL.
    if (inConfig.url.charAt(inConfig.url.length - 1) != "?") {
      inConfig.url += "?";
    }
    var queryString = "";
    for (var attribute in inConfig) {
      if (queryString != "") {
        queryString += "&";
      }
      queryString += attribute + "=" + inConfig[attribute];
    }
    inConfig.url += queryString;
    requestObject.inConfig = inConfig;

    // Now create the script tag for this request.
    var scriptTag = document.createElement("script");
    requestObject.scriptTag = scriptTag;
    scriptTag.setAttribute("src", inConfig.url);
    scriptTag.setAttribute("type", "text/javascript");

    // Now create the timeout.
    requestObject.timeout = setTimeout(function() {
      JSONP.timeoutElapsed(requestID);
    }, this.timeoutSeconds * 1000);

    // Kick off the request.
    this.headTag.appendChild(scriptTag);

    // Finally, put the requestObject in the collection.
    this.requestObjects[requestID] = requestObject;

  },

  /**
   * Internal intermediary callback that the JSON-P request calls.
   *
   * @param inRequestID The ID associated with the requestObject.
   * @param inResponse  The response from the remote server.
   */
  callback : function(inRequestID, inResponse) {

    // Get the request object associated with this request.
    var requestObject = JSONP.requestObjects[inRequestID];

    // Might not have a reqested object, if the request comes back after the
    // timeout period.
    if (requestObject) {
      // Clear the timeout so the request doesn't time out.
      clearTimeout(requestObject.timeout);
      // Call the specified callback.
      requestObject.realCallback(inResponse);
      // Delete the request object.
      delete JSONP.requestObjects[inRequestID];
    }

  },

  /**
   * This is called when a request timeout occurs.
   *
   * @param inRequestID The ID associated with the requestObject.
   */
  timeoutElapsed : function(inRequestID) {

    // Get the request object associated with this request.
    var requestObject = JSONP.requestObjects[inRequestID];

    // There should never be a case where there is no requestObject here,
    // but we'll check for it anyway, just in case I missed something.
    if (requestObject) {
      // Copy pertinent attributes of requestObject to a new object.
      var newRequestObject = { };
      newRequestObject.requestID = requestObject.requestID;
      newRequestObject.inConfig = { };
      for (var i in requestObject.inConfig) {
        newRequestObject.inConfig[i] = requestObject.inConfig[i];
      }
      // Delete the request object, but get onTimeout first.
      var onTimeout = requestObject.onTimeout;
      delete JSONP.requestObjects[inRequestID];
      // Now call the real timeout handler, if any.
      if (onTimeout) {
        onTimeout(newRequestObject);
      }
    }

  },

}; // End JSONP.

[/code]

Now, a test HTML file to use this:

[code lang="javascript"]

<body>

  <head>

    <script src="jsonp.js"></script>
    <script>

      function test1() {
        var config = {
          url : "http://search.yahooapis.com/ImageSearchService/V1/imageSearch?",
          appid : "YahooDemo", query : "Amanda Tapping", output : "json",
          callback : test1Callback, onTimeout : timeoutHandler
        };
        JSONP.request(config);
      }

      function badTest() {
        var config = {
          url : "gibberish", appid : "gibberish", query : "gibberish",
          output : "json", callback : null, onTimeout : timeoutHandler
        };
        JSONP.request(config);
      }

      function timeoutHandler(inRequestObject) {
        // Iterate its attributes
        var s = "";
        for (var i in inRequestObject) {
          s += i + " = " + inRequestObject[i] + "\n";
        }
        for (var i in inRequestObject.inConfig) {
          s += i + " = " + inRequestObject.inConfig[i] + "\n";
        }
        // Show the output.
        alert("REQUEST TIMED OUT - Request Object Dump: \n\n" + s);
      }

      function test1Callback(inResponse) {
        var outputString = "Total results returned: " +
          inResponse.ResultSet.totalResultsReturned + "<br>";
        for (var i = 0; i < inResponse.ResultSet.Result.length; i++) {
          outputString += inResponse.ResultSet.Result[i].Title + "<br>";
        }
        document.getElementById("divResponse").innerHTML = outputString;
      }

    </script>

  </head>

  <body>

    <input type="button" value="Make Request" onClick="test1();">
    <br><br>
    <div id="divResponse"
      style="width:400px;height:250px;border:1px solid #000000;overflow:auto;">
      Search results will appear here</div>
    <br><br>
    <input type="button" value="Make Bad Request" onClick="badTest();">

  </body>

</html>

[/code]

To use it, you simply call the JSONP.request() method.  You pass to this method an object that configures the call.  Only three of the attributes, strictly-speaking, are required.

  • url – The URL of the JSON-P web service to call.  This can end with a question mark, but it doesn’t have to.
  • callback – This is the function that will be called when the response comes back.
  • onTimeout – This is the function that will be called if the request times out.

The others are completely dependant on the JSON-P services you’re calling.  Here I’m toying around with Yahoo!’s search API.  You can also set the timeout attribute on the JSONP object if you want.  This is the number of seconds to wait for a response.  If no valid response comes back in that time, then the request is considered to have timed out and your onTimeout function will be called.

Now, there’s one flaw here that I just noticed: this code assumes the name of the parameter that tells the remote service the name of the callback function is itself named callback.  This is nearly always true of JSON-P services, but it doesn’t have to be.  I’ll probably make that update at some point, but I’m sure you can handle it yourself if need be :)

So, if you couple this approach with a JSON-P service that wraps the call in try…catch, then there’s only one situation left to deal with, and that’s HTTP error codes.  During my discussion, we all concluded there appears to be no way to deal with this until everyone is implementing JSONRequest.  This timeout technique though does give you a way to deal with them indirectly.  True enough, you still won’t be able to discern a 404 from a 500, but at least you can, after some time, handle not having gotten a response and thereby avoid hanging application UIs.

But hey, as a bunch of songs have said over the years: two out of three ain’t bad :) I think these two tricks make JSON-P services a heck of a lot more robust, and that can only be a good thing for mashup builders everywhere!

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 17 Jun 2009 @ 05:36 AM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 06 Jun 2009 @ 10:00 PM 

So, I’m working on a little side project at the moment… it’s a top secret, skunkworks-type thing that you can only hear about if you sign all sorts of papers and take an unmarked jet from McCarran to Area 51 :)

Because of its nature and what it has to be capable of, I have to write my code absolutely efficiently as possible. So last night I got to wondering if there was a difference in JavaScript between direct object attribute access and using accessor methods. So, is this faster…

var a = {
  attr : “frank”
};
alert(a.attr);

…or is this faster…

var MyClass = function() {
  var attr = “frank”;
  this.getAttr = function() {
    return atttr;
  }
};

Now, logically, my expectation was that the first approach would be faster. After all, there’s less code being executed and it is, deep down in the bowels of the interpreter, a much simpler operation. But, is that expectation correct? And even if it is, how big is the difference? Also, what’s the difference across various browsers? So, I threw together some very simple test code, and here it is:

Here’s the specs of the PC I ran this on:

  • Windows XP w/sp3 and all current patches as of 6/6/2009
  • Intel Core2 Duo 6600 @ 2.4GHz
  • 3G RAM
  • No applications other than browser running in foreground and all non-critical background processes shut down

And now, the results:

Firefox 3.0.10
Iterations Direct Accessor
50000 6 42
100000 12 83
200000 24 167
400000 48 331
1000000 119 826

IE 8.0.6001.18702
Iterations Direct Accessor
50000 16 63
100000 42 113
200000 87 222
400000 175 445
1000000 434 1117

Chrome 2.0.172.30
Iterations Direct Accessor
50000 1 1
100000 1 1
200000 3 2
400000 5 5
1000000 13 12

Opera 9.64 build 10487
Iterations Direct Accessor
50000 8 19
100000 16 37
200000 34 74
400000 69 147
1000000 170 367

Safari 4 public beta 528.17
Iterations Direct Accessor
50000 0 1
100000 1 2
200000 1 4
400000 3 9
1000000 7 22

All numbers are in milliseconds and have been rounded. The first number is the number of operations tests. So, that means that the test performed 50,000 operations each of direct attribute access and access via accessor method. The direct and accessor numbers are the average number of milliseconds that number of tests took, averaged over 10 test runs. So, for example, this is telling us that on Firefox 3.0.10, it took 6 milliseconds, on average, to perform 50,000 direct attribute accesses. It’s then telling us that is took 42 milliseconds, on average, to perform 50,000 attribute accessor calls.

There’s some possibly anomalous results there, although I’m convinced they aren’t incorrect. For example, in Chrome, it seems to take less time to use accessor methods when doing 200,000 or 1,000,000 iterations. I can’t imagine why that would be, but there’s the numbers. My best guess is it’s simply a rounding error and the difference is just about nothing.

There’s also the matter of that zero for the 50,000 run of direct attribute accesses for Safari. This seems to indicate that Safari is in fact the winner in terms of raw speed for direct attribute access. That’s entirely possible I think, but again, the difference between that and Chrome for the same test is probably almost nothing and it’s simply a result of rounding.

(all of this is making me wonder why I did the rounding in the first place, but I digress)

Since no report of this nature would be complete with graphs, let’s see a couple. We’ll take each of the above data sets and show them graphically (click on each to see them full-sized)…

Now let’s see a composite of all of them together, just so we can easily compare all of them…

So, what conclusions can we draw from this? I think a couple…

  • The original expectation, that direct attribute access is faster, clearly holds. Further, in all browsers except Chrome and Safari, the progression as you increase the number of iterations is almost exactly double as the number of iterations doubles.
  • Chrome performs the best, with Safari an extremly close second (not exactly surprising). Firefox and Opera are somewhat comparable, although Firefox is definitely the winner. IE is the slowest, which I think most of us would have anticipated. Even MS’s latest and greatest is pretty significantly behind all its competitors.
  • The difference in Chrome between the two methods is virtually nill. This is frankly a big surprise to me. This is nearly true of Safari as well, but not quite.
  • Even IE, the slowest of the bunch by a country mile as they say, performs a million accessor operations in just barely over a second. Slowest for sure, but still, hey, it’s a million method calls in slightly more than a second!
  • Sort of continuing the previous point… the difference, in terms of absolute milliseconds, between the two methods for any given browser (other than Chrome and Safari, which are very close to identical) isn’t generally all that much. I purposely picked pretty large numbers in terms of the number of iterations… I mean 400,000 operations a second is pretty substantial… certainly modern JavaScript can eclipse that number, absolutely. The point though is that for many types of tasks, the difference won’t matter one bit. For example, a mouse click event handler likely won’t see any sort of real-world difference between the two methods, unless you’re doing an ungodly amount of work in response to that click, in which case your design might need some rethinking anyway :)

What implications does all of this have aside from the above points? I think two important ones. First, if you want absolutely top-notch performance you’d better stick with direct attribute access regardless of browser. I don’t think this is a surprise to anyone, me included, but it’s nice to see it proven out.

Now second though, Chrome (and Safari to a slightly lesser extent) gives us a possibility we didn’t have before and don’t really have with other browsers: the chance to write our code the “right” way with no regard to performance penalties. What I mean by the “right” way is that in many ways it’s desirable to use accessor and mutator methods on a class rather than have direct attribute access to the attributes for the same reasons we do data hiding in other languages: if the only way to mutate an attribute of an object is via some mutator method, there is (theoretically at least) more safety in that. Plus, the API is arguably more self-documenting (i.e., if there is no mutator for a given attribute then we implicitly know it’s a read-only attribute). With Chrome, and almost Safari, you can write your code that way and know it won’t kill your performance. I think this is a really big step forward for us JavaScript coders. I’d also expect this to be the case with the new JS engine in Firefox, although I didn’t pull down a nightly to try it.

(and as usual, IE is the bane of our existence, but I digress once more)

So, in the end, I don’t think I made any Earth-shattering discoveries here, mostly it just confirms what I (and probably the rest of the world) already thought was the case. Still, I think seeing some hard numbers gives a clear picture of the situation and I think this was a useful exercise in the long-run.

Comments are of course welcome…

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 06 Jun 2009 @ 10:00 PM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized

 11 May 2009 @ 3:01 AM 

So, this weekend saw the release of the Star Trek reboot from J.J. Abrams, genius behind Lost and Fringe, two shows I totally love.  Was it any good you ask? (ok, so no one actually asked me, but I have a blog so you’re going to get my opinion anyway!)

Creating your own shows is a great achievement.  Putting your own creations out there is tough enough, but taking something beloved by many, including yours truly, and making it your own, that’s an even taller order.  And we’re talking here about taking something that is not just beloved by many but which has become a part of the fabric of society, woven it at a pretty low level.  It’s amazing any time something from pop culture pulls that off, and not too many people or things do, but Star Trek is one of those rare beasts.

So, did J.J. screw the pooch, or did he manage to do what eludes nearly every other remake ever done?

Oh, he pulled it off.  Boy did he ever!

I’ve been trying to get my 9-year old son to watch Star Trek for a long time.  Every time, he gets bored and just flat-out can’t get into it.  I’ve tried every version of the show, every spinoff, every movie.  It just doesn’t do it for him (although, he did start to get into First Contact last week when I was flipping through the channels).  Well, I decided to take him to see the new movie.  I figured, if it’s really all I’m hearing, it’s got a shot to pique his interest.  In short, it did.  He loved it.

This movie is top-notch in every possible way.  It’s fantastically entertaining, has some good emotionally-grabbing parts and generally sets up for future installments, and I for one absolutely cannot wait for more.

Now, I’ve yet to see a negative review.  I mean, literally, every single review I’ve read, and I checked out quite a few over the past two weeks, has been raving.  You can definitely add mine to that pile.  So, I’m going to take a different tact… as great as this movie was, it wasn’t perfect.  Here’s some things that actually bugged me a bit:

  • The back story of Nero was not covered in nearly enough detail.  Now, I read the comic that sets up the movie, and that does a pretty great job of it, but that’s definitely missing from the movie.  It makes Nero a bit more unknown than I thought was a good idea.  Another 10 minutes of footage maybe would have done the trick I think.
  • The convenience of Kirk being marooned on the same planet as Spock, and right near the cave Spock happens to be in, was a little *too* convenient.  No, make that A LOT too convenient.  Now, it doesn’t so much bother me that he happened to be placed on the same planet… for all I know, that’s the only planet in the Vulcan system aside from Vulcan that is class M.  But finding Spock so easily (even if by accident as it was) stretched things a tad too far.
  • The look of engineering on board the Enterprise just didn’t feel right to me.  It felt a little too retro.  Now, I’m OK with it being more mechanical than, say, engineering on NCC-1701D.  That makes sense.  But it seemed a little TOO much… especially the water pipe system Scottie gets caught in.  That seemed REALLY out of place to me.
  • Not enough Scottie!  Simon Peg does an awesome job with the role, and I really wish he had gotten a lot more screen time.  I suspect that will be the case in the next movie, so I can easily forgive this, but it still would have been really nice to see more of him.
  • Chekov.  This is the character I didn’t feel worked too well.  It’s not that the actor did a bad job per se, it just wasn’t up to the level of the other actors, who I think uniformly did great.
  • The story was frankly a bit weak.  Now, I can let this go largely because this was an action movie first and foremost, and the story certainly wasn’t terrible, and I don’t think it was riddled with plot holes of anything like that.  It just wasn’t special in any way.
  • The look of the Enterprise was a little off.  I actually thought it looked a little Romulan at one point, the sweep of the pylons leading to the nacells.  It wasn’t ugly or anything, just a little… off.  I still think the Enterprise as seen in The Motion Picture is the definitive design for NCC-1701, and I wish they had just copied that.

To be clear, none of this in any way, shape or form ruined my enjoyment of the movie.  But, they were things I noticed that struck me as I watched.

So, what was so great about it?  Well, let’s see… the actors, except for Chekov as noted, did fantastic work.  I echo the sentiment that McCoy was most like the original character, but the differences in all of them never once bothered me, it all seemed right.  The FX were across-the-board fantastic.  I loved that in at least a couple of scenes they actually acknowledge the silence of space, although it would have been nice if they did that in all the space scenes (I understand that might have taken away from the action, so not a huge thing).  The changing of what we’ve previously known I think worked out great.  J.J. and company reset things and set themselves up for the future in a way that I don’t think has to piss anyone off.  Now, there’s of course some reasonable questions to be asking… like, since paradoxes were raised, isn’t it likely that the events in the movie would have caused Spock to never be in the position in the future that caused him to go back in time in the first place?  It’s temporaral paradoxes 101!

So, in short, this movie rocks!  J.J. and his team did it: the successfully rebooted a franchise that I for one thought could never be rebooted properly.  When I first heard they were doing a prequal I cringed big-time.  I NEVER wanted to see this.  Yet, there I was, wishing there was another four hours of movie to sit through, and totally anxious to see the next installment.  Best of all, I think my son is going to be psyched to see it right along with me… I may never be able to get him to sit through the originals, and while I think that’s his loss, I certainly won’t be ashamed that *this* is his Star Trek.  This Star Trek is worthy of all that came before it, without a doubt.

Thinks its worth sharing? Go for it:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • email
  • Reddit
  • RSS
  • Twitter
Posted By: fzammetti
Last Edit: 11 May 2009 @ 03:01 AM

EmailPermalinkComments (0)
Tags
Categories: Uncategorized





 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 30
  • Comments » 16
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight