Author Archives: shaun

About shaun

Web programmer into Flash, Flex, PHP, JavaScript, Ruby, Scala etc..

Unit Testing: My problem with assertThat()

I write “ass” a lot while I’m coding.

Posted in Uncategorized | Leave a comment

Commit Messages

When reviewing a commit I’m not interested in what you did. A commit is a codebase transformation. I’m interested in what will happen to my codebase when I apply your commit.

Bad “I did this” form:

I had a cup of coffee, went for a walk, and changed some code.

 

Better “This commit does this” form:

Adds unmap() to the command map API.

A commit message should describe the commit, not the process you went through to create it – it is not a diary.

Posted in Uncategorized | Leave a comment

Unit Testing: Why I prefer assertThat()

Consider:

[Test]
public function null_criteria_should_not_match():void
{
  assertFalse("passing null should return false", instance.match(null));
}

When reading the test above I have to do a lot of scanning. Continue reading

Posted in Uncategorized | Leave a comment

Show Me Your Tree!

What does your display list look like?

While doing some work on multi-context view auto-wiring I wrote a little utility that iterates through the containers in a given display object container and builds some useful stats. Continue reading

Posted in Uncategorized | Leave a comment

Robotlegs – The Book

It’s here! The ActionScript Developer’s Guide to Robotlegs:

http://oreilly.com/catalog/0636920021216

Written by the amazing @stray_and_ruby and @jhooks

Posted in Uncategorized | Leave a comment

Why X Is Better Than Robotlegs

While the core Robotlegs developers do some preparatory undercover work on Robotlegs 2, some adventurous Robotlegs users have decided to take things into their own hands and start building their own ideal frameworks. I think this is great. The best ideas will almost certainly make their way back into RL2 in some shape or form. Continue reading

Posted in Uncategorized | Leave a comment

Too Much Of A Good Thing

As an enthusiastic programmer I tend to get overly excited when I discover a new technique – nails, nails everywhere for my shiny new hammer! It’s not a bad thing. I’ll abuse my newfound technique until I fully understand where it is and isn’t appropriate. Sometimes this takes a while.  Continue reading

Posted in Uncategorized | Leave a comment

Robotlegs 2.0

I’m super excited to be meeting with Stray, Till and Robert (sadly, Joel can’t make it) in a couple of weeks to discuss Robotlegs 2.0.

We decided to keep the initial meetup small and focused, but development of the framework itself is completely open and anyone is free to contribute once we’ve nailed down some core priorities.

More info over on the Robotlegs forums:

http://knowledge.robotlegs.org/discussions/feedback/20-robotlegs-20-how-to-get-involved

Posted in Uncategorized | Leave a comment

AS3 DI Metadata Tags

Spring Actionscript, Dawn, SmartyPants-IOC, SwizParsley and SwiftSuspenders (used by Robotlegs) perform Dependency Injection.

Moreover they can all perform automatic DI by parsing class metadata. It would be grand if the common DI related metadata tags could be standardised. That way we really could write code that is decoupled from any particular framework.

I’ve started a little document over at GitHub:

http://github.com/darscan/AS3-DI-Metadata

I don’t know the libraries well enough to fill in all the details, so if you could fork the repo and edit the doc that would be great! Also, the format/layout could be better, so if you have any ideas on that front.. edit away.

Posted in Uncategorized | Leave a comment

Why Ruby Is Fun

Some little things I enjoy about Ruby: Continue reading

Posted in Uncategorized | Leave a comment