<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Distractable</title><link href="http://www.distractable.net/atom.xml" rel="self"/><link href="http://www.distractable.net"/><updated>2012-01-04T10:58:08Z</updated><id>http://www.distractable.net</id><entry><title>Goodbye Markdown</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/tech/goodbye-markdown"/><updated>2012-01-04T00:00:00Z</updated><published>2012-01-04T00:00:00Z</published><id>http://www.distractable.net/tech/goodbye-markdown</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Over the last couple of years I have used &lt;a href=&quot;daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt; a lot. Content on this
blog is written using it, &lt;a href=&quot;http://github.com/&quot;&gt;Github&lt;/a&gt; has A-grade support for it, etc, etc.  In general, 
it&#39;s a nice unobtrusive way to write &lt;strong&gt;prettier than plain-text&lt;/strong&gt;&amp;nbsp;docs.&lt;/p&gt;
&lt;p&gt;Now, though, it&#39;s time to move&amp;nbsp;on.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;You see, Markdown just doesn&#39;t scale. It&#39;s absolutely awesome in the small, but when you need to do something that
takes more work, it really falls down.  Don&#39;t believe me?  Try writing extensive technical documentation - say anything 
that requires linked information, potentially reusable snippets, etc.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;While there have been some &lt;a href=&quot;http://fletcherpenney.net/multimarkdown/&quot;&gt;valiant efforts to extend markdown&lt;/a&gt;, 
I believe doing so is probably time wasted. You see, &lt;strong&gt;it&#39;s already a solved problem&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;After just spending a day or two with &lt;a href=&quot;http://docutils.sourceforge.net/rst.html&quot;&gt;reStructuredText&lt;/a&gt; and 
&lt;a href=&quot;http://sphinx.pocoo.org/&quot;&gt;Sphinx&lt;/a&gt; it&#39;s clear that these tools are built to scale.  On the flip-side, they 
do feel daunting to get started with, and perhaps at first don&#39;t feel quite as natural to write in.  Still, I think it&#39;s
definitely a case of &lt;em&gt;short term pain, for long term gain&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Combine the power of the tools with great online resources such as &lt;a href=&quot;http://readthedocs.org/&quot;&gt;Read the Docs&lt;/a&gt; and I would
say you have a recipe for success.  Just have a look at the quality of the documentation for a project like 
&lt;a href=&quot;http://celery.readthedocs.org/en/latest/index.html&quot;&gt;Celery&lt;/a&gt;.&amp;nbsp;Wow.&lt;/p&gt;
&lt;p&gt;I would also say that Sphinx feels strongly geared towards use with Python.  After poking around a bit though, I found it 
does a bang up job with &lt;a href=&quot;http://sphinx.pocoo.org/domains.html&quot;&gt;other languages too&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Over the next few weeks I&#39;m going to make a good effort towards documenting my experience with 
documenting JS projects with sphinx at &lt;a href=&quot;http://sphinx-js-howto.readthedocs.org/&quot;&gt;sphinx-js-howto.readthedocs.org&lt;/a&gt;. If you 
have already been using Sphinx with JS projects, then if you could drop tips here or hit me up on 
&lt;a href=&quot;http://twitter.com/DamonOehlman&quot;&gt;twitter&lt;/a&gt; that would be&amp;nbsp;awesome.&lt;/p&gt;

   </content></entry><entry><title>Dear HP</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/mobile/dear-hp"/><updated>2011-11-09T00:00:00Z</updated><published>2011-11-09T00:00:00Z</published><id>http://www.distractable.net/mobile/dear-hp</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;So, &lt;a href=&quot;https://twitter.com/#!/grigs/status/134072746064875521&quot;&gt;HP call a meeting to let everyone know they are still deciding the fate of WebOS&lt;/a&gt;.
