<rss version="1.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Rowan Hick</title>
    <link>http://work.rowanhick.com</link>
    <description>Application Development, Photography, Adventures</description>
    <generator>rowanhick.com</generator>
    <atom:link href="http://work.rowanhick.com/rss.xml" rel="self"/>
    <item>
      <link>http://rowanhick.com/2011/11/17/qconsf_architecture_talks_review</link>
      <guid>http://rowanhick.com/2011/11/17/qconsf_architecture_talks_review</guid>
      <pubDate>2011-11-17 14:45:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Visa on Rails and Beyond</title>
      <description>
  
    
      I've been awake for the past couple of hours, processing my first day of QCon.
    
    
      So I've heard from SimpleGeo, StubHub, Facebook, ESPN.com, and finally Visa who just launched V.me, Visa's new payment gateway. For me personally yesterday crystallized a lot, and in particular the last hour with Visa. Visa, in 18 months, launched their product V.Me, using an Agile development process, and, sitting down ? JRuby on Rails on the front end with Java on the backend. So lets repeat that back to ourselves, one of what must be amongst the largest IT shops in the world, who are probably the most paranoid in the world for security and process etc have started adopting Agile, and using rails. Cue blowing of mind.
    
    
      I stayed on the architecture track, and the one theme that stood out to me, is the focus on getting things to market as fast as humanly possible to enable business innovation. Robert Johnson, at Facebook said something that resonated with me profoundly (paraphrased - didn't write the exact words!) &quot;if we push to production every day, we get 365 chances to test, vs pushing every week we get only 52 chances a year to test&quot;. That's not to test things work (ie QA), it's to test that the theory of this new widget/tweak/whatever is actually going to be adopted by your users. For me, that encapsulates the 'Lean Startup' theory on the largest scale world wide, and there was a reason the audience was engrossed listening to Robert speak.
    
    
      The underlying themes of how to do this was around creating people cultures (allow mistakes to happen and not finger pointing - FB, empowering with sudo access SimpleGeo, going Agile at Visa), systemized continuous delivery (at SimpleGeo, if a commit to 'pending' branch passes tests in CI, then Jenkins merges to master and kicks off a deploy), planning for and helping fast debugging/traceability in production (injecting all HTTP requests with a GUID or 'dye marker', logging everywhere that goes through the system, Stubhub and SimpleGeo), and rolling your own support systems, so that you have the ability to fix things, and not wait on vendors. (SimpleGeo and FB - own monitoring tools)
    
    
      A day full of awesome from impressive mindsets, well worth the price of entry. Bring on Day 2.
    
  
  
    
      &quot;if we push to production every day, we get 365 chances to test, vs pushing every week we get only 52 chances a year to test&quot;.
    
    
      The presentations :
      
        SimpleGeo - Staying Agile at Scale
      
      
        Facebook - Social Computing Lessons Learned
      
      
        Visa - Architecting for Massive Scale and Innovation
      
      
        ESPN - Scalability and Caching at ESPN.com
      
      
        StubHub - Scaling and innovating at the worlds largest ticket marketplace.
      
      
        And the final key note on Product Engineering, that got everyone talking:
      
      
        Mike Lee, Product Engineering - And Appsterdam.
      
      
        All slides are going up on
        QConSF.com
        go check them out!
      
    
  

</description>
    </item>
    <item>
      <link>http://rowanhick.com/2011/11/16/development_team_trip_to_qcon</link>
      <guid>http://rowanhick.com/2011/11/16/development_team_trip_to_qcon</guid>
      <pubDate>2011-11-16 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Giving your team a trip to QCon</title>
      <description>

  &quot;Team, get your passports ready you're going to QCon&quot;


  So, one of the highlights of my career was a month or so ago at the end of a standup announcing to my development team that they were off to the QCon Software Development conference. It's something I'd budgeted at the beginning of forming the team together and being a developer at my core knew would appeal to them.


  I have got to say, that the instant round of smiles seconds after saying it, spoke volumes. Infact before I'd sat back down after standup, there was already a spreadsheet open of who was going to what tracks, and where the interest lay as a team (not surprisingly mobile is a hot topic!). QCon is one of those conferences that has something for everyone. Even though the team is primarily a Rails team, interest is across the broad from beautiful code, agile, big data you name it.


  For all those out there building budgets for 2012... I'll let you know how it goes, the smiles did really say it all.


  Alright, off to find coffee. Apparently Blue Bottle's Mint Plaza is where it's at. And if you find some dude with a kiwi accent in the Architecture sessions today, say hello. Kiwis are a friendly bunch.

</description>
    </item>
    <item>
      <link>http://rowanhick.com/2011/11/11/gorgeous_html5_app</link>
      <guid>http://rowanhick.com/2011/11/11/gorgeous_html5_app</guid>
      <pubDate>2011-11-11 13:30:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Gorgeous HTML5 app</title>
      <description>
Appreciate the UX
This app is gorgeous. I don't read the Financial Times, and I think my life is probably much better by not observing the stock markets daily. However, what they have built is abso-frigging-lutely gorgeous. I believe the key driver of this as a reaction to not paying Apple a cut of subscription fees, they went the HTML5 app route.
What is produced, is a very slick web app. I've loaded it up on both my iPhone and iPad. The experience is tweaked around based on which device you're on, but the  core essence of the app is the same. As someone who's seen the rise of the web from the first of the 'dynamic content' LAMP days, I have a huge appreciation for how polished this bad boy is, and the sheer depth of the content/structure (start going through the menu). Very very impressive.
Is this the future of the publishing ecosystem? If it is, I for one am loving it. Better go hire those front end HTML/JS/CSS ninjas....
Go have a look for yourself here app.ft.com</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2011/10/02/engineering_mongodb_replicated_blog</link>
      <guid>http://work.rowanhick.com/2011/10/02/engineering_mongodb_replicated_blog</guid>
      <pubDate>2011-10-02 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Over engineering a blog (in a big way). Part i. </title>
      <description>
  
    
      Nothing like killing a bunny with a rocket launcher, or in otherwords, dramatically over-engineering something. We used to have it as a saying on old software development team I worked for. Well. This is it. You're looking at it. A load balanced, replicated blog, using a CDN, for something that would realistically be handled with just static HTML on a single server. It originated from a fascination with looking at the MongoDB 'hype', and ended up refitting the mechanics car with a V8.
    
    
      The $100/mo challenge
    
    
      So of course, the first thing, is always a budget. $100/mo seems like a nice round number. What can I build for that ? Requirements are it must be redundant, if I mess one server up, the whole lot can't turn to custard. I've gotta be able to serve images to my friends everywhere, fast. I've got to have flexibilty to post whatever the hell I like. Use the best tool for the best job. Pages must be generated fast (no one likes slowness). Anything below 200ms would be good. It's got to look half decent, and degrade gracefully on people, use 3rd party services where it makes sense, and finally allow me to play with stuff when I want. Oh, and good uptime too. I like having my blog up when people visit it, otherwise what's the point ? (*cough* Posterous *cough*).
    
    
      Starting small
    
    
      But first things first. I had to get something up quick smart, so people could see my awesome trip to Peru. (when not doing deliciously nerdy stuff, I like to ride Mountain Bikes fast..). Time was of the essence, I'd just gotten back, everyone wanted to see pics. So no time to waste and I didn't want to ruin the photo experience by just dumping on Facebook, or Flickr. I'd half built the blog on a plane, on a previous trip. Time to finish it off. 1 week later. Done. Dusted and up.
    
    
      Scratching the itch
    
    
      It was running on one Linode, so staging and production became painful. Where there's an itch there's a credit card. 10 mins later, I had a new 'production' environment. I'm using 'production' in quotes as really, this is a blog which gets no traffic. And here I am with two Linode 768mb machines, and a Nodebalancer. Bam bam. Done. An hour of configuration later, and we have two live, load balanced servers. A couple of hours more and we have learnt about MongoDB Replica sets, copied over the database from (the shortly to be) staging box, dumped it into the a single MondoDB instance, fired up two more, switched on replication and wahey! Over engineering was readily apparent - but data was distributed.
    
    
      So now I've got servers, database, time to get the app running. Much to my suprise it only took one line of a different database connection string and bam! we now have my app talking to the replica set. (Top marks 10Gen on MongoDB by the way, error messaging actually makes sense.. and installation/configuration is a snap). Now she's ticking over smoothly. Capistrano Multi-Stage is making me pine less for Websitrano at home - at work it is our religion - however deployment is smooth, and the thing is pretty damn redundant.
    
    
    
      Next up ... GridFS :)
    
  

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2011/05/02/rails-developer-to-join-our-team-in-toronto</link>
      <guid>http://work.rowanhick.com/2011/05/02/rails-developer-to-join-our-team-in-toronto</guid>
      <pubDate>2011-05-02 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Rails developer to join our team in Toronto.</title>
      <description>So I'm looking for a Ruby on Rails developer to join my team at work. We are the Development team for a North American Marketing services company based in the Greater Toronto Area. We produce internal systems for our company. Our company has scale so these systems have an abundance of technical challenges ranging from UX, performance to code organization. If you want to work on a team where you have lots of opportunity to build and solve things in Ruby and Rails, then this is for you.&amp;nbsp;
What can we offer ?&amp;nbsp;
&amp;nbsp; - Our company was just rated 10th best place to work in Canada according to the Great Place Institute. We have a fantastic culture and are very proud of it.&amp;nbsp;
&amp;nbsp; - We're Agile, through and through. You get JIRA, you get stories, you get to talk about points and burn down, 2 week sprints, constant movement&amp;nbsp;
&amp;nbsp; - Career path, you're not just a cog in the wheel. Our goal is to get every team member to the best that they can be and happy with what they're doing through constant evaluation and feedback&amp;nbsp;
&amp;nbsp; - Software, like Github ? That's perfect because we do to. Like Emacs ? Textmate ? That's upto you, we have no code editor preferences&amp;nbsp;
&amp;nbsp; - Like to learn ? We have regular (2x a week at least) code reviews/refactoring/learning sessions
&amp;nbsp; - Want to give back to the Ruby &amp;amp; Rails community ? Have a github account ? We endorse that as well&amp;nbsp;
&amp;nbsp; - Your manager not only loves his team, but also loves to code, and knows what it takes to get stuff done.&amp;nbsp;
What does a day in the life look like ?&amp;nbsp;
You'd say hi to your team members, fire up JIRA, pick off a story. You recall from the sprint planning meeting how this story interacted with the system and set about developing the feature. Perhaps you'd talk with a team member or two on an implementation detail, then fireup Textmate (or vim,emacs..). Pull the latest code and run the tests, then start writing your feature test.&amp;nbsp;
A team member asks for some help, you arrange time and go off to the developer nook, to spend some pair programming time on a couch or at their desk. Then you'll be back at your task. Lunch time rolls around when you want it, but first at 1pm it's standup time. You'd get to find out where everyone's at and give your report. It may be a learning standup where one team member is going to show a refactoring for the next 20mins that everyone looks at learns from, and perhaps makes better.&amp;nbsp;
You'd find a minor business question you need resolved, ask the product owner giving your view of a solution, get an answer and use that to help guide your development. Towards the end of the day tests are green, code is good, you commit and move your story over for the QA guys to have a once over.&amp;nbsp;
Sounds like you ? want to join us ?&amp;nbsp;
Whether you have 6 years or 6 months experience, if you can demonstrate solid understanding of programming principles, Ruby knowledge, Rails knowledge and best practises during our interviews you would be considered for the position. At this time we are looking for candidates to work full time in our office in Mississauga (just near the 401/427) - 15-20 mins from downtown Toronto. We are not looking for remote workers.&amp;nbsp;
To apply please email danica.asanovic@mosaic.com with your resume. If you have a github account or any work artifacts you would like to share, please include details with your resume.
&amp;nbsp;</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2010/11/25/the-case-of-the-curious-snap-sony-development</link>
      <guid>http://work.rowanhick.com/2010/11/25/the-case-of-the-curious-snap-sony-development</guid>
      <pubDate>2010-11-25 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>The case of the curious SNAP Sony Development platform</title>
      <description>Yesterday evening I followed a reddit post to this.&amp;nbsp;

http://snap.sonydeveloper.com/develop/platform/

Shortly thereafter it's on hold

http://snap.sonydeveloper.com/

Some pages are up, but the link to download the SDK is no longer working. You can still get to the class reference (http://snap.sonydeveloper.com/snapdocs/Base/index.php)&amp;nbsp;

Now one would think, if Sony were to be getting into the game with a language that is very very close to what native iPhone apps are developed in various news outlets would be all over this. What's Sony up to ? Overzealous agency publishing pages before they were meant to ? It went up and swiftly got taken down for other reasons ?&amp;nbsp;

Well, well, well.. very interesting indeed.&amp;nbsp;</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2010/11/24/great-presentation-on-the-state-of-postgis</link>
      <guid>http://work.rowanhick.com/2010/11/24/great-presentation-on-the-state-of-postgis</guid>
      <pubDate>2010-11-24 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Great presentation on the State of PostGIS</title>
      <description>http://www.ustream.tv/recorded/10667125</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2010/11/16/crazy-hot-possibility-gpu-based-gis-database</link>
      <guid>http://work.rowanhick.com/2010/11/16/crazy-hot-possibility-gpu-based-gis-database</guid>
      <pubDate>2010-11-16 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Crazy hot possibility - GPU based GIS Database processing</title>
      <description>Okay so let's take some out of the box thinking here (not grounded in any understanding of what's going on under the hood in GIS database extensions, or CUDA - I'm just reaching here, so feel free to comment and tell me why technically it's not possible!)&amp;nbsp;

On one side of the fence we have this crazy stuff called 'Geospatial database extensions', that allow for database driven geometric/geographic calculations which are pretty damned impressive. I.e. tell me all the people from this one table, who live within 15 miles of this road that is this zig zag shape, that is defined is another table of roads.&amp;nbsp;

