September 2011
3 posts
1 tag
A pattern for handling validations in an...
Recently I struggled a bit to find an elegant and working solution to validate an associated model when destroying another model’s instance. The two models were Account and User and I needed to validate the Account whenever I delete a User. The two models look like this - very much simplified: class Account < ActiveRecord::Base has_many :users, :dependent => :destroy end class...
Sep 27th
1 note
Sep 22nd
3 tags
On the benefits of refactoring
You can’t build an office block and then decide you had better put in some concrete foundations afterwards. You can, however build a large scale app and decide you want a different foundation along the way. When you start an agile project, you “pitch a tent in dirt”. E.g. write a simple app that lets users drag a ‘job’ - which only has a name and id - onto a...
Sep 22nd
4 notes
August 2011
2 posts
3 tags
Why Boiler is better than Robotlegs. Pt. 2
I’m starting out with the “not terribly awesome” and perhaps even “that’s crap!” stuff. That is, you might think I’m losing my mind at this point. Remember these are things that I love about Boiler. You might not. I promise you, though, that the final two articles in this series will be epic. I’ll show you how to extend Steam using...
Aug 7th
13 notes
3 tags
Why Boiler is better than Robotlegs. Pt. 1
Haha! That’s gunna turn some heads.. I hope. Herein I set out to explain why I’m building Boiler. Other than the obvious fun of writing a framework, I have some very specific reasons. I could be wrong of course, Robotlegs is so good (and it’s well past the alpha stage, unlike Boiler) that it’s a tough call. However, why would I bother if I wasn’t trying to improve...
Aug 5th
June 2011
1 post
2 tags
Static Controller in Robotlegs
I’ve been away for a while in the land of the Ruby Object model and Rails. Upon my return to some Flex development, I decided that, although Robotlegs MVC ‘Controllers’ are really nice, they require too much boilerplate. One thing I found in RoR, is that although they use static controller classes with many command methods, most folk follow convention and avoid introducing wads...
Jun 22nd
2 notes
May 2011
1 post
All Praise the Almighty Click! →
May 22nd
April 2011
4 posts
1 tag
Agile, what it means to us.
We’re seeing a lot of to-ing and thro-ing about Agile, it’s success and failure. There are a lot of blogs, posts and tweets which let anyone who wants to, throw it away and dismiss it out of hand. From our fledgling point of view, the point is being missed. To work, Agile must be all about allowing a team to do what it naturally wants to do. That’s it in a nutshell. You...
Apr 27th
Strengthen your resolve, make your gems community... →
Apr 17th
3 tags
How to name your gems →
Why is it so hard to find ruby conventions? It’s the biggest aspect of the community, isn’t it? Read the post
Apr 14th
2 notes
4 tags
Community support and IRC (introducing SQLRecord)
A lot of my life has been spent on IRC. I got really sick of it. I got tired of the assumptions made by people meeting “anonymous” people for the first time. I include myself here, it seemed inevitable that I’d jump to conclusions without hearing someone out, and in turn made them sick of IRC too. However, in a recent expedition into making my first clean-coded, well thought...
Apr 11th
March 2011
1 post
Ruby DSL post that answers (my) age old (2 days in... →
Ruby DSL blocks need access to DSL methods. But which scoping to use? Farm.new do animal :kitten end or Farm.new do |farm| farm.animal :kitten end TL;DR? You can support both! Go read Rubylove’s article
Mar 22nd
February 2011
4 posts
New Flex Monkey! (Reloaded) →
Feb 28th
Position Vacant - Rails Focused Technical Lead...
Visfleet is looking for a certain someone to join our Agile team to develop our world class product. Warning, bullet points follow. That someone: Has a love affair with RubyOnRails that they’re not ashamed to confess to. Is looking for a senior role where they can help guide the architecture and vision of the product. Enjoys multi-disciplinary work, like say, getting involved in Flex...
Feb 24th
2 tags
Extract Responsibility Refactoring.
In Martin Fowler’s “Refactoring” he introduces the “Extract Class” refactoring. I love this refactoring pattern and I use it all the time. This refactoring is (unless im sorely mistaken) the most important one for the SRP. Because of this intimacy with the SRP, I think there is an umbrella refactoring, called “Extract Responsibility” with two concrete...
Feb 20th
2 tags
Musings on AS4 - Part 1, Safe Navigation, Safe...
So I had surgery 2 nights ago. Routine Gall bladder thing. But the pain killers, namely morphine, keep me awake, contrary to their typical side effects. This left me up all night, in a hospital room, with such a calm mind and strange thoughts, that my desires for Actionscript began to crystalise. These are meant to be idea’s to argue over, so please do comment. Safe Navigation ...
Feb 3rd
2 notes
January 2011
3 posts
The Meaning Of Object Oriented →
Jan 23rd
5 tags
Dominic Graefen introduces a Flex/Flash Buildr... →
Dominic Graefen (@devboy_org) introduces a Flex/Flash extension for Buildr. I recommend Buildr over Maven or other declarative build/dependency systems. Give it a go :)
Jan 23rd
9 notes
2 tags
Robotlegs Bootstrap Actor
I’m sharing the following Bootstrap Actor class, which simplifies bootstrap sequencing in Robotlegs. I figure it has some value because Stray, who has a fairly similar programming ethos to me, see’s some merit in it. Usage first. Trigger the bootstrap in your context override public function startup():void { commandMap.mapEvent(ContextEvent.STARTUP_COMPLETE,...
Jan 17th
10 notes
December 2010
1 post
Have you seen our Kanban Camera? →
Our kanbancam runs 24/7 (with archives) at http://www.kanbancam.com/ This is the view of our Kanban wall. To the right of frame you can see our information radiator showing our Hudson CI status.
Dec 20th
October 2010
1 post
Fixing 403 Forbidden Issue: OSX + Passenger...
I recently installed the Passenger Preferences Pane from Finger Tips. This is a great way to run a Rails app in a local development environment on a Mac. During the install process I did nothing different or flash, just followed the instructions. After trying to hit the URL for my local app for the first time, I got this error message: [error] [client 127.0.0.1] (13)Permission denied: access...
Oct 27th
September 2010
1 post
2 tags
Couch and Flex. First Steps.
I had this idea that I wanted to replace TraceTarget (the default Flex logging target) with CouchTarget. That way, instead of producing .csv text I could sort and filter in excel. I could get realtime (or close to) in couch and write views/shows that narrowed down my debug session. So off I went, and it did not go well. Step 1: Installing CouchDB I have an Ubuntu instance so I just installed...
Sep 25th
2 notes
August 2010
3 posts
4 tags
Builder pattern is so easy in Robotlegs
The Builder Pattern is a breeze in Robotlegs public class ConcreteWidgetBuilder implements IWidgetBuilder { [Inject] public var injector:IInjector; public function buildPart(parameterised:IThing):IWidget { var widget:IWidget = injector.getInstance(IWidget); widget.param = parameterised; return widget; } } Parameterized builder If you want to control what gets instanced...
Aug 24th
5 tags
Visfleet's Radiator (v 0.0.1)
I started a project not too long ago to implement an information radiator here at Visfleet. The first milestone has been reached: Show the status of important Hudson builds And here it is: The source is on github I started out with the intention of using Flex 4 skinning to make a super-modern, slick looking radiator like Panic’s. But somewhere along the way I ended up with a two...
Aug 10th
2 tags
Best practice for Ruby's require
Ruby’s require method gives you more than enough rope to hang yourself. Having now implemented too many projects with too many different approaches to using require, we thought it was worth writing down the conclusions we’ve come to. We’ve gleaned most of our knowledge from these two articles, here, and here. So a big thank you to their authors. How to require Do use...
Aug 5th
3 notes
July 2010
3 posts
Another performance tool for AS3 →
Jul 20th
Elad's performance monitoring tool for flash →
Jul 20th
2 tags
Mediating ItemRenderers, Again.
I’ve posted about this before. I still have no shame about mediating ItemRenderers and to my happy suprise, Flex 4 makes it simpler with the spark.ItemRenderer and its dataChange event. Here’s my base prescription in sample form: Now you and I both know it can be a lot simpler to achieve the same, namely: Why mediate, it’s so simple? Well the reason is simple too. Things...
Jul 16th
June 2010
2 posts
Postgres routine (and not so routine) maintenance
Postgres is our DB of choice. We run all our vTrack and vWork systems on it. We have lately been developing data archiving and culling strategies to manage data growth and disk consumption. I’ve found a few hints that are best shared. Culling Old Data to Recover Disk Space The initial thought is to perform a quick delete of the old data, a-la: DELETE FROM table1 where date < [some...
Jun 17th
3 tags
Useful Rules and Guidelines
In our complex lives, rules and guidelines help us avoid rethinking everything that crosses our paths. Rules are the outcomes of pattern recognition. We recognise repeating or similar stimulus in the world, and our ‘understanding’ of these stimuli is a “rule”. I’m not quoting anyone here, and I may be oversimplifying the case, but I think this is a reasonable...
Jun 3rd
May 2010
3 posts
6 tags
Ascending the Ivory Tower is good for everyone.
I attended the Flash And The City conference last week. It was an amazing experience and I met some of my personal Heroes. People who make the effort to popularise good software, good design, good tools, and good practices. Sometimes I don’t see eye to eye with them, but I still respect anyone who puts themselves out there to be criticised so willingly :) Funnily, a term started...
May 20th
4 tags
RSpec Style Unit Testing with FlexUnit4
We’re still early into our TDD for Flex program, and I am trying to learn “how” to write useful tests while not getting bogged down in any extremes, at least not until I understand it better. I asked our CTO who is an accomplished ruby developer to guide and mentor me a little. He prefers to use RSpec for Ruby development. RSpec is designed for “Behaviour Driven...
May 10th
4 tags
May 5th
April 2010
1 post
2 tags
IntelliJ my Love
An un-poetic ode to IntelliJ. Will be amended continuously. Auto-completion in comments Iteration Live Templates You type ‘iter’ and you get a live template: for each (var object:Object in myColl) { } And a caret over ‘myColl’ letting you pick from accessable itterable types. Nice! Color swatches when it “sees” web color strings Take a look at this...
Apr 22nd
March 2010
7 posts
3 tags
Robotlegs Plugin for IntelliJ
So I started a little plugin a few days ago. I’m writing it for IntelliJ and it’s designed to make your life a little simpler, letting you navigate between classes with known ‘Up’ and ‘Down’ relationships in Robotlegs MVCS. Eg, The view is “Up” from the mediator and the service is “Down” from a command. IntelliJ is really cool. Apart...
Mar 29th
Mount VBox shared dir as normal user in Linux...
Rash wanted to mount a shared folder between his Windows desktop and a Linux guest running inside Virtual Box on said desktop. He also wanted to be able to own and write to the mounted shared folder as himself, ( aka non-root user). The syntax to put into /etc/fstab is: [shared folder name] [mount path] vboxsf uid=[uid],gid=[gid],dmode=0755,fmode=0755 0 0 In Rash’s case this...
Mar 22nd
Flash Platform Users Group
VisFleet sponsored the Flash Platform Users Group lastnight. Thanks to the guys and girls of the group for a good night and interesting talks.  And here’s some pics: Rash taming Flash code into crafted code Vinnie wowing the audience with 3D in the browser
Mar 18th
Flash Platform User Group - Thursday @ 6PM at...
VisFleet are sponsoring the next Flash Platform User Group meeting this Thursday @ 6PM at VisFleet’s offices. Our own Rasheed is giving a talk on the popular new Flex framework (RobotLegs).  To register, RSVP here: http://aucknzfpug.eventbrite.com/ All welcome. Pizza and beer will be provided. Should be a good night. Talks: Rasheed Abdul-aziz. Rasheed will be wowing us with the...
Mar 15th
List Model-Service Architecture with Robotlegs
EDIT: Stupid post. I don’t know how I got it into my head that VO’s needed an abstract factory for testing. They’re Value Objects! Without the Abs-Fac we don’t need ‘IVO’ and we can implement multiple interfaces because the concrete interface is all that our system needs. Sorry if I wasted your time with this drivel. I’m currently looking at our...
Mar 9th
7 tags
On Robotlegs UI Architectures
There are now Caveats to all my posts. I am considering everything in this post from the point of view of a N-Tier RIA developer’s point of view. The Robotlegs MVCS presents a myriad of ways you can work with your tiers, without adding one line of extra framework code or departing from the Best Practices. Then there are the few presentation model mods I’ve seen around, such as Elad...
Mar 4th
4 tags
Verbose is a dirty word
I’m not saying verbose should be a dirty word, just that it does have a pejorative meaning. If you’ve used *nix command line tools often enough, you’ll know that -v is often used as a flag for “verbose”. This usually ends up in some useful information coming out of the log or stdout. -vvv usually means “very verbose” and too much information pours out to...
Mar 1st
February 2010
2 posts
Install pg gem via Bundler on OSX Snow Leopard
I encountered three problems installing the Postgres ruby gem (pg) when using Bundler to install all the gems for a project on my OSX Snow Leopard 10.6 machine. Firstly, the gem fails to build on Snow Leopard when you use the binary version of Postgres that is distributed by Enterprise DB. To work around this, the Postgres binaires need to be installed using Mac Ports. Secondly, the pg gem...
Feb 21st
4 tags
Mediating ItemRenderers
ListBase, what it is and is not. The ListBase classes are containers. In their simplest form, they mimic a typical OS list. In this capacity they work fairly well, and I see very little reason to mediate ItemRenderers. But they can be used for things far outside the scope of a typical list. This other use, I will refer to as the “Optimised Continuum Container”. Cool name eh?...
Feb 18th
January 2010
3 posts
Debian Squeeze Kernel for Ubuntu 9.04 XenServer...
Squeeze, the testing version of Debian ships with a more recent kernel which works well on a XenServer 5.5 guest. The version is 2.6.30-2-686-bigmem. I am evaluating whether this is a stable kernel for use under Ubuntu Jaunty 9.04. Up till now the best kernel has been 2.6.26-2-xen-686 from Debian Lenny. However, this older kernel has known issues which I am keen to avoid. The newer Squeeze...
Jan 20th
Citrix XenServer: Debian APT Repo Public Key
Citrix have a APT repository which provides a para-virtual kernel and some guest tools for linux guests on XenServer. The repo looks like this in /etc/apt/sources.list: deb http://updates.vmd.citrix.com/XenServer/5.5.0/debian/ lenny main deb-src http://updates.vmd.citrix.com/XenServer/5.5.0/debian/ lenny main On a default deploy, the public key for the repo is obviously not added...
Jan 17th
Ubuntu 9.04 + PSP + Firmware Updates on HP DL380...
PSP Install We prefer to use Ubuntu on our production servers for all kinds of reasons. With this choice however usually comes a lack of vendor support (because how can a Linux distro be enterprise if you don’t pay money for it?). The ProLiant Support Pack (PSP) provides a whole bunch of great software which helps with server management. I especially needed to update the firmware on our...
Jan 11th
November 2009
1 post
3 tags
Robotlegs. What I'm falling in love with.
Background I just thought I’d comment on my latest endeavor at Visfleet. I’ve been a little worried about my cobbled together framework for our Flex codebase. It was designed and added too from the day we started with Flex 2 and hasn’t had a proper review since. It works, and we have workable code, but I find that the developers here have the same trouble using it over and over...
Nov 19th
October 2009
2 posts
3 tags
Flex State Machine Release 0.1
http://github.com/visfleet/FlexStateMachine I’ll call this the first release :) Flex state machine is my attempt at getting a domain specific language (DSL) for state machines into Flex. It’s missing a vital ingredient (to my mind), which is the ability to mix events and ‘cans’ (State events, not the Flex observer pattern) into another class instance. The kludgy: ...
Oct 20th
Someone else trying to build IPhone apps with... →
Looks like Mike Nachbaur has gone a fair way further than I have. I’ll still complete my article series when we get to the app store steps, but I might be borrowing plenty from Mike’s article :)
Oct 16th
August 2009
3 posts
Flex Third Party Libraries in Multiple Projects
I don’t know the answer to this. I need to though. This is what I need to do. An existing project structure. We start with: LibProjA is a Flex Library Project AppA is a Flex Application Project [LibProjA] [ dependencies in square brackets] In reality we have a lot more LibProjs and a few Apps. Along comes a great library that we must have. I’ll use a real example:...
Aug 13th