This is excellent news, while also quite comical.  Vendors in the mobile space like to do this though,
and it does help to keep us mobile developer types amused.  Given that coding for the mobile web can at some times
be hard, I thank them for&amp;nbsp;that.&lt;/p&gt;
&lt;p&gt;As a show of my thanks, I would like to humbly offer some strategic advice regarding&amp;nbsp;WebOS.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;h2&gt;On Brand&amp;nbsp;Damage&lt;/h2&gt;
&lt;p&gt;The HP brand has certainly been damaged through what I now like to call the &quot;Apotholypse&quot;, and 
the way HP needs to carry itself in these post-apotholyptic times is significantly different than before. The 
great thing is that the HP brand is strong, and as a consumer I&#39;d still happily go out and by a HP printer,
server, etc.  I feel comfortable using HP in a sentence with regards to&amp;nbsp;hardware.&lt;/p&gt;
&lt;p&gt;That said, though you have proven to be poor custodians of the Palm brand. I really don&#39;t feel like I 
could say HP and mobile within 5 words of each other without have to reaffirm both myself and others I 
am speaking with that you do actually know what they are&amp;nbsp;doing.&lt;/p&gt;
&lt;p&gt;So, let&#39;s look at these last few months as an opportunity rather than the glorious screw up that it&amp;nbsp;was.&lt;/p&gt;
&lt;p&gt;It&#39;s an opportunity to relauch / renew the Palm brand. HP, given you seem to be comfortable with spin-offs,
why not spin Palm back off into a self-contained entity with more autonomy and power.  While trying to say
HP and mobile feels difficult, saying Palm together mobile still feels incredibly natural. I genuinely see an
opportunity here, and there are some great angles you could explore with regards to a Palm&amp;nbsp;relaunch.&lt;/p&gt;
&lt;h2&gt;On&amp;nbsp;OpenSource&lt;/h2&gt;
&lt;p&gt;It&#39;s great to see that the WebOS dev team have actively embraced various OpenSource technologies 
(Node.js, WebKit, etc) in the creation of the platform.  First and foremost this is something that
must be preserved - many companies today suffer from the &lt;em&gt;Not Invented Here&lt;/em&gt; syndrome and are going
to suffer as a result.  Don&#39;t fall into that&amp;nbsp;trap.&lt;/p&gt;
&lt;p&gt;I&#39;d love you to also consider opensourcing WebOS under potentially a new OpenSource brand (maybe
Palm Foundation, Palm Labs, etc).  While a simple argument for this would be that &quot;all the cool kids are
doing it&quot; and therefore it would be a win on a marketing front, I believe there are also more compelling&amp;nbsp;arguments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;WebOS has a strong community around it.&lt;/strong&gt;  People who have picked up a WebOS device, love them.  Developers
who have coded for the platform seem equally passionate.  Take an existing strong community and empower them
with OpenSource software generally proves to be a recipe for&amp;nbsp;success.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;WebOS already exists in an OpenSource ecosystem.&lt;/strong&gt; In using and embracing existing OpenSource projects
you are already hooked into the OpenSource ecosystem.   If WebOS was to become an OpenSource product in it&#39;s
own right, then that ecosystem grows stronger and all parties&amp;nbsp;benefit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;OpenSource and Mobile OSes are not being done well at the moment.&lt;/strong&gt; Technically, Android is OpenSource. 
In reality though, it just isn&#39;t.  As a simple example, pop on over to &lt;a href=&quot;http://source.android.com&quot;&gt;source.android.com&lt;/a&gt;
and see what the latest version of the source you can find is. Then compare that with the latest version
of the OS you know about.  Any questions?  With regards to &lt;a href=&quot;https://meego.com/&quot;&gt;Meego&lt;/a&gt; and 
&lt;a href=&quot;https://www.tizen.org/&quot;&gt;Tizen&lt;/a&gt;, I will leave that for another post, but suffice to say there is a vacuum
to fill in Mobile OpenSource operating systems and I think WebOS could really flourish&amp;nbsp;there.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;On the Power of the&amp;nbsp;Web&lt;/h2&gt;
&lt;p&gt;The mobile space is still wide open.  Without doubt, iOS is the flagship consumer platform and Android
is gaining massive market share through distribution in low-cost devices (Android is the new Symbian&amp;nbsp;folks).&lt;/p&gt;
&lt;p&gt;There is still a lot of opportunity though.  I believe the current mobile space will eventually be dominated
by the platform that proves to be the most interoperable. And when it comes to interoperability I look to 
the Web.  Despite perceived technical limitations, the Web continues to grow, change and&amp;nbsp;adapt.&lt;/p&gt;
&lt;p&gt;I believe the more 
a &lt;strike&gt;mobile&lt;/strike&gt;device platform works with the Web, rather than against it, 
the greater it&#39;s potential reach and therefore success.  Eventually, Mozilla&#39;s &lt;a href=&quot;https://wiki.mozilla.org/B2G&quot;&gt;Boot to Gecko&lt;/a&gt; 
project may be this platform, but WebOS has a big head start if it chooses to stretch it&#39;s&amp;nbsp;legs.&lt;/p&gt;
&lt;h2&gt;On Walled Gardens, Social and the Next Big&amp;nbsp;Thing&lt;/h2&gt;
&lt;p&gt;While some of the existing mobile OS vendors are doing very well, they all have their own hosted 
services that consumers are encouraged to use.  Essentially, the current strategy seems to replacing 
the previous telco-weeded walled gardens with OS-weeded walled gardens&amp;nbsp;instead. &lt;/p&gt;
&lt;p&gt;For the most part this seems to be working, and consumers dancing to the beat of the vendors drum.  The fly in 
the ointment though is that none of the existing vendors do social very well.  Consumers therefore look outside
the vendor led offerings to things like Facebook and&amp;nbsp;Twitter. &lt;/p&gt;
&lt;p&gt;While I&#39;m not really a big Facebook fan, it does demonstrate the power and reach of the web. With web
technologies at it&#39;s core, WebOS should in theory be one of the most capable social mobile platforms.
That&#39;s definitely something to be explored, grown and then&amp;nbsp;publicized. &lt;/p&gt;
&lt;p&gt;Also, when (not if) the next big web application starts to gain traction, built on the foundation of
the web, WebOS will be there&amp;nbsp;first.&lt;/p&gt;
&lt;h2&gt;In&amp;nbsp;Summary&lt;/h2&gt;
&lt;p&gt;I believe WebOS is completely salvageable as a product. I think, however, there is little HP can do to 
regain any kind of consumer / shareholder confidence in mobility where they attempt to maintain direct&amp;nbsp;control.&lt;/p&gt;
&lt;p&gt;It&#39;s time to make some progressive changes, and at the same time cash in on a celebrated brands past. Will
shareholders jump for joy at the news. They might if it were just the Palm relaunch. They may, however, be
more skeptical with regards to any OpenSource&amp;nbsp;plans.&lt;/p&gt;
&lt;p&gt;I do believe, however, these are two decisions that do at least need to be roadmapped (if not announced) 
together. Doing either one without the other definitely diminishes the chance of success (OpenSource 
leads to more developers, leads to more apps, leads to more consumers, etc,&amp;nbsp;etc).&lt;/p&gt;
&lt;p&gt;HP, I wish you measured decision making, and I do genuinely believe what I have outlined above represents
a decision that can be made right, even if it is not the exactly right decision.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Whatever you decide, I will continue to take an interest in&amp;nbsp;WebOS.&lt;/p&gt;
&lt;h2&gt;Update:&amp;nbsp;2011-11-15&lt;/h2&gt;
&lt;p&gt;Well, it looks like the Android 4.0 source has been &lt;a href=&quot;http://source.android.com/index.html&quot;&gt;published&lt;/a&gt;. It&#39;s
great to see the source code being released sooner than I expected, so I&#39;m happy to eat my words with regards
to previous comments around the lag of Android source releases.  This doesn&#39;t change the fact that I&#39;d love
to see something at http://github.com/hp/webos&amp;nbsp;;)&lt;/p&gt;

   </content></entry><entry><title>Nokia back in the game with N9?</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/mobile/nokia-back-in-game-with-n9"/><updated>2011-11-02T00:00:00Z</updated><published>2011-11-02T00:00:00Z</published><id>http://www.distractable.net/mobile/nokia-back-in-game-with-n9</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Yesterday, I bought a &lt;a href=&quot;http://www.nokia.com.au/find-products/all-phones/nokia-n9&quot;&gt;Nokia N9&lt;/a&gt; and I declare it 