On the other side of the fence, just released was this 'Cluster GPU' instance type at Amazon (http://aws.typepad.com/aws/2010/11/new-ec2-instance-type-the-cluster-gpu-instance.html), powered by one of these bad boys:&amp;nbsp;


Now what does a GPU do and why am I putting a GPU in the same post as a GIS database ? Well for one thing, phenomenal parallel processing &quot;GPUs work best on problem sets that are ideally solved using massive fine-grained parallelism, using for example at least 5,000 - 10,000 threads&quot; &amp;nbsp;(http://www.allthingsdistributed.com/2010/11/cluster_gpu_instances_amazon_ec2.html). Sounds interesting, but where is that GPU based processing actually used ? most commonly seen in .....games.&amp;nbsp;

What do games have to do with the price of fish ? Well, they do lots of 2d/3d calculations. Lines, vertexes, shaders, all that fun stuff... Now hey what do GIS extensions do for databases ? Add geometric calculations, lines, polylines, hmmm see where I'm going ?&amp;nbsp;

Imagine if you could switch a compile flag on with PostgreSQL/PostGIS to enable it to use the GPU CUDA architecture. Imagine the possibilities with taking this new parallel execution model and applying to a spatial query, one would assume it would run one heck of a lot faster! Real time complex spatial analysis....&amp;nbsp;

Now that, I would pay $2.10/per hour for. &amp;nbsp;</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2010/11/08/great-lecture-by-ed-catmull-of-pixar</link>
      <guid>http://work.rowanhick.com/2010/11/08/great-lecture-by-ed-catmull-of-pixar</guid>
      <pubDate>2010-11-08 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Great lecture by Ed Catmull of Pixar</title>
      <description>What's more important - great people or great ideas ?&amp;nbsp;
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2010/10/24/zbar-vs-redlaser-barcode-scanning</link>
      <guid>http://work.rowanhick.com/2010/10/24/zbar-vs-redlaser-barcode-scanning</guid>
      <pubDate>2010-10-24 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>ZBar vs RedLaser Barcode scanning</title>
      <description>After my good friend @sbfaulkner prompted me with a link to ZBar, I spent a little Saturday wet and rainy day hacking - before long I had ZBar (via TiBar) and RedLaser up and running side by side on my the ole iPhone 4.&amp;nbsp;

RedLaser is a commercial Barcode scanning SDK to incorporate into native Objective-C iPhone Apps. ZBar (http://zbar.sourceforge.net/)&amp;nbsp;is an opensource alternative via TiBar (http://code.google.com/p/tibar/), can be extended as a Module in the Appcelerator Titanium abstraction layer.&amp;nbsp;

Unfortunately at this time RedLaser can't be incorporated into Titanium, but it was an interesting test to see the side by side performance, so here's a little video on some standard household items.&amp;nbsp;



Ultimately RedLaser is much nicer, but if you are using Appcelerator, ZBar is a viable alternative right now for hacking projects (lots of don't use this in production disclaimers)&amp;nbsp;

I was *really* impressed with RedLaser, I went on a 'scan-a-thon' round the house and it pretty much got everything except the tiniest labels covered in dirt. With ZBar you had to wait for a picture capture to find out wether it worked or not, slower but still got a reasonable amount of barcodes.&amp;nbsp;</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2010/08/17/standing-the-test-of-time</link>
      <guid>http://work.rowanhick.com/2010/08/17/standing-the-test-of-time</guid>
      <pubDate>2010-08-17 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Standing the test of time</title>
      <description>A decade is nearly a century in IT land. But a good system can stand the test of time.
I had a friend visiting this weekend who I used to work with back in NZ. I had a big hand in designing parts of the CAD/CAM engine of the application, and managing the team we all worked on together. He still works there and happened to have a development environment setup with said application. Firing it up was like seeing an old long lost friend, the grey matter was reconnecting the interface and parts that I designed, they were still there and working - 10-12 years later !
Remember those old friends who it's just like yesterday when you see them ? This was just like that. Smiles all round as I was fumbling my way through it and remembering, &quot;whoah .. that's still there&quot;, &quot;would you look at that&quot;, &quot;hang on, wow, I remember what the document that specced that was called!&quot;.
One of my favourite interview questions is &quot;What's your proudest moment?&quot; I think that's it. Right there. Over a decade ago I helped design something, and today, thousands and thousands of users across the world are using this application day in day out to design and manufacture parts of buildings.
What's something you put built, designed, sketched out, built, qa'd, pm'd years ago and is still there to this day ? Go and dig up your old applications, you might be pleasantly surprised...</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2009/04/19/daisydisk-disk-space-visualisation-on-os-x</link>
      <guid>http://work.rowanhick.com/2009/04/19/daisydisk-disk-space-visualisation-on-os-x</guid>
      <pubDate>2009-04-19 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>DaisyDisk disk space visualisation on OS X</title>
      <description>Very impressive. Just downloaded this to find out where my precious HDD space is going to. Nice easy and fast, what more do you want ?
 

Click here to get the goods

Damn .trash folders.... gotta remember to empty those out!</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2009/01/21/the-dynamic-ux-project-episode-1</link>
      <guid>http://work.rowanhick.com/2009/01/21/the-dynamic-ux-project-episode-1</guid>
      <pubDate>2009-01-21 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>The &quot;Dynamic UX&quot; project - Episode 1</title>
      <description>Friday night, I was cleaning the house I had one of those moments which resulted in hitting up the blackboard scrawling lots of slightly out of the box thinking. Rather than put together a horrendously long post, I've thrown up this video giving a backgrounder on what I'm thinking about, and hoping to put into action....

Pontificating on Dynamic UX from Rowan Hick on Vimeo.

The basic premise for those that don't watch the video is - the core web experience over the past number of years, really hasn't changed - however what we do have, is substantially enhanced productivity through the use of many great frameworks and languages. So let's look at the core web experience, and how can we alter that based on the behaviour of the user, change the layout and  content shown to suit the individual user.  

Next Episode, mapping out a system for profiling the behaviour of the user. Look out for a github repo soon. 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2009/01/15/toronto-ruby-on-rails-nite-not-what-you-expect</link>
      <guid>http://work.rowanhick.com/2009/01/15/toronto-ruby-on-rails-nite-not-what-you-expect</guid>
      <pubDate>2009-01-15 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Toronto Ruby on Rails nite - not what you expect</title>
      <description>So last night was the first Rails project night of the year and you know what ? I don't think I talked to one person about Rails itself other than the cursory &quot;what do you do?&quot; type conversations. 

What *was* interesting is I had no less than 4 different conversations with people about their professional development, be it their ideas or their careers - challenges they're facing, how to tackle things etc. It was kinda amazing, and made me realise just how important these project/pub/*camp evenings are. Being in a startup, or freelancer you don't have access to people to bounce ideas off, nor have access to professional development or HR teams. Last night really hammered this home. 

So if you're a team leader, a seasoned development vet, have built a business or two, etc and have a passing interest in Rails, you could do much worse than head out to one of the RoR related events, or any tech events, in Toronto. Ask someone what they do and you never know what kind of conversation you might have..</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2009/01/06/whats-on-your-desk</link>
      <guid>http://work.rowanhick.com/2009/01/06/whats-on-your-desk</guid>
      <pubDate>2009-01-06 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>What's on your desk</title>
      <description>Following on from John Nunemakers post. I've been wanting to share this for quite sometime. I should preface this with, I'm one of *those* guys that loves to tweak, tinker, prod and play with things. It drives my fiance nuts.. So here goes. I recently just put the finishing coats of paint on my home office. 



Software for profit:
Textmate - what can I say
NetBeans - @adamw523 is convincing me slowly that maybe this is the way of the future. Haml plugin needs some work though. I sincerely hope there's a Textmate2 in the works. 
Rescuetime - I'm competitive as hell. Apparently for this week I'm in the Top 1% of users for efficency. 
Jungledisk - no nasty catastrophic disk failures here 
1password - what, you put your passwords in a text file ? 
Expandrive - mounting your server to your local filesystem over SSH ... 
Mailplane - saved my life
iTerm - put your production servers on a red background, white foreground profile, never again will you forget you're on a production server... 
Skype - one of these days I'm going to give the &quot;laptop handheld video tour&quot; and it will end in tragedy... I just know it. Plus everyone seems to talk to the cats over skype video.. it's amazing.  

Online services: 
&quot;rails ourapp&quot; - Tend to build what we need, not a big fan of paying out for something invariably you have to change your processes to suit. 
Photos - Flickr Pro Account. Please never let Flickr die 
Devguard - kinda rocks for subversion hosting, if you're not into this whole git hotness yet. 

Now, for the fun part.. 

The brains:
MBP - for profit 
Tower - Watercooled (both GPU and CPU), overclocked, beast. C2D E8500 @ 3.59ghz, 4GB DDR2-1000MHZ, EVGA 8800GT, 15'000RPM Velocripator drive. *always* put your money into fast drives, money well spent. 
Backup - Lacie BigTriple in Raid 1 config. 
Routers - Hacked (DD-WRT rocks)
Mouse - A logitech thing that has outlived currently 3 or 4 Mightymice I've used at various co's ... 

Video: 
BenQ 24&quot; -  1920 x 1200, anything less is a crime against multitasking, as good as you can get without spending stupid money. 

Audio:
NuForce Icon - I like detail (USB, outputs clean audio)
Sophia Electric Baby tube amp - I like detail and warmth, plus, VALVES ROCK. 
Energy RC Mini's - kick ass 
Mirage Omni 8&quot; Sub - when it's not downstairs

The brawn: 
Maple desk - all hand made. Had immense amounts of fun turning stock maple lumber and ply into this. Took approximately two months. Cost a lot more than what any rikety piece of Ikea cardboard would cost (don't ever think you can build furniture to save money). Amazingly when moving house, I didn't trust the movers, so I managed to get it all into a VW Golf in one go (albeit I was driving with the top of my head underneath the top of the desk - visualise that!). Comes apart in 3 pieces, only way to lift it. 


The last word:



</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/12/23/impressive-mac-vs-pc</link>
      <guid>http://work.rowanhick.com/2008/12/23/impressive-mac-vs-pc</guid>
      <pubDate>2008-12-23 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Impressive - Mac vs PC</title>
      <description>Watch. 

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/09/04/glowing-goodness</link>
      <guid>http://work.rowanhick.com/2008/09/04/glowing-goodness</guid>
      <pubDate>2008-09-04 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Glowing goodness</title>
      <description>I'll have something web app related next post (just say no to scratched out ToDo lists, forget GTD solution #127 - roll your own ticket tracking in a couple of hours). But for now, just check this bad boy out.. 



If that intrigues you, follow this link ... Sophia Electric Baby. Gorgeous wee thing, and it sounds pretty darned tasty. </description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/08/08/tip-of-the-day-app_rootconfighttpdconf</link>
      <guid>http://work.rowanhick.com/2008/08/08/tip-of-the-day-app_rootconfighttpdconf</guid>
      <pubDate>2008-08-08 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Tip of the day - APP_ROOT/config/httpd.conf</title>
      <description>If there's one thing that's saved me no end of heartache it's including Apache conf settings for a Rails app or Merb/PHP/whatever, in the app's config folder. You get versioning for free. You don't forget your settings. You know where to find it every time. No other process can mess with it (not looking at anyone in particular CPanel...). Just make sure your web app can't mess with it :) 

i.e. create a file /var/rails/myrails/app/current/config/httpd.conf in which you place your host pointing to your rails app. 
Then in your apache conf file (normally /etc/httpd/conf/httpd.conf) ensure you include the file above. 

On my main app config file I try to pop in the top of the file the passenger config settings, as again it's easy to find, then any of the required vhost(s) that the app uses. 

Nice clean and in one place. 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/07/29/energy-rc-minis-nuforce-icon-and-a-little-treat</link>
      <guid>http://work.rowanhick.com/2008/07/29/energy-rc-minis-nuforce-icon-and-a-little-treat</guid>
      <pubDate>2008-07-29 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Energy RC-Mini's + NuForce Icon and a little treat... </title>
      <description>So after 'Fringe it appears I'm not the only Rubyist with a deep love of music. I love music, listening to it, making it hmm not so much (I can't) - thus thought I'd blog about further adventures in audio-listening-land. I needed some replacements for my desktop system after a minor technical glitch, and have been temporarily using some Def Tech Pro Monitor 800s with a NuForce Icon - see at end.

I've looked at Totem Mites, Def Tech Pro Cinema 1000's, and been pouring over product reviews of everything under the sun, trying to find something in the sweet spot of sounding good, but not going to get strung up by..err.. yeah you can complete that one. 

After an audition the Totems were honestly gorgeous, and sounded wonderful but just too expensive, and still quite big. Deciding losing my left nut wasn't an option they were quickly ruled out. ProMonitor 1000's were a step up from the 800's but getting quite bulky for the desk and lost their appeal. Given that I don't really like the 800's for music they were off the list. Numerous product reviews and &quot;my speaker choice is better than yours&quot; leads you down a rabbit hole.  

So Saturday I went to &quot;go get the cat food&quot; and ahem well we alll know what that means don't we?, came back with a pair of these... 


(note the bling gloss of the desk I made.. a year on it still looks hot) 



So they're Energy RC-Mini's, I hadn't seen many product reviews as they're relatively new. However the Futureshop next to said pet food store had some in a listening room. Audiophiles will likely cringe with the slightest mention of going to FS, but well, tough!. One look and was all over them &quot;ok, if they sound even half decent I'm getting them&quot;. The sounded more than half decent, and while definitely not at Totem level, they also weren't at Totem pricing. 

Now, there's something special about any toy that requires &quot;100 hours of running in&quot; (no shit). So it will be a few weeks before I really try to get them singing but at moderate listening levels they're pretty hot. Teamed up with a powered sub and my work place has a whole new sound to it. 

So what to drive them with ? Well I had previously reached out to the tubes and found this a few weeks ago.... 


Nestled between the speakers is a a NuForce Icon. This tiny little amp packs a little 12w punch which is MORE than enough to power any reasonably sensitive speaker in a desktop environment. 

After reading many reviews I picked this up online (a $199 deal had something to do with that). I'm fence sitting. Honestly on one hand it has fantastic imaging, the DAC is brilliant, I've heard things I've never heard before. On the other the hiss. It's a class D amp so by design it will hiss when no signal present. However I've also heard hiss during playback in quiet stretches - kinda weird but it's like you need to get it warmed up playing reasonable volumes then the hiss disappears. I rma'd one board as it was all over the place and intrusive on songs. A second one and I'm still not entirely sold. BUT considering it's also a DAC+Headphone amp it's pretty much a no-brainer (compared to what you used to pay for decent sound cards) - note the Headphone amp circuit is dead clean so I'm assuming line out is as well. I'm going to look for some little valve amp or similar to put on the line out for it so I'll treat it more like a preamp than a pure integrated amp. But for now she does the business. 

To NuForce's credit they are working to resolve my amp issue. It appears to be the speakers have some characteristics that means the amp 'reacts' with a higher noise level. They're getting me an updated board to try out that should resolve it. 

Updated 11th August It appears a lot of people are searching and hitting my blog for this little NuForce amp, I wasn't expecting my post to feature quite so prominently in the search results. So here's my impressions after probably a month with it .. 

Noise issue aside (getting resolved shortly with a new amp board), which I'm assuming is only affecting a very low %age of icon owners. I am very happy with this little amp for the money involved. It's an amplifier, headphone amplifier, and DAC (Digital audio converter) in one unit. For $249 it's not a bad deal at all especially when you consider what some external USB solutions for DAC alone cost.  

The DAC in it is way better than the Mac's in built card. It's picked up immediately via USB and just works. The headphone amp portion is great, through my Sennheisers it seems to make them pick up steam and really rock. Coupled with the Energy's, again noise issue aside, it seems to have lots of headroom. In my 9ft sq office I have no volume troubles. My comfort level is below the amps output level (ie I'll give up and not want to be in the room, before the amp runs out of oomph). The NuForce is now, I believe, released with some S1 speakers of NuForces' own design. This sounds like it would make a great package for the 'no hassle, I just want a good sounding desktop setup'.  In my setup it kicks the pants off any 'desktop setup in a box' for obvious reasons. 

The amp's well thought out. Nice and small little unit (pictures don't really do it justice about how small it is). Little things like a line out for an external sub are included. Basically plug it in, add some speakers, and a sub, and go. But beware. Audio equipment is a very slippery slope. There's always the next upgrade down the line..... to go up from here you're looking at tube amps, there's a couple around for desktop usage, one of which I have my eye on! But you are looking a significant jump up in price tag. Or more traditional integrated amps which are way bulky and not really suited to a desktop environment. 

If you want a small system for a den, cosy listening room, or desktop environment, highly recommended. Click here for NuForce Icon on Amazon. 

Updated 26th August A number of amp boards later, some very helpful staff at NuForce, and suffice to say, the Icon (at this stage) won't work well with Energy RC-Mini's. So don't buy my setup Something in the frequency response curve of these speakers really disagrees with this amp. I'm moving on to a different amp - using the NuForce as a preamp. I have a tasty little tube amp on it's way up from the states at the moment, which should be quite something on the desktop. So if you're contemplating different speakers other than the S1 for the Icon, I'd recommend posting on forums and seeing if anyone else has them. You may run a very small risk that they won't work. 

Now for the little treat... 

So you get something out of reading this - people will pfaff on about audio gear forever. But it's all about the music. So here's one kiwi band that is truly amazing and tends to get rave reviews - if you're into electronica and dub, try Pitch Black out for size - some free MP3's from live performances, I recommend listening to the Tokyo mix http://www.pitchblack.co.nz/default.asp?s1=downloads. You can buy full mp3 downloads from here amplifier.co.nz (although for quality I obviously recommend CD Purchase) 

Enjoy. 


Amazon link for the speakers (for those in the US) Energy RC-Mini Bookshelf Speaker (Single, Black)

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/07/20/rubyfringe-a-new-brand-of-awesomeness</link>
      <guid>http://work.rowanhick.com/2008/07/20/rubyfringe-a-new-brand-of-awesomeness</guid>
      <pubDate>2008-07-20 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>RubyFringe a new brand of awesomeness</title>
      <description>Opening night and day 1 are over. Just about to go pick Krispy and head down for day two. Truly, my mate mates down at Unspace have done an AWESOME job. The vibe is amazing. A lot of &quot;best conference ever&quot; comments going round.  



Yes.. those are laptops waving in the air, and yes that is Zed on stage. Just look out for the mp3..  </description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/07/20/my-rubyfringe-highlights</link>
      <guid>http://work.rowanhick.com/2008/07/20/my-rubyfringe-highlights</guid>
      <pubDate>2008-07-20 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>My RubyFringe highlights</title>
      <description>My new home town (not just the place I live, but now HOMEtown) rocks. The unspace crew did a freaking amazing job on RubyFringe. Joey has a huge list of notes on his blog if you want some nitty gritty.

For me personally, here's the stand outs... 

- I have to say Damien Katz's presentation was extremely raw and powerful. The story of how CouchDB came to be will stick around in a lot of peoples minds for a very long time I'm sure. 
- Giles Bowkit's talk was just an assault on the senses. Wow. Almost want to go to Burning Man now. Looking over the shoulder of my cohort's laptop on the backchanel it seemed dead quiet in the 5 secs I peeled my eyes off stage. 
- Nick Sieger's Jazz presentation taught me more in 30 mins than any music class ever has (not that I attended many) did in school. Even though I love music. Love it to bits. But he broke it down so well I was stunned. Wow. Thank you. 
- Mr Grigsby. Resourceful. What more can I say. This dude plays the system hard. 
- Leila had a hard job having the last talk of the day, but her essence was on the money, do something people love (and therefore value) and you'll do well. If your customers love the stuff you build. You've got it made. She showed an extremely hard core passion for her company. Fantastic. 
- Less than 200 people seems a perfect number for networking. Not large enough that you're anonymous, not small enough so you're talking to the same people. Met so many great people. Hope to stay in touch.  
- Libin, my man, you should be THE official Canon product tester. I believe he was trying to hit 1k photos. at time of posting 413 odd photos were up on Flickr but he hasn't uploaded Sunday's yet...  

Surprisingly technology was less of a focus of most everyone's presentations. Instead of the usual tech stuff every day on blogs, to mix things up the talks really got into the hearts, minds, and souls of the  presenters. All of which just can't be conveyed in the web medium. The tech presentations that were given were solid as well, it felt like just the right mix between screeds of cool innovative code and deep talks. 

It's amazing what can be achieved in just 30mins ! 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/07/16/if-theres-one-piece-of-advice-i-could-give</link>
      <guid>http://work.rowanhick.com/2008/07/16/if-theres-one-piece-of-advice-i-could-give</guid>
      <pubDate>2008-07-16 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>If there's one piece of advice I could give .. </title>
      <description>So I've been thinking about things, thinking about the state of web development. What could I write about to could help out some new recruits and budding developers. (Note this is a long one, so get some coffee, sit back, read, and I'd love to see your thoughts and opinions at the end ...). In a nutshell:  



I have a rather entrepreneurial friend back in New Zealand, he consulted at a Software company I worked for once. Over time we became good friends.. One day him and his business partner came up with a widget. And sold a few, and then needed to sell some more. Then one day he gave me a call. You can imagine as a web developer the conversation &quot;Yeah some some company wants [insert horrendous figure here] to build us an e-commerce site&quot; pffwaaaattt (coffee all over desk)...



And so began a new relationship. Realising the scope of work was BIG, I actually called up one of my dev mates. &quot;Oi, I've got some work for us, keen?&quot; Gave him the specifics. We agreed to do it 50/50 (side note, later on I ended up taking it on 100%). We struck a deal. I drew up a contract and we got underway. 



It's one thing sitting at a desk job, saying something will work, and then meh, it doesn't, this happened or that happened, whatever the reason, your thing doesn't work. There's a kazillion reasons why something won't work, or can't be done, or is late etc. Depending on your character this will bother you, or not (hopefully the former!). It doesn't *really* teach you responsibility. Now, taking someones money personally, and promising delivery of something, with nobody else to shoulder the workload. Now that's responsibility. There's only you and your Mac/PC. So long as the two of you are both in working condition, and you haven't bitten off more than you can chew well there's no excuses.



Everyone reading this should be familiar with the actual mechanics of building something, but most often you're shielded from the business elements. Why are you building what you're building ? Is some Business Analyst telling you chinese whispers. Do you really know ? It's all about the vision. 

This isn't some contrived management tactic, there's a reason people put it on the top of briefing/requirements docs, if you buy into the ultimate business goal, then you will be far better at doing what you need to do. 

There is a famous saying in New Zealand - &quot;Make the boat go faster&quot; an entire army of engineers, yachtsman, craftsman, tacticians were all about one single minded goal - making the boat go faster (and they did, Black Magic won the Americas Cup). 

In our case it was all about selling the widgets. By being both a friend, and supplier, you realise you're taking money from this company, your friend, to build something. They're going to have to make that money up by selling product. So, you'd better do what you can to help them sell that product. 



By keeping the vision at the forefront of your mind you're not going to use technology for technology's sake. You're not going to waste time spending 10 hours getting some little bit working when it doesn't matter. You are going to learn how to prioritise - especially if you're doing this in your hometime. Once you've wasted 3 evenings in a row and not gotten any further along the path to completing your objective you'll quickly learn what's important!

This WILL make you a better developer. Too often I read posts about the top x number of things looking for when hiring a developer. Technical brilliance is IMNHO focused on WAY too much. By doing the process from start to finish, you'll realise, the minor technical bits are quite small in the overall scheme of things (unless of course you need to build some ninja fast product requiring complex calculations)

Note as I've been writing this Ilya put up a great post mentioning the jelly jar, another way of looking at this issue



You will hear and see a lot people who are singularly focused on one technology, one piece of the puzzle, they're specialists. That's great. But a piece of code, or a sql call, or a config file does not a web app make. If you have to do everything from ordering a server to getting the finished app up and ready to login, you'll realise there are a lot of pieces of the puzzle. 

By doing everything yourself you'll begin to realise the other side of the fence is not as nearly black magic as you thought it was. Gaining experience in all aspects, from server config, mysql setup, dns setup, playing with cron will make you a lot more well rounded. By becoming more experienced in different aspects, you'll realise you can do a lot more.

[As a side note, this is also why I think working in a startup, is a damned good thing. Every dev should do it at least once!]



Along the way, your client is going to ask you for things, lots of things. And you're going to have to manage that feature request cycle. Now who knows better - you or the customer ? The just say no philosophy that is becoming pervasive in web app development school of thought is scaring me. My client loves it when stuff gets implemented. I don't just say no every request. Where stuff doesn't make sense, or can be done better, I talk through it with them. But if I just said no everytime. Well the relationship not likely go far. Don't get me wrong, I see it's place, but you have to use judgement, and know where it applies. Don't take it literally. When you're close to the customer, you'll realise their daily pain. Walk through the system with them, understand every support request - what lead to it, why, what can you do better ?



Now, why did I say in my opening statement maintaining an app. Long term there is no greater thing than maintaining what you wrote. In our day jobs, we move on, client's move on, the code moves on. But invariably the business doesn't - it stays there and so does the site. 

By maintaining something yourself you get an appreciation for the movement in technology(when we first wrote this app, the nearest thing to a published framework were the PEAR libraries, nobody had yet come up with a solid stack). Now 3-4 years later I'm rolling in Rails into the mix. 


You'll understand the value of commenting the tricky bits. it always comes up as a reminder, just last week I was all over some code questioning &quot;WTF did I do here?&quot; especially when the business decision hadn't been written down beside the code.  

Along with gaining a much fuller appreciation of clean, modular, readable and reusable code. Also you'll get the chance to refactor and it makes you (well at least it does for me) feel good. Some crufty bit of code you haven't touched for 6 months, and you get to make it look better and work better. Nice !

 

This might seem counter to what I've been saying. But I think this is how a lot of new technologies get adopted. People are playing on pet projects and attempt to use a new technology. Doing your own app, you get to make the choice. It's either going to work or it's not. And you have to live with the win's or losses. Whereas in your day job there might not be anyway on gods green earth you're going to implement technology x as the impact on a large team is huge, but on your own time - it's your choice. 

You get to play with jQuery for instance (whichs rock extremely hard by the way), or mix and match Rails and PHP. Can you imagine what a system architect is going to say when you propose that in your day job? No f-cking way. 

Of course, you have to pick your moments and rationalise why you're choosing that technology. What is it really doing better for you... 



This is where doing a project for yourself shines.  I saw a great clip by Tony Robbins the other day, must say I've never seen him before, and not likely to buy his products, however he did say something that that resonated with me loudly - too many people blame the lack of resources time,money etc but ultimately their failures are not about lack of resources, but the lack of THEM being RESOURCEFUL. 

This is what I'm talking about with this post. Maybe it's a really long winded way of putting it, but by building and maintaining your own app, in order to do it successfully you'll have to be resourceful. You'll have to learn, prioritise, be accountable, responsible, problem solve, etc and it will all matter because.. 



You'll get this at the end of the day. That's what I appreciate in developers. People who when faced with a challenge won't back down. They will find different approaches to a problem. They will try and try to get something running, they'll go away, rethink the problem and have another crack at it. Once done, they'll polish it, make it look work better/faster/ etc to acheive the end goal/vision. Having done that they'll take pride in it and say &quot;I did that, I think it's cool and it rocks, and here's why ... &quot;. 

Going back to my original opening statement, doing a project yourself gives you the opportunity to do so, virtually unrestrained. You'll get a tonne of challenges from technical, emotional, financial, time, the whole gamut. But by taking on the responsibility to do it yourself, (or be responsible for delivery yourself - you could farm the whole lot out, then you've got a whole new set of problems!), it means you have to meet and break through each one of those challenges. The only constraints in general, are your time and motivation. A number of years down the track you can look back on it, and go 'damn that feels good' 

When I get the chance to interview people one of my questions is always 




Feel free to answer it here, I'd like to see what makes other people tick.. </description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/07/01/where-did-you-last-click</link>
      <guid>http://work.rowanhick.com/2008/07/01/where-did-you-last-click</guid>
      <pubDate>2008-07-01 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Where did you last click ? </title>
      <description>Please, when designing UI's make the most important things on a page so you don't have to scroll for them. Not everyone has giant screens, and even for those of us who are lucky enough to be rocking the world at giant resolutions, we may not like to have the browser maxed out to the full screen resolution.

Think of the actions on the page and group everything so you don't have to max out your browser window to reach the most used elements on the page. For example, I'm typing this post in wordpress, and arguably the most important things are giving it a title, content, then saving it right ? Nice and easy your eye follows a visual flow, and you didn't have to go for the scroll bar. 

Blue - common eye track/data entry path
Red - mouse movements



Now lets refine the thinking a little more. Same deal with gmail, open it up, compose a message. Notice there's two send buttons, one at the top of the page not more than 100-200px away from the compose email link ? So where you last clicked was likely exceedingly close to where you need to click next. OR if you happen to be writing a novel and have scrolled to the bottom, you don't have to scroll back up to the top, as there's a send button there also. 



Now, try posting a message in Basecamp without scrolling - and without cheating by having lots of vertical pixels. If you're running a giant screen size drop your browser down size to what mere mortals use, notice the distance from where you clicked on messages, to the send button ? (Particularly if you've got a couple of companies of contacts to click through!) 



