<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">

 <title>The Dynamic Programmer</title>
 
 <link href="http://blog.dynamicprogrammer.com/" />
 <updated>2013-05-11T09:57:55-04:00</updated>
 <id>http://blog.dynamicprogrammer.com/</id>
 <author>
   <name>Hernan Garcia</name>
   <email>hernan@dynamicprogrammer.com</email>
 </author>

 
   <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/TheDynamicProgrammer" /><feedburner:info uri="thedynamicprogrammer" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
     <title>Opa up and running - book review.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/2zhOduIeXes/opa-up-and-running-book-review.html" />
     <updated>2013-05-11T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/05/11/opa-up-and-running-book-review</id>
     <content type="html">&lt;p&gt;&lt;i&gt;Disclaimer: I got this book as part of the bloggers review program at O&amp;#8217;Reilly.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shop.oreilly.com/product/0636920025436.do" target="_blank"&gt;&lt;img class="img-float-right" src="../../../images/posts/opa_up_and_running.gif" border="0" alt="Opa up and running - book cover"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Overview.&lt;/h3&gt;
&lt;p&gt;You will learn about how to work with &lt;a href="http://opalang.org/"&gt;Opa&lt;/a&gt; &amp;#8220;the framework&amp;#8221; and about some of the language features.&lt;br /&gt;
The book achieves this with several hands on projects of varies and increasing complexity.&lt;br /&gt;
There are only a few chapters that are not practical, ex: explaining the opa type system (chapter 7) and a few short introductory chapters at the beginning of the book. Read those chapters because they are packed with good information on some of Opa&amp;#8217;s strong points&lt;/p&gt;
&lt;p&gt;The three authors &lt;a href="https://twitter.com/henri_opa"&gt;Henri Binsztok&lt;/a&gt;  ,&lt;a href="https://twitter.com/akoprowski"&gt;Adam Koprowski&lt;/a&gt; and &lt;a href="http://dribbble.com/creatrice"&gt;Ida Swarczewskaja&lt;/a&gt; manage to balance the code examples with well written and clear explanations of the code is doing.&lt;/p&gt;
&lt;h3&gt;The good.&lt;/h3&gt;
&lt;p&gt;The book is targeted to developers of an intermediate level, without leaving in the dark beginners.&lt;/p&gt;
&lt;p&gt;The authors don&amp;#8217;t waste to much time describing concepts outside Opa itself, a beginner may have to do some reading on the side to supplement knowledge, but it should be able to get to work with the framework regardless.&lt;/p&gt;
&lt;p&gt;I think it&amp;#8217;s a good compromise since keep the book focused on the task and keep it short.&lt;/p&gt;
&lt;h3&gt;The bad.&lt;/h3&gt;
&lt;p&gt;No tests.&lt;/p&gt;
&lt;p&gt;There are no tests at all in the book nor mention of unit test, assertions or testing libraries/modules. For me this is not a good thing. A book written today should (at least), describe how to test your system. Even if it&amp;#8217;s in an appendix of the book, so to keep the examples clean.&lt;/p&gt;
&lt;h3&gt;Conclusion.&lt;/h3&gt;
&lt;p&gt;Opa is an intriguing framework and I will have to take it for a spin to make my mind about it. The book convinced me that I should at least spend some time with it.&lt;/p&gt;
&lt;p&gt;There are a few other things that bother me, but those are regarding the code examples and the framework and may not be really the book to blame (ex: not external templates, to separate html from the view code).&lt;/p&gt;
&lt;p&gt;I also recommend taking a look at some of &lt;a href="https://github.com/akoprow"&gt;Adam Koprowski&amp;#8217;s repos on Github&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/2zhOduIeXes" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/05/11/opa-up-and-running-book-review.html</feedburner:origLink></entry>
 
   <entry>
     <title>Mindfulness, meditation for the busy programmer.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/ea5S186NI3Q/mindfulness.html" />
     <updated>2013-05-10T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/05/10/mindfulness</id>
     <content type="html">&lt;p&gt;I only got into mindfulness meditation after listening to &lt;a href="http://www.npr.org/2012/01/20/145525002/be-here-now-meditation-for-the-body-and-brain"&gt;this interview&lt;/a&gt; to Mark Williams on NPR&amp;#8217;s Science Friday a few winters ago.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Mark Williams is professor of clinical psychology at the University of Oxford in England&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;During the interview, Mr. Williams mentioned multiple studies done in various Universities on how meditation can help reducing depression, migraines, mood swims and reduce stress.&lt;/p&gt;
&lt;p&gt;It may sound silly, but knowing that there were actual scientific studies on the effects of meditation was a convincing factor for me.&lt;/p&gt;
&lt;p&gt;I decided to get the book, &lt;a href="http://www.amazon.com/Mindfulness-Eight-Week-Finding-Peace-Frantic/dp/1609618955/"&gt;Mindfulness: An Eight-Week Plan for Finding Peace in a Frantic World&lt;/a&gt; download the audio guides and get ready to start the program.&lt;/p&gt;
&lt;p&gt;At the beginning I had to restart the program a few times. After a while I was able to establish a daily routine and was able to meditate at least once or twice a day. I will say that the key is in understanding the process and don&amp;#8217;t get frustrated when things are more difficult that you thought.&lt;/p&gt;
&lt;p&gt;The use of the recordings really helped me to keep focus and don&amp;#8217;t blame myself every time my mind decided to start thinking on some of the problems of the day. Establishing the routine and taking it easy was the key to stay with it.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m so far very happy with the process and the results. It only requires a minimum commitment and once I worked a way to make it part of the daily work-flow is not very difficult to keep it going.&lt;br /&gt;
It has helped me to cope and brush off frustrations easily. I still have lots of work ahead of me, for example using some of the meditation techniques to avoid getting frustrated in the first place.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m ending up this post with the video of Jon Kabat-Zinn talking about Mindfulness at Google.&lt;/p&gt;
&lt;p&gt;&lt;iframe width="420" height="315" src="http://www.youtube.com/embed/3nwwKbM_vJc" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/ea5S186NI3Q" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/05/10/mindfulness.html</feedburner:origLink></entry>
 
   <entry>
     <title>Beautiful new typography, the work of Pablo Impallari.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/F2fWDI1z05s/beautiful-new-fonts.html" />
     <updated>2013-04-21T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/04/21/beautiful-new-fonts</id>
     <content type="html">&lt;p&gt;I really enjoy nice typography and this interest make me explore some of the several font providers out there. Sometimes for inspiration and other times is just like visiting an art gallery.&lt;/p&gt;