to be awesome.  So given its awesomeness, are Nokia now back in the consumer smartphone&amp;nbsp;game?&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;Short answer, no. Why?  Because they messed up - and we helped.  The N9 is an &lt;strong&gt;absolutely awesome&lt;/strong&gt; 
piece of kit.  A sturdy, functional, well polished and feature-complete device.  Heck the browser even supports
multi-touch&amp;nbsp;events.&lt;/p&gt;
&lt;p&gt;So if this device is so good, why aren&#39;t they back in the&amp;nbsp;game? &lt;/p&gt;
&lt;p&gt;Because the N9 does not represent the future of Nokia devices.  As far as I&#39;m aware the N9 is the last
of the Meego powered devices that Nokia plans to ship.  Their future aligns tightly with Microsoft and
focuses on shipping devices with the Windows Phone 7 operating&amp;nbsp;system.&lt;/p&gt;
&lt;h2&gt;We did&amp;nbsp;this&lt;/h2&gt;
&lt;p&gt;We all thought Nokia was down and out, a company that once dominated the mobile space seemed destined 
to fade slowly into the night.  I suspect some very talented engineers at Nokia, however, felt differently
and put an incredible amount of work into creating both &lt;a href=&quot;https://meego.com/&quot;&gt;Meego&lt;/a&gt; and the 
&lt;a href=&quot;http://www.engadget.com/2011/10/22/nokia-n9-review/&quot;&gt;N9&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I now feel a sadness for those talented engineers and regret everything I have previously said about 
Nokia being doomed to fail.  Why?  Because it was all of us doubting Nokia that led Nokia to ditch 
Meego and partner with MS for a future of Windows Phone riddled&amp;nbsp;devices.&lt;/p&gt;
&lt;p&gt;What a tremendous shame.  I hold in my hand a truly awesome piece of technology.  One that truly gives its 
iRivals a serious run for their money.  A piece of technology that feels better than any Android phone on 
the market, but has no future&amp;nbsp;roadmap.&lt;/p&gt;
&lt;h2&gt;An Apology and a&amp;nbsp;Plea&lt;/h2&gt;
&lt;p&gt;To the team at Nokia (who may well no longer be there) who crafted this device, let me say &lt;strong&gt;I&#39;m sorry&lt;/strong&gt;. 
You deserved&amp;nbsp;better.&lt;/p&gt;
&lt;p&gt;To the Nokia management and decision makers, please &lt;strong&gt;reconsider your decision to move away from Meego&lt;/strong&gt; and 
focus on the Windows Phone OS. Not only have you shown that what you had with Meego was excellent, I believe
you are potentially coupling yourself to a product roadmap in WP7 that does not align well with a mobile 
technology company.  I could write a whole post on this and may at another time, but for now let&#39;s just say
that MS and WP7 are definitely not the best fit for&amp;nbsp;Nokia.&lt;/p&gt;
&lt;h2&gt;Spread the&amp;nbsp;Word&lt;/h2&gt;
&lt;p&gt;If like me, you have bought an N9 and feel the same way that I do.  Tell your friends.  Tell your fellow 
developers, and tell your clients who you build mobile apps / websites for.  This is a device that deserves
respect and serious&amp;nbsp;consideration.&lt;/p&gt;
&lt;p&gt;My belief is the jury is still out within Nokia on Meego, and adoption and positive feedback on the N9 
could definitely influence future decisions.  Coupled with the generally poor response that Windows Phone 7
has had (I still don&#39;t know anyone who really cares about it) I genuinely believe that Meego has a fighting 
chance.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;But then, what do I know.  I thought WebOS could have changed the&amp;nbsp;world...&lt;/p&gt;

   </content></entry><entry><title>No more JavaScript Animation</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/coding/no-more-javascript-animation"/><updated>2011-10-22T00:00:00Z</updated><published>2011-10-22T00:00:00Z</published><id>http://www.distractable.net/coding/no-more-javascript-animation</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;ve written my fair share of JavaScript animation.  Though from this day forward, I&#39;m declaring it&#39;s
time for it to&amp;nbsp;stop...&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;For the last few years (and perhaps longer) there has been a lot little niceties added to libraries such 
as jQuery to improve the feel of websites and applications through small animation touches.  While these
have been wonderful, I think it really is time to start focusing on only using CSS3 to deliver our&amp;nbsp;animations.&lt;/p&gt;
&lt;p&gt;Interestingly, as I say this, I find myself in full agreement with &lt;a href=&quot;http://twitter.com/johnallsopp&quot;&gt;John Allsopp&lt;/a&gt;&#39;s 
recent post, &lt;a href=&quot;http://www.webdirections.org/blog/the-next-6-billion/&quot;&gt;The Next 6 Billion&lt;/a&gt;.  So how can I make 
a statement saying animation should only be done using CSS3 which is only supported in a handful of&amp;nbsp;browsers?&lt;/p&gt;
&lt;p&gt;Well, I say it based on the fact that animation (by and large) is something we add to our applications and sites
to give them that little something extra. I can say with certainly through the process of writing &lt;a href=&quot;http://www.tile5.org&quot;&gt;Tile5&lt;/a&gt;
that I spent a lot of time focusing on implementing animation in JavaScript, and... &lt;strong&gt;it&#39;s a&amp;nbsp;distraction.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Rather than focusing on broadening browser support or thinking about how HTML5 shims / polyfills might be used to work
with my library, my brain is obsessing over &lt;a href=&quot;https://github.com/DamonOehlman/cog/blob/master/cogs/easing.js&quot;&gt;easing equations&lt;/a&gt; and the like.  Guess what folks, the 
problem is already solved and CSS3 does a bloody good job of&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;While I&#39;m not going so far to say that I&#39;m not developing for older browsers (although the fact that I write 
so much JavaScript does bring about some limitations) I am saying that if the web is for everyone, then we need to look
at our products from a cake and icing&amp;nbsp;perspective:&lt;/p&gt;
&lt;p&gt;The cake is for all.  The icing is for those who choose, or have the
privilege of using a modern&amp;nbsp;browser.&lt;/p&gt;
&lt;p&gt;So personally, I&#39;m going to try to start spend more time on the cake, and utilize premixed icing where it works.

   </content></entry><entry><title>Classtweak - Terse DOM Element Class Modification</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/coding/classtweak-terse-dom-class-modification"/><updated>2011-10-18T00:00:00Z</updated><published>2011-10-18T00:00:00Z</published><id>http://www.distractable.net/coding/classtweak-terse-dom-class-modification</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Between the progress of various HTML5 specifications (the &lt;a href=&quot;http://www.w3.org/TR/selectors-api/&quot;&gt;Selectors API&lt;/a&gt; for instance)