Do more than a couple of messages a day and question to yourself, why is arguably the least important things in a message (milestone, attachment) taking up valuable real estate forcing me to scroll. 

No one likes a bitchfest, so being a little constructive - why not use that blank space on the right of the message pane to pick your people and send. Even better, have the people field as a text entry area with auto complete items to cut down on clicks. Keep all the important functions clustered above the fold and cut down on the scroll and click!


</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/06/28/orb-audio-and-advice-sought</link>
      <guid>http://work.rowanhick.com/2008/06/28/orb-audio-and-advice-sought</guid>
      <pubDate>2008-06-28 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Orb Audio and advice sought</title>
      <description>One of the many plus factors about working from home is you can have the sweetest sounds throughout the day. Without the accompanied hearing loss of listening to Senns or Grados all day in an office.

Some Tannoy active monitors (Reveal 5a's) graced my desk for the past year or so. Up until a crackle emanated from one of the tweeters on Friday, followed shortly with that 'I just got a little poorer' sensation as the sound stage disappeared from the left hand side as the tweeter blinked out. 



The associated cost of fixing it may not be worth the effort. Grieving period now over - they are wonderfully detailed, perhaps a little too 'clinical' though which is by design but I have certainly had countless hours of fantastic music. After a little digging I figure some one else probably has had one die in a similar manner - so assuming I can get enough for them on Ebay I'm going to try something different. 


(photo credit)

Rather than risk a mission to Bay Bloor Radio and the accompanying questions I turned to Google and found these puppies from OrbAudio. Handmade in the States vs shipped out from China. They look pretty damned cool, and unlike most cool looking, handmade products are reasonably priced and seem to get rave reviews. So. The next question, planning what the heck I could drive them with - the Tannoys had integrated amps on each speaker, so now I need to find an amp. I like the notion of trying out a valve amp but can safely say I have no idea what I'm looking for !  

Does anyone have any recommendations for good, cheap, stereo valve amp that would suit. I don't need to have hearing loss, despite my Tannoy's abilities to wake up the neighbours, I'd really prefer a rich warm soundstage at low volumes than trying to crank Tool out until I'm deaf :)

Anyone with 2cents to share ? 


</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/06/26/textmate-favourite-features</link>
      <guid>http://work.rowanhick.com/2008/06/26/textmate-favourite-features</guid>
      <pubDate>2008-06-26 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Textmate favourite features</title>
      <description>Sometimes you just forget the stuff you take for granted, but often you hear of people new to apps and not realising what's there. Here's a couple of the features of Textmate that are probably my most used...
 
CMD + T - Go to file, pretty hot. List of files is shown in a dialog that it is in order of last edited/open file, with the last file you worked on as being selected. So I have a big habit of spending my life CMD+T then Enter all day along. Also by typing will filter down the list of files pretty damned fast. 
CMD + SHIFT + T - Go to symbol. Hotter still. This allows you to easily navigate through a file with ease. If you single click on a method name, it jumps to that method without closing the dialog box, double clicking closes the dialog. Particularly handy working on a large class/module this tends to stay open all day jumping back and forth between methods.  
CTRL + SHIFT + A - Hottest, subversion integration. Diffing from the commit dialog is a godsend. 

What's YOUR favourite feature of Textmate ? </description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/06/24/see-rubyrails-does-scale</link>
      <guid>http://work.rowanhick.com/2008/06/24/see-rubyrails-does-scale</guid>
      <pubDate>2008-06-24 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>See Ruby/Rails does scale</title>
      <description>Updated LinkedIn Blog Post

If yellowpages.com or a whole bunch of other sites or the Friends for Sale facebook app wasn't enough to convince you, that yes, you are on the right track with Rails (no pun intended). 

Another solid Rails app has been mentioned in mainstream media  http://blogs.zdnet.com/enterprisealley/?p=188 blogs about a Facebook app done by the LinkedIn Light Engineering Development team. Cranking out mac daddy throughput rate - 1 billion page views / month. 

Enough said. 

Go read the article and watch the (excellent) video. 

Then get back to the business of building hot Rails apps. 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/06/11/toronto-rails-night-merb-presentation</link>
      <guid>http://work.rowanhick.com/2008/06/11/toronto-rails-night-merb-presentation</guid>
      <pubDate>2008-06-11 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Toronto Rails Night - Merb Presentation</title>
      <description>Last night was yet another successful Toronto Ruby on Rails Nite put on by Corina Newby. The Toronto ruby community is rocking, evidenced by the large turnouts and fresh faces we see everytime. I'd guess 40-50 of Toronto's best and brightest Rails developers filled out the room. The unspace guys put on some much appreciated beer and made sure we're all informed about the upcoming RubyFringe (can't wait, I'm really hoping Zed's presentation is as exciting as his blog rants posts). 

Along with the other presenters of the night Mike and Libin/Wes/Carsten (up on TorontoRB.ca sometime in the next day or so). 

I did a presentation on Merb - The pocket rocket framework. Slides are are here (you may have to click through to the blog post to view if you're reading this in a reader/aggregator). Resource links are at the end of this post, and some discussion notes follow.. 

 | View | Upload your own

Presentation background
Intended for people who are interested in looking at Merb, collating key points from blog posts, irc dicussions, mailing lists, and own experiences getting an app running with Merb (well the opposite way round, trying to get an app running and finding out those answers!). Hopefully the presentation collected a fair few hours worth of investigation into 20 or so minutes to help other people out

Sports Bikes vs Sports Cars
Useful analogy between Sports Bikes (Merb) and Sports Cars (Rails). Said cars have all the bells and whistles, everything is packaged up nicely, and it's pretty hard to hurt yourself, however given the nice packaging it's pretty hard to modify things. Sports bikes (Merb) on the other hand, are much more open to tuning, playing with, go faster, but need a bit more care

Same same but different
Rails and Merb apps are very much of the same likeness, but there are differences. Don't expect to be able to port code over 1:1 (especially if you've got a big reliance on plugins), and don't pepper the merb mailing lists/irc channel for &quot;please make xyx behave like it is in rails

merb-core &amp; merb-more
Two gems you need to get started (technically you only need merb-core). -Core is the stripped down bare minimum to get merb running. -more contains all the nice packaged goods to help you along the way


