<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Jordan Brough</title>
    <link>http://jordan.broughs.net</link>
    <pubDate>Tue, 09 Jun 2009 15:27:06 GMT</pubDate>
    <description>Jordan Brough</description>
    <item>
      <title>Animoto's 5-word acceptance speech</title>
      <link>http://jordan.broughs.net/archives/2009/06/animotos-5-word-acceptance-speech</link>
      <description>&lt;p&gt;Presenting our CFO:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=oyy19j2XTo8&quot;&gt;Animoto's Webby acceptance speech&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do I work for the greatest company on earth or what?  &lt;/p&gt;</description>
      <pubDate>Tue, 09 Jun 2009 15:27:06 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/06/animotos-5-word-acceptance-speech</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Animoto highlights the Webbys</title>
      <link>http://jordan.broughs.net/archives/2009/06/animoto-highlights-the-webbys</link>
      <description>&lt;p&gt;Animoto was asked to create a highlight clip for the Webby's (which we also got to accept an award from) and it turned out really well:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://biz.animoto.com/webbys.html&quot;&gt;Highlight Reel 2009&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 09 Jun 2009 15:25:24 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/06/animoto-highlights-the-webbys</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Animoto wins a Webby</title>
      <link>http://jordan.broughs.net/archives/2009/05/animoto-wins-a-webby</link>
      <description>&lt;p&gt;The awesome team that I'm lucky to be a part of at &lt;a href=&quot;http://animoto.com&quot;&gt;Animoto&lt;/a&gt; has taken home an 'oscar of the internet' in this year's Webby Awards in the &lt;a href=&quot;http://www.webbyawards.com/webbys/current.php?season=13#Services%20&amp;amp;%20Applications&quot;&gt;Services &amp;amp; Applications&lt;/a&gt; category.  Go Animoto!&lt;/p&gt;

&lt;p&gt;&lt;img src='/images/webby-win.png' style='width: 400px; border: 2px solid black; padding: 2px; background-color: #aaa;' /&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 05 May 2009 12:15:45 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/05/animoto-wins-a-webby</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Slow Ruby on Rails tests fixed!</title>
      <link>http://jordan.broughs.net/archives/2009/04/slow-ruby-on-rails-tests-fixed</link>
      <description>&lt;p&gt;I can't thank &lt;a href=&quot;http://bjhess.com/blog/&quot;&gt;Barry Hess&lt;/a&gt; and &lt;a href=&quot;http://blog.andischacke.com/&quot;&gt;Andi Schacke&lt;/a&gt; enough for writing and commenting on &lt;a href=&quot;http://bjhess.com/blog/2008/07/15/fixing-slow-rake-on-leopard/&quot;&gt;this post&lt;/a&gt; and saving me from all the darkness and despair ;) I've experienced over the past few months as my Rails test times plummetted on this shiny new MacBook Pro.  I recompiled as per Andi's comment and my times are now about a fourth what they were.  Thank you both.&lt;/p&gt;

&lt;p&gt;Revised &lt;a href=&quot;http://hivelogic.com/articles/view/ruby-rails-leopard&quot;&gt;Hivelogic&lt;/a&gt; instructions:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz
tar xzvf ruby-1.8.7-p72.tar.gz
cd ruby-1.8.7-p72
./configure
make
sudo make install
cd ..
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Thu, 16 Apr 2009 05:14:24 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/04/slow-ruby-on-rails-tests-fixed</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>MWRC: Jeremy McAnally - Machine Learning</title>
      <link>http://jordan.broughs.net/archives/2009/03/mwrc-jeremy-mcanally-machine-learning</link>
      <description>&lt;h1&gt;Jeremy McAnally - Machine Learning&lt;/h1&gt;

&lt;p&gt;&lt;img src='http://mtnwestrubyconf.org/2009/images/mwrc-logo.png' style='width: 150px; height: 94.5px;' /&gt; &lt;/p&gt;

&lt;p&gt;Works for entp. His latest app: &lt;a href=&quot;http://tweekapp.com/&quot;&gt;tweekapp&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;My Summary&lt;/h2&gt;