and awesome little libraries like &lt;a href=&quot;https://github.com/DmitryBaranovskiy/eve&quot;&gt;Eve&lt;/a&gt; I&#39;m starting to see less and less
need for&amp;nbsp;jQuery.&lt;/p&gt;
&lt;p&gt;I&#39;ve loved jQuery for a long time, but it is starting to get heavier and heavier as time goes on.  This is 
completely understandable given the broad browser compatibility that is required of it, but when you start
to realise you don&#39;t actually need all that weight, then you start looking around for smaller component
pieces to help solve the&amp;nbsp;problem.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/DamonOehlman/classtweak&quot;&gt;Classtweak&lt;/a&gt; is a little experimental JS library that provides an alternative
to jQuery (and Zepto) &lt;code&gt;addClass&lt;/code&gt;, &lt;code&gt;removeClass&lt;/code&gt; and &lt;code&gt;toggleClass&lt;/code&gt; functions.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;I&#39;m actually really pleased with the result as it feels really light to use.  For example, let&#39;s say you had a HTML
element that you wanted to add a particular class to (and didn&#39;t want to clobber the current classes in the elements
&lt;code&gt;className&lt;/code&gt; property).  If you weren&#39;t going to use jQuery, then you would have to slice and dice the current classes
attached to the elements, and if your new class didn&#39;t exist then add&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;This is what classtweak is designed to do,&amp;nbsp;e.g.&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// get the element using old school, getElementById&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;test&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class to the element&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;element&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;+bounce&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;In the above case, through a call to &lt;code&gt;getElementById&lt;/code&gt; we retrieved an element from the DOM.  We then used classtweak 
to add the class &lt;code&gt;bounce&lt;/code&gt; to the element.  As classtweak has been written to work in conjuction with newer HTML APIs, 
you can also ask classtweak to make use of the Selectors API for&amp;nbsp;you:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class to the test element&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;#test&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;+bounce&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;This is exactly the same as the first example, but where classtweak uses the &lt;code&gt;document.querySelector&lt;/code&gt; function to locate
the element.  In actual fact, classtweak is making use of the &lt;code&gt;querySelectorAll&lt;/code&gt; function which returns all matching elements
so if you wanted to modify all divs on a page you could do the&amp;nbsp;following:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class to the element&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;+bounce&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;For the most part, anything you could do with a jQuery selector you can also do using the new 
&lt;a href=&quot;http://www.w3.org/TR/selectors-api/&quot;&gt;Selectors API&lt;/a&gt; so it&#39;s well worth having a&amp;nbsp;play.&lt;/p&gt;
&lt;h2&gt;Class Modifier&amp;nbsp;String&lt;/h2&gt;
&lt;p&gt;The class modifier string (specified in the second parameter) is designed to let you add/remove/toggle 
mutiple classes of the specified elements in a single&amp;nbsp;call:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class, and remove the slide class&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;+bounce -slide&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// toggle the bounce class on the even divs&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div:nth-child(even)&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;!bounce&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;An alternative syntax is also currently supported, but I&#39;m not sure if it will stick&amp;nbsp;around:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class, and remove the slide class&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;.bounce slide.&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// toggle the bounce class on the even divs&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div:nth-child(even)&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;.bounce.&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;h2&gt;A few&amp;nbsp;conveniences&lt;/h2&gt;
&lt;p&gt;In addition to the core functionality, I&#39;ve dropped in a few conveniences into classtweak.  For instance, if you 
don&#39;t provide a class modifier string (2nd parameter) then classtweak will return you a tweaker function that 
you can use to modifier classes on the elements that were specified / located in the first&amp;nbsp;parameter:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// get a tweaker that is bound to the divs on the page&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tweaker&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class to the divs&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;tweaker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;+bounce&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// toggle the slide class&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;tweaker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;!slide&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;I&#39;ve also added chaining so you can do a whole pile of tweaking all at&amp;nbsp;once:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// deactivate all the sections on the page and then activate the &lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// &amp;#39;home&amp;#39; section&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;section&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;-active&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;section[data-route=&amp;quot;/&amp;quot;]&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;+active&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;It&#39;s important to note that the function that is returned for chaining depends on the way class tweak is
called.  Basically, if you provide a class modifier string (2nd parameter) you can reselect and tweak again
as per above.  If you do not provide a modifier string, then a tweaker function is returned which can also
be&amp;nbsp;tweaked:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;// get a tweaker that is bound to the divs on the page&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;tweaker&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;classtweak&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;div&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;c1&quot;&gt;// add the bounce class to the divs, and toggle the slide&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;nx&quot;&gt;tweaker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;+bounce&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;!slide&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;h2&gt;Feedback,&amp;nbsp;Suggestions?&lt;/h2&gt;
&lt;p&gt;If you have any feedback or suggestions, then it would be great to hear them.  Particularly 
interested to know what people&#39;s thoughts around around the different modifier string syntaxes 
as it would be great just to support one for both library size and keeping things simple&amp;nbsp;reasons...&lt;/p&gt;

   </content></entry><entry><title>HTML5 API Soup</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/talks/html5-api-soup"/><updated>2011-10-17T00:00:00Z</updated><published>2011-10-17T00:00:00Z</published><id>http://www.distractable.net/talks/html5-api-soup</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;ve been back from &lt;a href=&quot;http://south11.webdirections.org/&quot;&gt;Webdirections South 2011&lt;/a&gt; for a couple of
