try, catch and finally moving on from Robotlegs


Warning: in_array() expects parameter 2 to be array, boolean given in /home/xxcoder/public_html/wordpress/wp-content/plugins/advanced-excerpt/advanced-excerpt.php on line 146

Warning: implode(): Invalid arguments passed in /home/xxcoder/public_html/wordpress/wp-content/plugins/advanced-excerpt/advanced-excerpt.php on line 149

Warning: strpos(): Offset not contained in string in /home/xxcoder/public_html/wordpress/wp-content/plugins/advanced-excerpt/advanced-excerpt.php on line 230

Warning: in_array() expects parameter 2 to be array, boolean given in /home/xxcoder/public_html/wordpress/wp-content/plugins/advanced-excerpt/advanced-excerpt.php on line 239

Warning: in_array() expects parameter 2 to be array, boolean given in /home/xxcoder/public_html/wordpress/wp-content/plugins/advanced-excerpt/advanced-excerpt.php on line 239

try{harder} Level Up

March 19th-23rd: try{harder} Level Up is a conference with a difference:

5 days, 4 nights.
8 try{harder} mentors who took part in the original try{harder} and want to share it with…
8 new try{harder} participants who want to level-up.
Everybody teaches, everybody learns.

Flash on the Beach: Robotlegs 2 & your brain

Super excited! I’m confirmed as a speaker for Flash on the Beach 2011 and tickets just went on sale:

http://www.flashonthebeach.com

Session info isn’t up on the site yet, but here’s what I’ll be delivering

Adventures in TDD – fillin’ a hole in the SignalCommandMap

A simple question: What did you have for breakfast this morning?

Me? I had toast. 2 slices, white, with Flora and some great peach jam that we brought back from Spain.And a cup of tea, white with 2 sugars.

Another question: What didn’t you have for breakfast this morning?

Me? I didn’t have oatmeal. Or eggs. Or a hippopotamus, or lego, or chainsaw oil. The list of things I didn’t have is endless. Literally endless.

It’s impossible to fully scope the list of things that something doesn’t do, and yet as developers it’s important that we don’t just know what our code does, we also know what it doesn’t do.

Maps, maps and more maps

Over the last few months I’ve knocked up a few specialised ‘maps’ for working with robotlegs. I like the ethos behind these kinds of utilities – abstracting the meta-logic (the nature of the problem being solved) away from the detail-logic (the specific solution).

I’d planned to blog each one in turn, but the time runs away so quickly doesn’t it?

And so – all in one fell swoop – I offer you 3 variations on the CommandMap, a SignalMap and a race-condition beating EventMap. All on github and created through Read-Me-Driven-Test-Driven-Development, so you should find the ReadMe in each case sufficient to get going, but do check out the diagrams in this post as well:

GuardedCommandMap – for separating conditions from actions
OptionCommandMap – for implementing user options
CompoundCommandMap – for triggering a command in response to a combination of events
SignalMediator (containing SignalMap) – for automatic cleanup of signal handlers
RelaxedEventMap – for beating race conditions