assertTrue is the professional blog of Luke Bayes and Ali Mills

What do I really want?

Posted by Luke Bayes Tue, 01 Apr 2008 06:50:00 GMT

I’ve spent an inordinate amount of time lately considering and pondering what it is that I really want from my tools.

In an unrelated, introductory message to a random netizen, I just found myself emitting the following statement:

“I want to write clean, elegant, code that results in simple, expressive user experiences. Nothing available today truly satisfies this desire for me.”

So what would this “clean, elegant code” look like? I’m not exactly sure, but if it involves working with Objects, it will meet the following requirements (in no particular order):

  • Efficient to test
  • Efficient to mock
  • Efficient to share or communicate
  • Efficient to switch execution context
  • Simple, encapsulated statements
  • Minimize duplication

I recognize that each of these criteria represent a gradient, but I feel that I am not getting enough of any of them today and especially not with Flex work.

I recognize that there is no silver bullet and that I may never find or create the most amazing language ever.

In my late night clicking and dragging, I’ve discovered the website of a particularly kooky and opinionated, slightly paranoid auto-didact that I find myself reluctantly relating to. His thoughts on parallel programming are definitely interesting but I’m admittedly still trying to get my head around his proposed solution.

I’ve also been considering hotruby or creating something similar in order to get the power and efficiency of Ruby development into the most widely deployed runtime on Earth.

Unfortunately, there is something about writing a VM inside of another VM that seems inherently flawed, or at least just plain slow. In spite of that assumption, I’ve noticed that the hotruby folks are claiming victory in terms of performance?! An obviously naive and simple performance comparison but still, how could it ever be faster?

I have to confess that I’ve also been experimenting lately with untyped ActionScript 3. It’s true. You can tell the MXMLC compiler that you don’t want strict typing and just go crazy in there like it’s 1999.

function myFunc(yourArg) {
   return yourArg + 3;
}

For real. In Flash Player 9.

I’m still not convinced it’s a good idea, and I’m sure it’ll run orders of magnitude slower than it’s strongly typed cousin, but I have the beginning of a rudimentary layout framework going and the truth is that it’s the closest I can get to the feeling of Ruby in the Flash Player right this minute.

Am I losing my mind?

Tags  | 4 comments | no trackbacks

Comments

  1. Ben commented: Avatar I don't get the affinity for untyped code. It drastically increases the likelihood of a RTE and is it really that hard to type ":" and a few letters?
    Posted: about 5 hours later.
  2. Luke Bayes replied: Avatar Hey Ben,

    There are definitely opinionated people on both sides of this issue. I have to confess that I've spent more than a few years dreaming about strong typing in ActionScript and appreciate all the effort Adobe/Macromedia has put into supporting that feature.

    At this point though, I'm coming from a place where my primary requirement is the ability to write and maintain unit tests.

    In my experience, this has proven to be far more efficient in dynamic environments because my classes under test have much less stringent expectations. Because of this, I can more easily send mocks and stubs into method arguments and swap out contexts without building up an entire application in order to test a small piece of it. In strongly typed environments, I find myself spending a whole lot more time on plumbing and refactoring that is really just frustrating and wasted time because my unit tests are what hold up my confidence, not the compiler's type system.

    So really, my fundamental requirement is supporting TDD, because my experience has shown that no compiler can provide the support and confidence that my unit tests can, and through experience, I've learned that I can use TDD more efficiently in dynamic systems.

    It's not about entering the character ":", it's about the extensive implications that begin to the right of that character.

    :-)
    Posted: about 11 hours later.
  3. Vishi commented: Avatar Ruby runs on powerful servers. Flash runs in congested browsers. Performance on clients matters!
    Posted: about 18 hours later.
  4. Luke Bayes replied: Avatar I agree completely Vishi!

    Performance does matter. Not only that, but I concede that runtime performance matters more than developer productivity in the context of rich clients.

    In spite of this belief, I can't help but recall that Flash Player 9 claims from 10x to 40x speed improvements over previous versions and I most certainly have created dynamic, flexible component and layout architectures in previous versions of the Flash Player. Perhaps with the right architectural foundation, the performance experience will be acceptable? I'm not convinced that's true, just pondering the possibility....
    Posted: about 22 hours later.

Trackbacks

Use the following link to trackback from your own site:
http://asserttrue.org/articles/trackback/1548

Your Reply

Comment Form.

Fields denoted with an "*" are required.