days now (absolutely awesome conference, BTW), so I thought it was high time to get the slides
from my &lt;strong&gt;HTML5 API Soup&lt;/strong&gt; up where everyone could have a play around with&amp;nbsp;them.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;It&#39;s important to note that this deck has been built in &lt;a href=&quot;http://imakewebthings.github.com/deck.js/&quot;&gt;deck.js&lt;/a&gt;
with some additional help from two command line tools I&#39;ve been working on (
&lt;a href=&quot;https://github.com/DamonOehlman/deckem&quot;&gt;deckem&lt;/a&gt; and &lt;a href=&quot;https://github.com/DamonOehlman/demogen&quot;&gt;demogen&lt;/a&gt;) that
assist with the construction of the deck.  It&#39;s still early days yet for both of these, but I intend to keep
working on both as they make my life significantly&amp;nbsp;easier.&lt;/p&gt;
&lt;p&gt;The presentation itself walks through a few of the HTML5 API&#39;s that I have had experience with and finishes around 
highlighting the fact that these APIs are best used together (hence the soup&amp;nbsp;analogy).&lt;/p&gt;
&lt;p&gt;The deck itself is something that you can actually try out code samples in yourself, and in time I&#39;ll remove the
iframed code and replace it with something nicer.  It does, however, do the job and allows you to get some 
experience with the APIs without having to leave the&amp;nbsp;presentation.&lt;/p&gt;
&lt;p&gt;If you have any feedback I&#39;d love to hear it.  Anyway, here&#39;s the&amp;nbsp;link:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;/media/talks/html5-api-soup/index.html&quot;&gt;HTML5 API Soup&lt;/a&gt;&lt;/strong&gt; (May not work in all&amp;nbsp;browsers...)&lt;/p&gt;
&lt;p&gt;Additionally, if you are would like to play with the awesome and silly Geocities.js library, you can find it&amp;nbsp;here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/DamonOehlman/geocities.js&quot;&gt;https://github.com/DamonOehlman/geocities.js&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have fun&amp;nbsp;:)&lt;/p&gt;

   </content></entry><entry><title>Dart - Fragmentation, Innovation and Standards</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/coding/dart-fragmentation-innovation-and-standards"/><updated>2011-09-13T00:00:00Z</updated><published>2011-09-13T00:00:00Z</published><id>http://www.distractable.net/coding/dart-fragmentation-innovation-and-standards</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;There has been a lot of discussion in the last few days around Google&#39;s intention to develop Dart