&lt;p&gt;I try to keep track of new fonts that I like and I noticed that a few of the fonts I favored have been created by the same typographer.&lt;/p&gt;
&lt;p&gt;This on it&amp;#8217;s own is not that surprising, I obviously like his style, so is perfectly understandable I like several of his fonts.&lt;/p&gt;
&lt;p&gt;The typographer is &lt;a href="http://www.impallari.com/"&gt;Pablo Impallari&lt;/a&gt; and I will show some of my favorite fonts.&lt;/p&gt;
&lt;h3&gt;Quattrocento&lt;/h3&gt;
&lt;p&gt;I like it so much that I use Quattrocento for all the content in this blog (except headers, navigation and cut outs where I choose Gentium Book Basic).&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.impallari.com/quattrocento/" target="_blank"&gt;&lt;img class="img-float-center" src="../../../images/posts/quattrocento.png" border="0" alt="The quattrocento roman font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s a classy font with a vintage feel without sacrificing readability.&lt;/p&gt;
&lt;p&gt;I like the Roman version better than the Sans but of course there is a place for both.&lt;/p&gt;
&lt;h3&gt;Milonga&lt;/h3&gt;
&lt;p&gt;I already mentioned this one in a &lt;a href="http://blog.dynamicprogrammer.com/2013/04/19/buenos-aires-inspired-fonts.html"&gt;previous post&lt;/a&gt; a few days ago.&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.google.com/fonts/specimen/Milonga" target="_blank"&gt;&lt;img src="../../../images/posts/milonga.png" border="0" alt="The Milonga font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Dosis, elegant sans-serif&lt;/h3&gt;
&lt;p&gt;This one come in seven different weights and include a few alternates.&lt;br /&gt;
I really like the light and medium weights due to the minimalistic design without losing personality.&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.impallari.com/dosis/" target="_blank"&gt;&lt;img src="../../../images/posts/dosis-weights.png" border="0" alt="The dosis font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Cabin, where the lower case q, e, r, and m make an impression.&lt;/h3&gt;
&lt;p&gt;A very nice and balance sans. I particularly like the personality in some of the lower case letters.&lt;/p&gt;
&lt;p&gt;The stem and termination for the r is fairly unique, as well as the termination of the letter e.&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.impallari.com/cabin/" target="_blank"&gt;&lt;img src="../../../images/posts/cabin.gif" border="0" alt="The cabin font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Lobster, a new classic&lt;/h3&gt;
&lt;p&gt;I leave this one for the end of the post since I&amp;#8217;m pretty sure you saw it.&lt;br /&gt;
It have been used a lot latelly, specially in the start-up community (Codeacademy, Bayanumba, Camera tag and others).&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.impallari.com/lobster/" target="_blank"&gt;&lt;img src="../../../images/posts/lobster.png" border="0" alt="The lobster font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s a very elegant and playful font, probably victim of it&amp;#8217;s own success. It have been used so much that I would stay away from it at least for a little while. The font has such personality that jump at you (in a good way).&lt;/p&gt;
&lt;p&gt;Check &lt;a href="http://www.impallari.com/lobster/"&gt;the site&lt;/a&gt; to learn more about the process and the inspiration behind it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/F2fWDI1z05s" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/04/21/beautiful-new-fonts.html</feedburner:origLink></entry>
 
   <entry>
     <title>State changes, rest APIs and end points based permissions.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/H9Bq0Zyk7Ng/state-changes-and-rest-apis.html" />
     <updated>2013-04-20T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/04/20/state-changes-and-rest-apis</id>
     <content type="html">&lt;p&gt;You are ready to write your new &lt;span class="caps"&gt;HTTP&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt; (notice I&amp;#8217;m not saying &lt;span class="caps"&gt;REST&lt;/span&gt;) and everything goes well until you get the following requirement.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Customer status can be one of &amp;#8220;Active, Passive, Enabled or Deleted&amp;#8221;.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;So far no problem.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Editing customers is available to all back-end roles, but status changes is only available to some roles.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;This scenario is the one that most new comers find problematic. Specially if you want to model your permissions at the end point. For example using some kind of middleware.&lt;/p&gt;
&lt;h3&gt;Customers end points.&lt;/h3&gt;
&lt;p&gt;You may have the following end-points for the Customer object.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  GET     https://server.com/customers (all customers)
  GET     https://server.com/customers/:id (customer by id)
  POST    https://server.com/customers (create a new customer)
  PUT     https://server.com/customers (update the given customer)
  DELETE  https://server.com/customers/:id (delete the customer)

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A few things to notice here. The &lt;span class="caps"&gt;PUT&lt;/span&gt; and &lt;span class="caps"&gt;POST&lt;/span&gt; route may or may not have the id at the end.&lt;br /&gt;
The implementation of the &lt;span class="caps"&gt;DELETE&lt;/span&gt; operation can be a logical delete while preserving the data in your data store, but that is not really relevant&lt;/p&gt;
&lt;p&gt;In this scenario any update to customers is done via &lt;span class="caps"&gt;PUT&lt;/span&gt;.&lt;br /&gt;
We want to grant access to this operation to multiple roles, but we only want a &lt;strong&gt;subset&lt;/strong&gt; of those roles to be able to change the status of the customer.&lt;/p&gt;
&lt;p&gt;So we can&amp;#8217;t really use this end point to change status without changing how we implement security.&lt;/p&gt;
&lt;h3&gt;Model Status on it&amp;#8217;s own.&lt;/h3&gt;
&lt;p&gt;At this point of the analysis I like to stop and think what is the status of the customer. It may have started as a String property in the customer object, but it&amp;#8217;s usually more than that.&lt;/p&gt;
&lt;p&gt;I like to take a page of the &lt;span class="caps"&gt;DDD&lt;/span&gt; book and model the status as a value object.&lt;/p&gt;
&lt;p&gt;I start by creating an empty Status object that contains only one String property.&lt;/p&gt;
&lt;p&gt;I follow this with the creation of just one end point.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  PUT     https://server.com/customers/:id/status (updates the status for the customer with the payload)

&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Conclusion and home work.&lt;/h3&gt;
&lt;p&gt;Modeling the &lt;span class="caps"&gt;API&lt;/span&gt; in this manner will also allow us to add links to the customer object that represent some operations.&lt;/p&gt;
&lt;p&gt;I think that implementing security at the end points and only at the end points help you with how you model the &lt;span class="caps"&gt;API&lt;/span&gt; and the underlaying model. A nice side effect is that your code will be more modular and easy to maintain.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/H9Bq0Zyk7Ng" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/04/20/state-changes-and-rest-apis.html</feedburner:origLink></entry>
 
   <entry>
     <title>Fonts inspired by Buenos Aires signage.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/wNiIZJdFQY4/buenos-aires-inspired-fonts.html" />
     <updated>2013-04-19T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/04/19/buenos-aires-inspired-fonts</id>
     <content type="html">&lt;h3&gt;Montserrat&lt;/h3&gt;
&lt;p&gt;I came across &lt;a href="http://www.google.com/fonts/specimen/Montserrat"&gt;Montserrat&lt;/a&gt; a few months ago while researching fonts for a new project.&lt;/p&gt;
&lt;p&gt;Montserrat is an old neighbourhood in Buenos Aires where I spend a few years of my life while finishing secondary school.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/julietulanovsky"&gt;Julieta Ulanovsky&lt;/a&gt; has this to say&lt;/p&gt;
&lt;p&gt;&lt;i&gt;The old posters and signs in the traditional neighborhood of Buenos Aires called Montserrat inspired me to design a typeface that rescues the beauty of urban typography from the first half of the twentieth century.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.google.com/fonts/specimen/Montserrat" target="_blank"&gt;&lt;img src="../../../images/posts/montserrat.png" border="0" alt="The Montserrat font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Milonga&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.google.com/fonts/specimen/Milonga"&gt;Milonga&lt;/a&gt; is a newish font (I think) from Pablo Impallari.&lt;/p&gt;
&lt;p&gt;The font is inspired on the hand painted lettering and decorations that used to be very prominent in Buenos Aires called &lt;a href="http://en.wikipedia.org/wiki/Fileteado"&gt;fileteado porteño&lt;/a&gt;  and that sadly have been replaced recently for more modern and cosmopolitan signage.&lt;/p&gt;
&lt;p&gt;You can see the influence in the termination and some of the ligatures. I really like this font for headings, branding and anything that needs to be highlighted.&lt;br /&gt;
Upper-case letters are particularly beautiful.&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.google.com/fonts/specimen/Milonga" target="_blank"&gt;&lt;img src="../../../images/posts/milonga.png" border="0" alt="The Milonga font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;La porteña&lt;/h3&gt;
&lt;p&gt;A very delicate script with hints of fileteado. &lt;a href="http://www.sudtipos.com/fonts/43"&gt;La porteña&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.sudtipos.com/fonts/43" target="_blank"&gt;&lt;img src="../../../images/posts/la-portenia.png" border="0" alt="The Porteña font"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Tanguera&lt;/h3&gt;
&lt;p&gt;Also from sudtipos, &lt;a href="http://www.sudtipos.com/fonts/109"&gt;Tanguera&lt;/a&gt; brings some of the style from older signs you can see in Avenida de Mayo y San Telmo.&lt;/p&gt;
&lt;p&gt;&lt;a class="anchor-float-center" href="http://www.sudtipos.com/fonts/109" target="_blank"&gt;&lt;img src="../../../images/posts/tanguera.png" border="0" alt="The Tanguera font"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/wNiIZJdFQY4" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/04/19/buenos-aires-inspired-fonts.html</feedburner:origLink></entry>
 
   <entry>
     <title>oEmbed-node, consuming oEmbed providers with node.js.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/NpMKENQtkJM/oembed-node-consuming-oembed-providers-with-node-js.html" />
     <updated>2013-04-07T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/04/07/oembed-node-consuming-oembed-providers-with-node-js</id>
     <content type="html">&lt;p&gt;During the winter I build a &lt;a href="http://thebicho.com"&gt;very simple website&lt;/a&gt; to curate ski videos from Vimeo and YouTube for my own personal use.&lt;/p&gt;
&lt;p&gt;While working on it I needed to deal with the oEmbedd APIs of these two providers.&lt;/p&gt;
&lt;p&gt;The result is this simple but extensible node.js module to easily consume oEmbed API&amp;#8217;s from multiple providers.&lt;/p&gt;
&lt;p&gt;At the moment it &lt;del&gt;only&lt;/del&gt; supports YouTube and Vimeo but you can easily extend it to work with others via custom providers.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;: Version 0.2.0 adds support for &lt;a href="http://revision3.com"&gt;Revision3&lt;/a&gt;, &lt;a href="http://justin.tv"&gt;Justin.tv&lt;/a&gt; and &lt;a href="http://twitter.yFrog.com"&gt;yFrog&lt;/a&gt;. It also fix a bug when processing YouTube urls that contain multiple parameters in the querystring.&lt;/i&gt;&lt;/p&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;

  var oembed = require('oembed-node').init();
  oembed.get({url: "https://vimeo.com/62584176"}, getVideo);
  function getVideo(err, result) {

  }

&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The result will be a literal object with the properties returned by the provider. The library adds a video_url property to the object.&lt;br /&gt;
This property is not the url you entered but the &amp;#8220;proper&amp;#8221; url to embed a video. For example for YouTube you should use the http://youtu.be url to call the oEmbed &lt;span class="caps"&gt;API&lt;/span&gt; but the provider can deal with any url from youtube and &amp;#8220;returns&amp;#8221; the proper one.&lt;/p&gt;
&lt;h3&gt;Custom providers&lt;/h3&gt;
&lt;p&gt;The &lt;span class="code"&gt;init&lt;/span&gt; method of the library takes a literal object that&amp;#8217;s a map from host names to functions. Each of those functions is the handler that will return a proper oEmbed end point.&lt;/p&gt;
&lt;p&gt;For example a custom provider for vimeo would be like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  var customProviders = {
    "vimeo.com" : {
      init: function (urlStr) {
        return {
          getUrls: function () {
            return {
              embed: "http://vimeo.com/api/oembed.json?url=" + urlStr,
              video: urlStr
            };
          }
        };
      }
    }
  };

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And you can pass it to the &lt;span class="code"&gt;init&lt;/span&gt; function of the module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

    var oembed = require('oembed-node').init(customProviders);

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can use the same handler for multiple host names, just associate it to other keys in the hash.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/NpMKENQtkJM" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/04/07/oembed-node-consuming-oembed-providers-with-node-js.html</feedburner:origLink></entry>
 
   <entry>
     <title>Effective monitoring and alerting - book review.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/VKrGLqD6fiA/effective-monitoring-and-alerting-book-review.html" />
     <updated>2013-04-02T00:00:00-04:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/04/02/effective-monitoring-and-alerting-book-review</id>
     <content type="html">&lt;p&gt;&lt;i&gt;Disclaimer: I got this book as part of the bloggers review program at O&amp;#8217;Reilly.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shop.oreilly.com/product/0636920025986.do" target="_blank"&gt;&lt;img class="img-float-right" src="../../../images/posts/monitoring-and-alerting.gif" border="0" alt="Effective monitoring and alerting - book cover"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m having a hard time with this book. The author is clearly knowledgeable and experienced and the book is well written.&lt;/p&gt;
&lt;p&gt;But I don&amp;#8217;t think I&amp;#8217;m the intended audience.&lt;/p&gt;
&lt;p&gt;If you are new to metrics, this book is a good primer that goes deep into some of the practices and tools to use to capture and interpret those metrics.&lt;/p&gt;
&lt;p&gt;I was expecting more of a cookbook with different tools I could leverage to capture those metrics. The book only deals with tools in the appendix and only deals with OpenTSDB a time series data base.&lt;/p&gt;
&lt;p&gt;So, if you are looking for a good and deep book on time series analysis that can help you to read and understand all those metrics you are capturing, this is the book.&lt;/p&gt;
&lt;p&gt;There are extensive case studies of different scenarios that will show you how to interpret those time series and find the problem in that stubborn web server that (should) be working well.&lt;/p&gt;
&lt;p&gt;If instead you want to learn how to capture those metrics and what tools to use, this is probably not the book you should be reading just yet, but keep it in your list and make sure to read it soon after you have your metrics set.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/VKrGLqD6fiA" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/04/02/effective-monitoring-and-alerting-book-review.html</feedburner:origLink></entry>
 
   <entry>
     <title>Windows PowerShell Cookbook - book review.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/k8G0qZYZ_6c/windows-powershell-cookbook-book-review.html" />
     <updated>2013-01-23T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/23/windows-powershell-cookbook-book-review</id>
     <content type="html">&lt;p&gt;&lt;i&gt;Disclaimer: I got this book as part of the bloggers review program at O&amp;#8217;Reilly.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shop.oreilly.com/product/0636920024132.do" target="_blank"&gt;&lt;img class="img-float-right"  src="../../../images/posts/windows-powershell-cookbook.gif" border="0" alt="Windows PowerShell Cookbook - book cover"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.leeholmes.com/blog/"&gt;Lee Holmes&lt;/a&gt; takes the cookbook approach to help us discover the incredible power at our fingertips with PowerShell.&lt;/p&gt;
&lt;p&gt;It starts with a high level tour of PowerShell. How to get it (installed with most Windows distributions) and how to start playing with it.&lt;/p&gt;
&lt;p&gt;You will learn about some of the conventions and common commands available to you and how to explore them.&lt;br /&gt;
How it integrates with .&lt;span class="caps"&gt;NET&lt;/span&gt;, using it for rapid prototyping or as a &lt;span class="caps"&gt;REPL&lt;/span&gt; and much more.&lt;/p&gt;
&lt;p&gt;After the introduction, the book takes the form of multiple recipes for common tasks. The tasks grow in difficulty.&lt;/p&gt;
&lt;p&gt;The fundamentals section contains a series of recipes that will help you to get comfortable with the shell, customize the command prompt, invoke commands, get to know your session history, learn about aliases, etc.&lt;/p&gt;
&lt;p&gt;After that you will take on more serious programming, parsing and working with data, how to pipe commands together to create powerful scripts, interact with environment variables, variables, work with .&lt;span class="caps"&gt;NET&lt;/span&gt; objects, &lt;span class="caps"&gt;COM&lt;/span&gt; and pretty much anything you need to know.&lt;/p&gt;
&lt;p&gt;The book is extensive, coming shy of 1600 pages in the iPad version, but the cookbook format make it easy to use and you don&amp;#8217;t need to read it in order.&lt;/p&gt;
&lt;p&gt;If you are new to PowerShell I would recommend that at least you read the introduction and the Fundamentals sections. They will help you to get things done faster.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;If you work with a Windows machine I would certainly recommend it. Start using PowerShell today and start automating your workflow with it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/k8G0qZYZ_6c" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/23/windows-powershell-cookbook-book-review.html</feedburner:origLink></entry>
 
   <entry>
     <title>Newsify, my new choice on RSS reader for the iPad.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/eDKtAhHnlbA/newsify-rss-reader-for-the-ipad.html" />
     <updated>2013-01-16T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/16/newsify-rss-reader-for-the-ipad</id>
     <content type="html">&lt;p&gt;I do a lot of reading in my iPad and I&amp;#8217;m currently subscribe to a few hundred feeds. I use Google reader to manage all my &lt;span class="caps"&gt;RSS&lt;/span&gt; subscriptions but I like to have a good off-line reader while traveling or commuting.&lt;/p&gt;
&lt;p&gt;For the longest time I used Byline and I have been happy with it. The problem is that I also use Buffer to share links to articles I found interesting and Byline doesn&amp;#8217;t have integration with Buffer, so I had to open the article on Safari to share it.&lt;/p&gt;
&lt;p&gt;This is a minor inconvenience but last night, I saw that Buffer integrates with a few &lt;span class="caps"&gt;RSS&lt;/span&gt; readers, so I decided to take them for a spin.&lt;/p&gt;
&lt;p&gt;I end up installing the free version of Newsify and after just a few minutes, go the full version for just $0.99 cents.&lt;/p&gt;
&lt;p&gt;This is a slick and stylish &lt;span class="caps"&gt;RSS&lt;/span&gt; reader, with a great design and flawless integration with Buffer.&lt;/p&gt;
&lt;p&gt;The application present all articles in a magazine style view instead of a vanilla list, and it just looks so much appealing.&lt;/p&gt;
&lt;p&gt;You can easily get an overview of all the unread feeds and it makes for a much better experience.&lt;/p&gt;
&lt;p&gt;If you have a setup similar to mine, go ahead and give it a try.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;You need the full version to share with Buffer and a few other applications&lt;/i&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/eDKtAhHnlbA" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/16/newsify-rss-reader-for-the-ipad.html</feedburner:origLink></entry>
 
   <entry>
     <title>Codemash 2.0.1.3, another great conference.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/ZqQYj5hsK3I/codemash-2013.html" />
     <updated>2013-01-15T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/15/codemash-2013</id>
     <content type="html">&lt;p&gt;Say that Codemash doesn&amp;#8217;t disappoint is an understatement. Codemash is great!&lt;br /&gt;
Even with the conference continuously growing year after year, it have managed to keep true to it&amp;#8217;s identity.&lt;/p&gt;
&lt;p&gt;When everything was over, a new CD was added to &lt;a href="https://www.womackband.com/"&gt;The Womack Family Band&lt;/a&gt; collection, an XBox won and new knowledge was acquired.&lt;/p&gt;
&lt;p&gt;And probably most important, new friends were made and all friendships rekindle.&lt;/p&gt;
&lt;p&gt;This time I was able to manage &lt;a href="https://twitter.com/codemash/status/290332929614311426"&gt;the Codemash blues&lt;/a&gt; much better than previous years, but I&amp;#8217;m already looking forward to Codemash 2.0.1.4&lt;/p&gt;
&lt;h3&gt;Thursday sessions&lt;/h3&gt;
&lt;p&gt;After a hearty breakfast I head over &lt;a href="http://bencallahan.com/"&gt;Ben Callahan&lt;/a&gt; session on &amp;#8220;Web design process in a responsive world&amp;#8221;, where he explored the new processes that &lt;a href="http://seesparkbox.com/"&gt;Sparkbox&lt;/a&gt; is using to tackle the challenges presented when working on responsive sites, specifically how to work in multidisciplinary teams and how roles are changing.&lt;/p&gt;
&lt;p&gt;You can follow the process in the open while the Sparkbox team &lt;a href="http://building.seesparkbox.com/"&gt;redesign their own website&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I follow up with some hardware session and a very entertainment &amp;#8220;Raspberry Pi deep dive&amp;#8221; by &lt;a href="https://twitter.com/garyshort"&gt;Gary Short&lt;/a&gt; where he show us how to leverage Mono, C# and VistaDB to create a simple application and deploy it to the Pi.&lt;/p&gt;
&lt;p&gt;After lunch, I decided to head over &lt;a href="http://lostechies.com/jimmybogard/"&gt;Jimmy Bogard&lt;/a&gt; session on &amp;#8220;Functional testing with &lt;span class="caps"&gt;ASP&lt;/span&gt;.&lt;span class="caps"&gt;NET&lt;/span&gt; &lt;span class="caps"&gt;MVC&lt;/span&gt;&amp;#8221;. I wasn&amp;#8217;t sure about it but it was a great session with good solid examples. It reflects my own experience when using similar tools and I learned about some helpers inside &lt;a href="http://mvccontrib.codeplex.com/"&gt;&lt;span class="caps"&gt;MVC&lt;/span&gt; Contrib&lt;/a&gt; I wasn&amp;#8217;t aware off. A solid presentation.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://carlfranklin.net/"&gt;Carl Franklin&lt;/a&gt; introduced us to his &lt;a href="http://www.franklins.net/gesturepak.aspx"&gt;GesturePack&lt;/a&gt; product, that allow recording and playing back gestures with the Kinect. It was a very interactive presentation and he was very open on some of the processes he followed while creating the library, some of the challenges and limitations and where he want to take it.&lt;/p&gt;
&lt;p&gt;The last session of the day was probably the highlight of the conference. &lt;a href="https://twitter.com/bsherwin"&gt;Brian Sherwin&lt;/a&gt; presented together with his son Stephen on the journey they started five years ago when they started playing with a Netduino, a robot and a Kinect controller.&lt;br /&gt;
They were extremely well prepared in what is a very difficult presentation, not only compiling code live but also interacting with a robot.&lt;br /&gt;
They show us the first project they took on with the Arduino and how they evolved taking on a new challenge and going a bit further each time.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;I just noticed that Thursday was a very .&lt;span class="caps"&gt;NET&lt;/span&gt; day for me. Strange, I guess not doing .Net for a living for the last 2 years may have something to do with it. In any case, they were all really good sessions.&lt;/i&gt;&lt;/p&gt;
&lt;h3&gt;Friday sessions&lt;/h3&gt;
&lt;p&gt;After Thursday night party I started Friday at &lt;a href="https://twitter.com/kognate"&gt;Joshua Smith&lt;/a&gt; session on the Go language. A few weeks prior to Codemash I started to (again) hear references to Go in multiple conversations. This was a good presentation to get a 10000 feet overview of some of the interesting features of the language.&lt;/p&gt;
&lt;p&gt;I kept the &amp;#8220;languages&amp;#8221; theme with &amp;#8220;Dick Wall&amp;#8221; session on &amp;#8220;SubCut&amp;#8221; an &lt;span class="caps"&gt;IOC&lt;/span&gt; container for Scala.&lt;/p&gt;
&lt;p&gt;After lunch another &lt;a href="http://lostechies.com/jimmybogard/"&gt;Jimmy Bogard&lt;/a&gt; session; this time on &amp;#8220;Building external DSLs&amp;#8221;. After a quick overview on DSLs and the differences betwen internal and external DSLs, Jimmy showed how to use &lt;a href="http://irony.codeplex.com/"&gt;Irony&lt;/a&gt; to help on building the language, with lot&amp;#8217;s of code examples.&lt;/p&gt;
&lt;p&gt;For the last session of the day (and the conference) I head over to &lt;a href="https://twitter.com/johnlindquist"&gt;John Lindquist&lt;/a&gt; introductory session on AngularJS.&lt;/p&gt;
&lt;h3&gt;Thanks for another great Codemash&lt;/h3&gt;
&lt;p&gt;Once again, many thanks to all the volunteers, organizers and sponsors that make this possible, as well as everybody at the Kalahari that is &amp;#8220;so&amp;#8221; nice.&lt;/p&gt;
&lt;p&gt;For the last four years, I have been using the end of Codemash as my &amp;#8220;official&amp;#8221; new years day from a professional point of view.&lt;/p&gt;
&lt;p&gt;So, let the new year begin.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/ZqQYj5hsK3I" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/15/codemash-2013.html</feedburner:origLink></entry>
 
   <entry>
     <title>Codemash 2.0.1.3 precompilers.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/kajmDLv-MnY/codemash-precompilers.html" />
     <updated>2013-01-09T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/09/codemash-precompilers</id>
     <content type="html">&lt;p&gt;We are half way through Codemash 2.0.1.3 since this year we got two days of precompilers.&lt;/p&gt;
&lt;p&gt;I think I choose fairly well but as usual I had to leave out some sessions that looked really good. Nothing I can do about that.&lt;/p&gt;
&lt;h3&gt;Choose your own application&lt;/h3&gt;
&lt;p&gt;I wasn&amp;#8217;t very sure to attend or not the &amp;#8220;Choose your own application&amp;#8221; session. It looked very interesting in paper, but I was worry since I had been using those frameworks for a while.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m glad I did it anyway, the session was really good and the amount of work both &lt;a href="http://twitter.com/dburton"&gt;Dennis Burton&lt;/a&gt; and &lt;a href="http://twitter.com/BrianGenisio"&gt;Brian Genisio&lt;/a&gt;  put behind it is  impressive.&lt;/p&gt;
&lt;p&gt;I will recommend you visit their site &lt;a href="http://chooseyourownapplication.com"&gt;http://chooseyourownapplication.com&lt;/a&gt; sign up and follow the instructions.&lt;/p&gt;
&lt;p&gt;You will be making some decisions along the way, choosing the language to use, the different technologies and libraries and even deployment platform, getting new badges with each complete &amp;#8220;level&amp;#8221;.&lt;/p&gt;
&lt;p&gt;It should take you a few hours to complete it, but once you are done, you will have a single page application with a basic back end.&lt;/p&gt;
&lt;p&gt;The exercise finish leaving a list of things you could do to make the application a bit more &amp;#8220;real world&amp;#8221; and robust.&lt;/p&gt;
&lt;p&gt;Even when the application you will work on is very simple, it deals with several common scenarios that apply to more complex apps of this nature.&lt;/p&gt;
&lt;p&gt;I thinks is a very good resource for understanding single page apps, and even more, since you can go back and start again and make different decisions, it&amp;#8217;s also a good way to evaluate and compare the different technologies.&lt;/p&gt;
&lt;h3&gt;Atomic Scala&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://twitter.com/dmarsh"&gt;Dianne Marsh&lt;/a&gt; and &lt;a href="https://twitter.com/BruceEckel"&gt;Bruce Eckel&lt;/a&gt; put together a condensed version of their seminar specially for Codemash, all based on their &lt;a href="http://www.atomicscala.com/book/"&gt;upcoming book&lt;/a&gt; of the same title.&lt;/p&gt;
&lt;p&gt;The idea is to teach Scala step by step, introducing each feature in order.&lt;/p&gt;
&lt;p&gt;From their website:&lt;/p&gt;
&lt;p&gt;&lt;i&gt;We present each Atom (chapter) in the book as a very short lecture, followed by an exercise period. Atomic concepts make learning Scala easy and fun.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s a nice approach to learn a new language and is a gentle introduction to Scala, that can be a bit scary if you come from traditional OO languages.&lt;/p&gt;
&lt;p&gt;I had a good time pairing and doing the exercises, sadly I had to leave after lunch but I plan to complete the book later tonight.&lt;/p&gt;
&lt;p&gt;I recommend keeping an eye once the book is finally released and get yourself a copy if you want to get into Scala.&lt;/p&gt;
&lt;h3&gt;Behind the scenes of building Roslyn&lt;/h3&gt;
&lt;p&gt;I wasn&amp;#8217;t planning to attend this session, I poke my head into the room and I got hook. It&amp;#8217;s not a secret that I like languages, compilers and also &amp;#8220;processes&amp;#8221;, so been able to learn how Roslyn was build was very interesting and educational.&lt;/p&gt;
&lt;p&gt;Roslyn is an impressive project, a compiler for very well established languages like C# and VB, integrated deep inside a non trivial products like VS (and WebMatrix).&lt;/p&gt;
&lt;p&gt;The process, testing (both unit and functional) and performance considerations and how the team addressed each of those problems was very revealing.&lt;/p&gt;
&lt;p&gt;Both &lt;a href="http://twitter.com/Pilchie"&gt;Kevin Pilch-Bisson&lt;/a&gt; and &lt;a href="https://twitter.com/kodehoved"&gt;Brian Rasmussen&lt;/a&gt; made what can sound like a boring and arid subject into a very good and engaging presentation.&lt;/p&gt;
&lt;p&gt;I gain a better appreciation of the complexities involved while working on a project of these level of complexity and visibility.&lt;/p&gt;
&lt;h3&gt;Building Mobile Applications with PhoneGap&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://twitter/cfjedimaster"&gt;Ray Camden&lt;/a&gt; gave a good presentation/workshop.&lt;/p&gt;
&lt;p&gt;I particularly enjoyed the first part of the session where he introduced PhoneGap and the different ways to use it, some of the common pitfalls and the different work-flows recommended to get your application out the door in good shape.&lt;/p&gt;
&lt;p&gt;He was very entertaining and well prepared and I took a few tips from it that will certainly save me some time in the future.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/kajmDLv-MnY" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/09/codemash-precompilers.html</feedburner:origLink></entry>
 
   <entry>
     <title>First pull request for curling, increasing buffer size.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/QCgIklZZSdk/curling-increasing-buffer-size.html" />
     <updated>2013-01-06T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/06/curling-increasing-buffer-size</id>
     <content type="html">&lt;p&gt;Just four days after releasing &lt;a href="http://blog.dynamicprogrammer.com/2013/01/01/curling-node-wrapper-for-curl.html"&gt;curling&lt;/a&gt;  I got the first pull request from &lt;a href="https://github.com/romansky"&gt;romansky&lt;/a&gt; that increases the buffer size.&lt;/p&gt;
&lt;p&gt;These changes have been included in curling v0.3.0 available now via npm. There are no changes to the &lt;span class="caps"&gt;API&lt;/span&gt; so just run &lt;span class="code"&gt;npm update&lt;/span&gt; to get the new version and everything should work as normal.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/QCgIklZZSdk" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/06/curling-increasing-buffer-size.html</feedburner:origLink></entry>
 
   <entry>
     <title>Jump start CoffeeScript - book review.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/s1a5RsYvGRU/jumpt-start-coffeescript-book-review.html" />
     <updated>2013-01-05T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/05/jumpt-start-coffeescript-book-review</id>
     <content type="html">&lt;p&gt;&lt;i&gt;Disclaimer: I got this book as part of the bloggers review program at O&amp;#8217;Reilly.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shop.oreilly.com/product/9780987247827.do" target="_blank"&gt;&lt;img class="img-float-right"  src="../../../images/posts/jump-start-coffee-script.gif" border="0" alt="Jump Start CoffeeScript - book cover"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are possible two types of technical books I really enjoy, the ones dealing with process and general programming and the ones that tell a story while teaching something new.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.mrspeaker.net/"&gt;Earle Castledine&amp;#8217;s&lt;/a&gt; book does the later and it does it very well.&lt;/p&gt;
&lt;p&gt;The author paints the picture of a somehow dysfunctional team set to build a 2D game as part of a coding competition where the developer decides to write the game using CoffeeScript even when he has little knowledge of the language.&lt;/p&gt;
&lt;p&gt;This setup works very well to show case all the features of the language in the frame of a non trivial application.&lt;/p&gt;
&lt;p&gt;The narrative is great and keep the pace very well.&lt;/p&gt;
&lt;h3&gt;Three books on one.&lt;/h3&gt;
&lt;p&gt;The book not only deals with coffee-script but takes on teaching some Canvas and basics game mechanics.&lt;/p&gt;
&lt;p&gt;What it&amp;#8217;s even better, it manage to do all this in just a bit over 200 pages.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Page count of the ePub version on an iPad2&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;You can get all the code from the book to follow along, specially some of the assets for the game that you may not be able (or incline to) do by yourself.&lt;/p&gt;
&lt;p&gt;I really enjoyed reading it and coding along; even when I was familiar with the language I gain a better appreciation for it.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Absolutely recommendable, you can&amp;#8217;t go wrong with this book.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/s1a5RsYvGRU" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/05/jumpt-start-coffeescript-book-review.html</feedburner:origLink></entry>
 
   <entry>
     <title>Who are you, private/public key authentication for connect.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/KN0gkJc0SJE/who-are-you-private-public-key-authorization-for-connect.html" />
     <updated>2013-01-03T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/03/who-are-you-private-public-key-authorization-for-connect</id>
     <content type="html">&lt;p&gt;Who-are-you, reads a series of http headers and authorize (or not) the caller to access the &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;
&lt;aside class="resources"&gt;
  &lt;h4&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/h4&gt;
You should also check Joyent&amp;#8217;s &lt;a href="https://github.com/joyent/node-http-signature"&gt;node-http-signature&lt;/a&gt; that provides &lt;span class="caps"&gt;HMAC&lt;/span&gt; authentication in a more complete and mature module.
If you are using &lt;a href="http://mcavage.github.com/node-restify/#Bundled-Plugins"&gt;Restify&lt;/a&gt;  you can use the Joyent module right away since it comes already included.
&lt;/aside&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Provide the client with a private and public key.&lt;/li&gt;
	&lt;li&gt;Create names (or use the defaults) for the http headers the client will use to make the request.&lt;/li&gt;
	&lt;li&gt;Choice a public value that will be used to generate the hash with the private key.&lt;/li&gt;
	&lt;li&gt;At the moment it uses sha1 to generate the (hash) token.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Example&lt;/h3&gt;
&lt;p&gt;Given the keys:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;apiKey: 90ijUhj88uY&lt;/li&gt;
	&lt;li&gt;secretKey: ppKJHnmm09Iu564ghfB=&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And using the default custom http headers:&lt;/p&gt;
&lt;p&gt;The client should send a request with the following headers:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  x-api-key: 90ijUhj88uY
  x-request-time: '1357169907984'
  x-token: 'a001880c10e2a61231311b1b56cecd98c71a7fe4'

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The hash is calculated (in node) using the crypto module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  var hash = crypto.createHmac('sha1', 'ppKJHnmm09Iu564ghfB=')
      .update('1357169907984')
      .digest('hex');

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On the server application you can add the module as usual:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  var whoareyou = require('whoareyou');
  server.use(whoareyou.privatePublicKey(accountStore, null));

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to use custom headers use an options argument as this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  var whoareyou = require('whoareyou');
  var options = {
    "apiKey": "x-key",
    "dateTime": "x-date",
    "token": "x-hash"
  };
  server.use(whoareyou.privatePublicKey(accountStore, options));

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;span class="code"&gt;accountStore&lt;/span&gt; is expected to have one method &lt;span class="code"&gt;get(apiKey, cb)&lt;/span&gt; the callback takes two arguments and error and an &lt;span class="code"&gt;account&lt;/span&gt; object.&lt;br /&gt;
The &lt;span class="code"&gt;account&lt;/span&gt; object is expected to have at least one property &lt;span class="code"&gt;secretKey&lt;/span&gt; that contains exactly that.&lt;/p&gt;
&lt;p&gt;The middleware will add two properties to the request &lt;span class="code"&gt;authenticated&lt;/span&gt; a boolean indicating if the authentication have been succesful and &lt;span class="code"&gt;currentAccount&lt;/span&gt; that contains a clone of the &lt;span class="code"&gt;account&lt;/span&gt; object returned by the &lt;span class="code"&gt;accountStore.get&lt;/span&gt; method.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/KN0gkJc0SJE" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/03/who-are-you-private-public-key-authorization-for-connect.html</feedburner:origLink></entry>
 
   <entry>
     <title>Introducing curling, a simple node wrapper for curl.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/48_11-30E9Y/curling-node-wrapper-for-curl.html" />
     <updated>2013-01-01T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2013/01/01/curling-node-wrapper-for-curl</id>
     <content type="html">&lt;p&gt;Another of those libraries that I&amp;#8217;m tired to write again and again, so here it goes, up to npm.&lt;/p&gt;
&lt;p&gt;It has a very simple &lt;span class="caps"&gt;API&lt;/span&gt; that exports only two methods `connect` and `run`.&lt;/p&gt;
&lt;h3&gt;Install or get the code.&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
  npm install curling
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or download the code from &lt;a href="https://github.com/hgarcia/curling"&gt;github&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;run(command, cb)&lt;/h3&gt;
&lt;p&gt;You shouldn&amp;#8217;t have to use `run` but is in there just as a convenience or if you need to do something crazy that is not possible to do via the connection object.&lt;/p&gt;
&lt;p&gt;It pretty much allow you to send any command with any option to curl. It used internally by connect and the connection object.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
  var curl = require('curling');
  curl.run("--GET http://www.cnn.com", function (err, result) {
    console.log(result.payload); // should output the html for the cnn page to console.
    console.log(result.stats);   // should output some of the statistics on downloading the page
  });
&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;connect(options)&lt;/h3&gt;
&lt;p&gt;This method takes an `options` object with general options that will be re-used in each command.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
  var options = {user: "hernan:secret"};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It returns a connection object.&lt;/p&gt;
&lt;h3&gt;Connection object &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;It has five methods, each corresponding to an &lt;span class="caps"&gt;HTTP&lt;/span&gt; verb. They all have the same signature: `method(url, options, cb)`. The method are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;head();&lt;/li&gt;
	&lt;li&gt;get();&lt;/li&gt;
	&lt;li&gt;post();&lt;/li&gt;
	&lt;li&gt;put();&lt;/li&gt;
	&lt;li&gt;del();  //&lt;span class="caps"&gt;DELETE&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The callback takes two parameters `cb(err, result)` where the result is a `curl-result` object.&lt;/p&gt;
&lt;h3&gt;curl-result&lt;/h3&gt;
&lt;p&gt;It has two properties, `payload` and `stats`. The payload contains the data returned in the stdout by curl while the stats is an object that parse as the content of stderr.&lt;/p&gt;
&lt;p&gt;Stats is of the form:&lt;/p&gt;
{
totalSize: 0,
received: 0,
xferd: 0,
averageDownloadSpeed: 0,
averageUploadSpeed: 0,
totalTime: 0,
timeSpent: 0,
timeLeft: 0,
currentSpeed: &amp;#8216;0 Kb&amp;#8217;
}
&lt;p&gt;The time properties are converted to milliseconds, the rest of the properties are of type `Number` in the same units as returned by curl except for the `currentSpeed` that is a string with the unit at the end (again as returned by curl).&lt;/p&gt;
&lt;h3&gt;Passing options.&lt;/h3&gt;
&lt;p&gt;There are two ways to pass options and data to a request.&lt;br /&gt;
You can use the `options` for the `connect` method and this options will be used in each and every request.&lt;br /&gt;
You can also use the `options` object in each of the verb methods.&lt;/p&gt;
&lt;p&gt;The `options` object is actually a hash where the keys should be the name of the flag in a curl command, for example to set an Accept header and pass some data you could pass an `options` as the following.&lt;/p&gt;
var options = {
header: &amp;#8220;Accept: text/html&amp;#8221;,
data: [&amp;#8220;name=hernan&amp;#8221;, &amp;#8220;last=garcia&amp;#8221;]
};
&lt;p&gt;The keys in an `options` object can be one of the following types, String, Array or null.&lt;/p&gt;
&lt;p&gt;Strings are useful when you only need to set a single value, arrays are used to pass multiple values, like data, header and so. Null is a special case and is used for empty flags, like `&amp;#8212;false`.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/48_11-30E9Y" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2013/01/01/curling-node-wrapper-for-curl.html</feedburner:origLink></entry>
 
   <entry>
     <title>Get started with Arduino, A hands-on introductory workshop - video review.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/8xnwBl3RH9k/get-started-with-arduino-video-review.html" />
     <updated>2012-12-31T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2012/12/31/get-started-with-arduino-video-review</id>
     <content type="html">&lt;p&gt;&lt;i&gt;Disclaimer: I got this video as part of the bloggers review program at O&amp;#8217;Reilly.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shop.oreilly.com/product/0636920027973.do" target="_blank"&gt;&lt;img class="img-float-right"  src="../../../images/posts/get-started-with-arduino-video.gif" border="0" alt="Get Started with Arduino: A Hands-On Introductory Workshop - video"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In less than 3 hours &lt;a href="https://twitter.com/rancidbacon"&gt;Philip Lindsay&lt;/a&gt; will get show you the basics on working and programming Arduino.&lt;/p&gt;
&lt;p&gt;The video is organized in 23 little segments that can be watched independently.&lt;/p&gt;
&lt;p&gt;It starts with the basics on what is Arduino the components and the layout of the circuit, what tools and components you will need to complete the tutorial and how to install the development environment in your computer.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;They cover Windows, Mac OX and Linux&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;You will learn how to create a series of simple projects that make some LEDs blinks or take inputs from pushing buttons, but those projects are the basics for any other from of interaction with the Arduino.&lt;/p&gt;
&lt;p&gt;One of the videos that I particularly enjoyed was Exploring the hardware ecosystem to give you an idea of the depth and breath of the Arduino world.&lt;/p&gt;
&lt;p&gt;If you have any background on electronics you may find yourself skipping some parts, ex: explanation on reading resistors code, how a led works, etc.&lt;br /&gt;
At the same time those, basics make for a set of nice videos to share with the youngsters in the family that may want to get into electronics.&lt;/p&gt;
&lt;p&gt;You will work on four projects in total, increasing the level of difficulty just a bit in each one, while introducing a new concept.&lt;/p&gt;
&lt;p&gt;The production of the videos is very good, with nice long sequences taking from the top of the circuit where you can easily follow the connections and what&amp;#8217;s going on in each project.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;I certainly would recommend the series as a good way to get started.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/8xnwBl3RH9k" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2012/12/31/get-started-with-arduino-video-review.html</feedburner:origLink></entry>
 
   <entry>
     <title>node-resources helping modularize your Restify or Express application.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/UVpFuRC46bc/node-resources.html" />
     <updated>2012-12-30T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2012/12/30/node-resources</id>
     <content type="html">&lt;h3&gt;node-resources&lt;/h3&gt;
&lt;p&gt;When working on Restify or ExpressJS applications you usually see a file structure based on routes, models and views.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  |_app.js
  |_routes
  | |_hello.js
  |_models
  | |_hello.js
  |_views
    |_hello
      |_index.ejs
      |_edit.ejs

&lt;/pre&gt;&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This structure is very common to other &lt;span class="caps"&gt;MVC&lt;/span&gt; frameworks as well.&lt;/p&gt;
&lt;p&gt;I found that this structure works well for small or medium size projects but after a while it can get a bit out of control. The main problem is that code that belong together and is relate is split all over the place what makes developing small modules in isolation very complicate.&lt;/p&gt;
&lt;p&gt;I prefer the following code organization.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  |_app.js
  |_resources
    |_hello
      |_index.js
      |_handlers.js
      |_models
      | |_hello.js
      |_views
        |_index.ejs
        |_edit.ejs

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This approach makes each module self contained.&lt;/p&gt;
&lt;h3&gt;Caveats&lt;/h3&gt;
&lt;p&gt;You want to make sure that inter-dependency between this modules is keep to a minimum.&lt;/p&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;p&gt;Install as usual via npm&lt;/p&gt;
npm install node-resources
&lt;p&gt;To use the structure above you should do the following.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  var resources = require('node-resources');
  resources.registerRoutes(server, {path: __dirname + "/resources"});

&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Api&lt;/h3&gt;
&lt;p&gt;The module exports only one method &lt;span class="code"&gt;registerRoutes(server, options)&lt;/span&gt;&lt;br /&gt;
The &lt;span class="code"&gt;options&lt;/span&gt; argument can have two properties.&lt;/p&gt;
&lt;h4&gt;options.path&lt;/h4&gt;
&lt;p&gt;This is mandatory and if not passed it should throw an Error.&lt;/p&gt;
&lt;h4&gt;options.pattern&lt;/h4&gt;
&lt;p&gt;You can use this property to specify a pattern to search for a file inside the module to require. This is useful if you don&amp;#8217;t want to use an &lt;span class="code"&gt;index.js&lt;/span&gt; file in each module or if you want to give use for something different.&lt;/p&gt;
&lt;p&gt;Ex: given you have the following module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

  |_cars
    |_cars.routes.js
    |_handlers.js
    |_models
    | |_cars.js
    |_views
      |_list.ejs

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your &lt;span class="code"&gt;options.pattern&lt;/span&gt; should be &lt;span class="code"&gt;[folder].routes.js&lt;/span&gt;.&lt;br /&gt;
The &lt;span class="code"&gt;[folder]&lt;/span&gt; token is the only one accepted in the pattern and will be replaced by the folder name at the root of the module.&lt;/p&gt;
&lt;h3&gt;Coming soon&amp;#8230;&lt;/h3&gt;
&lt;p&gt;Adding dependency management and injection to the routers.&lt;br /&gt;
Maybe even doc generation for the application &lt;span class="caps"&gt;API&lt;/span&gt;, routes, methods and parameters.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/UVpFuRC46bc" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2012/12/30/node-resources.html</feedburner:origLink></entry>
 
   <entry>
     <title>DynProg.Validation now available on NuGet</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/X03vCLu2-18/DynProg-Validation-on-NuGet.html" />
     <updated>2012-12-27T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2012/12/27/DynProg-Validation-on-NuGet</id>
     <content type="html">&lt;h3&gt;A bit of history&lt;/h3&gt;
&lt;p&gt;I wrote this library for the first time 6 or 7 years ago.&lt;/p&gt;
&lt;p&gt;During all this time I keep improving it and enhancing it, sometimes even duplicating the effort on a different code base. For a few years now it has been sitting on my personal GitHub repository with a bunch of other small projects.&lt;/p&gt;
&lt;p&gt;During the holidays, while working on a new side project, I was ready to add the library to the project the old fashion way, copy the &lt;span class="caps"&gt;DLL&lt;/span&gt; into a libs folder and add a reference.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s evident that this is not the way of doing things in .Net anymore and since we (.Net developers) finally have a package manager it was time to move this library into NuGet.&lt;/p&gt;
&lt;p&gt;After a few hours of fiddling around with the code, cleaning up a few things and moving it into it&amp;#8217;s own repository I published and now is available for everybody via NuGet.&lt;/p&gt;
&lt;p&gt;You can install via &lt;a href="http://nuget.org/packages/DynProg.Validation"&gt;NuGet&lt;/a&gt; or inside VS using the NuGet Package Manager.&lt;/p&gt;
&lt;h3&gt;Why another validation library?&lt;/h3&gt;
&lt;p&gt;&lt;span class="code"&gt;DynProg.Validation&lt;/span&gt; is intended to replace the countless checks for null argument and argument formatting and provide a simple and easy to use interface.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s not a replacement for other popular libraries like &lt;span class="code"&gt;FluentValidation&lt;/span&gt; or &lt;span class="code"&gt;DataAnnotations&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;It should replace code like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

    public string setValue(string key, string value)
    {
        if (String.IsNullOrEmpty(key) || key.length &amp;lt; 5 || key.length &amp;gt; 20)
        {
            throw new ArgumentException("key");
        }
        if (String.IsNullOrEmpty(value))
        {
            throw new ArgumentException("value");
        }
        // the actual code goes here
    }

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with something like this&amp;#8230;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;

    public string setValue(string key, string value)
    {
      var validator = new Validator();
      validator.CheckThat(() =&amp;gt; key).IsNotNullOrEmpty()
          .LengthIsBetween(5, 20);
      validator.CheckThat(() =&amp;gt; value).IsNotNullOrEmpty();
      validator.Throw();
      //the actual code goes here
    }

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It doesn&amp;#8217;t looks like much but let&amp;#8217;s examine some of the niceties in the &lt;span class="caps"&gt;API&lt;/span&gt; and some of the facilities it provides.&lt;/p&gt;
&lt;h3&gt;General usage&lt;/h3&gt;
&lt;p&gt;We create a validator instance per method and you call the &lt;span class="code"&gt;CheckThat&lt;/span&gt; method. This method takes a &lt;span class="code"&gt;func&lt;/span&gt; that access and returns the parameter that we want to check.&lt;/p&gt;
&lt;p&gt;This is a little weird but the reason is that we use this to internally get the name of the parameter that in turn we use to generate the Exception message. This save you of passing a string with the parameter name that can get out of sync at the first refactoring of your code.&lt;/p&gt;
&lt;p&gt;The &lt;span class="code"&gt;CheckThat&lt;/span&gt; method returns one of many &lt;span class="code"&gt;CheckConditions&lt;/span&gt; based on the type of the parameter.&lt;/p&gt;
&lt;p&gt;These &lt;span class="code"&gt;CheckConditions&lt;/span&gt; expose a series of method suitable to check multiple aspects of the parameter.&lt;/p&gt;
&lt;p&gt;You can chain multiple conditions together to check several attributes of the parameter.&lt;/p&gt;
&lt;h3&gt;Specific Exception per check&lt;/h3&gt;
&lt;p&gt;All methods of the &lt;span class="code"&gt;CheckConditions&lt;/span&gt; have a &amp;#8220;typeless&amp;#8221; interface that will generate a generic Exception based on what condition is checking, parameter type and name.&lt;/p&gt;
&lt;p&gt;They also have a &amp;#8220;Generic&amp;#8221; interface that take an Exception type. This interface takes the same parameters of the &amp;#8220;typeless&amp;#8221; one plus an array of object as the arguments that Exception type is expecting.&lt;/p&gt;
&lt;h3&gt;Managing exceptions.&lt;/h3&gt;
&lt;p&gt;Although (at the moment) the validation is run on runtime no Exceptions will be thrown or values returned unless you call one of the following methods.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;List()&lt;/li&gt;
	&lt;li&gt;Throw()&lt;/li&gt;
	&lt;li&gt;Throw&amp;lt;T&amp;gt;()&lt;/li&gt;
	&lt;li&gt;ThrowFirst()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These methods can be called on an instance of the &lt;span class="code"&gt;Validator&lt;/span&gt; object or in any of the &lt;span class="code"&gt;CheckConditions&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;span class="code"&gt;ThrowFirst&lt;/span&gt; method will throw the first exception in case one or more exceptions where found.&lt;/p&gt;
&lt;p&gt;The &lt;span class="code"&gt;Throw&lt;/span&gt; method will throw an &lt;span class="code"&gt;ErrorsCollectionException&lt;/span&gt; if at least one error was found.&lt;/p&gt;
&lt;p&gt;&lt;span class="code"&gt;ErrorsCollectionException&lt;/span&gt; inherits from &lt;span classs="code"&gt;Exception&lt;/span&gt; and contains methods to access the list of exceptions generated during validation.&lt;/p&gt;
&lt;p&gt;The &lt;span class="code"&gt;Throw&amp;lt;T&amp;gt;&lt;/span&gt; method will throw an &lt;span class="code"&gt;Exception&lt;/span&gt; of type &lt;span class="code"&gt;T&lt;/span&gt; if at least one error was found.&lt;/p&gt;
&lt;p&gt;Finally &lt;span class="code"&gt;List&lt;/span&gt; will return the &lt;span class="code"&gt;ErrorsCollectionException&lt;/span&gt; even if empty.&lt;/p&gt;
&lt;h3&gt;&lt;span class="caps"&gt;API&lt;/span&gt; documentation&lt;/h3&gt;
&lt;p&gt;I put together &lt;a href="http://hgarcia.github.com/DynProg.Validation/"&gt;a quick site&lt;/a&gt; using gh-pages with the complete &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;More code examples coming soon, or just check the tests.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/X03vCLu2-18" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2012/12/27/DynProg-Validation-on-NuGet.html</feedburner:origLink></entry>
 
   <entry>
     <title>CSS considerations with widget development.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/uSCImnoxb-0/css-considerations-with-widget-development.html" />
     <updated>2012-12-22T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2012/12/22/css-considerations-with-widget-development</id>
     <content type="html">&lt;p&gt;When working on scripts that will modify the &lt;span class="caps"&gt;DOM&lt;/span&gt; of third party pages you will have to apply custom styles to those elements.&lt;/p&gt;
&lt;p&gt;This can cause problems in the host application and you need to be mindful of that.&lt;/p&gt;
&lt;h3&gt;Rarely use ids.&lt;/h3&gt;
&lt;p&gt;I&amp;#8217;m very tempted to say &amp;#8220;&lt;span class="caps"&gt;NEVER&lt;/span&gt;&amp;#8221; use ids, but I know better than to be absolute about these things anymore.&lt;/p&gt;
&lt;p&gt;Id&amp;#8217;s on elements should be unique per page, so using ids will prevent you from including multiple widgets in the same page.&lt;/p&gt;
&lt;p&gt;If you have to use ids, make sure the name is unique. EX: dynamic-prog-widget.&lt;/p&gt;
&lt;h3&gt;Close your tags.&lt;/h3&gt;
&lt;p&gt;You never know about the &lt;span class="caps"&gt;DOCTYPE&lt;/span&gt; of the page you will be modifying, so a good rule of thumb is to close all your tags and write &lt;span class="caps"&gt;HTML&lt;/span&gt; that should validate as &lt;span class="caps"&gt;XHTML&lt;/span&gt; transitional.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Your script could check the page &lt;span class="caps"&gt;DTD&lt;/span&gt; and generate &lt;span class="caps"&gt;HTML&lt;/span&gt; accordingly but this will increase the script difficulty considerable.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;You can also have several versions of your widget (good luck maintain that), or indicate clearly what &lt;span class="caps"&gt;HTML&lt;/span&gt; version you are compatible with.&lt;/p&gt;
&lt;h3&gt;In-line styles.&lt;/h3&gt;
&lt;p&gt;We all know that we shouldn&amp;#8217;t in-line styles in our pages and always define then in style sheets.&lt;/p&gt;
&lt;p&gt;This rule is usually broken when working with embedded widgets. You will see this approach in some of Google widgets, like the embedded search.&lt;/p&gt;
&lt;p&gt;The advantage of this approach is that there is no risk of interfering with the styles of the application.&lt;/p&gt;
&lt;p&gt;The disadvantage is that it makes life very difficult for the host application to modify the styling of your widget due to the &lt;span class="caps"&gt;CSS&lt;/span&gt; precedence rules.&lt;br /&gt;
It also can increase code size significantly if the widget needs to be inserted multiple times in the same page.&lt;/p&gt;
&lt;h3&gt;&amp;#8220;Namespace&amp;#8221; your rules.&lt;/h3&gt;
&lt;p&gt;If you use classes make sure you don&amp;#8217;t use the &lt;span class="caps"&gt;CSS&lt;/span&gt; &lt;span class="code"&gt;!important&lt;/span&gt; rule in any of your classes.&lt;/p&gt;
&lt;p&gt;Don&amp;#8217;t apply rules to &lt;span class="caps"&gt;HTML&lt;/span&gt; elements or ids (well you shouldn&amp;#8217;t be using ids anyway).&lt;/p&gt;
&lt;p&gt;Make sure your classes have some unique name, you can use a prefix, like the name of your application. Ex: &lt;span class="code"&gt;.dynamic-prog-widget-container&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;External fonts.&lt;/h3&gt;
&lt;p&gt;This is a fairly new(est) concern. We are starting to use web-fonts more and more nowadays, specially for icons. Even when the possibility of clashing is minimal you can still override a font name by mistake, so make sure you use similar naming conventions as mentioned in the previous paragraph.&lt;/p&gt;
&lt;h3&gt;Navigation.&lt;/h3&gt;
&lt;p&gt;Make sure that links either point to new windows, or you allow for the user to configure this behaviour as wanted.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;An easy way to open a new window is using &lt;span class="code"&gt;target=&amp;#8220;_blank&amp;#8221;&lt;/span&gt; in your links.&lt;/i&gt;&lt;/p&gt;
&lt;h3&gt;Last thoughts.&lt;/h3&gt;
&lt;p&gt;Try to avoid resizing as much as possible. Since you don&amp;#8217;t know the code that will surround your widget, resizing it may cause odd behaviour and make for a poor user experience.&lt;/p&gt;
&lt;p&gt;And most of all, be mindful of any interaction the user may have with your widget.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/uSCImnoxb-0" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2012/12/22/css-considerations-with-widget-development.html</feedburner:origLink></entry>
 
   <entry>
     <title>Web, Cloud and Mobile solutions with F# - book review.</title>
     <link href="http://feedproxy.google.com/~r/TheDynamicProgrammer/~3/Ws3A5tlMEyI/web-cloud-and-mobile-solutions-with-f-sharp-book-review.html" />
     <updated>2012-12-21T00:00:00-05:00</updated>
     <id>http://blog.dynamicprogrammer.com/2012/12/21/web-cloud-and-mobile-solutions-with-f-sharp-book-review</id>
     <content type="html">&lt;p&gt;&lt;i&gt;Disclaimer: I got this book as part of the bloggers review program at O&amp;#8217;Reilly.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://shop.oreilly.com/product/0636920026099.do" target="_blank"&gt;&lt;img class="img-float-right"  src="../../../images/posts/web-cloud-and-mobile-with-f-sharp.gif" border="0" alt="Web, Cloud and Mobile solutions with F# - book cover"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/dmohl"&gt;Daniel Mohl&amp;#8217;s&lt;/a&gt; book had the distinctive quality to make F# really approachable.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Some of those F# characteristics are: functional / OO paradigm, messaging, records and immutability.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;I think that the secret lies in the approach the author took in showing us how we can use F# and it&amp;#8217;s distinct capabilities to write better solutions in a world where high availability and scale is a major concern.&lt;/p&gt;
&lt;p&gt;There are multiple examples on writing services with different technologies, not just Microsoft products but also open source frameworks. You will learn about a number of F# libraries that will make your life easier in a day to day use in real world projects.&lt;/p&gt;
&lt;p&gt;The author makes an effort to show different ways to solve similar problems, ex: using records and classes to interact with databases and queues, while at the same time indicating what is the  preferred way in F#.&lt;/p&gt;
&lt;p&gt;Some of my favorite sections of the book: Using NancyFX and WebApi with F# to create &lt;span class="caps"&gt;HTTP&lt;/span&gt; services. Interacting with Azure services and how to combine F# with NoSQL databases like Mongo, Raven and CouchDB.&lt;/p&gt;
&lt;p&gt;There is also a really good example on using Web Sockets with a library called Fleck that I wasn&amp;#8217;t familiar with.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;I found the book a really enjoyable read and the reason to try to use F# soon in some side project.&lt;br /&gt;
I feel that makes F# very approachable and is really good on showing why you should care. It&amp;#8217;s not just another language, or a language that should be used only when doing lots of data processing or scientific work, but a tool that can help even when dealing more pedestrian, but still complex, tasks.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheDynamicProgrammer/~4/Ws3A5tlMEyI" height="1" width="1"/&gt;</content>
   <feedburner:origLink>http://blog.dynamicprogrammer.com/2012/12/21/web-cloud-and-mobile-solutions-with-f-sharp-book-review.html</feedburner:origLink></entry>
 

</feed>