&lt;p&gt;Jeremy was out to convert everyone to doing DSLs the 'right way'.  Some salient points were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the point of a DSL ought to be to make the DSL easier to use for the &lt;em&gt;experts&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;'external dsls' (i.e., you make up your own language) can be great for simple project, like config-writing code&lt;/li&gt;
&lt;li&gt;'internal dsls' (e.g., ruby-code-dsls) get a lot of stuff for free (loop structures, etc)&lt;/li&gt;
&lt;li&gt;dsl composition (using more than one dsl at a time) can cause namespace issues (he didn't really offer much in the way of solutions here as far as I can remember)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;DSLs&lt;/h2&gt;

&lt;p&gt;Used by experts, for specific problems.&lt;/p&gt;

&lt;h3&gt;Domain&lt;/h3&gt;

&lt;p&gt;Different problems have different domains, and they each have their own language.&lt;/p&gt;

&lt;h3&gt;Specific&lt;/h3&gt;

&lt;p&gt;DSLs that are very generic or look a lot like english don't make sense to him.  DSLs are supposed to make the brain-to-code jump much smaller.  Also, why waste the keystrokes?&lt;/p&gt;

&lt;h3&gt;External DSLs&lt;/h3&gt;

&lt;p&gt;These are DSLs that don't use an existing language (e.g. ruby).  Sounds like he doesn't like them as much in general, though there are specific cases where the language structure is simple enough that it makes sense (e.g. &lt;a href=&quot;http://reductivelabs.com/products/puppet/&quot;&gt;puppet&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;Internal DSLs&lt;/h3&gt;

&lt;p&gt;Implemented in an existing language (e.g. ruby).  Loops &amp;amp; basic things like that are baked-in and already understood by end-users.  External DSLs have to go to a lot of work to create these structures &amp;amp; etc.  When to use?  Look at the possible complexity of your code, look at what your 'experts' will use.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rails Templates (written by him).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ambition.rubyforge.org/&quot;&gt;Ambition&lt;/a&gt; - 'Take the suck out of SQL'&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/jeremymcanally/foundry/tree/master&quot;&gt;Foundry&lt;/a&gt; (Another of his).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Designing the DSL&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Think about the problem domain&lt;/li&gt;
&lt;li&gt;Deconstruct -- remove the cruft.  DSLs are not fake English.  No Finglish allowed.&lt;/li&gt;
&lt;li&gt;Implementation&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;Method chaining&lt;/h3&gt;

&lt;p&gt;Approach 1: return a new object every time&lt;/p&gt;

&lt;p&gt;Approach 2: return self after changing state&lt;/p&gt;

&lt;p&gt;Choosing an approach -- think about which is more concise in your case, also think about how #2 can get ugly &amp;amp; unwieldy.&lt;/p&gt;

&lt;p&gt;Dynamic dispatch&lt;/p&gt;

&lt;p&gt;He likes using closures.  Some extra chrome -- if that's bad maybe look at an external DSL.&lt;/p&gt;

&lt;p&gt;Compositon - meshing DSLs. Presents namespace issues.&lt;/p&gt;

&lt;h3&gt;Decoupled DSLs&lt;/h3&gt;

&lt;p&gt;In his opinion, the DSL ought to be decoupled from the library behind it.  The DSL is &lt;em&gt;just&lt;/em&gt; the interface to the logic.  Thus, when testing you test them separately.&lt;/p&gt;</description>
      <pubDate>Mon, 16 Mar 2009 14:04:34 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/03/mwrc-jeremy-mcanally-machine-learning</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>MWRC: Kirk Haines - Vertebra</title>
      <link>http://jordan.broughs.net/archives/2009/03/mwrc-kirk-haines-vertebra</link>
      <description>&lt;h1&gt;Kirk Haines - Vertebra&lt;/h1&gt;

&lt;p&gt;&lt;img src='http://mtnwestrubyconf.org/2009/images/mwrc-logo.png' style='width: 150px; height: 94.5px;' /&gt; &lt;/p&gt;

&lt;p&gt;Kirk is working for EngineYard on Vertebra&lt;/p&gt;

&lt;h2&gt;Jordan's Summary&lt;/h2&gt;

&lt;p&gt;Vertebra is a solution from EngineYard to manage processes in the cloud.  Still in development (no production usage so far).  Sounds interesting, will probably take a look at their &lt;a href=&quot;http://github.com/engineyard/vertebra&quot;&gt;source code&lt;/a&gt; if for nothing else than an interesting architecture.  Uses XMPP, which I seem keep hearing about these days.&lt;/p&gt;

&lt;h2&gt;Cloud Computing&lt;/h2&gt;

&lt;p&gt;Clouds are great b/c it's many, many machines waiting to do you bidding.&lt;/p&gt;

&lt;p&gt;Clouds are hard b/c there are many, many machines to manage.&lt;/p&gt;

&lt;p&gt;Scripted SSH works, but he says it has its limits.  Vertebra built to be 'fault-tolerant operations among autonomous agents'.&lt;/p&gt;

&lt;h2&gt;Enter Vertebra&lt;/h2&gt;

&lt;p&gt;Built on XMPP.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;very chatty protocol&lt;/li&gt;
&lt;li&gt;upside to chatty-ness is fault tolerance.  back-and-forth paints the picture of message reception.&lt;/li&gt;
&lt;li&gt;goal is: if network dies, operation in progress should be able to pick right up where it left off&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For an XMPP Server they use EJabberd&lt;/p&gt;

&lt;p&gt;The pieces of Vertebra are agents.  E.g. a logger agent.&lt;/p&gt;

&lt;h2&gt;Special Vertebra Agent: Herault&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;originally written in ruby, rewritten in erlang for performance &amp;amp; scalability&lt;/li&gt;
&lt;li&gt;new agents coming on board advertise their capabilities to Herault&lt;/li&gt;
&lt;li&gt;when looking for capabilities ('show me all loggers') you ask Herault&lt;/li&gt;
&lt;li&gt;also handles authorization for dispatching operations&lt;/li&gt;
&lt;li&gt;when asking Herault to dispatch an operation, can specify :all or :single (more options in the works)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Concurrency API&lt;/h2&gt;

&lt;p&gt;Talking about using vertebra to schedule future units of work that may or may not execute depending on a given set of conditions.  &lt;/p&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:12:53 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/03/mwrc-kirk-haines-vertebra</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>MWRC: Yehuda Katz - The Great Rails Refactor</title>
      <link>http://jordan.broughs.net/archives/2009/03/mwrc-yehuda-katz-the-great-rails-refactor</link>
      <description>&lt;h1&gt;Yehuda Katz - The Great Rails Refactor&lt;/h1&gt;

&lt;p&gt;&lt;img src='http://mtnwestrubyconf.org/2009/images/mwrc-logo.png' style='width: 150px; height: 94.5px;' /&gt; &lt;/p&gt;

&lt;p&gt;Yehuda is working for EngineYard, was working on merb, is now working on rails.&lt;/p&gt;

&lt;h2&gt;My Summary&lt;/h2&gt;

&lt;p&gt;He says he's talking more about the future of rails &amp;amp; less about what-came-from-merb these days.&lt;/p&gt;

&lt;p&gt;Yehuda's presentation really seemed to be centered on componentization of the entire Rails stack&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pluggable persistence layers (ActiveRecord, DataMapper, Sequel, CouchDB, etc)&lt;/li&gt;
&lt;li&gt;Using and becoming middleware&lt;/li&gt;
&lt;li&gt;Making rails' ruby modules less tightly coupled with each other&lt;/li&gt;
&lt;li&gt;Replaceable rails components (ActiveRecord, ActiveSupport, Action)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;He ended talking about how all these areas of componentization will open up new possibilities of competition (and thus greater health &amp;amp; growth) for the whole Rails ecosystem.  An interesting thought in juxtaposed with the elimination of Merb vs Rails competiton.  I'm a bit skeptical of whether this can be really pulled off, but I'm excited to see what the brilliant minds behind all this produce.&lt;/p&gt;

&lt;h2&gt;ORM Agnosticism&lt;/h2&gt;

&lt;p&gt;Possible in rails right now, but things like &lt;code&gt;form_for&lt;/code&gt; ought to work also.&lt;/p&gt;

&lt;p&gt;There were two interfaces that merb switched on: ActiveRecord/Datamapper or Sequel.  Not too bad but not ideal.&lt;/p&gt;

&lt;p&gt;The solution: ActionORM (Lori Holden) - a way of making any ORM look like ActiveRecord.&lt;/p&gt;

&lt;p&gt;Two options going forward for compliance for ORMs&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;mimick AR&lt;/li&gt;
&lt;li&gt;provide a proxy that supports the key methods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A few core things will be covered (like form_for) but it will be up to the community to create extensions for the rest.  It's hard for them to ascertain what's going to be useful up front and they want to move forward quickly.&lt;/p&gt;

&lt;h2&gt;Rack&lt;/h2&gt;

&lt;p&gt;Some middleware they used in merb:  PathPrefix, ConditionalGet, Static&lt;/p&gt;

&lt;p&gt;Static - can use for tweaking static asset handling for dev mode (and turn off in prod)&lt;/p&gt;

&lt;p&gt;Rails middleware usage: Session middleware, Param parsing, Failsafe&lt;/p&gt;

&lt;p&gt;This is all working toward amore unix-like setup, requests come in and get routed to pieces (Sinatra, Rails, etc) which are not special -- they just know how to handle the same thing.&lt;/p&gt;

&lt;h2&gt;Callbacks&lt;/h2&gt;

&lt;p&gt;He worked on improving callbacks a lot.  His first analysis of Rails showed callbacks taking 20% of the time for a request (admittedly a simple request).  A bit on the history of callbacks in Rails:  there was no unified callback system originally -- lots of different ones.  Then it was refactored into callbacks.rb.  But it didn't solve all the needs of all the pieces and thus there was a lot of reaching-into-and changing going on that added complexity and slowness.  Yehuda went through &amp;amp; made a single calback system that served all needs.  Improved actual calling of callbacks - went to 'compilation' instead.&lt;/p&gt;

&lt;p&gt;On complex code:  Sometimes it's ok to have a complicated bit of code, as long as your abstraction is leak proof &amp;amp; well-abstracted.  E.g., nobody cares that ruby is complicated internally because it's done well enough that nobody has to go digging through the C code.&lt;/p&gt;

&lt;p&gt;One big problem w/ current rails code -- poorly named (confusing) instance variables make it hard to read &amp;amp; understand.&lt;/p&gt;

&lt;p&gt;Upcoming: Abstract controller.  Will be module based (truly module based, not tightly coupled modules like rails currently has).&lt;/p&gt;

&lt;p&gt;Ruby tip:  If you include a module in a class you can super from a module method.  Much better than alias method chaining, which can get really messed up if things aren't chained in the right order.&lt;/p&gt;

&lt;p&gt;About the plugin api -- there are lots of methods in Rails that are not for everyday use, but are available for plugin authors.  These are methods that they don't want to clutter the API docs with, but they will stand by them as far as keeping them working the same way.  Sort of a 'hidden' but valid public API.  Still thinking about how to provide plugin API for the future of Rails to avoid all the crazy monkey patching that currently goes on.&lt;/p&gt;

&lt;p&gt;Upcoming: Debug Toolbar like Django's, but more pluggable.&lt;/p&gt;

&lt;p&gt;Orchestra -- gets the pieces working together.  Hopefully will make it a lot easier for people to add instrumentation (especially specialized instumentation) to Rails, not only for fiveruns &amp;amp; etc, but for normal end users.&lt;/p&gt;

&lt;h2&gt;On Competition&lt;/h2&gt;

&lt;p&gt;Yes, the competition between Rails &amp;amp; Merb is gone.  However, Yehuda says that they've really eliminated a less-useful competition in order to open up a more useful one. That is, competition on the component level. The want to make the pieces of Rails compete instead of the entire framework compete.  E.g., Sequel vs ActiveRecord, your own ActionController, etc.&lt;/p&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:13:39 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/03/mwrc-yehuda-katz-the-great-rails-refactor</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>MWRC: Jon Crosby - Middleware</title>
      <link>http://jordan.broughs.net/archives/2009/03/mwrc-jon-crosby-middleware</link>
      <description>&lt;h1&gt;Jon Crosby - Middleware&lt;/h1&gt;

&lt;p&gt;&lt;img src='http://mtnwestrubyconf.org/2009/images/mwrc-logo.png' style='width: 150px; height: 94.5px;' /&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://getcloudkit.com&quot;&gt;getcloudkit.com&lt;/a&gt;&lt;br/&gt;
contributor to rack-contrib project&lt;br/&gt;
working at Engine Yard on Engine Yard Solo&lt;/p&gt;

&lt;h2&gt;CGI&lt;/h2&gt;

&lt;p&gt;Remembering the bad old days...&lt;/p&gt;

&lt;h2&gt;Things we maybe could pull out of our apps&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;authentication&lt;/li&gt;
&lt;li&gt;caching&lt;/li&gt;
&lt;li&gt;openid + oauth&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Rack&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/rack/rack-contrib&quot;&gt;http://github.com/rack/rack-contrib&lt;/a&gt;&lt;br/&gt;
based on http model of having layers&lt;br/&gt;
based on wsgi (web server gateway interace)&lt;br/&gt;
Interesting -- Rack::CSSHTTPRequest&lt;br/&gt;
Rack::Cache&lt;br/&gt;
Check out his cloudkit - intersting out it builds up rack items w/ oauth, openid items &amp;amp; etc&lt;br/&gt;
Middleware announcing itself - Middleware can announce it's presence via env headers&lt;br/&gt;
Adding sinatra as middleware before Rails  &lt;/p&gt;

&lt;p&gt;Comment from Yehuda: they are currently working on rails as middleware stuff&lt;/p&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:13:51 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/03/mwrc-jon-crosby-middleware</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>MWRC: James Edward Gray, II</title>
      <link>http://jordan.broughs.net/archives/2009/03/mwrc-james-edward-gray-ii</link>
      <description>&lt;h1&gt;James Edward Gray, II&lt;/h1&gt;

&lt;p&gt;&lt;img src='http://mtnwestrubyconf.org/2009/images/mwrc-logo.png' style='width: 150px; height: 94.5px;' /&gt; &lt;/p&gt;

&lt;p&gt;If you want to learn Ruby you should read code, lots of code.  He estimates that an 'expert' ruby programmer would read &lt;em&gt;more&lt;/em&gt; code than he writes.&lt;/p&gt;

&lt;h2&gt;Examples of good code libraries&lt;/h2&gt;

&lt;h3&gt;Restclient&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;clean interface to restful services&lt;/li&gt;
&lt;li&gt;this is networking code done right&lt;/li&gt;
&lt;li&gt;quote he likes:  'Everything in a method should be written to the same level of abstraction'&lt;/li&gt;
&lt;li&gt;logs from restclient are executable ruby code&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;bj&lt;/h3&gt;

&lt;p&gt;background priority queue for rails&lt;/p&gt;

&lt;h3&gt;terminator&lt;/h3&gt;

&lt;p&gt;robust thread/pipe/etc level code written by an expert&lt;/p&gt;

&lt;h3&gt;slave&lt;/h3&gt;

&lt;p&gt;trivial multiprocessing with built-in ipc&lt;/p&gt;

&lt;h2&gt;The art of code reading&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;when you start reading, relax.  not all code sucks &amp;amp; you probably won't understand the author's reasons at first&lt;/li&gt;
&lt;li&gt;don't start with Rails (too big &amp;amp; complex)&lt;/li&gt;
&lt;li&gt;have a goal&lt;/li&gt;
&lt;li&gt;get the source code open in your standard text editor (e.g. use gem unpack or get a copy from a vcs)&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:13:56 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/03/mwrc-james-edward-gray-ii</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Happy Valentines Day!</title>
      <link>http://jordan.broughs.net/archives/2009/02/happy-valentines-day</link>
      <description>&lt;p&gt;Two videos from our family to yours. :)&lt;/p&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://widgets.clearspring.com/o/4805fc0db4a3562c/4998e0f1b6fa4cf6/4805fc0d7c7211c3/77cf044/-cpid/91fdf5f2110e2ec4/autostart/false/widget.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;object width=&quot;480&quot; height=&quot;295&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/eM3mlgLAlMs&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/eM3mlgLAlMs&amp;amp;hl=en&amp;amp;fs=1&amp;amp;rel=0&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;480&quot; height=&quot;295&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 16 Feb 2009 03:43:59 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2009/02/happy-valentines-day</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Enterprise Ruby</title>
      <link>http://jordan.broughs.net/archives/2008/12/enterprise-ruby</link>
      <description>&lt;p&gt;(from &lt;a href='http://maik-schmidt.de/'&gt;Maik Schmidt's&lt;/a&gt; &lt;a href='http://www.pragprog.com/titles/msenr/enterprise-recipes-with-ruby-and-rails'&gt;Enterprise Recipes with Ruby and Rails&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&quot;Back in the mid-90s, an experiment started as a way to make average developers more effective, because the demand continued (as it does today) to outstrip the supply of good developers. If the software industry can &#64257;gure out a way to make mediocre developers productive, software development can expand to enterprise scales. Thus, we saw the rise of languages like Visual Basic and Java and later C#. These languages were speci&#64257;cally made less powerful than alternatives (like Smalltalk). The goal of the Lockdown Experiment: make tools to keep average developers out of trouble while still being able to write code. But then a couple of interesting things happened. First, creating restrictive tools and languages didn&#8217;t really keep average developers out of trouble, because average developers sometimes apply great ingenuity to coming up with ridiculously complex solutions to problems. But while this didn&#8217;t really make the average developers better, it put a serious governor on the best developers. The whole industry seemed to be optimizing for the wrong thing: safety at the expense of power, with the stated goal of creating software faster. Yet, we didn&#8217;t produce software faster; we just annoyed the best developers. The second effect was this new wave of languages was so restrictive that they immediately had to start supplementing them to get real work done. For example, in the Java world, the second version added a bunch of new features (like anonymous inner classes), and eventually some limited metaprogramming was added to Java via aspect-oriented programming. &lt;/p&gt;

&lt;p&gt;The real underlying problem with lots of &quot;enterprise languages&quot; is one that Stuart Halloway of Relevance software summed up brilliantly: ceremony vs. essence. Languages that require you to jump through hoops to achieve results are highly ceremonious, whereas languages that make it easy to do sophisticated things are more essential. At the end of the day, you have to solve problems. You want languages and frameworks that lessen the distance from intent to result. Ceremonious languages sometimes make that distance quite far, requiring lots of work that doesn&#8217;t really move your solution forward. More essential languages get out of your way, making the distance from intent to result shorter. &quot;&lt;/p&gt;</description>
      <pubDate>Wed, 31 Dec 2008 21:10:53 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2008/12/enterprise-ruby</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Merry Christmas!</title>
      <link>http://jordan.broughs.net/archives/2008/12/merry-christmas</link>
      <description>&lt;p&gt;&quot;True happiness comes only by making others happy&#8212;the practical application of the Savior&#8217;s doctrine of losing one&#8217;s life to gain it. In short, the Christmas spirit is the Christ spirit, that makes our hearts glow in brotherly love and friendship and prompts us to kind deeds of service.&quot; &lt;sup&gt;&lt;a href='http://lds.org/ldsorg/v/index.jsp?vgnextoid=f318118dd536c010VgnVCM1000004d82620aRCRD&amp;amp;locale=0&amp;amp;sourceId=a4f3e3ec0bfcd110VgnVCM100000176f620a____&amp;amp;hideNav=true'&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 25 Dec 2008 17:50:16 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2008/12/merry-christmas</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Extra Flash crossdomain.xml wrinkles</title>
      <link>http://jordan.broughs.net/archives/2008/12/extra-flash-crossdomainxml-wrinkles</link>
      <description>&lt;p&gt;Had a lovely time trying to figure out why my flex widget couldn't talk to our sever via https.  Turns out that (even with a crossdomain.xml file) a swf served from http cannot access https, unless you add an extra special parameter of 'secure=&quot;false&quot;' to the crossdomain file.  I really wish flash returned more helpful error messages than 'Security Error'.&lt;/p&gt;

&lt;p&gt;&lt;a target='_blank' href='http://livedocs.adobe.com/flex/3/html/help.html?content=security2_15.html'&gt;http://livedocs.adobe.com/flex/3/html/help.html?content=security2_15.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We're using this to allow secure communication from our non-https page for some ajax login &amp;amp; fetch behavior.  Using the flash widget as a proxy since same origin policy for javascript prohibits just about everything if you need a secure communication w/o having the whole page in https.  Ajax requests are prohibited, the script-tag hack doesn't work (login params would have to go (unencrypted) in the url), and iframes suffer from the same problem.  Google uses the iframe trick on some of it's pages --&lt;/p&gt;

&lt;p&gt;&lt;a target='_blank'  href='http://www.google.com/shoppinglist?hl=en'&gt;http://www.google.com/shoppinglist?hl=en&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(make sure you're not logged in)&lt;/p&gt;

&lt;p&gt;but it seems that that only works because they  redirect the whole page when successful, which we didn't want to do.  Looks like the flash widget will work.&lt;/p&gt;</description>
      <pubDate>Tue, 09 Dec 2008 16:52:12 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2008/12/extra-flash-crossdomainxml-wrinkles</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Ruby Closure Surprises</title>
      <link>http://jordan.broughs.net/archives/2008/10/ruby-closure-surprises</link>
      <description>&lt;p&gt;Doing some fun stuff with named_scope this morning led me to some surprising discoveries in Ruby's handling of blocks/closures/etc.&lt;/p&gt;

&lt;p&gt;In Ruby, I had thought that lambda was supposed to do arity enforcement and that Proc.new wasn't (and also that return behaves differently in Proc's vs lambda's) and that this was the extent of the differences.  See &lt;a href='http://samdanielson.com/2007/3/19/proc-new-vs-lambda-in-ruby'&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, I was getting a &quot;warning: multiple values for a block parameter (0 for 1)&quot; warning when doing this: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  named_scope :ordered, Proc.new {|o| {:order =&amp;gt; o || &quot;created_at DESC&quot;}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and I then also discovered that the following also worked (with the same warning) whereas I thought it would have raised an exception because it was lambda:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  named_scope :ordered, lambda {|o| {:order =&amp;gt; o || &quot;created_at DESC&quot;}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My coworker Jeff found &lt;a href='http://innig.net/software/ruby/closures-in-ruby.rb'&gt;this fascinating and revealing investigation into Ruby closures&lt;/a&gt; where he reveals &quot;four types of closures and near-closures, expressible in seven syntactic variants.&quot;  Yikes.&lt;/p&gt;

&lt;p&gt;However, I think the chart he has about half way down is either outdated or a little wrong.  Here's what I came up with after a little investigation of my own.  Perhaps I'll write down a test for these at some point to test future Ruby versions (and to make sure I got the chart right).  But for now --&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;                                                    &quot;return&quot; returns from closure
                                   True closure?    or declaring context...?         Mismatched arity behavior
                                   ---------------  -----------------------------    -------------------
1. block (called with yield)       N                declaring                        Behavior 1
2. block (&amp;amp;b =&amp;gt; f(&amp;amp;b) =&amp;gt; yield)    N                declaring                        Behavior 1
3. block (&amp;amp;b =&amp;gt; b.call)            Y except return  declaring                        Behavior 1
4. Proc.new                        Y except return  declaring                        Behavior 1
5. proc                                    &amp;lt;&amp;lt;&amp;lt; alias for lambda in 1.8, Proc.new in 1.9 &amp;gt;&amp;gt;&amp;gt;
6. lambda                          Y                closure                          Behavior 3
7. method                          Y                closure                          Behavior 2

* Behavior 1: Succeed (supply nil for missing args and ignore extra args).  Exception: When block is defined to accept exactly 1 parameter then warn on any mismatch
* Behavior 2: raise ArgumentError on mismatch 
* Behavior 3: same as Behavior 2 except for the following:
    - Same as Behavior 1 if block has exactly one parameter, e.g. -- lambda{|a| puts a}.call # warn and succeed
    - Same as Behavior 1 if block was defined w/o argument pipes, e.g. -- lambda{puts 'hi'}.call(1,2) # succeed
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It's a crazy Ruby world :)&lt;/p&gt;</description>
      <pubDate>Mon, 27 Oct 2008 15:31:37 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2008/10/ruby-closure-surprises</guid>
      <author>Jordan</author>
    </item>
    <item>
      <title>Creating Cross Platform Windows and Mac Installer CDs</title>
      <link>http://jordan.broughs.net/archives/2008/03/creating-cross-platform-windows-and-mac-installer-cds</link>
      <description>&lt;p&gt;I'm working on an Adobe AIR cross-platform app at work.  We're providing a physical CD for distributing the application and I wanted the CD to work like a real Mac CD should look like -- Background image in the finder, hide all extraneous files, auto-open the finder window when the CD is inserted, etc.&lt;/p&gt;

&lt;p&gt;Getting just this to happen requires some trickery, and getting it to happen while &lt;em&gt;also&lt;/em&gt; putting an auto-launching Windows installer on the same disc proved to be even more of a game.&lt;/p&gt;

&lt;p&gt;After a lot of googling I think I've got a pretty good process down and wanted to share, so here are the details.&lt;/p&gt;

&lt;h3&gt;Core Concepts&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The standard ISO CD filesystem doesn't let you do all the good stuff that you'll want to do for Mac (finder background image, hiding files, etc).  You need to use some variant of HFS.  However, Windows can't read HFS.&lt;/li&gt;
&lt;li&gt;'Hybrid CDs' solve the previous problem.  From what I understand, a hybrid CD contains an HFS volume and a standard ISO volume.  Windows machines can't see the HFS volume and OS X machines ignore the ISO volume when there is an HFS volume present.&lt;/li&gt;
&lt;li&gt;You'll need the OS X Developer tools for these steps&lt;/li&gt;
&lt;li&gt;From what I understand, Roxio Toast 7 &amp;amp; above make this much easier, but this is more fun and it's free. :)&lt;/li&gt;
&lt;li&gt;It is much easier to test all this out in Windows if you have Parallels (or presumably Fusion) because Parallels let's you mount an iso in Windows as if it were a CD, so you don't have to waste your precious blank CDs creating actual copies. :)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Steps&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a standard folder on your harddrive and put all the install files (windows and mac, including an autorun.inf for your Windows installer, presumably) in it.  We'll call it 'install folder' for now.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make a user-friendly finder window&lt;/p&gt;

&lt;p&gt;To make a nice OS X finder window for a CD (or dmg or whatever) we want to have a friendly background image that helps the user understand what they're supposed to do.  Go grab AdiumX to see an example of what I mean.  We have to include this image on the CD, but we also want to hide it from the end user so that it doesn't clutter up our install window.  Here are the steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create your background image.&lt;/li&gt;
&lt;li&gt;Create a folder called 'background' inside 'install folder'.&lt;/li&gt;
&lt;li&gt;Put your background image into this folder.&lt;/li&gt;
&lt;li&gt;Use terminal to rename this folder to '.background'.  e.g.:
mv background .background
(The folder should then disappear from view in the Finder)&lt;/li&gt;
&lt;li&gt;Open 'install folder' in the Finder and hit Command+J.  Make sure that 'This window only' is selected.  Click 'Picture' for the background.  In the dialog that comes up, hit command+shift+g to bring up a box where you should enter the path to your '.background' folder.  This allows us to navigate there even though it is hidden.  Select your background image and click OK.&lt;/li&gt;
&lt;li&gt;Click 'Picture' again for the background.  For some reason it gets reset after selecting the picture.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For each file that you'd like hidden in &lt;em&gt;both&lt;/em&gt; windows &amp;amp; mac (e.g. perhaps the window autorun file), run this command in Terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/Developer/Tools/SetFile -a V /path/to/your/folder/name-of-file-to-hide&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get rid of the finder toolbar (click that top-right oval button) and resize your window &amp;amp; arrange your icons, leaving the windows icons clumped together somewhere for now (we'll hide them in a minute)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the hybrid ISO using hdiutil
Run this command in Terminal to turn your folder into a hybrid ISO:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;hdiutil makehybrid /source/folder/name/ -o outputfile.iso&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mount the ISO in read-write mode:
Run this in terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;hdiutil attach -readwrite outputfile.iso&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make files invisible &lt;em&gt;to Mac ONLY&lt;/em&gt; (e.g., your windows installer file) by setting the invisible bit on them:
Again in terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/Developer/Tools/SetFile -a V /path/to/your/folder/name-of-file-to-hide&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make the finder window auto-open when the cd is inserted/image is mounted:
In Terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo bless -folder &quot;/Volumes/discName&quot; -openfolder &quot;/Volumes/discName&quot;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test it out.  Mount your ISO and unmount it a couple times to see the wonderous installer.  If you have Parallels you can try it out in Windows too by using 'Connect Image' to simulate it as a CD in Windows&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Disk Utility &amp;amp; drag your iso file into the left-hand pane.  Click 'Burn' in the toolbar above.  Insert a blank CD and let it burn.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Done!  Try inserting it into a Mac and a Windows machine and be amazed by the beauty of it all.&lt;/p&gt;</description>
      <pubDate>Mon, 31 Mar 2008 14:36:28 GMT</pubDate>
      <guid>http://jordan.broughs.net/archives/2008/03/creating-cross-platform-windows-and-mac-installer-cds</guid>
      <author>Jordan</author>
    </item>
  </channel>
</rss>