merb-gen is your friend
throw out script/* you're now doing everything in merb gen for generating your app, models, resources etc

Key code differences
refer to slides, but the code used is difference

Agnostic in a very good way
Merb is agnostic when it comes to ORM, test framework, js framework, rack adapator. merb-gen behaviour changes based on component used so if you're using rpsec, then stories get created vs unit tests. This is one of the reasons I'm very much into the idea of Merb

Cool features
part controllers, action args, router, covered off in the slides. 

Full apps, flat apps, very flat apps and thin servers and large grains of salt
For performance stats (which are to be taken with a very large grain of salt). Hello world action on a single controller, rails would be about 300 req/s full merb app would be round 500 req/s flat merb app 500-550 req/s, a very flat app marginally quicker again, front a very flat app with thin (merb -I veryflatapp.rb -p 3000 -e production -a thin) and woah hold on, 1000 req/s ! Question was asked about benchmark figures and I made the point, they're going to be all over the place - it's easy enough to benchmark for yourself, that's the only thing that's really relevant. We know Merb is quick, just how quick will depend on your own application and uses. 

Merb, Rails and you
The inevitable discussion at the end around, should you use Merb and how does it relate to Rails. Some of the goodness in Merb looks to be slowly being backported to Rails, so over time Rails will benefit from all of the wizardry going on in Merb (hopefully!). For those that like Merb's approach, and willing to forsake the vast library of rails plugins, and/or have very specific performance requirements and/or need to hack a framework around to do what they want. Merb looks to be killer. Ultimately it's upto you, so evaluate carefully. 

Resources

Lots of link goodness..... 

http://merbivore.com
http://wiki.merbivore.com
http://merbunity.com
http://merborials.com/
http://groups.google.com/group/merb
http://github.com/search?q=merb
http://mwrc2008.confreaks.com/
http://www.slideshare.net/search/slideshow?q=merb
http://www.slideshare.net/search/slideshow?q=datamapper




</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/05/13/torontorbca</link>
      <guid>http://work.rowanhick.com/2008/05/13/torontorbca</guid>
      <pubDate>2008-05-13 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>TorontoRB.ca</title>
      <description>A while ago I was looking at all of the events going on in Toronto, mailing lists, *camps wondering how the heck does anyone get to know what&#8217;s going on?. Particularly those who are new to the scene ? After talking to a couple of people and realising the need for one central place to collect it all, I put together this blog. With my partners in crime, Corina and Pete, TorontoRB.ca will be kept up to date with when things are happening, goings on in the scene, opportunities to help out. Our vision is to keep you, our faithful Rubyist&#8217;s up to the play on what&#8217;s going on in our fair city. 

Add the feed to your readers, sit back, and soak up the centralised goodness. http://torontorb.ca

If you're in Toronto, know of something I've missed. Have a blog, project, or anything that you think deserves a mention on there, send it into mail@torontorb.ca and it will get attended to in short order. 

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/05/06/minor-gotcha-and-shout-out-to-passenger-crew</link>
      <guid>http://work.rowanhick.com/2008/05/06/minor-gotcha-and-shout-out-to-passenger-crew</guid>
      <pubDate>2008-05-06 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Minor gotcha and shout out to Passenger crew</title>
      <description>Okay so yesterday I found a behavior problem with passenger (1.04) in that request.env['PATH_INFO'] was nil, whereas under Mongrel it was being set as we were expecting to the current path. Within less than I guess 2 hours of reporting it on #passenger, code was put in place and committed to github.

Now how's that for amazing work ? You've got to hand it to the boys over at the Passenger team. I sat back in my chair at that point and thought about the days before dealing with open source. I recall a dev team I was working with found a bug in number handling with .NET, what could they do ? For all the money paid in licensing fees etc ? Nothing. Just code around it. 

Days like yesterday I really enjoy the open source community, it certainly has some major advantages. I still have a lot of testing to do before I'd happily switch a production app over to Passenger, but looking forward to the promise of better deployment that's for sure!
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/05/05/toronto-ruby-rails-madness</link>
      <guid>http://work.rowanhick.com/2008/05/05/toronto-ruby-rails-madness</guid>
      <pubDate>2008-05-05 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Toronto Ruby / Rails madness</title>
      <description>If you're in Toronto and been living under a rock you probably haven't realised that every month, there are a number of events specifically for Ruby/Rails developers. 

There's the ever popular and well attended Rails Pub Nite - great for networking and an excuse to have a pint or two. If this sounds like your thing join the other 40 odd that head out on the third Monday of the month at the Rhino. Pete Forde @ Unspace is the man on the scene for that one, kudos for keeping that for over a 2 years now (I think, don't quote me!!). 

The newish kid on the block the Rails Project Nite. Project nite consists of 3 presentations every time showcasing projects or rails specific learnings, usually showing nitty gritty code on some fantastic projects so quite enjoyable for us nerds! There's been some great presentations, so make sure if you've got any interest get down there, again solid numbers show up. Corina Newby has been putting this together, major props there for getting the new event up and running. If you have an interesting project that you would like to present, just contact her and volunteer your name, and breif summary. Make sure you RSVP on the Project nite, if not you could miss out 

Finally there's the Toronto Ruby users group, meeting on second sunday of every month at the Linux cafe - I will fess up that I haven't been to this one, weekends being usually DIY disaster time it's harder for me to make that one :) So if you can't find something in between those 3 that spark an interest in Ruby related development learnings, well then... there's no hope for you

More details on the Ruby Users Group, Sunday May 11th - http://www.trug.ca/
More details this months Project Nite, Tuesday May 13th- http://correlations.wordpress.com/2008/05/04/tuesday-may-13th-ruby-on-rails-project-night/
More details on the Rails Pub Nite, Monday May 19th - http://www.unspace.ca/innovation/pubnite/

Finally, what mention of the Toronto Ruby/Rails scene wouldn't be complete without a Rubyfringe plug, haven't got tickets, get that sorted out ! - http://rubyfringe.com 

See ya at one of the above !

[Post script] Not entirely Ruby/Rails related I would be shot if I didn't also mention the Toronto Software Developers Lunch or the Ajax Pub Nite.


</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/04/30/centos-5-passenger</link>
      <guid>http://work.rowanhick.com/2008/04/30/centos-5-passenger</guid>
      <pubDate>2008-04-30 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>CentOS 5 + Passenger</title>
      <description>Tip of the day: For anyone out there with CentOS 5, despite what Passenger thinks, your http-devel libraries likely are installed. 

I was getting an error &quot;you need to yum install http-devel&quot; , which I had, but still getting the error. 

If like me, the export APXS2 as per passenger docs doesn't work, just add &quot;/usr/local/apache/bin/&quot; into your profile path and passenger will then work fine (I just checked by ensuring axps ran at the command prompt before running the passenger module install)

In theory then you should be good to go... 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/04/10/rails-php-sharing-the-same-session</link>
      <guid>http://work.rowanhick.com/2008/04/10/rails-php-sharing-the-same-session</guid>
      <pubDate>2008-04-10 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Rails + PHP sharing the same session</title>
      <description>Ya know there's times in your life you do things that feel 'wrong'. This somehow feels that way, but one of my buddies wanted to know how it's done, so here it is:  

I've got an application I maintain in PHP which has been in production for a good number of years. It's stable, works really well, however like any application I need to keep putting in enhancements, the pain curve of doing this is exponential with the time I've been using Rails, so over a couple of years you can imagine the pain is pretty high. Last week I thought to myself, enough is enough. I'm sick of writing PHP, I could do this so much faster in Rails. I've been churning away on a rewrite in the background, in Rails as and where I have time but I wanted a 'fix it now' kind of solution. So, why not have the same virtual host serve out both Rails &amp; PHP, so long as the Rails app can find out if a user is currently logged in, then I can piece by piece enhance/replace the PHP app. Turns out it was pretty damned simple. Here's a quick guide assuming

1- Both apps are sharing the same database
2- In the session you're storing a user_id of the logged in user
3- App uses cookies

So here we go... 

1. Virtual Host Config

The first thing we need to do is get Rails to run under the same vhost as the PHP scripts are run. This is easy, just adding a ProxyPass directive into the Apache vhost for the site back to your mongrel(cluster), so lets say we had a REST resource &quot;some_resource&quot;, you'd add in the ProxyPass line below



    ...
    DocumentRoot &quot;/path/to/your/php/app/html&quot;
    ProxyPass /some_resource http://127.0.0.1:3000/some_resource
    ...



Note that in production this would pass through to a balancer of course. The unintended consequence of this is that you also can share all of your assets served from your existing app without having to duplicate them in your Rails app. 

2. Sessions - PHP

The next thing for this to work is we need to know for the Rails app that the PHP app has logged a user in - we need to share the sessions. There's not too much black magic here. When you start your session in the PHP app (well at least mine!) PHP was storing in a named cookie eg &quot;myappname&quot; a hash value via session_name( 'myappname' );. This hash value is used to look up the session tmp files stored on the server, inside those session files are the serialized objects that PHP stores in $_SESSION global. So you have three options. 

1. The &quot;read from file system and unserialize the session&quot; route 
2. Store the session in memcached and have both PHP/Rails connect to memcached
3. Use the db to store sessions and logged in user_id's, then load the user on each page load. 

Note there is a page on this on the rails wiki, devoted to approaches 1 &amp; 2. However if you're not storing a tonne of variables in the $_SESSION then approach number 3 - the path of least resistance - will likely be just dandy for you... 

In my database I created a shared_sessions table - using a rails migration (detailed in step 3 below) This stored a unique key &quot;session_hash&quot;, as well as other fairly understandable columns &quot;user_id&quot;, &quot;updated_at&quot;. 

As we're logging in and out from the PHP app, this will mostly maintain the sessions table. So I added a quick couple of functions Application_SetSession() and Application_ClearSession(). Application_SetSession() simply writes into the shared_sessions table the hash value from the cookie $_COOKIE['myappname'], the corresponding user_id, as well as the time of update, it looks something like this: 


function Application_SetSharedSession($user_id)
{
    global $DB;
    $session_hash = $DB-&gt;real_escape_string($_COOKIE['myappname']);
    $qry = &quot;REPLACE INTO shared_sessions SET `session_hash` = '{$session_hash}', 
                      `user_id` = '{$user_id}', `updated_at` = NOW()&quot;;
    if ( !$DB-&gt;query($qry) ) throw new DBException($qry);
}


ClearSession() clears out the appropriate shared_session record. As you can well imagine ClearSession() is called when the user logs out, SetSession() when they login as well as every page load. 

Your PHP app will now be setting/clearing the shared_session records as appropriate. 

3. Sessions - Rails


  rails myphphack
  cd myphphack
  script/generate model SharedSession
  script/generate model User
  script/generate scaffold SomeResource name:string ... 


Right now you need to fill out the SharedSession model's migration, and delete the user model migration (it's already in the database!). In the SharedSession migration, make sure you're setting the unique index on session_hash, otherwise REPLACE INTO won't work. 

So, first we need to load the user on the Rails side. To do this we need look up the SharedSession model for the session hash, from the cookie that was set by PHP. It's available of course, doesn't care who set it we have access to it. 


class ApplicationController &lt; ActionController::Base
  before_filter :restore_user
  ...
  protected
  def restore_user
    unless @user = User.restore_from_php(cookies[:myappname])
      redirect_to '/login.php'
    end
  end
  ...
end


On the user model, we now need a method to find the user from the session_hash:


class User &lt; ActiveRecord::Base
  has_many :shared_sessions
  def self.restore_from_php(session_hash)
    find(:first, :include =&gt; :shared_sessions, 
          :conditions =&gt; [&quot;shared_sessions.session_hash = ?&quot;, session_hash])
  end
end


Easy peasy. 

4. Testing time

Run the migration, fire up a mongrel instance on 3000, hit the appropriate vhost, login to your PHP app and go to /some_resource. With any luck you'll be able to hit the /some_resource path with a logged in user. 

Now then, it's not quite that simple

The astute ones will notice &quot;Hey what happens if I login from PHP, see /some_resource, then come back directly to /some_resource in future - I could do this at any point in the future, it won't log me out&quot;. Exactly, you can handle this one of two ways. Either some nasty cron job thing to clear out the SharedSessions table, or do it as part of the load_user filter in the rails app - ie before restoring the user, SharedSession.delete_all(&quot;updated_at &lt; DATE_ADD(NOW(), INTERVAL -15 MINUTES)&quot;) or whatever matches your current PHP session timeout settings. 

You also probably want to do some hash of the user agent, ip address etc and store this away in the shared_session table, then check against it whenever you're finding if a user exists, to try to eliminate cookie theft. 

The fine print

It's pretty simple and it works in testing... YMMV. Test the hell out of it in your own application. 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/04/08/lacie-2big-triple-raid-drive-review</link>
      <guid>http://work.rowanhick.com/2008/04/08/lacie-2big-triple-raid-drive-review</guid>
      <pubDate>2008-04-08 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>LaCie 2big Triple RAID Drive - Review</title>
      <description>Searching for an affordable freelancer/SOHO backup solution? I think I found one on the weekend. I use JungleDisk for offsite storage of *really* important stuff that I would quite literrally die if I lost, but in this day and age of huge media files, the need for vast amounts of reliable, fast, storage is present. After a previous Maxtor drive started making some horrendous whirring and high pitched electrical whines a replacement needed to be found. 

A Saturday morning Google turned up that desktop external HDD's with RAID arrays are now actually affordable, and realistically the only option for a backup drive. Most external drives seem to be configured in RAID0 (data is split across drives effectively doubling capacity, but the upmost worst for reliability). However some drives are available with configurable RAID settings. The LaCie 2big Triple is one such drive, I found one that was within driving distance in downtown Toronto @ Vistek. 

So off I went and picked one up. Should you be south of the border it's significantly cheaper on Amazon, I paid just under $CAD469+tax - whereas Amazon it's $US329: LaCie 301254U 1 TB 2big Triple 2-Disk RAID Hard Drive

Unboxed it, set it up. It's a fairly attractive little unit, the aluminium blending in with any respectable SOHO.  The funky blue bulge actually is a big red/blue light &amp; one touch backup button. It's a bit more attractive setup than the product images would have you believe. Some designer has put his name to the unit so it looks the part. On the back you have the drive caddies - in theory it's hot swappable (if one drive fails, replace it and the data will be rebuilt to the new drive), with the RAID setting switch, drive status lights, and connectors. I chose the 'Triple' unit meaning triple interface - USB/Firewire400/Firewire800. There's also a NAS variant should you want skynet hooking up to it and leading a bunch of terminators... woah wrong script :) 

I flicked it over to RAID1 and switched it on. A few blinks of various LED's later as the drive reconfigured itself from RAID0 to RAID1 I had a drive ready to be formatted. Use DiskUtility and format/partition it, was then good to go and store files away with peace of mind. And well what can I say - it's just another drive at this point ! I neglected to install any of the packaged software, time machine was quite keen on turning itself on and using the drive but I'm still too cynical and want to control my own backups. A couple of days later having consolidated all of my media and backup files strewn across various drives I feel exceedingly virtuous and safe in the knowledge if one drive goes tits up my data is still safe**

Okay so things aren't quite perfect, the only downside I can see is I hate noise with a passion, I really would like a noiseless drive but that's not going to happen anytime soon. Given what this unit does the noise is a good compromise, it has a tiny little fan hidden away behind the heatsinks, so with the drives idle it's liveable, just a gentle whirr. Accessing it it's a different story - both drives spin up and it crunches away, but given the data's getting written twice to both drives it's unreasonable to expect whisper quietness. The initial dumping of gigs of data to it was quite something but now streaming back mp3's during the day I don't notice it. If you like ultra quiet you may want to store it away in a desk unit or something.  

So if you're not backing stuff up, sort it out, now that drives like these are reasonably priced there's no excuse. Also bear in mind always think worst case scenario, and use something like JungleDisk or ExpanDrive to store your files offsite. 

** There's some argument out there that prepacked RAID drives are statistically not actually that hot as the drives likely came out of the factory one after the other, in which case if one fails the others not too far behind it. But that's being a little paranoid!</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/03/07/tips-of-the-day-query-trace-and-equality</link>
      <guid>http://work.rowanhick.com/2008/03/07/tips-of-the-day-query-trace-and-equality</guid>
      <pubDate>2008-03-07 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Tips of the day - Query Trace and Equality</title>
      <description>Tip #1 Query Trace

So you're profiling your application, cutting down your SQL queries, looking through the logs - &quot;argh where did that query come from ?!&quot; you say to yourself. Then you remember what Luke G said at the last Toronto Rails Project nite - check out Query Trace. 

Oh how this has made my life so much better. It tells you the stack trace at the point the query was executed, colorised nicely so you don't go blind tailing your log files. Here's a very simple example so you get the idea.. 

 

Get the plugin from here https://terralien.devguard.com/svn/projects/plugins/query_trace/README


Tip #2 Object equality vs checking id's 

When checking for ownership or association between objects, be careful you're not checking for equality of the objects. For example &quot;did person x create this order y&quot; the temptation is simply to go &quot;if person == order.creator&quot;, where you're checking the objects themselves. Careful! As this is actually loading up the creator of the order if it's not already loaded (SELECT * FROM people WHERE person.id = x). Simply check if person.id = order.creator_id, as this won't require the order's creator to be loaded, eliminating one less hit to the DB. Little things like this littered through an application can start really slowing things down if you're not careful. 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/02/19/rails-vs-merb-activerecorddatamapper</link>
      <guid>http://work.rowanhick.com/2008/02/19/rails-vs-merb-activerecorddatamapper</guid>
      <pubDate>2008-02-19 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Rails vs Merb &amp; ActiveRecord/Datamapper</title>
      <description>If you're getting to this page from searching &quot;Rails vs Merb&quot; I suggest you read/view this presentation I did http://work.rowanhick.com/2008/06/11/toronto-rails-night-merb-presentation/

Following on from my presentation last week, I had someone mention I should look at Merb+Datamapper if I'm looking for something awesomely fast. So I decided to put it to the test. This is a *completely* contrived - I've done enough benchmarking to know this, so take the following figures with an (extremely) large grain of salt, I'm just posting this for interest. The view being rendered is a real world view that I'm using for a rewrite of a PHP/MySQL app, listing out orders by order status, along with their customer and originating country. 

I've got a database of Orders(770), OrderStatuses(17), Customers(300), Countries(244). I have a find by sql statement I'm using to pull upto 100 orders like so:

&quot;SELECT orders.id, orders.created_at, customers.name as customer_name, countries.name as country_name, order_statuses.name as status_name FROM orders LEFT OUTER JOIN `customers` ON `customers`.id = `orders`.customer_id LEFT OUTER JOIN `countries` ON `countries`.id = `customers`.country_id LEFT OUTER JOIN `order_statuses` ON `order_statuses`.id = `orders`.order_status_id WHERE (order_status_id &lt; 100) ORDER BY order_statuses.sort_order ASC,order_statuses.id ASC, orders.id DESC LIMIT 100&quot;

The same statement is used in all 3 applications, along with the same generated html. All 3 apps were run daemonized in production mode using mongrel. The resulting page is comprised of a layout + js + css files, that each app is serving identically. 

Using Rails: 42.16 req/s (baseline)
Using Merb + ActiveRecord: 57.80 req/s (1.37x)
Using Merb + Datamapper: 72.98 req/s  (1.73x)

So lets up the order count to 11550. As the volumes of data goes up (and therefore database tuning becomes more important) these are the following figures... 

Using Rails: 22.82 req/s (baseline)
Using Merb + ActiveRecord: 29.85 req/s (1.30x)
Using Merb + Datamapper: 33.91 req/s (1.48x)

Merb+Datamapper still outshines the competition, but the difference in performance isn't quite as significant, however once the DB is tuned, I bet life gets more interesting.... 

Again before I get lambasted, take the figures with a grain of salt, the times do vary quite significantly as there are variables aplenty, just look at the general trends. 
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/02/12/how-to-avoid-hanging-yourself-with-rails</link>
      <guid>http://work.rowanhick.com/2008/02/12/how-to-avoid-hanging-yourself-with-rails</guid>
      <pubDate>2008-02-12 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>How to Avoid Hanging Yourself with Rails</title>
      <description>The law of unintended consequences. Evidently people are searching on figuring out how to leave this earth in Google and getting to this page because of the title with alarming regularity. If you're one of these people PLEASE see a psychiatrist, talk to someone you love, take a deep breath, realise that you've got your whole life ahead of you, whatever it takes.  

This evening I presented at the monthly TSOT Toronto Rails Project Nite. As promised here's the presentation and links to resources mentioned. Big thanks to TSOT, everyone who came, everyone else who presented and the spirit in the T. Ruby/Rails community. 

Presentation - How to Avoid Hanging Yourself with Rails
Faker - faker.rubyforge.org
'mrj's ActiveRecord select/include patch -  http://dev.rubyonrails.org/attachment/ticket/7147/init.5.rb
include preloading optimisation - http://blog.codefront.net/2008/01/30/living-on-the-edge-of-rails-5-better-eager-loading-and-more/

Some points following on from this:
- YMMV, times were produced using a consistent dataset, results are going to be all over the place dependent on columns, table size, indexes, ordering etc etc. 
- By testing with real (/faked) data, you can avoid (to some degree) the premature optimisation problem, you'll see what your app is going to perform like closer to a real world production environment. 
- Word on the street is Datamapper + Merb is wickedly fast, I'm going to run a test with the same dataset just to see what the difference is like 
- There were no MySQL optimisations preformed, just a vanilla MySQL install. 
- I'm not being negative on the core team about the select/include problem, it's a hard problem to fix, I'm just making people aware of it so you can save the banging-of-head-on-desk problem others of us have suffered. 
- If the presentation bored you to tears, you know it all already, live in Toronto, and are bored in your job - we may have a position for you. Talk to me... 

If you're in T. make sure you get yourself along to the Rails pub and Rails project nites, well worth it for networking and learning respectively. I hope to see every developer in T. putting forward a presentation on their projects, by collaborating and sharing we all learn immensely. Personally I've found every presentation exceedingly interesting - keep it up !</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2008/02/06/monit-restarting-mongrel-cluster-execution-failed</link>
      <guid>http://work.rowanhick.com/2008/02/06/monit-restarting-mongrel-cluster-execution-failed</guid>
      <pubDate>2008-02-06 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Monit restarting Mongrel Cluster - &quot;Execution Failed&quot;</title>
      <description>Following in the footsteps of numerous other hapless people seeing this error - I had a frustrating number of hours, trying every combination of stuff that *should* work according to various recipes. 

The following is what I had to do to get monit playing nice with mongrel cluster (and thereby avoiding the lovely error &quot;execution failed&quot; when trying to get mongrel restarted via monit)

This is on a CentOS 5 Enterprise x86_64 server. For some reason calling the cluster::start option on mongrel_rails would not work, I had to pass in all the flags manually to mongrel_rails, along with absolute paths for everything. But hey it works ... you can manually kill a mongrel process and watch monit bring it back up for you, right as rain !!!  

(note next step I'd change the monitrc to actually test a response from the mongrel server in question, rather than rely on the pid file) 

Setup: 
- mongrel user, in mongrel group. 
- mongrel owns /var/www/apps/myappname/ 
- monit is run as root user
- mongrel user doesn't have sudo privileges

in /etc/monitrc 

check process mongrel_8000 
  with pidfile /var/www/apps/myappname/shared/pids/mongrel.8000.pid 
  start program = &quot;/usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -c /var/www/apps/myappname/current/ --user mongrel --group mongrel -p 8000 -P /var/www/apps/myappname/shared/pids/mongrel.8000.pid -l /var/www/apps/myappname/shared/log/mongrel.8000.log&quot;
  [stop program, rules etc following] 

[Rinse and repeat for each mongrel you're running in the cluster] 

Note that this will not work... 
  start program = &quot;/usr/local/bin/mongrel_rails cluster::start -C /var/www/apps/myappname/current/config/mongrel_cluster.yml --clean --only 8000&quot; 








</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/12/19/require-rmagick-and-case-sensitivity</link>
      <guid>http://work.rowanhick.com/2007/12/19/require-rmagick-and-case-sensitivity</guid>
      <pubDate>2007-12-19 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>require, RMagick, and case sensitivity </title>
      <description>(At least on Leopard with Ruby 1.8.6)

Ruby will try to reload rmagick if you get the case of rmagick different from the original require. And when that happens it all goes up the whop. 

We were using attachment_fu's image magick processor, then doing a require 'rmagick' seperately which resulted in tonnes of errors like this 


/usr/local/lib/ruby/gems/1.8/gems/rmagick-1.15.10/lib/rmagick.rb:32:
  warning: already initialized constant PercentGeometry


Keep your case's of require's consistent. Even if this is file system dependent behaviour in mixed development environments you can imagine how weird problems could get! 


</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/11/28/html_quickform-in-rails</link>
      <guid>http://work.rowanhick.com/2007/11/28/html_quickform-in-rails</guid>
      <pubDate>2007-11-28 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>HTML_QuickForm in .... Rails ? </title>
      <description>Caution Thinking Out Aloud: 

Okay the purists have just decided to kill me. Let the religious wars begin !

No seriously, everytime I do some coding in an old PHP app which is heavily dependent on HTML_QuickForm, I keep questioning how possible would it be to convert it across to Rails, and whether any other persons like myself would think all of their Christmases have come at once. Here's my hopefully rational thought processes behind this. Rails is a fantastic CRUD machine. If you want to build single model forms with validations in them, absolutely beautiful. Nothing could feel more clean and make you as a developer go 'thats sweet'. Fantastic. 

Now try and do a model-less form, with validations, or combine multiple models within one form. Things like the presenter pattern get bandied about. Real world case example - a form to choose options for defining a report. Nothing that you want to put in a model as it's not a represenation of a 'thing' (although some may argue it is). 

I wonder and am sitting on the fence of, whether to try implementing quickform for rails. For those that haven't been exposed to it, in a nutshell it's a brilliant little php library that lets you create a representation of a form, with rules, pass the form into a renderer which dumps out the html on a page, but that's not all, it assists you in processing the form on submission. So some code can look like this (not syntactically correct, but close enough), which does all of the hard work of writing out html, setting up client side js, and server side processing. 


//page myform.php

$myform = new HtmlQuickForm('form_name', 'myform.php'); 
$abc = $myform-&gt;addElement('text', 'product_name', 'Product Name:'); 
$myform-&gt;addRule('product_name', 'required', 'You must enter a product name'); 
if ($myform-&gt;validate()) {
   //process form
   var_dump( $abc-&gt;getValue() ); 
} else {
   //setup form 
   $abc-&gt;setValue('123')
}

// then in any template which dumps out the rails code
$myForm-&gt;display(); 


It doesn't seem like much, but put half a dozen or more options on the form, different processing rules, and suddenly it's done a lot of the heavy lifting for you. 


What would it take to add this to Rails ? How would (I personally) fit it in.  It doesn't really sit within either the model, view, or controller. The view should render the output, it doesn't really fit within a model as it's not a representation of a thing. It most closely sits in the controller, but you don't really want to clutter the controller with your form models. 
Here's some thoughts 

An initial idea, with everything defined in the controller, then dumped into the view by a @my_form.output


class FormController &lt; Application 
  def do_form
    get_form
    if @myForm.posted 
       #do stuff
    else
       #populate stuff
    end
  end

protected
  def create_report
    @myform = RFormBuilder.new do |f|
       f.call_back_url = { :controller =&gt; 'form', :action =&gt; 'do_form' }
       f.name = 'myform'
    end
    @myform.add_text( :name =&gt; 'product_name', :label =&gt; 'Product Name', 
              :rule =&gt; { :required =&gt; :true, :msg =&gt; 'You must add this' } )

  end

end



OR 

Maybe we add in a new folder in the main app 

  /app/
      /controllers
      /models
      /views
      /forms 
        myform.rb


And the treat myform.rb kinda like a model, but kinda not. 



class MyForm &lt; RFormBuilder
  defaults :name =&gt; 'my_form', :call_back_url =&gt; '/myform' 
  text_field :name =&gt; 'product_name', :label =&gt; 'Product Name', :required =&gt; :true
   
  #gets called when form is posted   
  def validate
    return true if field_product_type == 'abc'
  end 
end


# now in FormController 

 def do_form
    get_form
    @my_form = MyForm.new
    if @myForm.valid
       #do stuff
       render :text =&gt; @my_form.field_product_name
    else
       #populate stuff
    end
  end



What do you think ? Am I stark raving mad. Could this just work ? I think so and am willing to take up the challenge... 


Rowan</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/11/01/gotta-love-those-recruiters</link>
      <guid>http://work.rowanhick.com/2007/11/01/gotta-love-those-recruiters</guid>
      <pubDate>2007-11-01 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Gotta love *those* recruiters</title>
      <description>From a blanket spam email I (and probably a good portion of the rails community just received)

&quot;I have a direct client who is seeking a strong Programmer who posses experience with Rudy on Rails. If you are qualified and interested, please send me your most current resume in a word.doc format to..&quot;

Yes, Rudy was actually put in bold, just to place even more emphasis on the spelling error.

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/10/23/want-to-know-what-torontos-councillors-are-spending-your-money-on</link>
      <guid>http://work.rowanhick.com/2007/10/23/want-to-know-what-torontos-councillors-are-spending-your-money-on</guid>
      <pubDate>2007-10-23 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Want to know what Toronto's councillors are spending your money on ? </title>
      <description>Check this out. Council Expenses (robford.ca)

Absolutely brilliant, and questionable all at the same time... 


</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/09/04/jungledisk-online-backup-done-right</link>
      <guid>http://work.rowanhick.com/2007/09/04/jungledisk-online-backup-done-right</guid>
      <pubDate>2007-09-04 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>JungleDisk - online backup done right?</title>
      <description>Following some links last week I ended up on jungledisk.com. All of 30 secs later I had the client downloaded and started backing up my hard drive.

What is it ? It's a collection of clients for the 3 majors (Windows, OS X, Linux) that essentially mount up an S3 storage bucket as a separate volume. You purchase the jungledisk client for $20 after a trial period, then get an S3 account with Amazon.com and settle your bill with them, based on exactly how much transfer and disk space you use. Set the whole lot up, and bingo you have an online volume, that (one would hope) is near infallible. 

Over the past week I've had a mac connected up, and an xp box, to the same S3 account. I'm in the process of slowly backing up all of my very precious photos etc. You do need a fat pipe to go and store all this stuff online but that comes with the territory. The beauty of this system is it appears just as another volume, and with cross platform clients, it means you can have your data storage off in some other place, without worrying about it. 

The cost.. well, hardly anything to get worked up around. So far I've spent a princely sum this month of $0.16USD with Amazon for ~1gb transfer, and 300mb storage. 

I'm stoked. No iffy external hard drives, or optical media to get damaged. Of anyone I expect Amazon to be the most reliable service, much more than anyone could acheive with a SOHO RAID storage device, for a fraction of the cost. 


Very tidy solution, and well worth a look at.  
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/28/goodbye-mediatemple</link>
      <guid>http://work.rowanhick.com/2007/08/28/goodbye-mediatemple</guid>
      <pubDate>2007-08-28 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Goodbye MediaTemple</title>
      <description>Okay, I'm not one to publicly rant but really, I've given up with the performance of MediaTemple's GridServer implementation. More to the point the marketing and statements simply do not measure up to what actually has happened with this blog at Mediatemple. It's not high load at all, never been dugg, slashdotted or anything else that might bring ill fate to a web site, however it's been subject to outages last week and weekend. Maybe someone had tried deploying a facebook app using the same grid server cluster my site was on ? Who knows. But whatever happened to the &quot;no single point of failure&quot; and &quot;rapid scaling&quot;... ? 

My particular favourite piece of copy is the &quot;Guaranteed Resources&quot; bit. Couple that with a sub par customer support response and the plug was pulled. 

I do know personally of one other with a media temple account (who I had recommended MT), he's serving static pages only and experiencing no troubles, so credit where credit is due. If you're backing it with a database, be prepared... 

Of course, now I've setup Murphy to come bit me in the ass with his law on my new host!. 

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/28/pgr4-event-atoms-so-close-yet-so-far</link>
      <guid>http://work.rowanhick.com/2007/08/28/pgr4-event-atoms-so-close-yet-so-far</guid>
      <pubDate>2007-08-28 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>PGR4 event ? Atoms ? .. so close yet so far. </title>
      <description> Oh the humanity of it all! On my way to work this morning I was stopped in my tracks by two Ariel Atoms parked outfront of an events place just round the corner. Instant parallel thought trains rocked through my mind, how the hell are they road legal in Canada ? and how the hell do I get myself in the passenger seat ?. Then a 360 Modena rocks up, along with a Porker. What's going on ? Finally I look out of my Atom induced haze to see the XBox 360 signage everywhere. Aha. Makes sense...Project Gotham Racing 4. 

Righto so I rock back to the office. Get dressed so I look more professional than bike courier, rock back and start talking to various people. 5 mins later I'd managed to wangle a potential ride later in the day after telling my true tale of woe that I left New Zealand when an Atom track day was going down and missed out on the drive of my life. The clock strikes 4 (after hearing the Ferrari opening it up many times during the afternoon... Torture! Torture I tell you...). I jump up, grab camera, rock round the corner. &quot;Oh No&quot; 

The Police. (with a heavy weighting on the period there)

Who would've thought that would've happened? No cars were going anywhere. Period. However the silver lining is at least I'm on the list for a track day for next summer, which gives me a good 10 months to work out how to justify the money for it to my S.O. </description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/22/automated-testing-of-websites-via-real-users</link>
      <guid>http://work.rowanhick.com/2007/08/22/automated-testing-of-websites-via-real-users</guid>
      <pubDate>2007-08-22 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Automated testing of websites via &#8220;real&#8221; users.</title>
      <description>Of all the testing we can do, there's nothing quite like firing up your browser and navigating to the website in question, logging in and doing stuff. All of the integration tests, port tests, contrived &quot;I'm alive&quot; tests etc can give you an *indication* that your website code is all well and good. However what you really want to test is &quot;can I jump to it, do x y z action, and complete those actions without it bombing out&quot;. We have a two options, we hire an army of minions who will do that for us every 15minutes on the dot OR we could do it automatically. How do we do this ?

Well there are a number of ways. One option I'm going to walk through is using the magic genius of Safari Watir, RSpec tests, ruby, a few gems, cron and any Mac you can lay your hands on. We set this up a while ago monitoring some of our sites and it's great for finding out when something in your webstack has fallen over. For a &lt; $1k investment it's a no brainer for any web site.

Caveat - this ain't going to test your flash/flex content - this is just for HTML based sites. Read on...

1. Machine setup

First, take one mac mini. We need to install ruby, ruby gems, rails, rspec, safariwatir, and rb-applescript bridge on it. Follow the Hivelogic narrative here for instructions on installing a full rails stack. Then just simply run these commands to finish off the last remaining gems.

  sudo gem install rspec
  sudo gem install safariwatir --include-dependencies


2. First website check

So we've got our infrastructure setup. Now we need to write the scripts that actually run the test the site. These will fire up safari and tell it to navigate to various URL's, then check the content on the pages returned. So in true behaviour driven development style we write a spec that in plain english walks through the steps. It fires up a browser instance courtesy of Watir::Safari.new and uses it to navigate around pages. First let's create a file called check_google.rb like so:


require 'rubygems'
require 'safariwatir'

context &quot;With www.google.com&quot; do
  before(:all) do
    @browser = Watir::Safari.new
  end

  it &quot;can navigate to home page&quot; do
    @browser.goto(&quot;http://www.google.com/&quot;)
  end

  it &quot;homepage should not have a 404&quot; do
    @browser.contains_text(&quot;404&quot;).should == nil
  end

  #it &quot;should throw an contrived error, when seeing if yahoo is on main page&quot; do
  #  @browser.contains_text(&quot;www.yahoo.com&quot;).should == true
  #end

  after(:all) do
    @browser.close
  end
end


Now if we run spec check_google.rb we get output as follows:


 RowanH$ spec check_google.rb
..

Finished in 2.818356 seconds

2 examples, 0 failures

Fantastic, it's what we expect google is alive and tickety-boo. Now to check the failure scenario, uncomment the yahoo test:

RowanH$ spec check_google.rb
..F

1)
'With www.google.com should throw an contrived error, when seeing if yahoo is on g main page' FAILED
expected: true,
     got: nil (using ==)
./test_mysite.rb:18:

Finished in 2.837444 seconds


Cool, we know what a failure looks like.

3. Turning your console output into a email message

We're not going to be logging in and doing this all the time, so we want to be emailed of success/failures. We are going to use a custom formatter for RSpec, which can make our output look a lot more interesting and pop it into an email. As I was running these scripts on a machine with a full rails stack I used ActiveMailer for sending emails.. (you'll see why in a minute) so let's create a custom formatter that will format our output for mailing. Lets call it mail_formatter.rb and pop it into the same place as our existing scripts - as follows.


require 'rubygems'
require 'action_mailer'

#actual email thingy
ActionMailer::Base.server_settings[:address] = 'domain@myhost.com'
class Emailer &lt; ActionMailer::Base
  def test_email(text, status)
    subject    &quot;TEST Autotest Status - #{status}&quot;
    from       &quot;mytestbox@myhost.com&quot;
    recipients &quot;me@myhost.com&quot;
    body       text
  end
end

class MailFormat &lt; Spec::Runner::Formatter::BaseTextFormatter
  def start(spec_count)
    @mail_output = String.new
    @mail_output &lt;&lt; &quot;Test started \n&quot;
    @mail_status = &quot;Tests OK&quot;
  end

  def add_behaviour(name)
    @mail_output &lt;&lt; &quot;\n #{name}\n&quot;
  end

  def example_failed(example, counter, failure)
    @mail_output &lt;&lt; &quot; - #{example.description} FAILED \n&quot;
    @mail_status = &quot;#{counter} tests FAILED&quot;
  end

  def example_passed(example)
    @mail_output &lt;&lt; &quot; - #{example.description} PASSED \n&quot;
  end

  def dump_summary(duration, spec_count, failure_count, something_else)
    @mail_output &lt;&lt; &quot;\n&quot;
    @mail_output &lt;&lt; &quot;Finished in #{duration} seconds &quot;
    @mail_output &lt;&lt; &quot;#{spec_count} test#{'s' unless spec_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}&quot;
    Emailer.deliver_test_email(@mail_output, @mail_status)
  end
end


Right so this time if we a new command like so, to require the mail_formatter, and output in mail format, we should by rights receive an email:


 RowanH$ spec check_google.rb -r mail_formatter.rb -f MailFormat

1)
'With www.google.com should throw an contrived error, when seeing if yahoo is on main page' FAILED
expected: true,
     got: nil (using ==)
./test_mysite.rb:18:

(we still get our console output if we get a failure)

5. Automating it

Okay so wrap that lot up in a shell script, and call it via cron (hey I'm not going to write *everything* out here), and you've now got a simple script that's calling up your website and checking it.

6. Extending it

If you browse around for some of the safari-watir examples out there then you'll see more of how to access specific fields and named form elements - this will let you actually login and do stuff on your site(s) your testing.

7. Extra Credit - Screenshots!!

Okay, we've got our system emailing us every test. But what would be really cool is if it actually sent us a screenshot everytime something turned to custard and failed so we could see what actually went wrong. Well... it's suprisingly easy. We're going to use OSX's inbuilt screencapture utility and fire off a shell command to capture a png file everytime something goes wrong. Then pop those in as attachments to our status email.
Modify the code like so:

In the Emailer.test_mail method, add a parameter images, and pop this code at the bottom of the method:

   if ( images )
      for image_name in images
        attachment :content_type =&gt; &quot;image/png&quot;, :filename =&gt; image_name ,
                        :body =&gt; File.read(&quot;/Users/rowanh/Desktop/failed_images/#{image_name}&quot;)
      end
    end


So this will allow our email method to read in a list of images and attach them to mail message. Next we want to update our formatter.

For the start method add the following:

    @failed_image_count = 0
    @failed_images = Array.new


Add a new method like so :

  def take_screenshot()
    @failed_image_count += 1
    screenshot_name = &quot;failure_#{@failed_image_count}.png&quot;
    system &quot;screencapture /Users/rowanh/Desktop/failed_images/#{screenshot_name}&quot;
    @failed_images &lt;&lt; screenshot_name
  end


Next update example_failed so it takes_screenshot.

Finally in the deliver_test_email method, pop in the @failed_images array.

Conclusion

Bingo! you now have a hugely useful tester, that runs away, tests your website, tells you and will actually show you what went wrong. For not a whole lot of investment.


Off to setup a continuous integration machine that actually does this for each build........

Credit:
http://blog.aslakhellesoy.com/2006/12/2/getting-screenshots-from-watir
http://redsquirrel.com/cgi-bin/dave/projects/watir</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/20/yet-another-multicolumn-layout-rocks</link>
      <guid>http://work.rowanhick.com/2007/08/20/yet-another-multicolumn-layout-rocks</guid>
      <pubDate>2007-08-20 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Yet another multicolumn layout - rocks!</title>
      <description>One chasm between traditional desktop application development and web application development is layout/forms design. It's my constant pain point &quot;I just want a 2 column layout, with a data table in the middle&quot; - many hours later you're still tearing your hair out trying to get it working. It should not be this way (and that's just for prototyping).

To get a production tested basic grid/column based layout, that looks reasonable across all browsers and is flexible enough to grow as the app grows - well we all know how much a top notch HTML/CSS wizard is going to cost us right ? Why for every project the same ground of IE hacks and cross browser issues are solved over and over again ? This is half the reason that a sandbox environment like AIR is very appealing - don't deal with it, just get your users to use a standard environment.

Enter from stage left, in the why hasn't anyone thought about it before category, are two CSS frameworks that I happened upon on Friday. One called Blueprint which is getting a bit of attention, and one with the rather confusing name of YAML. After seeing all of the examples of YAML, and reviewing the documentation I thought what the heck lets give this a go.
YAML is designed for 'standard' column based layouts. It essentially says 'create your main div structure this way, in a predefined page/top nav/nav/main body/footer layout. Then within your main body div, you have options for creating 1-3 columns, and then sub columns within those columns. Whilst I haven't tested the limits, I'm sure so long as it fits within a grid you could use YAML to create it. It's not designed for your highly creative CSS award winning page with umpteem divs all over it - however that audience wouldn't be reading this blog. But for your standard store/blog/cms/other application I can see a huge head start in having the CSS pain removed from your desk.

So I put the theory to the test - 4 hours later, I had a couple of layouts running and working across IE 6, IE 7, Firefox, Safari... un-fricking-believable. About 30mins of that 4 hours was the actual job of getting the css setup with the basic grid structure - the rest, playing about with colours, table styles, and creating actual views. I abhor front end CSS work and this abstracted away all of the pain, leaving me just to get on with the job.

I'm not going to attempt to write a how-to or tutorial, as the original docs are so good I'll leave well enough alone - the only caveat is don't just blindly copy and paste, make sure you skim read the docs, you need to know where to put the appropriate patch files etc.

But wait there's more !

Does the thought of manually constructing even your basic div structure seem a little off putting to you. Dirk  Jesse (YAML's wizard) has a browser based builder for constructing your layout and outputting the CSS. Very nice indeed !. Just jump to his site and check it out.

So you can expect to see some XChain screenshots gracing this site shortly.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/13/the-satisfaction-of-rails</link>
      <guid>http://work.rowanhick.com/2007/08/13/the-satisfaction-of-rails</guid>
      <pubDate>2007-08-13 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>The satisfaction of Rails</title>
      <description>More work on XChain. In some spare hours on the weekend I implemented the basic structure of price catalogues for products. I can't tell you how long this took when previously doing it in PHP a few years back! (or even worse ASP a few years further back still). I'm sold on BDD, it was so quick to bang this out starting with the spec it first approach, mainly because all you need to do is 'rake spec', and bingo your code is tested...

As follows, note code is cut down a little, but you get the picture:

# A product itself does not contain any price information, it has many price's in a 'pricing' model, that is linked
# to price types, eg &quot;Standard Distributor&quot; &quot;Standard Retail&quot;
class Product &lt; ActiveRecord::Base
  has_many :pricings
  has_many :price_types, :through =&gt; :pricings
  belongs_to :order_line
end

#The pricing table, not only links to a product and price_type, it also has a discount
#model associated with it..
class Pricing &lt; ActiveRecord::Base
  set_table_name 'pricing'
  belongs_to :product
  belongs_to :price_type
  belongs_to :discount
end


# discount linked to the pricing, and discount tables to enable volume based discounting.
class Discount &lt; ActiveRecord::Base
  has_many :pricing
  has_many :discount_tables, :order =&gt; &quot;qty ASC&quot;
  #note that I don't want to do queries every time I ask get_discount, so I just iterate over the
  # tables to find the discount, rather than doing a find each time.
  def get_discount(qty)
    discount_tables.each do |dt|
      return dt.discount_applied if qty &lt;= dt.qty
    end
    return discount_tables.last.discount_applied
  end
end


# In order to calculate price, we need to determine the pricing model for the order (taken from price type)
# then look up the unit price for the product according to the price type
# finally get the discount for the volume at that price type.
class OrderLine &lt; ActiveRecord::Base
  belongs_to :order
  belongs_to :product
  def get_price(price_type)
    @pricing = product.get_pricing(price_type)
    price_as_ordered = ( get_unit_price * qty_ordered ) * get_discount
  end

  protected
  def get_unit_price
    @pricing.get_unit_price()
  end

  def get_discount
    @pricing.discount.get_discount(self.qty_ordered)
  end



You feel like you accomplished something when you sit down to work for a few hours and you get this...


=====================
rowans-computer:~/work/xchain rowan$ rake spec;
(in /Users/rowan/work/xchain)

DiscountTable
- should be valid

Discount when loading existing discount
- should return a max discount of 0.25 for a quantity of 10000
- should return a discount of 1 for a quantity of 20
- should return a discount of 1.5 for a quantity of 5
- should respond to get discount
- should have a discount table
- should have a name
- should belong to a pricing

Order when finding existing order
- should have a customer
- should have a billing address
- should have 3 order lines
- should have a purchase order number
- should have id = 1

Order with a single, invalid order line added
- should after changing the quantity be able to be saved
- should not be able to be saved as it has incorrect quantity
- should calculate to a correct amount

Order new draft order
- should be in the order collection list
- should belong to the correct customer
- should have an associated user who created it
- should be able to have it's address changed
- should be able to be changed to a new status

Order when creating a new order
- should when valid and saved, have one order status history item
- should be able to have an order line added
- should throw an error that it doesn't have line items
- should calculate return 0 dollars
- should have a default price type matching customer price type
- should be able to prefill an address
- should default to draft status
- should be able to instantiate

OrderStatus using a draft order status a super user
- should have a list of all available statuses

OrderStatus using a draft order status with no super user
- should not have all statuses available
- should have a list of next available status, when flow next is false, only including itself and the next higher status

OrderStatus
- should be able to find standard statuses

Product when using Product ID 1
- should be valid

OrderLine with valid order line
- should return correct discount levels (NOT IMPLEMENTED)
- should after changing qty return a different price (NOT IMPLEMENTED)
- should return a price of for x price type and y qty with a discountable price type
- should return a price of for x price type and y qty with a non-discountable price type
- should respond to get_price
- should be valid

Finished in 1.72758 seconds

40 examples, 0 failures, 2 not implemented
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/13/the-daily-miscellany</link>
      <guid>http://work.rowanhick.com/2007/08/13/the-daily-miscellany</guid>
      <pubDate>2007-08-13 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>The daily miscellany</title>
      <description>The Golden Rule

Always isolate your speakers from whatever they're sitting on (be it floor, bookshelf whatever). It's just the golden rule in life. You must do it. Well, I built this new desk**, and completely forgot the rule, I was just so happy to have somewhere for these puppies to sit on. I happened upon some 8mm strips of rubbery packing foam - night and day difference, event at low volumes it makes a difference. I'm not sure the maple was really adding to music

Just listening to some Ben Harper and it sounds GORGEOUS. No more annoying little bass resonances. Put on some Vivaldi and we get bone chilling clarity. Nice - that's what studio monitors are about, reproduction (this is a moment of triumph, I bought them 5-6 months ago and haven't really had a chance to *use* them until now).
Of course a true audiophile might be a little horrified that sound waves are going to reflect off the desk, but you can't have it all.

** The other golden rule, never try to figure out how Ikea can sell furniture so cheaply. 

A long way from Paperboy.. Bioshock

What a busy evening, picked up stuff for my significant other, went out for dinner, did some coding, managed to give the cats some attention, and last but not least sneaked in a few minutes of playing the Bioshock Demo.

Holy sh-t. Games have come a very long way from Paperboy, and even further from &quot;LOAD FROM A:\&quot; &quot;RUN&quot; off a tape drive (yes I'm starting to feel old). What keeps me young is firing up the flat panel, powering up the receiver, turning on the XBox 360 and having a bit of good ole fun.


All I've got to say with Bioshock, is I'll be very suprised if it doesn't come in a close 2nd, if not 1st with Gears of War for sales this year. It is absolutely spectacular (and this is just the demo). I was blown away from 15mins of play time, the water effects are very nice indeed. An eerie atmosphere pervades each section of gameplay. Well done. There goes my productivity for a few days...</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/10/xchain-now-running-on-rspec</link>
      <guid>http://work.rowanhick.com/2007/08/10/xchain-now-running-on-rspec</guid>
      <pubDate>2007-08-10 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>XChain is now running on rSpec</title>
      <description>Whilst I wait to sort out the UI issues I'm building up the specs' for XChain. I'm using RSpec, so it's a lot more 'self documenting' about what you can expect the application to do. Starting on a fresh project, it's immensely enjoyable to get into the spec -&gt; code -&gt; test -&gt; repeat cycle. If you're at all hesitant about getting into them feel free to go browse the source of my specs. I only spent a little time on it last night but already starting to see progress - a lot of the schema is getting cleaned up as a result of the specs. Here's the doc out put so far (which is about a fraction of what the finished specs will look like !).

Order when creating a new order
- should be able to instantiate
- should default to draft status
- should be able to prefill an address
- should have a default price type matching customer price type
- should calculate return 0 dollars
- should throw an error that it doesn't have line items
- should be able to be edited
- should be able to have an order line added

Order when finding existing order
- should have id = 1
- should have a purchase order number
- should have 3 order lines
- should have a billing address
- should have a customer


To get the specs running.
1. Grab a latest copy of xchain from subversion http://xchain.googlecode.com/svn/trunk/.
2. Dump all databases, then create, and run migrations.
3. Install rpsec using instructions from here
4. Run rake rspec
5. You should (at time of writing) get 13 examples with 1 failure (to work on!)

By the end of the weekend there should be a healthy amount of specs in there and fair portion of the model structure of orders, pricing, customer management done.

Heres a sample chunk of code

require File.dirname(__FILE__) + '/../spec_helper'


describe Order, &quot;when creating a new order&quot; do
  fixtures :orders, :order_lines, :customers, :addresses, :addressables, :products

  it &quot;should be able to instantiate&quot; do
    @order = Order.new
  end

  it &quot;should default to draft status&quot; do
    @order = Order.new
    @order.order_status_id.should == 10
  end

  it &quot;should be able to prefill an address&quot; do
    @customer = Customer.find(1)
    @order = Order.new
    @order.should respond_to(:prefill_address)
    @order.prefill_address(Customer.find(1))
    @order.billing_address.should eql(@customer.addresses.default_billing.address)
    @order.billing_city.should eql(@customer.addresses.default_billing.city)
    @order.billing_postcode.should eql(@customer.addresses.default_billing.postcode)
    @order.shipping_address.should eql(@customer.addresses.default_shipping.address)
    @order.shipping_city.should eql(@customer.addresses.default_shipping.city)
    @order.shipping_postcode.should eql(@customer.addresses.default_shipping.postcode)
  end
end


If you want an introduction on rspec follow your nose to either the rpsec docs (which are fairly self explanatory) or if you're the visual sort the head on over to http://peepcode.com/products/rspec-basics for a screencast (disclaimer, haven't watched it, but judging on Peepcode's previous efforts it should be good).</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/09/flex-vs-html-part-2-how-big</link>
      <guid>http://work.rowanhick.com/2007/08/09/flex-vs-html-part-2-how-big</guid>
      <pubDate>2007-08-09 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Flex vs HTML part 2 .. how big ?</title>
      <description>Following on from my post yesterday, I'm asking the question to the community, how big can Flex apps get. This is probably the great unknown which makes it hard (on this project) to commit to Flex. I'm not sure if I'm going to get halfway in and strike performance problems or such like (this is just conjecture!). HTML it's easy, it doesn't matter how big the app gets you're always just firing down a single page to the browser - you just have to manage page load times, this (for myself, and I guess anyone getting into Flex) is a little unknown. The questions are

1) Am I crazy trying to develop 1 person ~15hrs a week, given the apps functional list below, over ~6 months
2) Whats a good example app close to this size.
3) What kind of performance impact (if any) is there in adding each new functional area
I've gone through the ever growing showcase and I've picked out the nearest one size wise Studio Cloud, but there doesn't seem to be a lot of them that get this 'big'. Where my definition is big is a large number of different functional areas. To give you an idea of what I'm building.. (this list is about 6mths long I guess, rebuilding an existing system which has approx 2/3 of these functional areas).

Note that this is all backed by a Rails backend so all of the order calculations, report calculations will be coming from Rails, this just has to pick it up via AMF/HTTPService/WebORB. I'm a full time Rails web team lead so this is definitely cake for me to do the backend.


[Public View]
- Catalog
  - Product List
  - Product View
     - Application views
  - Cart
  - Checkout
- Orders
- Support
[Backoffice view]
- Dashboard (upcoming orders, tickets, shipments, forecasts)
- Orders
  - List orders (search/archive/filtering)
      - Manufacturing sub view
  - View orders (new/edit/view)
      - Order Sub View (audit trail, shipping status, invoices, order calculation summary)
- Customers
  - List customers (search/archive/filtering)
  - View customers (new/edit/view)
     - Customer Tracking Tickets (list/view/respond)
- Agents/Distributors
  - List
  - View
    - View Customers
    - View Orders
- Reports
  - Reports List
    - Individual report charts ~5-10
    - Individual report list based ~5-10
- Admin
  - Catalog management
     - Categories
     - Products
  - Price List Management
     - List
     - Price matrix update (products vs price category)
  - System Options



I'm sure it's doable, I'm not sure of the workload or performance of this. I'm not overly concerned of the swf file size, what I am concerned with is, will each additional functional area have an impact on overall performance and am I nuts for attempting this as my first large Flex project. I have knocked out a couple of small little Flex projects which weren't too bad, definitely didn't need frameworks for them.

Any comments would be appreciated; again all of the source is going to be freely available to everyone by a Mozilla Public License, so anyone who's thinking of going down this path and wants to contribute please feel free to leave a comment (big *hint* if there's any Flex UI designers out there - I would absolutely love to have a clean skin like this one...http://coenraets.org/blog/2007/07/new-version-of-salesbuilder-flex-air-application/ world fame could be yours ;) )</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/08/flex-vs-html-vs-time</link>
      <guid>http://work.rowanhick.com/2007/08/08/flex-vs-html-vs-time</guid>
      <pubDate>2007-08-08 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Flex vs HTML vs Time</title>
      <description>The old simple triangle of time vs features vs quality has reared it's ugly head again. After one particularly unproductive weekend I've made the decision to place a hold on the Flex interface for XChain, in favour of a raw HTML interface, sprinkled with AJAX.

I personally hate the decision, being enamored with Flex, I don't want to make it, but I look at the forward progress I've made in the past couple of weeks and it's been more or less stationary. I'm not trying to deliver the 'richest' interface possible, I'm going to deliver a working application.

What impacts my client most, is that they can get their job done.
Granted I am learning Flex, and grappling with the Cairngorm/No Cairngorm decision. I decided to go ahead with Cairngorm, particularly after reading the usual tales of woe 'i decided not to use it, now I've rebuild my app and am using it..'. However holy sh-t do you have to produce a lot of code to get things done, okay there are code generators out there, but still. For a pet project this blows out the window the time required to do the job. Sure if this was a 40hr work week project I'd be writing a completely different post right now.

This makes me appreciate the elegant nature of Ruby and Rails&amp;trade; so much more. It just gets out of your way and lets you get on with producing productive code. In just one hour I can do so much more. Firing up textmate I feel instantly at home. Is this a language familiarity thing, or a complexity problem, or am I using the right tool for the right job, within the given constraints, (probably not).

I had a big discussion about it with a colleague at work, and it always boils down to trade-offs and compromises, there's no one magic silver bullet (unfortunately). Rails is fantastic at backend work, and helps some with front end work, Flex has some great time savers, rich interface components like datagrid which are cake to wire up and get working - but then you're spending a tonne of time on event and ui management.

Where is the happy median ? Something like a super rich js framework ? What am I sorely missing from flex in going 'back' to HTML ?

- Rich components
- Consistent styling
- Reduced network traffic

A random thought floating through my mind is to publish it in AIR, that way I can still use an HTML interface hooked up to my back end, but a few extra features that might be very useful (drag n drop support, offline storage). More to investigate..

Grumpy but moving forward.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/08/03/wrightspeed-x1-best-of-both-worlds</link>
      <guid>http://work.rowanhick.com/2007/08/03/wrightspeed-x1-best-of-both-worlds</guid>
      <pubDate>2007-08-03 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Wrightspeed X1 - Best of both worlds</title>
      <description>And now for something completely different. Old news if you already have heard about it...

Quite a few years ago, like many a young IT guy, I had a too little responsibilities and too little common sense, which resulted in a daily driven, highly modified, 450HP Twin Turbo 300ZX gracing my garage - including no less than a Formula 1 derived Launch and Traction Control system... $2000 sets of tyres were dispatched on semi regular occasion, and I learned how to throw a ton of metal and fabric round a racetrack at insane speeds.

Now I'm atoning for my environmental and financial sins by daily riding a 0 HP 2 LP 0 Emission mountain bike turned commuter (with some ugly 1&quot; wide slicks). Which does amazing things for your fitness, and is absolutely great for venting any frustration you may have had in the office during the day - there's always a dimwitted motorist who will pull out on you and be needing gentle reminding that you too have a legal right to be on the road.

However. It's just not the same really...

Then this came along. Built by a fellow expat New Zealander Ian Wright. The Wrightspeed X1. Based on an Ariel Atom, a viciously fast car with one mission in life, to do everything fast, very fast. But this one has a twist. It's called Lithium Ion. Packed with batteries, electric motors and not a drop of smog producing fuel* in sight I'm in technology-love.


I'm just putting this out there, you know instead of the 'come join our startup for equity ' type emails, how about you be a bit creative and 'come join our startup and we'll get one of these bad boys in your driveway' ?? That's one way to get my attention..

Better acceleration than anything I've driven or been in (and I'll tell you 600HP is pretty damned quick and this would be faster), limited pollution (the electricity does have to come from somewhere) and it looks like it has fun by the bucket loads.

Check out this video. The astute will notice the Porsche has to do a rolling start, no doubt worried about destroying some clutch plates and the X1 *still* wipes the floor with it.



Or another..



And to think, you wouldn't have the difficulties of getting a high horsepower sports car off the line, like triple-plate clutches (not fun in traffic), it's just like an on-off switch. C'mon already, what are you waiting for, lets see these in production...

People in the performance world are really starting to see the benefit, check out this... Killacycle

*Until we have giant solar panel arrays, the energy to produce electricity has to come from somewhere...

Image is licensed under Creative&amp;nbsp;Commons ShareAlike&amp;nbsp;1.0&amp;nbsp;License</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/31/using-rails-with-flex-for-to-manage-long-running-tasks</link>
      <guid>http://work.rowanhick.com/2007/07/31/using-rails-with-flex-for-to-manage-long-running-tasks</guid>
      <pubDate>2007-07-31 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Using Rails with Flex to manage long running tasks</title>
      <description>UPDATE Jul 2008 - The API for BackgroundRB has changed and docs improved significantly since this blog post. Read the latest API calls over here http://backgroundrb.rubyforge.org/rails/. Don't reference the Rails code below if using latest BackgroundRB

As soon as you start doing anything with photos sooner or later someone says &quot;It would be really nice to upload these in a zip file&quot;, which then leads into a whole rabbit warren of issues, one of which you will inevitably come across is how to deal with a long running task on the server, in terms of a) getting it to actually complete and b) telling the user what's going on. There are various hacks for doing these, like running a shell script and writing out tmp files all over the place. Just plain ugly.

Enter Backgroundrb, probably one of the greatest little inventions for Rails.  It lets you kick off a background process, outside of the main rails app process, with the option to interact with the rails models or not. The beauty of this plugin is a little thing called MiddleMan, as the name implies it lets you interact with your background processes (Workers) from your Rails app.

So, this gives us the ability, from your Flex app to invoke a Worker on the server side, then monitor that Worker until it's finished, and/or kill off the worker if need be (for slacking on the job?).

What do we need.

1. First off install BackgroundRB from here.

2. Next we need to create our worker in your Rails app dir 'script/generate worker ResizerWorker . Here's a simple chunk of worker code.

class ResizerWorker &lt; BackgrounDRb::Rails
  def do_work(args)
    @total_images = 50
    @current_image = 1
    50.times do
      @current_image += 1
      sleep(1)
    end
  end

  def get_progress
    @current_image &lt; 50 ? status = 'In progress' :  status = 'Finished'
    info = { :status =&gt; status, :current_image =&gt; @current_image, :total_images =&gt; @total_images}
    return info
  end
end
As you can see we have a do_work method which is generated by default, this is called whenever the worker is instantiated so it kicks off our work to be done. Then I added a get_progress method to return a hash of the worker's current status.

3. Great so now we need to kick it off, there's some options to do this automatically at timed intervals, but I'm not going to go into that here, all we're doing is getting our rails app, by a web request to start/stop and monitor the progress (the web request is then called from Flex) . So we create a watcher controller, with actions 'start_task', 'status' and 'stop_task' as below which is all pretty self explanatory:

class WatcherController &lt; ApplicationController

  def start_task
    session[:worker_key] = MiddleMan.new_worker(:class =&gt; :resizer_worker)
    info = {:message =&gt; 'job_started', :key =&gt; session[:worker_key]}
    render :xml =&gt; info.to_xml(:dasherize =&gt; false)
  end

  def status
    @worker = MiddleMan.get_worker(session[:worker_key])
    if @worker
      info = @worker.get_progress
      if info[:status] == 'Finished'
        MiddleMan.kill_worker(session[:worker_key])
      end
    else
      info = { :status =&gt; 'Finished' }
    end
    render :xml =&gt; info.to_xml(:dasherize =&gt; false)
  end

  def stop_task
    @worker = MiddleMan.kill_worker(session[:worker_key])
    info = { :status =&gt; 'Task Stopped' }
    render :xml =&gt; info.to_xml(:dasherize =&gt; false)
  end

end

Gotcha!  I found out the method names in the Documentation, on MiddleMan, were wrong compared to the version I had installed. I needed to use .new_worker, .get_worker and .kill_worker.

4. Fantastic, so go into console, do &quot;rake backgroundrb:start&quot; in your rails directory, then fire up a rails server. You should now be able to hit http://localhost:3000/watcher/start_task, http://localhost:3000/watcher/status, http://localhost:3000/watcher/stop_task and see the appropriate results.

5. Now you can fire HTTPService requests on the Flex side and consume the results as required. For example :  (for the sake of berevity I haven't put in any timer function to recheck the status, just a manual click event)

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;


	
		import mx.rpc.events.ResultEvent;
		import mx.controls.Alert;

		private function onSvcWatchTaskResult(event:ResultEvent):void
		{
			trace(event.result.valueOf());
			var info:XML = XML(event.result);
			pbProgress.setProgress( info.current_image, info.total_images );
		}

		private function onSvcStartTaskResult(event:ResultEvent):void
		{
			Alert.show('Task Started');
		}
	





	
		
		
			
			
			
		
	


And there you go. A few seemingly simple lines of code has knocked off one of the age old problems of dealing with long running tasks. I heart Rails (and Flex).

(As always with code examples, don't copy and paste, rewrite it yourself. You'll understand it better and won't copy in any errors I've made whilst cutting it down for blogging)</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/26/refactoring-by-martin-fowler-developer-must-have</link>
      <guid>http://work.rowanhick.com/2007/07/26/refactoring-by-martin-fowler-developer-must-have</guid>
      <pubDate>2007-07-26 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Refactoring by Martin Fowler - Developer must have</title>
      <description>Late last year I was spending a lot of time on trains between T.O and Montreal, on one trip I picked up this book and was thoroughly engrossed - Refactoring - Martin Fowler is one of those simply must-have books on any developers bookshelf. Of all technical books I've found it to be the one that actually compels you to be a better programmer.

The first chunk of the book is dedicated to whats, whys, testing etc of how you should turn your mish-mash of spaghetti code into beautiful elegant world class code, the rest of the book is dedicated to a catalog of various examples of refactorings.  
Each  refactoring is structured with a small class diagram, theory about why you want to do it, then a detailed walk through of the steps written to get there. Well written, most of them are a doddle to understand. Even though the book uses examples in Java, they equally can apply for your Ruby, PHP, Actionscript code or whatever else tickles your fancy.

If you want to change from a programmer to a code artisan, this is the book for you. If not we'll leave you alone with your unmaintainable spaghetti code. Some of the refactorings are obvious, and some  the light switches on and you go 'a-ha'. Certainly if I'd have had this book from day 1 many moons ago I would've been a much happier chappy. I know using principles in the book I came away refactoring a working but messy piece of code days after reading it - the principles learned in the book made it a lot easier and quicker to do.

One big personal improvement I made was towards not being afraid of breaking up functions for readability e.g. like so:

  class MyClass

    def able_to_checkout

      if ( ugly_condition_1 == a &amp;&amp; ugly_condition_2 == c &amp;&amp; you_get_the_picture )

         self.set_book_to_checked_out

      end

    end
(guilty as charged) to the following:

  class MyClass

    def able_to_checkout

      if ( no_books_checked_out? )

         self.set_book_to_checked_out

      end

    end

    def no_books_checked_out?

      ugly_condition_1 == a &amp;&amp; ugly_condition_2 == c &amp;&amp; you_get_the_picture

    end

  end
To round off the book, it's a hard cover with a little red cloth tape bookmarker. What other technical book have you seen with that in recent history ? It's been designed to stay on your shelf for a very long time - unlike some faded examples gathering cobwebs on mine. A rare timeless classic ? Quite possibly. Go out and buy it today if you haven't already.

Another 10 | 10</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/23/xchain-it-has-a-name-license-and-home</link>
      <guid>http://work.rowanhick.com/2007/07/23/xchain-it-has-a-name-license-and-home</guid>
      <pubDate>2007-07-23 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>XChain - it has a name, license, and home.</title>
      <description>The open source Rails/Flex eCommerce application now has a name - XChain - pronounced cross-chain. I had some air travel time over the weekend and put it to good use coming up with a name, the basic premise being that the app should really be classified as a Supply Chain Management system as it deals with a lot more than simply taking peoples money for a product. (Order fulfillment, shipment tracking, eventually CRM and inventory management), and being a cross of two major technologies it seems to fit. Catchy enough and has meaning. Well I think so anyway, others might disagree - (that's what the comments form at the bottom is for...), only downer is XChain.com is taken by some spammer, but I've snapped up .ca and other appropriate domains.

To this end, I've also created a home for it here http://code.google.com/p/xchain/ which seems to be a good location for now, satisfies the free and accessible by SVN requirements. Alas no RSS feed, so stick to here for the updates.

I'm not a lawyer by any stretch, and have to a little more digging, but have basically decided on a license for it. The Mozilla Public License. My wish is that anyone will be able to use it for either non-commercial and commercial applications free of charge. The only restriction is if you extend it, you have to provide source code back to the community. I believe this is fair enough as  you will be getting a tonne of usable code out of the box to start with. I just need to check that we can provide mechanisms for companies sensitive proprietary processes - to make sure these can be wrapped up in a separate lib, or DSL stored in the db, to make sure that doesn't need to be opened up to the outside world.

Final decision of the day is to go with Cairngorm - this has more exposure so will hopefully appeal to a wider base of developers, and seems more suited to the scale of this application. I also found a Cairngorm Rails code generator via onrails.org which looks like it will do the business saving time generating code.

Right, time to get some code into that repository.... in the meantime feel free to let me know your thoughts on the name and license choice.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/19/essential-actionscript-3-essential</link>
      <guid>http://work.rowanhick.com/2007/07/19/essential-actionscript-3-essential</guid>
      <pubDate>2007-07-19 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Essential Actionscript 3 - Essential !</title>
      <description>The great chapters.ca boat sailed into port - last week Essential Actionscript 3.0 by Colin Moock arrived on my doorstop. First impressions this is by far the biggest tech book to grace my shelves. 900+ pages worth, it dwarfs O'Reillys recently released Programming Flex 2 book.

This book really does cover everything from general programming skills to the nitty gritty of E4X useage. The work that has gone into this book by Mr Moock shows. Approximately the first ~350 pages of the book is devoted to Core Actionscript &amp;amp; OOP principles in general, the second half Flash/Flex features such as XML, Drawing API, Security etc. Coupled with the Programming Flex 2 book I really think that's all you need for your bookshelf.

My learning style is to learn by example (I skim read text - but thoroughly read code to understand) which is covered off really well, the vast majority of pages have a short code fragment or diagram to complement the text along with longer full code examples where applicable.

Essential AS3 has depth to each and every topic, the ones I've read thus far anyway, going through example after example illustrating different facets of the topic - the XML chapter was particularly impressive. Too often you read a book and feel like you have to go back to the great Google Gods to discover more, whereas with this book I feel like that's all I need right there.

All in all, the best tech book I've purchased (even over the famous Agile Web Development with Rails book). Value for money can't be beat, cost me about $55CAD to my doorstep - and illustrates how thankful I am living in Canada now, after being used to New Zealand book prices! It's already taken pride of place by the keyboard as I'm working on our new widget seller solution.

10|10</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/17/open-source-rails-flex-ecommerce-application</link>
      <guid>http://work.rowanhick.com/2007/07/17/open-source-rails-flex-ecommerce-application</guid>
      <pubDate>2007-07-17 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Open Source Rails &amp; Flex eCommerce Application</title>
      <description>[Announcement] Rowan Hick Consulting, Canada and Ron Hanley of Fastmount LTD, New Zealand are pleased to annouce that their new Rails/Flex/MySQL eCommerce application will be released to the community under an Open Source license. The application, is a successor to a PHP/MySQL based application developed by Rowan Hick and James McGlinn of Nerdsinc Ltd New Zealand.
After nearly 2 years in production, with the advent of Rails, Flex, and the rapidly growing business needs of Fastmount, the current application no longer meets the business needs of Fastmount. We made the decision early this year to re-write a new application and have been developing requirements for the application as well as evaluating technologies.

The application is a business to business eCommerce system. Allowing a marine manufacturing company in New Zealand to service it's agents, distributors and customers world wide. The existing application facilitates order management from creation through to shipping tracking, along with customer management and some reporting elements.

Why are we open sourcing ?

We made the conscious decision that we don't want to sell the application, as such being closed and proprietary we gain no extra business value by keeping it internal (this doesn't preclude the possibility of a hosted version being provided down the road).  The application contains no proprietary information to Fastmount Ltd so there is no harm by open sourcing it.

Having done a number of eCommerce solutions, the problems faced and solutions tend to be very similar regardless of domain. Thus the app's tend to look very similar. Why reinvent the wheel, over and over again?

My personal vision is that a vibrant community will flourish around the application. If it can become an option for people when putting together an eCommerce solution then I would be ecstatic. Currently I haven't seen an active Rails based open source eCommerce engine out there so there's hope that this may become one of many possible standard 'engines' for people to use.

Through our background in the widget ordering domain - solving business problems beyond the simple shopping cart such as; multiple price catalogues, multiple currencies, product/ package combination, agents, sales by regions etc - this may help to be a learning tool for those who aren't familiar with the problems at hand, introducing real world solutions beyond your standard learning materials and tutorials.

Also by opening it up, and allowing public scrutiny will likely ensure that a higher standard of coding is reached within the application - there's nothing like judgement from your peers to keep those nasty  kludges out of the codebase.

Why Flex ?

Flex, does at first glance seem to be an odd coupling with Rails in terms of philosophical approach. However as a business tool, this application needs to work perfectly, regardless of browser incompatibilities. In my own opinion, the time saved by not having to deal with these issues, along the extra interface richness granted by Flex, warrants the extra upfront time in creating the Flex interface. What should be noted here is this application is more of a business to business, rather than business to consumer type system - thus we can expect less casual browsing/ordering as in the case of a product catalog/ecommerce app versus a very defined business process for ordering.

Having said all this, whilst the app has a Flex front end by using some Rails niceties there will be no stopping anyone developing an HTML front end for the app (infact the app will already have some front end work in HTML), so the core Rails application will become the engine and any various front end(s) that may appear can be bolted on. We're using a REST based approach to facilitate this.

Roadmap

Current Status: Initial development of Order management stories; Creating, editing, listing orders and customers. Evaluating implementing microframeworks for the Flex front end (Cairngorm or Model Glue Flex). Evaluating communication methods (HTTPService, WebOrb, RubyAMF).

Release 1: Production ready system - Revamp of existing system in Rails and Flex, all existing user stories maintained. Streamlined order entry system, customer management, order payment processing (via ActiveMerchant), shipment tracking (via UPS).

Release 2: Customer Relationship Management enhancements

Release 3: Inventory Management, manufacturing enhancements.

Community Release

The application will be released to the community under an Open Source license (license to be decided), the only caveat from our production system will be licensed assets (such as icons) stripped out for community release with placeholders for people to find their own. I haven't as yet investigated a trac (or trac like system) that's impervious to spam, so for any community members that have any ideas reading this post feel free to drop us a comment. This will likely happen in the next month.

Community Contributions

We will welcome contributions and commit back into the core, so long as they don't negatively impact core functionality. Process as yet undecided. To ensure fair attribution - the credits page of the app will include your name as a contributor. Whatever license is decided upon will require that any modifications are publicly available as open source. Share and share alike principles.

The Name?

Undecided - if you want to throw out an idea feel free!

Keep Informed

All announcements will be made here on this blog. Keep informed, keep your RSS readers locked to http://feeds.feedburner.com/rowanhick

In closing

I'm personally very excited about providing this to the community and hope good things will come out of it.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/13/good-to-great-part-2-going-full-circle</link>
      <guid>http://work.rowanhick.com/2007/07/13/good-to-great-part-2-going-full-circle</guid>
      <pubDate>2007-07-13 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Good to Great part 2 - Going Full Circle</title>
      <description>Following on from Good to Great (rules to live by) post.

One thing that constantly irks me is the &quot;It's not my job&quot; syndrome. This is most apparent in call centers &quot;Sorry I can't help you with this, let me transfer you to..&quot; [cue another 10min wait time]. We've all been on the receiving end of that one and can attest to how we get annoyed by it. This also manifests itself in development teams and developed systems.

The biggest impact you as a IT person (be it developer, analyst, project manager) can make, is take a 'full circle' approach to your interactions both within a team and directly with clients and your developments. What do I mean ? take extra time out of your day when faced with an issue, that's not technically your, or your apps responsibility, to solve it completely for your client or team member. Or if you can't solve it, take ownership in handing it off properly**. The end result is to have the initiator of the request client, user etc, not required to go elsewhere to solve their initial problem.

Why would we possibly want to do this, when our time could be better served browsing Digg, checking out Facebook, breaking out the office xbox ?

- Client is vastly happier, happy clients pay bills, come back for more work, and refer you/your company
- You get credit, and respect within the team and from the client
- You will likely gain greater domain knowledge
- You will likely see opportunities in your app to further improve it's usability

Lets look at some examples:

... as applied to a hosting management

Case: Your client forget to renew their domain name

The standard approach is to send them an email 'you need to renew your domain name'. The full circle approach is to lookup their domain registry details, tell them where and how to renew their domain name - as so often clients have simply no idea. Takes an extra 15mins of your time but you will be rewarded massively in return. If you're really on the ball you'll pop in your calendar an annual recurring reminder to make sure it gets renewed ahead of time.

... as applied to internal development

Case: You stumbled across a bug you think most people won't notice.

The likely approach would be to fix the bug you found and case closed. Lets say you made a mistake that caused all historical orders in a system to miss the city off the shipping details. So the first approach is to go 'ooops, shouldn't have done that, let's fix it here and move on'.  Taking a full circle approach to it would be to go and contact everyone who was affected by it and let them know what the problem was, how it would present itself, that you found the problem, fixed it, and what would occur now. By being open and honest with them and taking the time out to inform them, will gain trust and appreciation.

Suffice to say if the little bug was caused by you and resulted in a minor loss of a few million dollars it might be time to hang up the keyboard and quickly get out of dodge. 

... as applied to developing a system

Case: An order system ships stuff via a major shipper, tracking number's get emailed to the buyer. ( This one is my personal pet peeve )

How about your system goes away to your shipper(s) requests shipping information, and updates your user. So you don't require your user to go elsewhere to find shipping information. Better yet - when your shipping service says delivered how about an email 24 hrs later &quot;We have been notified your package has been delivered, please click on this link to let us know you've received your package and if you may have any comments you can make them there&quot;. That way your system has a true end to end connection with the user from the time the order was placed, till it hits their doorstep.

In summary

Whenever interacting with someone, take time out to put yourselves in their shoes, and ask yourself was this problem completely solved for me? Take ownership and pride in the solution and you will be rewarded 10x over with fellow team members and clients, willingness to work with you in the future.

___

** Handing something off properly ? How so ? For the love of god never expect your client to explain everything all over again to another team member. Talk to the client, say you can't personally solve it, however you've given all the details to person x and they will be contacting them, you'll follow up in y timeframe to make sure it's all their issue has been dealt with a-ok.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/12/cant-find-essential-actionscript-3-and-in-canada</link>
      <guid>http://work.rowanhick.com/2007/07/12/cant-find-essential-actionscript-3-and-in-canada</guid>
      <pubDate>2007-07-12 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Can&#8217;t find Essential Actionscript 3 and in Canada ?</title>
      <description>For all the Canadians out there wanting this book (at time of writing) my order from chapters.indigo.ca just shipped, so there must be a few of them in stock - go get your order in quick !

Whereas amazon.ca is currently out of stock, and chapters two weeks ago were out of stock, and O'Reilly is/was of stock when I tried a couple of days ago to order.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/07/10/getting-started-with-flex-what-you-should-know</link>
      <guid>http://work.rowanhick.com/2007/07/10/getting-started-with-flex-what-you-should-know</guid>
      <pubDate>2007-07-10 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Getting started with Flex - what you should know.</title>
      <description>Okay, so like me you've done a lot of web development with scripting languages ala Ruby, PHP, Perl etc and you've decided to try out Flex for a front end. What do you need to know ?

This is just my own humble opinion - take it with a grain of salt, but for those looking to jump in you should find something valuable. This is all encompassed with the caveat that you are using the right tool for the right job, now what ? We know the advantages of using Flex - I'm not going to reiterate them. What I am going to tell you is the things to be aware of - not critiscims.

Be prepared to invest time. Considering I had a working app with rails in one all night code marathon, I feel that I've only just waded in with Flex - granted this is apples to oranges comparison - however of everything I've jumped into, Flex is the one that takes the most time - mainly because it is developing interfaces, not yet another scripting language/framework stack. Beyond the basics you will spend a lot of time figuring out the nuances of what you need to do to get something working. You will have moments of happiness, and moments of wanting to heft your computer off a cliff....

Flex is not flash.  Flex is a very real grown up interface language / architecture. Sure Flex is rendered via the Flash Player, and gets compiled down to a SWF but thats where the similarities start and end. [As a side note, I personally can't help but wonder if they just rebranded the flash player etc whether that would help Flex adoption...]

Flex requires compilation of the runtime swfs. No biggie, but if you happen to be in Mac land on a Dual Core G5 (or worse) machine you might want to talk to your tech department about an upgrade. Compared to pure web scripting it can put a dent in your workflow, code-compile-refresh vs the time honoured code-refresh. If you're not going to break out the cash for Flex Builder lookup the Flex Compiler Shell (FCSH) on adobe labs. This dramatically cuts compilation time.

Break out your OO skills. You're going to need them..

Actionscript 3 is strongly typed. If you've come from a dynamically typed background ala Ruby, this can hinder you - you have to consistently be aware of the types of objects your dealing with and what they can/can't do. Time and experience will render this issue obsolete.

Event based programming - say hello to your new friend dispatchEvent. Everything is event based, and a solid part of learning flex, is realising when and where to send events and listen to events. You have to change your mindset to look at every possible combination of things the user can do in your app. Learn how to get events into your custom components and use them wisely.

Learn how to use the Flex Builder Debugger. This is exceedingly powerful and useful for figuring out why your apps aren't doing what you expected them to do. Adobe can expect my money when they release Moxie for this feature alone.

Code  Completion. Again another life saving feature of Flex Builder is the code completion / inspector. An advantage of the strong typing this helps in your coding by seeing the correct properties/methods on objects - which in turn saves a lot of time referring back to the livedocs.

More than one way to a skin a cat. For everything you try to achieve there normally multiple of ways of doing so. Keep persevering and find the one that works and is most suitable for the problem at hand.&#160; 

You're not on your own - Adobe developer support is fantastic. Case in point the giant wall posters that I scored from Adobe for free - great for me but scary for the general populous walking into my office. You can see that Adobe want this to succeed and they're doing all they can to do so. A free SDK, good documentation, free PDF book downloads (for AIR), onAIR tour events, videos.onflex.org, open sourcing... you name it they're trying to do it - which gives me the warm fuzzies about investing my time in this technology.

Above all, keep persisting it all pays off  !

You can produce beautiful works of interface-art, that work as you expect them to, consistently and repeatedly. Pixel perfect and cross platform, beyond any interactivity possible with AJAX (unless you're a sadomasochist)</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/27/flex-component-development-mindset</link>
      <guid>http://work.rowanhick.com/2007/06/27/flex-component-development-mindset</guid>
      <pubDate>2007-06-27 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Flex component development mindset</title>
      <description>Having just picked up Programming Flex 2 I was dismayed that components seem (almost) to be an afterthought. Yes they're documented, with 2 chapters dedicated to them - but the importance of them is from an architecture perspective seems to be glossed over.

After keyboard sized imprints in my forehead for the past day coding. I'm going to say this, definitely develop your Flex applications with a component first approach (well I will anyway!) don't bother with a cruddy component-less prototype. You will save far more time in the long run designing your app from the ground up with components in mind and skipping the ugly component-less prototype step. Why do you want to do this ?  
Components are a VeryGoodThing&#8482;.

Components are so easy to use, that it's almost criminal to start building your first rough cut without them. One of the biggest benefits is how well you can capture your business interface needs within the components.  Almost turning your mxml and actionscript into a domain specific language. For example in an eCommerce application, the heirachy might look like this

AppStack (&amp;lt; View Stack )
- Dashboard ( &amp;lt; Canvas )
- OrdersStack ( &amp;lt; View Stack )
--- OrdersList  ( &amp;lt; Panel )
--- OrderView ( &amp;lt; Panel )
- CustomersStack ( &amp;lt; View Stack )
- InventoryStack ( &amp;lt; View Stack )
- ReportsStack ( &amp;lt; View Stack )

With examples of public methods:

OrdersList.refreshOrders()
OrdersList.switchToCustomersOrders(customerID:Number)
OrderView.changeToEditMode()
OrderView.showBackOfficeInformation()

This takes no imagination to understand the application. With a little bit of foresight, it reduces your prototyping and development time as you can translate your wireframes into components pretty much from the get go.

Keep your reader's subscribed - next up we'll look at an actual component implementation. From pencil sketch through to working code.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/26/game-full-on-like-youve-never-seen-it</link>
      <guid>http://work.rowanhick.com/2007/06/26/game-full-on-like-youve-never-seen-it</guid>
      <pubDate>2007-06-26 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Game Full &#8212;&#8212;&#8211; on like you&#8217;ve never seen it</title>
      <description>An overexcited brit can lower the tone on any web app. Todays race in the Americas Cup with ETNZ (go boys!!!) vs Alinghi saw some dramatic action. All of the amazing graphics and real time communication does nothing to convey the sheer drama of the event. One of the text commentators got a little excited in the commentary, it's amazing how much atmosphere can be generated with a few random characters. Click the thumbnail link and look at the text at the bottom to see what I mean. What a race (oh and we won!!)</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/19/hardware-accelerated-flash-video-the-turning-point</link>
      <guid>http://work.rowanhick.com/2007/06/19/hardware-accelerated-flash-video-the-turning-point</guid>
      <pubDate>2007-06-19 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Hardware Accelerated Flash Video - the turning point?</title>
      <description>I'm looking forward to the web 2.bomb era to be over. Every man and his dog is building yet another social networking, api enabled, ajaxified, beta tag wearing application and waiting for the VC money to flow in. Just follow techcrunch.com and yawn every morning at the yasu* of the day.

Outside of the VC crazed crowd some interesting things are happening. Adobe's announcement on HD content deployed using the Flash Player is very interesting indeed, not so much from the feature set, but what it's actually doing technically. We now have a cross platform web delivered piece of code that is utilizing the GPU. I think this has been lost on a few people. I'm personally not interested in the HD aspect, what I am interested in is the hardware acceleration. If an appropriate DirectX or OpenGL piece of hardware is present it then the flash player will utilise it to enable full screen 'HD' video. Very very impressive. Tinic is a genius.

This marks (in my mind) a turning point for web apps - the crack in the dam has started, finally we are starting to really break out of the limitations of the browser, and will pave the way for some serious development of serious web applications. Perhaps Flash will have the last laugh..

I am not a fan boy of any tech religion. I do not think Adobe are God, Microsoft know it all, or Rails will fulfill my every desire. However in unison it seems, people are looking for the (r)evolution - the race is currently on to see who can deliver this technology we're crying out for.

Taking the real (engineering) enterprise to the web

Back for one of the companies I worked for, we had a huge Delphi application that is a fat client, fat server model. A CAD/CAM app, it required lots of CPU cycles to render an entire window (real .. not the microsoft kind)  structure, apply business rules etc, compared to your atypical order processing system (which are just fancy crud operations). Currently on the web, all you see are these crud applications. The so called web 2.0 era, for all of the applications we see, are really just crud systems. So nothing is there to support anything other than crud. Which rules out doing this particular app. The browser in it's next version is only just starting to see a Canvas object whereas this has been the backbone of many desktop applications for years/decades! Flash/Flex/Air notwithstanding of course...

What gets me excited, is when the potential for an application like the previously mentioned CAD/CAM system to be delivered over the web, utilising the advantages of the web AND the advantages of the desktop. The only way of doing that is breaking out of the web browser sandbox to use a desktop's horsepower. I think this hardware acceleration development might just kick off a chain reaction. Imagine via Actionscript, suddenly being able to harness the GPU's drawing system.... or even processing for horribly complex calculations that suit for parallelism - instead of bringing your system to a crawl, pipe them off to your GPU.

Think of the possibilities....

An interior design application, rendered in beautiful photo realism with all the lighting effects you could imagine, allowing you to design your dream interior and order everything for it online.

Games, delivered online, using local client connections for rendering - all code, etc retained on the server and piped down on demand. Infinitely expansive as the code is never kept locally. Log back in the next day and all new baddies added into the game without you even knowing until you stumble upon one.

User powered grid computing services. Imagine firing up your beast of a computer, connecting to medical research system, and donating your GPU cycles - without having to download any nasty java or activex applets to your desktop.  Companies are salivating over the PS3's power for this and scrambling to figure out how to do it, imagine taking this to the desktop arena ?

Is this not the Holy Grail we want ?

Let's start imagining, dreaming up the possibilities... and if we're smart enough, try to realise them. My mind's already going a hundred miles an hour. What would you build if you had access to the best of both worlds ?!

*yasu - Yet Another (......y) Start-Up</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/12/working-air-sqlite-datagrid-example</link>
      <guid>http://work.rowanhick.com/2007/06/12/working-air-sqlite-datagrid-example</guid>
      <pubDate>2007-06-12 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Working AIR / SQLite DataGrid example</title>
      <description>!!!August 24 - The following code is for example only - DON'T copy and paste... the lovely little syntax highlighter screwed up casing and tag names. Just pay attention to the methods noted above and general structure.. I'll post up the correct files later on

Okay so in my excitement to check out AIR/Apollo I tried to get the SQLite connection working. The sample code in the livedocs on one of the initial Flex Builder builds (the online docs have since been corrected), had a few errors in it ... So I reworked an example from start to finish to:

1. Open a connection
2. Create a table
3. Populate the table
4. Fetch from the table
5. Put results into a dataprovider.

A couple of errors that will set you wrong in the docs, I've highlighted them below **. (Adobe ... feel free to put this into your examples and tidy it accordingly)

1. The example accesses SQLDBStatement, which doesn't exist - it's called SQLStatement
2. Instead of the method .db on SQLStatement it's .sqlConnection. Which will get you a working connection.


Application File - test.mxml


	


Datagrid component - com/rowanh/components/Customers.mxml

(note watchout for the cdata tags when you copy and paste... syntax highlighting isn't perfect)




	
		           
	   
	   
        
</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/11/first-hours-with-flex-3-air</link>
      <guid>http://work.rowanhick.com/2007/06/11/first-hours-with-flex-3-air</guid>
      <pubDate>2007-06-11 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>First hours with Flex 3 / AIR</title>
      <description>Small step for man, big step for RIA-kind !

I had to stay up past midnight to be one of the questionably committed few to read the words of joy spread by Ted Patrick. Not more than 2 seconds later I download Flex 3 builder. So far I've managed to spend a good solid 3-4 hrs in Builder 3 without any hiccups or crashes.

A little gem of a resource, missed out on the various announcements, are the videos on onflex.org. Check out in particular the refactoring one. Looks like some serious goodness to be toyed with there.

Something tells me Adobe is on a war path with this one, going for bigtime developer buy in and I'm pretty much sold.

Good stuff Adobe! Top marks.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/08/franken-php-rails-apache-stein</link>
      <guid>http://work.rowanhick.com/2007/06/08/franken-php-rails-apache-stein</guid>
      <pubDate>2007-06-08 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Franken-php-rails-apache-stein</title>
      <description>Every wondered about the possibility of running a rails app, and a php (or anything else for that matter) site together, on one virtual host, on apache. But why? the hordes screamed ... DHH keels over ... the PHP community says ahh just put it in CakePHP... and to you it feels just plain *wrong*.

However, there is always that odd need, every now and then, that you have to do it. So here's how.

 It's really simple, assuming you're using mongrel cluster and setup a balancer in Apache for it, like so in one of the conf files...

&amp;lt;Proxy balancer://mybalancer.rowanhick.com&amp;gt;
BalancerMember http://localhost:2000
BalancerMember http://localhost:2001
BalancerMember http://localhost:2002
&amp;lt;/Proxy&amp;gt;

Then on the paths that you want to mash up with your vhost, it's as simple as this...

For specific file mapping to an action:

ProxyPass /some_path/some_file balancer://mybalancer.rowanhick.com/mycontroller/myaction
ProxyPassReverse /some_path/some_file balancer://mybalancer.rowanhick.com/mycontroller/myaction
ProxyPreserveHost On

For one path mapping to a controller:

ProxyPass /some_path/ balancer://mybalancer.rowanhick.com/mycontroller/
ProxyPassReverse /some_path/ balancer://mybalancer.rowanhick.com/mycontroller/
ProxyPreserveHost On

Restart and you're away.

(even if it feels dirty)</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/06/05/handling-the-four-letter-words</link>
      <guid>http://work.rowanhick.com/2007/06/05/handling-the-four-letter-words</guid>
      <pubDate>2007-06-05 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Handling *the* four letter words</title>
      <description>The boys over at 37signals have put the danger flag up over the following words. Need, Must, Can&#8217;t, Easy, Just, Only, Fast.

The following comments thread has been an interesting read. But it does highlight what to do about when you hear these words, and whether they necessarily are bad. I tend to think of them as helping you, the business analyst, or developer, to extract exactly what the client wants to acheive. Harking back to the general philosophy that a client/user (be it a your paying client, your designer, your developer) just wants to get things done, when they can't the frustration level can start to increase and you start to see these words - by the time you personally get involved things might be getting a little heated...

So, what do they really mean ? And how do we deal with it ?
Take the case of our proverbial user. Our user is tring to do something, our system is (hopefully) helping them to do this but along the way, boom, somebody can't get past step Y, because it won't let them enter x. The following call is made &quot;why can't it just do this...&quot; so what's wrong here ? Well... maybe the original developer for not figuring out the requirements, or maybe the business model has changed. Either way our poor end user has gotten stuck. And we need to fix it for them.

It's a mindset shift all dependent on your audience - sure you can continue down the Mr UnPleasant road and not deal with it. However, if you're an enterprise system where things have to get done, no matter what. Then simple, get down to business. If you're running a public web app with a wide audience you've got a tough decision on your hands to make.

So what do they really mean?

&quot;I just need it to do X, I can't complete my task&quot;
[translation: I'm trying to do something, I know what I want to do, and I think I know what the software needs to do in order for me to do it.. so I'm telling you what you need to do, I think this will speed up the process if I express it to you like this]

First off, before saying yes or no, it's part of my job to figure out what they actually need. Nearly always I ask these key questions.

1. &quot;What are you trying to acheive?&quot;
2. &quot;What's the steps they took to get to X, so I know context&quot;
3. &quot;How did you do X before today ?&quot;
4. &quot;If in a perfect world, what would your preferred way of doing this.. &quot;

All of the above should provide a gold mine of information in helping you to design the best solution, and to work out whether it is really needed, or a work around can be provided.

Okay so after a bit of backwards and forwards figuring out what they want to do, and the best solution we've realised that our 'please just do this' is a bit of a kicker, we've got tonnes of code to rewrite (unless you're rolling on rails of course!). So do we go straight back to our office and start coding.

No. Not yet.

You now explain to the user what you've got planned out in the next short term, all of which will be impacted by this change, and then how long the change will take. Ie &quot;we'll I'm currently working on the new inventory feature, which I have 3 weeks left for. if I implement this it will take probably 1 week&quot; and ask the really important question &quot;What do you want me to work on ?&quot;

You will be suprised how often the decision won't be this 'critical urgent' problem that was just raised.

Now, if you get the do it now, do everything else you're working on, and I don't give a damn type attitude there are two ways to handle it. One involves lots of this stuff and all nighters, the other involves giving them a business card of your competitors. Problem solved, go off and find a client who values your relationship.

Going back to wether those word's are dangerous, in my world no, it's just a way of expressing a need. I think the occurence of those words is inversley proportional to the happiness of our client - a good system that is returning value and have content users will see very little of these. A system constantly hindering our users workflow will see a tonne of those words.....</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/05/31/good-to-great-rules-to-live-by</link>
      <guid>http://work.rowanhick.com/2007/05/31/good-to-great-rules-to-live-by</guid>
      <pubDate>2007-05-31 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Good to Great (rules to live by)</title>
      <description>What makes a great developer ? Outside of obligatory technical and problem solving skills which go without saying, the differentiator between good developers and great developers I think simply boils down to understanding, empathy and respect for your client. Having a cross functional developer that can write code and talk to a client in plain english is an amazingly huge (and seemingly rare) asset to any team or studio. As the world slowly moves away from waterfall development I think this is going to be increasingly important.

I've worked with the uber algorithm generator russion rocket scientists, the fresh out of university bumbling junior guy, the know it all with an ego the size of africa, the one that wants to debate every minute detail until they forgot why they were debating it, the one that will fight to the death to not change the feature they just implemented.

Every time the one developer that's stood out, and had clients want to work with them, were those that sat down and understood the business problem at hand and were empathetic to their clients needs. If you spend those hours/days up front and actually listen to your client. Put yourselves in their shoes, and understand how they do business and want to do it better. You are going to go a lot further than those who tell the customer how to do business. Here's my rules to live by:


1. Mr/Ms Pleasant. It doesn't matter what business you are dealing with, people unless they like being antagonised, will actively avoid dealing with an unpleasant person. I have a bike store by my house, it's got everything, it's convenient, but if I have to deal with the mechanic once more.... so I use the bike store close to work. Inconvenient, pain in the proverbial, the kids are way less experienced but I'd much rather deal with an 18yr old kid who's eager to please, than the 40 yr arrogant sod who has no time of day for you (I have no time of day giving him my hard earned cash). I'm sure we've all had those experiences no ? Now multiply that $50 purchase in the bike store a good 200-2000 times into a big scale web project. Who's the customer going to pick, Mr/Ms Pleasant or Mr/Ms Arrogant.

2. Mr/Ms Understanding. Understand the business problem at hand, and make an effort to understand the wider context of the business. Don't try and get the full story in the nth degree on the first meeting - you'll be there for days, however everytime you meet again, always try to get a bit more business knowledge in the wider context of the business. The more domain knowledge you have about the customer's business the easier it makes your job, the more valuable you become.

3. Mr/Ms Talker. Talk with your customer.... just because you and everyone around you uses email for everything, it's not necessarily a good thing. You get so much more out of talking and more importantly listening than you ever will on email - the hesitant pauses (.. maybe not a good idea to work on this functionality, they're unsure), the excited yes please (.. get it delivered straight away they want it!). I tend to talk or meet face to face, then follow up with an email restating the items to be actioned, priorities etc. Everytime I've relied solely on email it's been a disaster. And with any important business dealings (ie you get the contract, you've been paid, major milestone etc). Talk on the phone then follow up with an email - it shows respect.

4. Mr/Ms Restater. As part of number 3, to show your understanding of a problem, always restate it, multiple times if need be. It's like learning your ABC's. It a) shows you know and understand it, b) gives the customer a chance to rethink it through, see if it makes sense. Use role play &quot;Okay, so I'm your business store owner, at the start of the day I go to my computer, fire up the browser, go to... I'm the region manager, at the end of the day I do..&quot;. You've got to have personal confidence of knowing the problem and your customer has to feel happy you can go away and put together a solution. Nothing's worse than giving a task to someone who has that semi nervous 'yeah.. sure, okay, i'll be back in touch'. I rarely need to refer to notes as I make an effort to understand the problem.

5. Mr/Ms Light. Don't go dark. No matter what.. don't go dark. It's the standing joke of feeding the pizza under the door and waiting for something to come out the other end (and waiting.. and waiting). The customer gets worried, you go off on a tangent it all turns to custard. Keep in touch. Even if it's just an email 'Just to touch base I'm working on aspect x. I expect to have it sorted in 3 days, I'll send you a screenshot then'. It also keeps you top of their mind, and them top of your mind.

6. Mr/Ms Nicely No. Say no carefully. If something's a bad idea, no with a smile and say why you're saying no. Remember Mr/Ms Pleasant ? ... The customer is paying the bills so be careful with this one. The customer is always right can be rephrased as: The customer is nearly always right in terms of what they want to acheive - but doesn't have experience in execution so often need to be guided.

7. Mr/Ms Goal Oriented Understand the stated goals and objectives. Extract these from the client before you run down the path of looking at the functional elements of your task. If you don't know what you're trying to acheive how can you write the steps to get there ? The customer often will express what they want by how they want to acheive it e.g. &quot;add this button here, make it go to this page, then ask the user for this&quot; vs &quot;We want the user to give us their address information before entering the site&quot;

8. Mr/Ms Humble Know when you're wrong, face up admit it and move forward. Unless you're facing a law suit then talk to your lawer don't listen to me! It seems obvious but it's the hardest thing to do, especially the later in the game it gets.

Finally...

Remember you're an expert in your field, they're an expert in theirs. Respect, understanding and an empathetic relationship will take you a lot further with your dealings, and will help to garner you more business and referrals. The cool toys like Flex, Rails, Ajax, etc all just help you along the way.

Be the dude/dudette that either a client, or a project manager says &quot;This person is fantastic, you should work with them&quot;</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/05/28/syncing-up-external-filemaker-data-with-rails</link>
      <guid>http://work.rowanhick.com/2007/05/28/syncing-up-external-filemaker-data-with-rails</guid>
      <pubDate>2007-05-28 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Syncing up external Filemaker data with Rails</title>
      <description>One of the web apps I work on leverages a Filemaker database. My co worker Brent the expert Filemaker dude, and I had a serious problem to tackle - how to get Rails and Filemaker talking to each other.

Now Filemaker has iffy SQL standard support and we didn't necessarily want our web app to run live from the Filemaker database. We spent some time looking at making an ActiveRecord adapter for FM but really at the end of the day it was too much like hard work.

There are 3rd party solutions out there that can do this stuff for you, but if your needs dictate that they won't work - our experience may help you. I'm going to write up the theory behind this which has been live in production for a good 6 months + and in the coming weeks will release some code acts_as_syncable or similar...

First off we wanted it occassionaly connected, one way synchronising. We had an installed instance of Filemaker Web Publishing engine so we could expose our data as xml views. We used a background rails (backgroundrb) process to query Filemaker every 5-10mins and ask for changed data, pull that data using REXML, and populate/update on the Rails side using ActiveRecord.

Here's the mechanics...


1. Each object, needs a last_modified timestamp, whenever an update to the object that affects the data being synced, this last_modified timestamp needs to be updated (for all intents and purposes create an updated_at column on the filemaker side).

2. Next on the Filemaker side create a layout that exposes that data when queried via Web Publishing, as an xml result. We're going to do two different queries so your layout must support these - as per note ii.

3. On the Rails side we need to add two models, and extend the models we want synced. First I created a SyncLog model which will track when syncing occurs (just for informational purposes), then a ClassSyncLog, which will track the models synced, when they were synced, the last timestamp and id of each model synced.

4. For each model on the rails app side, we need a number of properties:
- The corresponding id field name from Filemaker
- A hash listing each rails field and it's corresponding name on the Filemaker side (we're assuming that these will be different, in our case they were wildly different)
- Some call backs, pre process sync, and post process sync if you need to do stuff before/after syncing.

5. We need a model that will actually do the work of syncing the objects. This is the involved part of the process that does the grunt work of syncing so pay careful attention.

5.1 Pass in a list of Class names, for each class name do the following
5.2 Query filemaker using Net::HTTP from the last updated_at timestamp and see if any records have been updated since then, if so move on to 5.3 or go to the next class  (well... almost there's a trick here **)
5.3 For that returned result set from Filemaker (from the HTTP Raw data returned), fill an REXML object from the returned xml file. For each of the records in the result set do the following
5.3.1 Find or create the rails side object from the corresponding id in the resultset, check if you can sync it per the pre process rules if you have any.
5.3.2 Iterate over each of the fields in the result set, see if it matches a field in the field mapping on the rails class you're syncing (4). If it does update the current object from the result set.
5.3.3 Finally save the current object and move onto the next record
5.4 Now before moving onto the next class you need to save a ClassSyncLog record, with the last timestamp of the last updated record, and the last id. So next time you have a starting point to retrieve the records.
5.5 Move onto the next class
5.6 After completing all classes write out a log entry to say it's been done.
6. Wait 5mins... and repeat.

Of course there's some caveats.

i. First is if you're dealing with 100'000's of records you do not want to grab just one resultset back - you're going to run out of memory and/or have problems with getting the full stream of data. So we get the result set query into groups of ~ 2000.

ii. Related to this, lets say you have 100'000 records updated at 10:10:01 AM. The first request is going to be for all records greater than the last updated time, for example 9:30AM. So you'd get 2000 in on your 100'000 records, the next time in you ask for &amp;gt; 10:10:01 am, you're going to skip 98'000 records, so you want to do two queries
first:
a. Give me all records time = last_updated_time AND id &amp;gt; last_updated.id, which will catch the next 2000 records - repeat this one until you get no more results
then:
b. Give me all records time &amp;gt; last_updated_time - then go back to qry #a for the next repeat.

iii. You will have performance issues, this isn't quick by any stretch of the imagination so be a little patient to work through the issues. We're running massive datasets so we often see updates that take hours. Not great but it's ok.

iv. Watch your memory, this can be a long running process so throw in 'GC.start' to clean up memory along the way. (eg every resultset retrieved)

v. To avoid ID collissions it's strongly recommended you use the MySQL master-master auto-increment-increment + offset scheme, so you stagger your ID inserts between your Filemaker DB(s) and MySQL DB(s).

Again look for code in the coming weeks.. I'm wrapping our custom stuff up into an acts_as module for the (limited) audience this may help...</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/05/25/datagrid-handy-hints</link>
      <guid>http://work.rowanhick.com/2007/05/25/datagrid-handy-hints</guid>
      <pubDate>2007-05-25 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>DataGrid - handy hints</title>
      <description>Okay the orders list. It's a plain vanilla DataGrid component bound to the result from an HTTPService call to get an XML representation of an ActiveRecord orders collection. This all pretty easy to get up and running, but I ran into two immediate snags.

Requirement #1 - Multicurrency in the totals column. Our system deals with orders in currencies all over the world, so we have price types and associate each order with a price type. Fair enough. Now we don't store price type symbol with the total (naturally) so how do we get it to appear in the same column in the the datagrid.

Option 1 (on the Rails side) would be to add some faux accessor and iterate over the orders populating it before we handed it to the to_xml function sending it to Rails (that's not without it's problems). OR

Option 2 (on the Flex side) we manipulate it over here. First off we create a little function that takes our current item (row) and the column we're manipulating, then prepends the symbol and appends the code to the amount.

private function formatCurrency(item:Object, column:DataGridColumn):String
{
   var field:String = column.dataField;
   return item.price_type_dollar_sign+' '+item[field]+' '+item.price_type_symbol;
}
Then in the mxml code for the datagrid

  &amp;lt;mx:DataGridColumn headerText=&quot;Total Amount&quot; dataField=&quot;total_amount_payable&quot; labelFunction=&quot;formatCurrency&quot;/&amp;gt;
Requirement #2 Sorting a field in an order different to that displayed So we have an order status (Draft, Pending Review, Review, Payment Pending, In Manufacturing, Shipped etc). Great, now you put that straight into your datagrid, hit a column header to sort, and realise it's doing an alpha sort on the status name. As you expect (but not as you wanted). Well again there's two ways to accomplish this - one is to pass in custom sort function to figure out the order. OR

The other option, is to pipe down in your xml along with the order status name, a sort order numeric value , so Draft is 1 Shipped is 1000, everything in between gets a number etc. Then just as you do for the currency symbol, change the formatting of the column - so we bind our column to the order status sort_order value, but we display the order status name. When the datagrid sorts, it sorts on the bound value, not on the formatted value. Very nifty and simple. Just like this...

private function formatStatus(item:Object, column:DataGridColumn):String
{
    return item.order_status_name;
}

  &amp;lt;mx:DataGridColumn headerText=&quot;Status&quot; dataField=&quot;order_status_id&quot; labelFunction=&quot;formatStatus&quot;/&amp;gt;
No nasty sort function, and does the trick.

That's it for now... till next time.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/05/24/screenshot-1-orders-list</link>
      <guid>http://work.rowanhick.com/2007/05/24/screenshot-1-orders-list</guid>
      <pubDate>2007-05-24 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Screenshot #1 - Orders list</title>
      <description>Right here's our first look at the prototype app. Nothing too dramatic but gives you an idea of where we're headed with this.



As you can see we've got some fairly standard controls, a datagrid, combo boxes, and buttons. Tomorrow we'll show how this is structured, and how I managed to get some fairly neat stuff with the datagrid working that demonstrates the polish already in Flex.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/05/23/possibilities-become-real</link>
      <guid>http://work.rowanhick.com/2007/05/23/possibilities-become-real</guid>
      <pubDate>2007-05-23 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Possibilities become real.</title>
      <description>A while back, at a previous company, our clients inundated us with feature requests. At one point at the infancy of this software's life, the codeword for &quot;thank you for your request, we'll try to get it into the software&quot; was called Possibilities. It always left the door open, however I'm sure the rate at things went through the door and never came back (well not until years later!) possibilities became a dreaded word...

Now however (my personal belief) is between Rails and Flex turning the seemingly impossible to implement round in no time at all. After a rocky road start to Flex, I'm now having the opportunity to develop a full blown B2B application in it. Replacing a PHP/HTML solution. Both exciting and nerve racking - last night a good 2 hours was spent tracking down how exactly to get something shown in the correct order.

I am well impressed, and looking forward to the future of possibilities with Flex 2, Apollo (and what Flex 3 may bring). To share my enthusiasm a good portion of this blog is going to be dedicated to documenting the rebuild of the previously mentioned B2B application.

Currently I have client buy in, after ~ 6 hours of knocking up simple interface showing off a very 'windows like' application within a web browser he's sold on it, so it's now the big re-write.

Here's the starting point for it:

- A rails app with database migrations to take the v1 app's database and migrate it into a rails friendly naming scheme.
- Basic objects replicating core functionality within Rails
- Two flex front ends, one for general order management, and the other a tailored interface specifically for manufacturing.

So far, here's my pro's and con's list

Pro
+ It's going to work once, anywhere. Flash bugs cross browser are fee and far between. (compare that with XHTML/CSS/JS)
+ More native application functionality (drag/drop, grids etc)
+ Less network traffic per session
+ More responsive application

Cons
- Write, compile, write, compile, write, compile (although Flex Builder/Flex compiler shell reduces the pain)
- A lot more code in building the interface
- Guess work figureing out how to do complex stuff
- Loosing some of Rails niceties (or duplication of things like validations)

Next up some screenshots....</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2011/10/05/productivity-enhancers</link>
      <guid>http://work.rowanhick.com/2011/10/05/productivity-enhancers</guid>
      <pubDate>2007-04-11 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Productivity Enhancers</title>
      <description>
  Tannoy nearfield active monitors. Let's face it churning through documentation or code, can sometimes be mind numbing, no matter how much delegation you do you still have to deal with it and the only way to keep your mind in check, and sometimes to speed things along is to be bathed in your favourite music.


  Now I have a penchant for all things musical, whilst I don't spend 40k on audio gear at home, I also can't stomach the $50 computer speakers. A previous fan of Klipsch systems I decided it was time to step up the game. Enter these bad boys. &quot;Nearfield active monitors&quot; = speakers designed to be on a studio recording desk, up close to your ears versus across the living room floor. As they're monitors they're designed to be very neutral and flat sounding, allowing the detail of the music to present itself, not be coloured like most residential systems. So you won't have bass or mid range heavy music. To my ears, at low volumes everything is very crisp, tonnes of detail I've picked things I've only heard with Sennheisers on my head.


  All this comes at a cost, these clock in at $800 retail CAD, before taxes, if you know where to look. However eBay came to the rescue and I found a pair and won the auction for under half that, now they're gracing my desk getting burned in.


  Nice. (with a capital N). Not Pants.

</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/04/11/productivity-enhancers</link>
      <guid>http://work.rowanhick.com/2007/04/11/productivity-enhancers</guid>
      <pubDate>2007-04-11 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Productivity enhancers</title>
      <description>Tannoy nearfield active monitors. Let's face it churning through documentation or code, can sometimes be mind numbing, no matter how much delegation you do you still have to deal with it and the only way to keep your mind in check, and sometimes to speed things along is to be bathed in your favourite music.

Now I have a penchant for all things musical, whilst I don't spend 40k on audio gear at home, I also can't stomach the $50 computer speakers. A previous fan of Klipsch systems I decided it was time to step up the game. Enter these bad boys. &quot;Nearfield active monitors&quot; = speakers designed to be on a studio recording desk, up close to your ears versus across the living room floor. As they're monitors they're designed to be very neutral and flat sounding, allowing the detail of the music to present itself, not be coloured like most residential systems. So you won't have bass or mid range heavy music. To my ears, at low volumes everything is very crisp, tonnes of detail I've picked things I've only heard with Sennheisers on my head.

All this comes at a cost, these clock in at $800 retail CAD, before taxes, if you know where to look. However eBay came to the rescue and I found a pair and won the auction for under half that, now they're gracing my desk getting burned in.

Nice. (with a capital N). Not Pants.</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2011/10/05/hello-world-2</link>
      <guid>http://work.rowanhick.com/2011/10/05/hello-world-2</guid>
      <pubDate>2007-04-10 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Welcome</title>
      <description>Welcome to my blog...after many years of reading other's blogs it's about time I gave back nuggets of wisdom. So here it is. I'll keep this bad boy updated on (almost) a daily basis - subscribe to the RSS, sit back and relax...</description>
    </item>
    <item>
      <link>http://work.rowanhick.com/2007/04/10/hello-world-2</link>
      <guid>http://work.rowanhick.com/2007/04/10/hello-world-2</guid>
      <pubDate>2007-04-10 00:00:00 UTC</pubDate>
      <author>
        <name>Rowan Hick</name>
        <email>rowan.hick@gmail.com</email>
      </author>
      <title>Welcome</title>
      <description>Welcome to my blog...after many years of reading other's blogs it's about time I gave back nuggets of wisdom. So here it is. I'll keep this bad boy updated on (almost) a daily basis - subscribe to the RSS, sit back and relax...</description>
    </item>
  </channel>
</rss>