(a new potential client-side language for the web). If you haven&#39;t seen the discussion, then I would recommend
checking out the &lt;a href=&quot;http://jsperf.com/dart&quot;&gt;jsPerf Dart Summary&lt;/a&gt; as it is an excellent summarizing of what
has transpired so&amp;nbsp;far.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;While it&#39;s great to see people passionately defending JavaScript (it really is quite a wonderful language), I 
believe there is merit in Google&#39;s Dart&amp;nbsp;strategy.&lt;/p&gt;
&lt;h2&gt;On&amp;nbsp;Fragmentation&lt;/h2&gt;
&lt;p&gt;I have seen quite a few tweets from coders that I respect regarding the fragmentation that introducing Dart will
bring to the world of client-side development.  The truth is (IMO) that the fragmentation is already there. You 
see, &lt;a href=&quot;http://jashkenas.github.com/coffee-script/&quot;&gt;CoffeeScript&lt;/a&gt; is already an example of the fragmentation.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Now, it&#39;s important to note that CoffeeScript didn&#39;t cause the fragmentation, but rather it is a by-product of the
existing fragmentation within the client-side development community (note I didn&#39;t say JavaScript).&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;There are many programmers being drawn (either by choice or necessity) to the wonderful world of client-side dev, 
many of whom have come from a classical OOP programming background. While I have grown to love JavaScript, I can
say that the initial transition from classical OOP to prototypal inheritance was a mind-bending experience. Given 
my experience, I can definitely understand why people choose CoffeeScript over using JavaScript directly, despite
my belief that it is the wrong way to go (in the long&amp;nbsp;run).&lt;/p&gt;
&lt;p&gt;With more developers required in the client-side space, many of whom I think will transition from server-side
development, this fragmentation isn&#39;t going to go away.  I think Google recognise&amp;nbsp;this.&lt;/p&gt;
&lt;h2&gt;On Innovation and&amp;nbsp;Standards&lt;/h2&gt;
&lt;p&gt;The other main criticism that people have of Google with regards to Dart, is how they appear to be circumventing
standards processes.  I think this is completely true, and personally I don&#39;t have a problem with it.  In my 
opinion and limited experience with collaborative research groups, innovation rarely happens effectively by 
committee or&amp;nbsp;group-think. &lt;/p&gt;
&lt;p&gt;Innovation requires an courageous mindset and one resilient to external criticism.  I believe that Google deserve
the opportunity to showcase what they believe the &quot;language of the web&quot; would look like, and it should be able to 
succeeed or fail based on its&amp;nbsp;merits.&lt;/p&gt;
&lt;p&gt;This is the opportunity we as developers previously gave to great innovations like jQuery and 
CoffeeScript (yes, I do consider CS a great innovation). I realise that both of these innovations have
been built upon the foundation of JS (which has facilitated their broad adoption), the point is that they were
not conceived or driven by a working group, but rather by individuals with vision and drive to improve the 
way we work with the&amp;nbsp;web.&lt;/p&gt;
&lt;p&gt;Dart is obviously something more aggressive again, and while the notion that we need something other than
JavaScript to effectively drive the client-side web feels sacreligious at first, I can certainly draw on experiences that validate Google&#39;s&amp;nbsp;direction. &lt;/p&gt;
&lt;p&gt;JavaScript is an awesomely powerful language - one that definitely takes prowess to wield effectively. I can&#39;t 
help but wonder whether we have enough skilled craftspeople to use JS effectively to build maintainable 
client-rich applications. Looking ahead, we are going to have boat-loads of apps to build and maintain, and
personally I don&#39;t know where the developers are going to come from. That, however, is another post&amp;nbsp;entirely.&lt;/p&gt;
&lt;p&gt;With regards to Dart, I&#39;m certainly interested to see what the collective value of hindsight of some 
very smart people can come up with.  I do hope that Google invite some other non-Googlers to the table to help
foster open communication and discussion, but at the same time hope the group is only as big as it needs to 
be to achieve an&amp;nbsp;outcome.&lt;/p&gt;

   </content></entry><entry><title>JavaScript Builds with Interleave</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/coding/javascript-builds-using-interleave"/><updated>2011-09-01T00:00:00Z</updated><published>2011-09-01T00:00:00Z</published><id>http://www.distractable.net/coding/javascript-builds-using-interleave</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;ve been a little frustrated with current set of JavaScript built tools for a little while now.
I don&#39;t know whether &quot;I&#39;m just doing it wrong&quot; or whether there is a genuine need for something better, but
I&#39;ve finally caved and written&amp;nbsp;one.&lt;/p&gt;
&lt;p&gt;It&#39;s called Interleave and you can check it out on &lt;a href=&quot;https://github.com/DamonOehlman/interleave&quot;&gt;Github&lt;/a&gt;.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;h2&gt;Why Another JavaScript Build&amp;nbsp;Tool&lt;/h2&gt;
&lt;p&gt;As I outline in the project readme, there are already quite few options available when it &quot;building&quot; your
JavaScript app or library.  I posted earlier in the year about my thoughts on &lt;a href=&quot;/coding/javascript-builds-beyond-concatenation&quot;&gt;moving beyond a simple
concatenation style approach&lt;/a&gt; and my opinion hasn&#39;t changed
too much since that&amp;nbsp;time.&lt;/p&gt;
&lt;p&gt;As outlined in that article, I ended up using &lt;a href=&quot;https://github.com/sstephenson/sprockets&quot;&gt;Sprockets&lt;/a&gt; fairly
extensively while building &lt;a href=&quot;http://www.tile5.org/&quot;&gt;Tile5&lt;/a&gt; and it did the job.  I did often find myself questioning
why on earth I was using a Ruby tool to build my JS files when &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt; could support such
a tool just as&amp;nbsp;easily.&lt;/p&gt;
&lt;p&gt;Initially, I thought &lt;a href=&quot;https://github.com/sstephenson/stitch&quot;&gt;Stitch&lt;/a&gt; would fill the void.  While it is very 
good it seems very geared towards using behind a Node.js application.  Even fellow Brisbane coder, 
&lt;a href=&quot;http://twitter.com/#!/secoif&quot;&gt;Tim Oxley&#39;s&lt;/a&gt; attempt to create a nice 
&lt;a href=&quot;https://github.com/secoif/StitchUp&quot;&gt;command-line wrapper to Stitch&lt;/a&gt; didn&#39;t convince me. I did have a tinker
with it when building our &lt;a href=&quot;http://nodeknockout.com/teams/sidelab&quot;&gt;Node Knockout Entry&lt;/a&gt; and it was great
in that context, but I&#39;m still not convinced around using &lt;code&gt;require&lt;/code&gt; on the browser&amp;nbsp;front.&lt;/p&gt;
&lt;p&gt;So with nothing feeling quite right, today (finally), I started writing my&amp;nbsp;own.&lt;/p&gt;
&lt;h2&gt;General&amp;nbsp;Usage&lt;/h2&gt;
&lt;p&gt;I won&#39;t go into too much detail here, as I&#39;ve tried to cover things in the 
&lt;a href=&quot;https://github.com/DamonOehlman/interleave/blob/master/README.md&quot;&gt;repository README&lt;/a&gt; as much as possible. 
At a high-level, Interleave &lt;strong&gt;injects&lt;/strong&gt; (as does Sprockets) include files into your source files rather than adopting a 
simple concatenation approach.  This allows you to compose your JavaScript files in a much more intentional&amp;nbsp;way.&lt;/p&gt;
&lt;p&gt;Including a file is done using the same comment format as sprockets (but without the require&amp;nbsp;keyword): &lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;//= lib/test.js&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;I&#39;ve added a few additional features too, and I can happily say the library is built in such a way that should
allow easy extension.  For instance, want to pull in an include from a github repository?  Yep, you can do&amp;nbsp;that:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;//= github://documentcloud/underscore/underscore&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Maybe, you just want to pull jQuery down from the CDN.  You can do that&amp;nbsp;too:&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;//= http://code.jquery.com/jquery-1.6.2.js&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt; Update (02 September&amp;nbsp;2011)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&#39;ve also added a bitbucket loader, for those of you who use &lt;a href=&quot;http://bitbucket.org/&quot;&gt;Bitbucket&lt;/a&gt;.  It works 
pretty much exactly like the github&amp;nbsp;loader.&lt;/p&gt;
&lt;div class=&quot;code&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;//= bitbucket://puffnfresh/roy/src/types&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;h2&gt;A Work in&amp;nbsp;Progress&lt;/h2&gt;
&lt;p&gt;Interleave is a project that started today, so it&#39;s far from a finished, polished product.  It does work though, so 
if you are frustrated with the current JavaScript build tools and want to be more intentional with the way you
build JavaScript applications and libraries, then give it a&amp;nbsp;go.&lt;/p&gt;
&lt;p&gt;If you have feedback on the concept, then feel free to leave a comment here, ping me on &lt;a href=&quot;http://twitter.com/DamonOehlman&quot;&gt;Twitter&lt;/a&gt;
or &lt;a href=&quot;https://github.com/DamonOehlman/interleave/issues&quot;&gt;report an issue&lt;/a&gt;.&lt;/p&gt;

   </content></entry><entry><title>Node.js Templating Options</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/coding/nodejs-templating"/><updated>2011-08-23T00:00:00Z</updated><published>2011-08-23T00:00:00Z</published><id>http://www.distractable.net/coding/nodejs-templating</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;With &lt;a href=&quot;http://www.nodeknockout.com/&quot;&gt;Node Knockout&lt;/a&gt; just a few days away now, combined with some early work I&#39;m doing 
on a &lt;a href=&quot;https://github.com/sidelab/steelmesh&quot;&gt;CouchDB + Node.js integration platform&lt;/a&gt;, I decided to take another look
at the state of templating in &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now, if you are looking for a templating solution, then there are quite a few 
&lt;a href=&quot;https://github.com/joyent/node/wiki/modules#wiki-templating&quot;&gt;options to choose from&lt;/a&gt; in various stages of development.
For the purposes of this blog post, I&#39;m going to focus on four options that I think all look pretty&amp;nbsp;interesting. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Additionally, this is a less-is-more post so for template samples go check out the various projects&amp;nbsp;:)&lt;/em&gt;&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;h2&gt;Weld&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/hij1nx/weld&quot;&gt;https://github.com/hij1nx/weld&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Weld describes itself as an &#39;anti-templating&#39; solution which fits nicely.  By 
using appropriate CSS selectors weld can quite capably turn a piece of boilerplate HTML 
into a nicely filled-out&amp;nbsp;view.&lt;/p&gt;
&lt;p&gt;It&#39;s both browser and Node.js friendly, but does require the &lt;a href=&quot;https://github.com/tmpvar/jsdom&quot;&gt;jsdom&lt;/a&gt; 
package to create a functional DOM on the server-side.  It&#39;s certainly an well-crafted solution and one
that should appeal to folks looking for a solution that genuinely encourages separation of design and
coding&amp;nbsp;concerns.&lt;/p&gt;
&lt;p&gt;On the downside, using a DOM implementation on the server-side feels a little heavy to me, and does 
mean that Weld is a solution for templating solution that is limited to creating HTML&amp;nbsp;output.&lt;/p&gt;
&lt;h2&gt;Jade&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/visionmedia/jade&quot;&gt;https://github.com/visionmedia/jade&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jade is a &lt;a href=&quot;http://haml-lang.com/&quot;&gt;Haml&lt;/a&gt;-like templating solution which goes to the opposite end
of the templating spectrum to Weld.  While Jade isn&#39;t going to be a great solution for 
allowing a designer and coder to work together in any kind of workflow, it is extremely expressive
and&amp;nbsp;efficient.&lt;/p&gt;
&lt;p&gt;Additionally, in terms of features Jade is very, very impressive. Support for mixins, includes and filters
are there. Specifically of interest a markdown filter is provided given that 
either &lt;a href=&quot;http://github.com/evilstreak/markdown-js&quot;&gt;markdown-js&lt;/a&gt; or &lt;a href=&quot;http://github.com/visionmedia/node-discount&quot;&gt;node-discount&lt;/a&gt;
is available in your node&amp;nbsp;packages.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://expressjs.com/&quot;&gt;Express.js&lt;/a&gt; is supported out of the box too, and given my love of 
&lt;a href=&quot;http://senchalabs.github.com/connect/&quot;&gt;Connect&lt;/a&gt; this is a bit of a&amp;nbsp;plus.&lt;/p&gt;
&lt;h2&gt;Mustache /&amp;nbsp;Handlebars&lt;/h2&gt;
&lt;p&gt;In terms of my favourite client-side web templating solution, &lt;a href=&quot;http://handlebars.strobeapp.com/&quot;&gt;Handlebars&lt;/a&gt; is 
a particular favourite.  It&#39;s worked really well in a current project, and I&#39;m definitely comfortable with the
&lt;a href=&quot;http://mustache.github.com/&quot;&gt;Mustache&lt;/a&gt; approach to&amp;nbsp;templating.&lt;/p&gt;
&lt;p&gt;With regards to options for Mustache-like templating there are a few options&amp;nbsp;available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/raycmorgan/Mu&quot;&gt;mu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/donpark/hbs&quot;&gt;Express View Engine Wrapper for&amp;nbsp;Handlebars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Dust (see&amp;nbsp;below) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&#39;m not going to go into the strengths of Mustache-like templating here, but suffice to say that
it&#39;s pretty flexible and it&#39;s application isn&#39;t constrained to generating HTML documents (which I think
is a good thing).  In general, the Node.js implementations (mu especially) look to be very faithful 
implementations of a Mustache templating&amp;nbsp;option.&lt;/p&gt;
&lt;h2&gt;Dust&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://akdubya.github.com/dustjs/&quot;&gt;http://akdubya.github.com/dustjs/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I like dust.  Why do I like dust?  Well because it&#39;s thought beyond the simple file-based templates + data = output.
It uses mustache-like templating syntax but then builds upon that to support partials (includes) and other nice features.&lt;br /&gt;
Partials don&#39;t necessarily have to reside on the file-system either, and can just as easily be stored in something like 
&lt;a href=&quot;http://couchdb.apache.org/&quot;&gt;CouchDB&lt;/a&gt; or another datastore.  That&#39;s flexible and clever, and exactly what I need at 
the&amp;nbsp;moment.&lt;/p&gt;
&lt;h2&gt;Templating Solution of&amp;nbsp;Choice&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;best choice&lt;/strong&gt; will always depend on the&amp;nbsp;circumstances:&lt;/p&gt;
&lt;p&gt;In the situation where you want to support a solid designer -&amp;gt; developer workflow, then I think it 
will be hard to go past Weld.  It&#39;s still maturing so you will need to be aware of that, but it&#39;s
a great approach to templating HTML&amp;nbsp;documents.&lt;/p&gt;
&lt;p&gt;For something like NodeKO, I reckon Jade is a great choice (depending on the makeup of your team of course).
The ability to get more for less keystrokes is always good when time is constrained, and the integration with
Express makes it a good choice for the&amp;nbsp;day.&lt;/p&gt;
&lt;p&gt;In other situations though (or when you don&#39;t know what the situation might be), 
it is hard to go past a Mustache based solution. Given dust falls into this family 
and offers some great extensions, flexibility and top-tier asynchronous support, I&#39;ll definitely be giving it a&amp;nbsp;try.&lt;/p&gt;

   </content></entry><entry><title>A New Home for WebOS?</title><author><name>Damon Oehlman</name></author><link href="http://www.distractable.net/mobile/webos-new-home"/><updated>2011-08-19T00:00:00Z</updated><published>2011-08-19T00:00:00Z</published><id>http://www.distractable.net/mobile/webos-new-home</id><content type="html">
       
&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;The world of mobile - crazy one day, insane and upsetting the next. This week in particular has been a real doozy.
The whole &lt;a href=&quot;http://www.bloomberg.com/news/2011-08-15/google-agrees-to-acquisition-of-motorola-mobility-for-about-12-5-billion.html&quot;&gt;Google, Motorola Mobility thing&lt;/a&gt; 
was pretty interesting, but today&#39;s news of &lt;a href=&quot;http://www.businesswire.com/news/home/20110818006301/en/HP-Confirms-Discussions-Autonomy-Corporation-plc-Business&quot;&gt;HP making some strategic changes&lt;/a&gt; 
is just downright&amp;nbsp;disappointing.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;

&lt;p&gt;So while the only thing that&#39;s clear at this stage is that &lt;a href=&quot;http://thisismynext.com/2011/08/18/hp-not-walking-away-webos-exclusive-details/&quot;&gt;nothing is clear&lt;/a&gt;,
it definitely seems that the Google-Motorola transaction has shaken everything up quite a bit.  There are some pretty interesting
theories kicking around as to what might eventually transpire.  These range from the HP just dropping mobile hardware and 
continuing to evolve and sub-license WebOS, to selling off everything to someone like HTC, LG given they have been disadvantaged
since the Google Motorola&amp;nbsp;deal.&lt;/p&gt;
&lt;p&gt;My thoughts are somewhat different.  I don&#39;t necessarily see HP being terribly successful simply sub-licensing WebOS.
I may well be wrong, but it seems that currently their isn&#39;t enough money to be made in sub-licensing mobile operating
systems for a company as big as HP to be bothered with this.  Neither do I think an LG or HTC acquisition of the full
WebOS line would be that successful&amp;nbsp;either.&lt;/p&gt;
&lt;p&gt;My theory focuses on a company that has a lot of cash and currently knows it isn&#39;t as relevant in the mobile space as
it should be.  Also it&#39;s a company that can finance it&#39;s investment in an operating system from hardware licensing / sales
rather than software.  If you haven&#39;t already guessed, it&#39;s Intel.  Yes, I know they&#39;ve tried this before with the whole
Maemo / Meego thing and failed pretty badly.  I still think its something they &lt;strong&gt;could&lt;/strong&gt; pull&amp;nbsp;off.&lt;/p&gt;
&lt;p&gt;While I thought I was a little off at first, there is &lt;a href=&quot;http://www.crunchbase.com/company/infineon&quot;&gt;evidence to suggest&lt;/a&gt; 
that Intel still feel strongly about the mobile chipset&amp;nbsp;space.&lt;/p&gt;
&lt;p&gt;Would WebOS flourish under an Intel acquisition?   No, probably not.  Intel folks don&#39;t have the head for software (sorry guys).
It could definitely flourish under someone like &lt;a href=&quot;http://joyent.com/&quot;&gt;Joyent&lt;/a&gt; though.  Oh, I wonder where most of Joyent&#39;s 
funding so far has come from, check it out folks - &lt;a href=&quot;http://venturebeat.com/2010/09/14/joyent-lands-another-15m-for-cloud-computing-services/&quot;&gt;Intel Capital&lt;/a&gt;.
Combine the fact that &lt;a href=&quot;https://developer.palm.com/content/api/dev-guide/js-services/overview.html&quot;&gt;WebOS services&lt;/a&gt; are written 
using &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt; and you can see that things would really start to&amp;nbsp;sing.&lt;/p&gt;
&lt;p&gt;I genuinely think that Intel pushing for this kind of top-and-tail strategy would really work for them.  There&#39;s obviously
a few things that have to be sorted for it to work out, but you have to admit, it would be kinda interesting&amp;nbsp;:)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE 10:00am AEST:&lt;/strong&gt; &lt;strong&gt;Thoughts on&amp;nbsp;Mozilla&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A few people have suggested Mozilla as another company that might be interested in taking on WebOS. While I think they 
might be interested (especially given the announcement of their &lt;a href=&quot;https://wiki.mozilla.org/B2G&quot;&gt;Boot 2 Gecko initiative&lt;/a&gt;)
I&#39;m not sure that Mozilla have the &quot;deep-pockets&quot; required to complete the transaction.  And even if they did, would
they consider it&amp;nbsp;bang-for-buck? &lt;/p&gt;
&lt;p&gt;My thinking (which is probably off) is that Mozilla are a talent-rich company but aren&#39;t &quot;brimming with funds&quot;.  So 
for my money I would expect Mozilla will opt for the build rather than buy approach for a mobile&amp;nbsp;OS.&lt;/p&gt;

   </content></entry></feed>
