<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Daniel Cazzulino's Blog</title>
	
	<link>http://blogs.clariusconsulting.net/kzu</link>
	<description>XML? What XML?</description>
	<lastBuildDate>Sun, 19 May 2013 04:23:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DanielCazzulino" /><feedburner:info uri="danielcazzulino" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><feedburner:emailServiceId>DanielCazzulino</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>NuGet References: publishing my first open source extension to the DevStore</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/-wR0g6Il-Bo/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/nuget-references-publishing-my-first-open-source-extension-to-the-devstore/#comments</comments>
		<pubDate>Sat, 18 May 2013 22:49:56 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/nuget-references-publishing-my-first-open-source-extension-to-the-devstore/</guid>
		<description>Last week I had the pleasure of spending time with a bunch of friends at the OuterConf 2013, including pretty much the entire NuGet team. I also could attend to the hackathon they organized, and I got to hack what I think is a pretty cool Visual Studio 2012 extension: NuGet References. An improved NuGet [...]</description>
			<content:encoded><![CDATA[<p>Last week I had the pleasure of spending time with a bunch of friends at the <a href="kzu.to/outerconf" target="_blank">OuterConf 2013</a>, including pretty much the entire NuGet team. I also could attend to the hackathon they organized, and I got to hack what I think is a pretty cool Visual Studio 2012 extension: NuGet References. </p>
<h2>An improved NuGet experience</h2>
<p>The idea is simple enough: I wanted to leverage some new extensibility hooks in VS2012 to show installed nuget packages right inside a packages.config file, like so:</p>
<p><img title="Nodes" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Nodes" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/Nodes.png" width="284" height="299" /></p>
<p>And once you have the nodes in there, wouldn’t it be cool to be able to update and uninstall right from there?</p>
<p><img title="Menus" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Menus" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/Menus.png" width="373" height="337" /></p>
<p>And why not allow me to see key information about the package on the properties window?</p>
<p><img title="Properties" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Properties" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/Properties.png" width="504" height="457" /></p>
<p>Cool enough <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Sonrisa" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/wlEmoticon-smile.png" /></p>
<h2>Monetizing your creations</h2>
<p>Now, after the extension was “done” (there’s a TON more that can be added to it! This is just the start), I realized I had put quite a few hours (more like days by now!) into it. So even if I do want my work to be open source so that eventually it can make it into NuGet’s core tooling, I could certainly use a few bucks to pay for the coffee and beer I put into it <img class="wlEmoticon wlEmoticon-winkingsmile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Guiño" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/wlEmoticon-winkingsmile.png" />.</p>
<p>In the past, attempting to monetize small extensions was either a matter of placing a Donate button somewhere and hope that users would notice, or investing serious time in some sort of payment method (i.e. PayPal) and issuing product keys and implementing some activation mechanism. </p>
<p>I believe the Donate button doesn’t work because you have mainly two choices on how to expose it:</p>
<ul>
<li>At installation time </li>
<li>Sporadic nagging dialogs afterwards </li>
</ul>
<p>At installation time, I usually don’t know yet if what I’m installing is any good and if I will be willing to donate and how much. And everybody hates nagging dialogs. So there you have it: it won’t work. </p>
<p>And the alternative is simply not worth it most of the time (like for this cool extension I just built). I’m done with the fun part of building it, I just want to move on to the next fun thing. I’m hardly looking forward to building the payment and product activation stuff, much less maintain that up and running and the like. It’s just too much work.</p>
<p>This is the reason we (Clarius Consulting) built the <a href="http://devstore.com" target="_blank">DevStore</a>: it allows me to quickly and effortlessly publish my extension for sale and be done in minutes. So let’s do that right now!</p>
<h2>Publishing to the DevStore</h2>
<p>So let’s go to <a href="http://devstore.com">http://devstore.com</a> and click on the prominent Upload button:</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image.png" width="923" height="399" /></p>
<p>I get to sign in with either a Google or Windows Live account, and after that quick permissions acceptance dialog, I get to fill in basic information about myself and accept the DevStore terms of service.</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image1.png" width="928" height="545" /></p>
<p>That will send an email to our inbox for verification purposes, after which we can log in with our credentials by clicking the Login button at the top. Of course this is only required the first time <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>After we’re logged in, if we now click again the Upload button, we get to accept the Seller terms of service (which is different than for users, just like every other app store), and with that out of the way, we can just go ahead and upload our VSIX!</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image10.png" width="923" height="300" /></p>
<p>Here I have already chosen my extension file. Note that the file I’m uploading is the output of a regular VSIX project in Visual Studio. I haven’t modified the manifest in any way for now. Upon submitting the file, we get some data extracted from the manifest, which we can now tweak as needed:</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image11.png" width="890" height="452" /></p>
<p>For one thing, I know I want to change the Full Price value! So let’s click Edit. You can edit quite a bit of information about how you want to sell your extension, including full price (for first-time purchases), upgrade price (for v1 users when I come out with v2), what countries I want to sell it on, screenshots, and so on. I just happen to love Stella Artois beer which is <a href="http://fresh.amazon.com/product?asin=B0016XMXZK&amp;qid=156589851&amp;rank=1&amp;sr=1-1&amp;tag=title" target="_blank">about $2 on Amazon Fresh</a>, so I’ll just round it up to $2.99 and you can buy me a beer for this extension <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>After I’ve saved the information, I can click Submit/Publish, at which point it’s live on the site on the Recently Added section:</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image4.png" width="948" height="414" /></p>
<h2>Buying from the DevStore</h2>
<p>Now you can all go buy me a beer for this extension by either going to the website and downloading the VSIX from there, or, much more conveniently, do it from within Visual Studio!</p>
<p>All you need to do is first get the DevStore extension via the Extension Manager (remember, my extension only works on VS2012):</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image5.png" width="915" height="247" /></p>
<p>After a quick VS restart, you will get a new node in the extension manager window, the DevStore:</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image6.png" width="959" height="291" /></p>
<p>You cannot buy your own extensions, so here I’m buying it from another account I have, just to show you how it looks. The user will first have to register/sign in (right after clicking the Buy button), at which point they will get the Checkout dialog:</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image7.png" width="959" height="462" /></p>
<p>The next step takes you to your default browser, to the PayPal website. We had this step baked into Visual Studio at some point, but the overwhelming feedback from early beta testers was that they felt more confident and secure if we just took them to the regular browser window. In there, you get to log in and pay as usual:</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image8.png" width="939" height="396" /></p>
<p>Right after confirming the payment, I can go back to Visual Studio, and notice that the button changed from Buy to Download (as well as a new little world icon that tells me I own this extension in the cloud). And sure enough , after a quick download, I get the regular VSIX install dialog plus optional EULA if any, and I get to finish the install:</p>
<p><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2013/05/image9.png" width="959" height="550" /></p>
<p>&#160;</p>
<h2>What about Open Source, Freedom and Love?</h2>
<p>Well, I’m a complete fan of open source. I always ask myself “why NOT make this open source?”, rather than the opposite (and more common) question. I believe a very low-friction way to contribute with a few bucks with an open source project or developer is a great way to encourage more open source, independent developers and innovation. </p>
<p>The DevStore provides a great way to encourage developers to automate more of their daily programming activities, boosting productivity. I believe bite sized extensions in the range of $2-10 are a much better option that monster-sized tools that completely take over most of your IDE or pollute it unnecessarily with myriad (and totally unrelated) commands all over the place.</p>
<p>In order to prove the point that both open source and paid convenience delivery of binaries can actually be a commercially viable option, I’m also publishing the entire source for this extension in <a href="http://kzu.to/10x7FXt" target="_blank">GitHub</a>.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>And that’s it! I just bought myself a beer with that demo above, so it’s time for me to go enjoy it. I hope you like the extension and gift me a beer too <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=-wR0g6Il-Bo:FYSn4bxPLIg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=-wR0g6Il-Bo:FYSn4bxPLIg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=-wR0g6Il-Bo:FYSn4bxPLIg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=-wR0g6Il-Bo:FYSn4bxPLIg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/-wR0g6Il-Bo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/nuget-references-publishing-my-first-open-source-extension-to-the-devstore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/nuget-references-publishing-my-first-open-source-extension-to-the-devstore/</feedburner:origLink></item>
		<item>
		<title>How to perform regular expression based replacements on files with MSBuild</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/AbSYSDpbDMM/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/how-to-perform-regular-expression-based-replacements-on-files-with-msbuild/#comments</comments>
		<pubDate>Wed, 05 Dec 2012 02:34:42 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[msbuild]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/how-to-perform-regular-expression-based-replacements-on-files-with-msbuild/</guid>
		<description>And without a custom DLL with a task, too . The example at the bottom of the MSDN page on MSBuild Inline Tasks already provides pretty much all you need for that with a TokenReplace task that receives a file path, a token and a replacement and uses string.Replace with that. Similar in spirit but [...]</description>
			<content:encoded><![CDATA[<p>And <a href="http://kzu.to/RAjUjY" target="_blank">without a custom DLL with a task</a>, too <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="http://blogs.clariusconsulting.net/kzu/files/2012/12/wlEmoticon-smile.png" />. </p>
<p>The example at the bottom of the MSDN page on <a href="http://msdn.microsoft.com/en-us/library/dd722601.aspx" target="_blank">MSBuild Inline Tasks</a> already provides pretty much all you need for that with a TokenReplace task that receives a file path, a token and a replacement and uses string.Replace with that. Similar in spirit but way more useful in its implementation is the <a href="http://kzu.to/WI1hHv" target="_blank">RegexTransform in NuGet’s Build.tasks</a>. It’s much better not only because it supports full regular expressions, but also because it receives items, which makes it very amenable to batching (applying the transforms to multiple items). You can read about how to use it for <a href="http://kzu.to/RAk62L" target="_blank">updating assemblies with a version number</a>, for example.</p>
<p>I recently had a need to also supply <a href="http://kzu.to/RAkhuT" target="_blank">RegexOptions</a> to the task so I extended the metadata and a little bit of the inline task so that it can parse the optional flags. So when using the task, I can pass the flags as item metadata as follows:</p>
<pre class="brush: xml;">&lt;Target Name=&quot;ReplaceReleaseNotes&quot;&gt;
    &lt;ItemGroup&gt;
        &lt;RegexTransform Include=&quot;$(BuildRoot)**\*.nuspec&quot;
                        Condition=&quot;'$(ReleaseNotes)' != ''&quot;&gt;
            &lt;Find&gt;&lt;![CDATA[&lt;releaseNotes /&gt;|&lt;releaseNotes/&gt;|&lt;releaseNotes&gt;.*&lt;/releaseNotes&gt;]]&gt;&lt;/Find&gt;
            &lt;ReplaceWith&gt;&lt;![CDATA[&lt;releaseNotes&gt;$(ReleaseNotes)&lt;/releaseNotes&gt;]]&gt;&lt;/ReplaceWith&gt;
            &lt;Options&gt;Singleline&lt;/Options&gt;
        &lt;/RegexTransform&gt;
    &lt;/ItemGroup&gt;

    &lt;RegexTransform Items=&quot;@(RegexTransform)&quot; /&gt;
&lt;/Target&gt;</pre>
<p>It also supports specifying multiple options, like “Singleline | IgnorePatternWhitespace”&#160; and the like.</p>
<p>The code changes to the task are minimal:</p>
<pre class="brush: xml;">&lt;!--
============================================================
            RegexTransform

Transforms the input Items parameter by evaluating the
regular expression in their Find metadata and
replacing with their ReplaceWith metadata. Optional, the
options for the regular expression evaluation can be specified.

Example input item:
        &lt;RegexTransform Include=&quot;$(BuildRoot)Src\GlobalAssemblyInfo.cs&quot;&gt;
            &lt;Find&gt;AssemblyFileVersion\(&quot;.*?&quot;\)&lt;/Find&gt;
            &lt;ReplaceWith&gt;AssemblyFileVersion(&quot;$(FileVersion)&quot;)&lt;/ReplaceWith&gt;
            &lt;Options&gt;Multiline | IgnorePatternWhitespace&lt;/Options&gt;
        &lt;/RegexTransform&gt;

Invoking the target:
    &lt;RegexTransform Items=&quot;@(RegexTransform)&quot; /&gt;
============================================================
--&gt;
&lt;UsingTask TaskName=&quot;RegexTransform&quot;
           TaskFactory=&quot;CodeTaskFactory&quot;
           AssemblyFile=&quot;$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll&quot;&gt;
    &lt;ParameterGroup&gt;
        &lt;Items ParameterType=&quot;Microsoft.Build.Framework.ITaskItem[]&quot; /&gt;
    &lt;/ParameterGroup&gt;
    &lt;Task&gt;
        &lt;Using Namespace=&quot;System.IO&quot; /&gt;
        &lt;Using Namespace=&quot;System.Text.RegularExpressions&quot; /&gt;
        &lt;Using Namespace=&quot;Microsoft.Build.Framework&quot; /&gt;
        &lt;Code Type=&quot;Fragment&quot;
              Language=&quot;cs&quot;&gt;
            &lt;![CDATA[
       foreach(var item in Items)
       {
         string fileName = item.GetMetadata(&quot;FullPath&quot;);
         string find = item.GetMetadata(&quot;Find&quot;);
         string replaceWith = item.GetMetadata(&quot;ReplaceWith&quot;);
         string optionsValue = item.GetMetadata(&quot;Options&quot;) ?? &quot;&quot;;

         var options = string.IsNullOrWhiteSpace(optionsValue) ?
             RegexOptions.None : (RegexOptions)Enum.Parse(typeof(RegexOptions), optionsValue.Replace('|', ','));

         if(!File.Exists(fileName))
         {
           Log.LogError(&quot;Could not find file: {0}&quot;, fileName);
           return false;
         }
         string content = File.ReadAllText(fileName);
         File.WriteAllText(
           fileName,
           Regex.Replace(
             content,
             find,
             replaceWith,
             options
           )
         );
       }
     ]]&gt;
        &lt;/Code&gt;
    &lt;/Task&gt;
&lt;/UsingTask&gt;</pre>
<p>&#160;</p>
<p><strong>Update</strong>: As noted by Emperor, I simplified the code for parsing the enum from using Aggregate to a simple string replace of | with a comma, which is readily supported by Enum.Parse <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none" alt="Smile" src="http://blogs.clariusconsulting.net/kzu/files/2012/12/wlEmoticon-smile.png" /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=AbSYSDpbDMM:GVc3QKn6nZc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=AbSYSDpbDMM:GVc3QKn6nZc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=AbSYSDpbDMM:GVc3QKn6nZc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=AbSYSDpbDMM:GVc3QKn6nZc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/AbSYSDpbDMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/how-to-perform-regular-expression-based-replacements-on-files-with-msbuild/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/how-to-perform-regular-expression-based-replacements-on-files-with-msbuild/</feedburner:origLink></item>
		<item>
		<title>How to access the raw markdown source for a github wiki page</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/k4Ii_fTl79s/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/how-to-access-the-raw-markdown-source-for-a-github-wiki-page/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 04:44:49 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/how-to-access-the-raw-markdown-source-for-a-github-wiki-page/</guid>
		<description>This is not entirely obvious (at least it wasn’t for me), but since Github wikis are actually backed by a proper Git repo, I figured it should be possible to access the raw markdown for a page by using Github’s https://raw.github.com/ style URLs. After some minor trial/error, it turns out to be very predictable (as [...]</description>
			<content:encoded><![CDATA[<p>This is not entirely obvious (at least it wasn’t for me), but since Github wikis are actually backed by a <a href="https://github.com/blog/699-making-github-more-open-git-backed-wikis" target="_blank">proper Git repo</a>, I figured it should be possible to access the raw markdown for a page by using Github’s <a href="https://raw.github.com/">https://raw.github.com/</a> style URLs.</p>
<p>After some minor trial/error, it turns out to be very predictable (as many things in github):</p>
<p>https://raw.github.com/wiki/[user]/[project]/[page].md</p>
<p>Just replace the square brackets&#8217; stuff with your values and that’s it. I think I’ll be trying this out with a wiki page as a Release Notes landing page, which I just pull in raw format on a build script and replace the Nuget &lt;releaseNotes&gt; node with its content…</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=k4Ii_fTl79s:ISSgXEfmBG0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=k4Ii_fTl79s:ISSgXEfmBG0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=k4Ii_fTl79s:ISSgXEfmBG0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=k4Ii_fTl79s:ISSgXEfmBG0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/k4Ii_fTl79s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/how-to-access-the-raw-markdown-source-for-a-github-wiki-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/how-to-access-the-raw-markdown-source-for-a-github-wiki-page/</feedburner:origLink></item>
		<item>
		<title>Documenting user interfaces in a mouse-less touch UI</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/8VI0Wrb_jiE/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/documenting-user-interfaces-in-a-mouse-less-touch-ui/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 22:05:00 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/documenting-user-interfaces-in-a-mouse-less-touch-ui/</guid>
		<description>“Old” apps rely on mouse pointing and tooltips to explain what a given button is for. Maybe there is text associated with the button, but you can only put so much text without wasting useful screen state. More so in a phone or tablet app. I’ve seen a trend in Google apps where they put [...]</description>
			<content:encoded><![CDATA[<p>“Old” apps rely on mouse pointing and tooltips to explain what a given button is for. Maybe there is text associated with the button, but you can only put so much text without wasting useful screen state. More so in a phone or tablet app.</p>
<p>I’ve seen a trend in Google apps where they put an overlay on top of the app the first time it runs, to explain how the various pieces of UI work. I have seen this also on my Nexus phone, but don’t have a screenshot. I don’t recall a way to actually bring that help overlay back again, so that’s maybe some built-in gesture that’s missing. Here’s what it looks like in Gmail, the first time you use the new compose layout:</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/gmailhelp.png"><img title="gmailhelp" style="display: inline" alt="gmailhelp" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/gmailhelp_thumb.png" width="801" height="480" /></a></p>
<p>&#160;</p>
<p>I like the approach very much, and I think it’s something that should become standard part of mobile OS, and Windows, including a standard way to bring that help up from within any app.</p>
<p>Update 11/22: here&#8217;s another example, now from Netflix Android app:
<p>
<a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/wpid-Screenshot_2012-11-23-21-10-26.png"><img title="NetflixAndroidHelp.png" class="alignnone" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/wpid-Screenshot_2012-11-23-21-10-26.png" /></a></p>
<p>Update 11/25: looks like a tend to me now. This time from YouTube app</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/wpid-Screenshot_2012-11-25-15-37-46.png"><img title="Screenshot_2012-11-25-15-37-46.png" class="alignnone" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/wpid-Screenshot_2012-11-25-15-37-46.png" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=8VI0Wrb_jiE:l_Q_NPlzagU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=8VI0Wrb_jiE:l_Q_NPlzagU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=8VI0Wrb_jiE:l_Q_NPlzagU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=8VI0Wrb_jiE:l_Q_NPlzagU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/8VI0Wrb_jiE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/documenting-user-interfaces-in-a-mouse-less-touch-ui/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/documenting-user-interfaces-in-a-mouse-less-touch-ui/</feedburner:origLink></item>
		<item>
		<title>How to exclude copy local referenced assemblies from a VSIX</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/zjgZkYM-MPs/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/how-to-exclude-copy-local-referenced-assemblies-from-a-vsix/#comments</comments>
		<pubDate>Fri, 09 Nov 2012 17:49:12 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[extensibility]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/how-to-exclude-copy-local-referenced-assemblies-from-a-vsix/</guid>
		<description>When you add library references to project that are not reference assemblies or installed in the GAC, Visual Studio defaults to setting Copy Local to True: If, however, those dependencies are distributed by some other means (i.e. another extension, or are part of VS private assemblies, or whatever) and you want to avoid including them [...]</description>
			<content:encoded><![CDATA[<p>When you add library references to project that are not reference assemblies or installed in the GAC, Visual Studio defaults to setting Copy Local to True:</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/image.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/image_thumb.png" width="281" height="436" /></a></p>
<p>If, however, those dependencies are distributed by some other means (i.e. another extension, or are part of VS private assemblies, or whatever) and you want to avoid including them in your VSIX, you can add the following property to the project file:</p>
<pre class="brush: csharp;">&lt;PropertyGroup&gt;
  ...
  &lt;IncludeCopyLocalReferencesInVSIXContainer&gt;false&lt;/IncludeCopyLocalReferencesInVSIXContainer&gt;</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=zjgZkYM-MPs:bow-3URldY0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=zjgZkYM-MPs:bow-3URldY0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=zjgZkYM-MPs:bow-3URldY0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=zjgZkYM-MPs:bow-3URldY0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/zjgZkYM-MPs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/how-to-exclude-copy-local-referenced-assemblies-from-a-vsix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/how-to-exclude-copy-local-referenced-assemblies-from-a-vsix/</feedburner:origLink></item>
		<item>
		<title>How to change the target VSIX file name</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/shlvtMgXrqA/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/how-to-change-the-target-vsix-file-name/#comments</comments>
		<pubDate>Fri, 09 Nov 2012 14:46:35 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/how-to-change-the-target-vsix-file-name/</guid>
		<description>When creating a VSIX or VS Package extension to VS, the default .vsix file name matches the project assembly name. Usually this is too long. So if you want to change it to be a short name, you have to edit the project file and add the following property: &amp;#60;PropertyGroup&amp;#62; ... &amp;#60;TargetVsixContainerName&amp;#62;MyCoolExtension.vsix&amp;#60;/TargetVsixContainerName&amp;#62; Happy extending</description>
			<content:encoded><![CDATA[<p>When creating a VSIX or VS Package extension to VS, the default .vsix file name matches the project assembly name. Usually this is too long. So if you want to change it to be a short name, you have to edit the project file and add the following property:</p>
<pre class="brush: csharp;">&lt;PropertyGroup&gt;
  ...
  &lt;TargetVsixContainerName&gt;MyCoolExtension.vsix&lt;/TargetVsixContainerName&gt;</pre>
<p>Happy extending</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=shlvtMgXrqA:DHiy9Mv9Ri0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=shlvtMgXrqA:DHiy9Mv9Ri0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=shlvtMgXrqA:DHiy9Mv9Ri0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=shlvtMgXrqA:DHiy9Mv9Ri0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/shlvtMgXrqA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/how-to-change-the-target-vsix-file-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/how-to-change-the-target-vsix-file-name/</feedburner:origLink></item>
		<item>
		<title>Electronics 101 for kids: littleBits review</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/JRq2rL6iziA/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/electronics-101-for-kids-littlebits-review/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 20:21:00 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/electronics-101-for-kids-littlebits-review/</guid>
		<description>I&amp;#8217;m always on the lookout for cool toys that can empower my kids (9, 6 and 2yo) to be creative and break the mold of being just consumers of other&amp;#8217;s ideas. I recently came across littleBits while watching a TED video of their creator. I was immediately hooked. It seemed like the perfect blend of [...]</description>
			<content:encoded><![CDATA[<p>I&#8217;m always on the lookout for cool toys that can empower my kids (9, 6 and 2yo) to be creative and break the mold of being just consumers of other&#8217;s ideas.</p>
<p>I recently came across <a href="http://littlebits.cc/" target="_blank">littleBits</a> while watching a <a href="http://kzu.to/TGaC4u" target="_blank">TED video</a> of their creator. I was immediately hooked. It seemed like the perfect blend of simplicity and self-learning that I was looking to get my kids into electronics. So I went ahead and <a href="http://kzu.to/TGaIJm" target="_blank">purchased the kit from SparkFun</a> and a bunch of standalone parts (&quot;<a href="https://community.littlebits.cc/bits" target="_blank">bits</a>&quot;) from the <a href="http://kzu.to/TGaPVq" target="_blank">site itself</a>. There are also a bunch of videos and pictures on their site to get a better idea of what they are, as well as multitude <a href="http://kzu.to/TGcLNE" target="_blank">YouTube videos</a>.</p>
<p><img src="http://littlebits.cc/wp-content/uploads/2012/09/streetlight.jpg" /></p>
<p>This weekend I gave them to my kids, and coincidentally, we also travelled to my hometown and they got to share them too with their cousins.</p>
<p>Man, what a blast it was! I decided to approach this &quot;toy&quot; just like one of the iPod/iPad games I buy for them: &quot;How it&#8217;s used? I&#8217;ve no idea! I just heard it was great, you go figure it out!&quot;. And figure it out they did.</p>
<p><img src="http://needplease.com/wp-content/uploads/2012/05/Little-Bits-Electronic-Building-Blocks.jpg" /></p>
<p>They spent the entire weekend trying out different combinations, together on a table, 3 to 5 kids between 6 and 12 alternating, collaborating and sharing their discoveries of what pieces worked with others, speculating why, and so on. I provided some explanations when asked, but it was very much self-directed learning. I was mostly giving them names for the things that they already knew how they worked.</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0028.jpg"><img title="IMG_0028" style="display: inline" alt="IMG_0028" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0028_thumb.jpg" width="732" height="428" /></a></p>
<p>I strongly recommend watching the short <a href="http://kzu.to/TGaC4u">TED presentation by littleBits creator</a>. The basic idea was to come up with a Lego-style set of building blocks to learn how electronics work. The greatest thing about this approach is that it requires no soldering whatsoever: you just snap together the little blocks and magnets do the work of ensuring you don&#8217;t connect them in the wrong direction. This allows for immediately feedback on the functioning of the circuits and their combinations, unlike the soldering-based kits. It&#8217;s also much cleaner than the breakout board-based ones. No programming is required, although its creator hinted at a programmable module down the road, which seems to me like the logical next step once you master the basic hardware based logic gates.</p>
<p>You can buy the modules individually or in a kit. The kit is very small to be of use for such a large group, but it may be ok for a single kid. I decided to complement the kit with additional sensors and logic modules.</p>
<p>Since I knew I wanted a group of 3 or 4 kids to be able to play together (I&#8217;m planning on selling the idea to buy these toys to my kids&#8217; school), the first thing was to decide on the power, to enable multiple ongoing experiments at a time. Initially I thought the <a href="https://community.littlebits.cc/bits/coin-battery" target="_blank">rechargeable flat watch-style battery</a> module would be the most useful.</p>
<p><img src="http://market.littlebits.cc/assets/images/coincell_web.jpg" width="240" height="160" /></p>
<p>It turned out to have far too little power for a lengthy playing session. They were exhausted in about 30&#8242; I&#8217;d say. They also cannot power the more energy-savvy motors and fans, so kids were quickly complaining about why they didn&#8217;t work. The <a href="http://market.littlebits.cc/littleBits-Battery-Cable_p_41.html" target="_blank">9v battery module</a> turned out to be much better, but the battery was not rechargeable and the recharging cycle for one also wouldn&#8217;t be quick enough for them:</p>
<p><img src="http://market.littlebits.cc/assets/images/battery_adapter.jpg" width="240" height="180" /></p>
<p>The best one was the <a href="https://community.littlebits.cc/bits/usb-power" target="_blank">micro-USB module</a>, which I just plugged to the car power while traveling, and to a regular phone charger while at home. </p>
<p><img src="https://littlebits-production.s3.amazonaws.com/uploads/bit/image/30/usbpower_smallforweb.jpg" width="240" height="180" /></p>
<p>I think it will be the most used form of energy for this, since they usually kept the modules running for a long time while trying other alternatives before plugging them in. To cut the cord when needed, it was also very useful to have the <a href="http://us.sanyo.com/eneloop-mobile-booster/eneloop-Mobile-Booster-KBC-L2" target="_blank">Sanyo recharging battery</a> which was used also with the same micro-USB module:</p>
<p><img src="http://us.sanyo.com/Dynamic/ImageManager/eneloop/KBC-L2/3Angles.grey.jpg" width="240" height="104" /></p>
<p>In order to draw power from a single module to multiple paths (one for each kid or group), I used a fork combined with prolonging cable modules:</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0095.jpg"><img title="IMG_0095" style="display: inline" alt="IMG_0095" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0095_thumb.jpg" width="640" height="331" /></a></p>
<p>This battery did have enough juice for all 3-4 branches of circuits, each containing 3-5 LEDs and a one or two motors and fans, and it worked for hours.</p>
<p>They had lots of fun trying to figure out how the logic modules worked, and which combinations “worked”. </p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0108.jpg"><img title="IMG_0108" style="display: inline" alt="IMG_0108" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0108_thumb.jpg" width="640" height="480" /></a></p>
<p>It was very collaborative as they built fragments of circuits, tested them separately and they tried to plug them all together and see if everything would still “light up”.</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0129.jpg"><img title="IMG_0129" style="display: inline" alt="IMG_0129" src="http://blogs.clariusconsulting.net/kzu/files/2012/11/IMG_0129_thumb.jpg" width="640" height="480" /></a></p>
<p>By far the most successful modules were:</p>
<ul>
<li><a href="https://community.littlebits.cc/bits/led" target="_blank">LED</a> (green) </li>
<li><a href="https://community.littlebits.cc/bits/rgb-led" target="_blank">RGB LED</a>: you can vary the color component with a plastic screwdriver that comes with each of these modules </li>
<li><a href="https://community.littlebits.cc/bits/pulse" target="_blank">Pulse</a>: this was a favorite, not sure why <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </li>
<li><a href="https://community.littlebits.cc/bits/bargraph" target="_blank">Bargraph</a>: an analog component that turns on more LEDs the more energy that passes through it </li>
<li><a href="https://community.littlebits.cc/bits/pressure-sensor" target="_blank">Pressure sensor</a>: used to drive the bar, but also as a switch </li>
<li><a href="https://community.littlebits.cc/bits/fan" target="_blank">Fans</a>, <a href="https://community.littlebits.cc/bits/dc-motor" target="_blank">motors</a> and <a href="https://community.littlebits.cc/bits/vibration-motor" target="_blank">vibration motor</a> modules </li>
<li><a href="https://community.littlebits.cc/bits/button" target="_blank">Button</a> or <a href="https://community.littlebits.cc/bits/toggle-switch" target="_blank">toggle switch</a> </li>
<li><a href="https://community.littlebits.cc/bits/roller-switch" target="_blank">Roller switch</a> </li>
</ul>
<p>We couldn&#8217;t find a good use for the <a href="https://community.littlebits.cc/bits/timeout" target="_blank">Timeout</a>, and we couldn&#8217;t figure out the difference between the <a href="https://community.littlebits.cc/bits/fork" target="_blank">Fork</a> and the <a href="https://community.littlebits.cc/bits/branch" target="_blank">Branch</a> (aside from their shape). From the logic gates, <a href="https://community.littlebits.cc/bits/inverter" target="_blank">inverter</a> and <a href="https://community.littlebits.cc/bits/double-or" target="_blank">OR</a> where most used, and you probably don&#8217;t need more than one of each kind, maybe 2 or 3 inverters. Fork was very useful to allow for more complicated designs spanning multiple modules, joined with OR or AND gates.</p>
<p>All in all, it was one of the best purchases I made for a toy. It&#8217;s still quite expensive, and I certainly hope to see its price come down to around $5 per module max, considering you need about 20 per kid to make it interesting. I believe they have a good chance of <a href="http://kzu.to/TGcj1P">becoming the next Legos of electronics</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=JRq2rL6iziA:p8OAoFhJPP0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=JRq2rL6iziA:p8OAoFhJPP0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=JRq2rL6iziA:p8OAoFhJPP0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=JRq2rL6iziA:p8OAoFhJPP0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/JRq2rL6iziA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/electronics-101-for-kids-littlebits-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/electronics-101-for-kids-littlebits-review/</feedburner:origLink></item>
		<item>
		<title>Static GitHub powered blog engine</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/tCgeaiTpKQc/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/static-github-powered-blog-engine/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 01:21:34 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/static-github-powered-blog-engine/</guid>
		<description>Blog engines were the new &amp;#34;cool thing to write&amp;#34; after the fever of writing a new DI framework was over. It was kinda like the new &amp;#34;hello world++&amp;#34; example. Almost every single engine uses a database of some sort to keep posts and comments. Almost every one is not leveraging the web as a consequence [...]</description>
			<content:encoded><![CDATA[<p>Blog engines were the new &quot;cool thing to write&quot; after the fever of writing a new DI framework was over. It was kinda like the new &quot;hello world++&quot; example. Almost every single engine uses a database of some sort to keep posts and comments. Almost every one is not leveraging the web as a consequence <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I was intrigued by the possibilities that a flexible and general-purpose hosting solution like Github could offer for a static blog engine: basically keeping plain markdown/HTML/razor/WLW/whatever files that through a publish/build time process generate static files that pass for a &quot;blog engine&quot;. GitHub even supports custom domain names, so why not?</p>
<p>Such an &quot;engine&quot; would have a number of benefits:</p>
<ul>
<li>Plain CSS styling </li>
<li>Arbitrary JavaScript </li>
<li>Leverage the web infrastructure (caching, CDNs, etc.) </li>
<li>Easy to restyle: just change templates, and rebuild </li>
<li>Hosting anywhere, including plain Amazon S3 </li>
</ul>
<p>Comments and trackbacks are trickier, but the &quot;app server-less&quot; plus is just too compelling.</p>
<p>I even found a couple projects that actually do this, using Ruby or Phython for the build/transform on publish. Just search for &quot;static blog engine&quot;.</p>
<p>But I found that they didn&#8217;t leverage GitHub&#8217;s native capabilities. What if comments on the blog were just GitHub comments on the entry source itself? That would mean that as the blog admin, I could get to moderate and reply using standard github interface, or even answer by email.</p>
<p>Anyone could also just branch my blog and send pull requests whenever my samples or content could use some improvement. It could even be the basis for some wiki-style collaborative editing of sorts, with the built in versioning and diff viewer that works so great for code.</p>
<p>Maybe this is a service a third party site could provide automatically: using a GitHub service hook it could automatically pull changes, build static site and check back in the updates. And when users want to comment, automatically ask in a nice UI for GitHub credentials (maybe even registering you automatically if you want to?). Maybe even allow &quot;anonymous&quot; comments by using a well-known GitHub account just for this purpose? And it could also take care of creating trackbacks as comments too&#8230;</p>
<p>The cool thing about such a service, is that it could evolve to support multiple input formats and template languages for the static site building phase, and maybe even provide migration tools if you want to switch formats.</p>
<p>What else does a &quot;proper&quot; blog engine buy you that would render this idea useless? Is it just stupid or actually makes sense?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=tCgeaiTpKQc:HxYXxfgVsZ0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=tCgeaiTpKQc:HxYXxfgVsZ0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=tCgeaiTpKQc:HxYXxfgVsZ0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=tCgeaiTpKQc:HxYXxfgVsZ0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/tCgeaiTpKQc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/static-github-powered-blog-engine/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/static-github-powered-blog-engine/</feedburner:origLink></item>
		<item>
		<title>Visual Studio 2012 Developer Command Prompt Here</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/btq93OFfwlE/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/visual-studio-2012-developer-command-prompt-here/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 02:26:46 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/visual-studio-2012-developer-command-prompt-here/</guid>
		<description>This is a very handy utility that I’ve used consistently for years now. I’ve been updating it since VS 2003 days. Originally from Scott’s blog, IIRC. You can just download the vs2012cmdhere.inf, righ-click the downloaded .inf and select Install. This will add the following context menu: &amp;#160; And the command can even be uninstalled from [...]</description>
			<content:encoded><![CDATA[<p>This is a very handy utility that I’ve used consistently for years now. I’ve been updating it since VS 2003 days. Originally from <a href="http://kzu.to/TjR5aK">Scott’s blog</a>, IIRC.</p>
<p>You can just download the <a href="http://kzu.to/vs2012cmdhere">vs2012cmdhere.inf</a>, righ-click the downloaded .inf and select Install. This will add the following context menu:</p>
<p><a href="http://blogs.clariusconsulting.net/kzu/files/2012/09/image.png"><img title="image" style="margin: 0px; display: inline" alt="image" src="http://blogs.clariusconsulting.net/kzu/files/2012/09/image_thumb.png" width="275" height="186" /></a></p>
<p>&#160;</p>
<p>And the command can even be uninstalled from Add/Remove programs.</p>
<p>&#160;</p>
<p>Enjoy!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=btq93OFfwlE:QmttPcJsZrY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=btq93OFfwlE:QmttPcJsZrY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=btq93OFfwlE:QmttPcJsZrY:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=btq93OFfwlE:QmttPcJsZrY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/btq93OFfwlE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/visual-studio-2012-developer-command-prompt-here/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/visual-studio-2012-developer-command-prompt-here/</feedburner:origLink></item>
		<item>
		<title>Tracer: the unified, dead-simple API for all logging frameworks in existence</title>
		<link>http://feedproxy.google.com/~r/DanielCazzulino/~3/oWJnchu9WIw/</link>
		<comments>http://blogs.clariusconsulting.net/kzu/tracer-the-unified-dead-simple-api-for-all-logging-frameworks-in-existence/#comments</comments>
		<pubDate>Wed, 08 Aug 2012 03:42:15 +0000</pubDate>
		<dc:creator>kzu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.clariusconsulting.net/kzu/tracer-the-unified-dead-simple-api-for-all-logging-frameworks-in-existence/</guid>
		<description>We all need some kind of tracing or logging in our apps. We’d also like third party components to provide useful logging too. And if it integrates with whatever logging framework we happen to use, even better! There’s a challenge though: we’d all have to agree on using a certain logging framework up-front. Or we [...]</description>
			<content:encoded><![CDATA[<p>We all need some kind of tracing or logging in our apps. We’d also like third party components to provide useful logging too. And if it integrates with whatever logging framework we happen to use, even better!</p>
<p>There’s a challenge though: we’d all have to agree on using a certain logging framework up-front. Or we could all agree on a common API (much like <a href="http://kzu.to/MrebVE" target="_blank">Common Service Locator</a> did for picking DI containers) and provide specific adapters. The former is impossible, so it’s got to be the latter <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There are some efforts in the area, most notably <a href="http://kzu.to/MreRds" target="_blank">Common.Logging</a> which has quite a following according to the <a href="http://nuget.org/" target="_blank">nuget</a> download numbers. So I set to investigate how thin the abstraction was: 28 public types, yuck. Doesn’t look much like a thin wrapper over specific frameworks <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . One problem I noticed right away is that it already provides a bunch of abstractions to write logger implementations, reading configuration, etc., which I believe should be totally out of scope of such an abstraction.</p>
<p>The abstraction should be about the consuming side, not the bootstrapping/authoring side. Just like common service locator doesn’t dictate how you configure a container, how to initialize or extend it in any way, neither should a logging abstraction: just the API for consumers, nothing more.</p>
<p>I looked across log4net, NLog and EntLib logging, and at the core, they are about just two operations: log a message (with a formatted overload), or log an exception alongside a message (also with a formatted overload). Then they all provide a gazillion overloads in their main logger interface/class for all the permutations of those four by each of the supported severity (or log type): Critical, Error, Warning, Information and Verbose (also called Debug).</p>
<p>That’s IT. There’s nothing more an abstraction for consuming code needs. Here’s all we need:</p>
<pre class="brush: csharp;">interface ITracer
{
    void Trace(TraceEventType type, object message);
    void Trace(TraceEventType type, string format, params object[] args);
    void Trace(TraceEventType type, Exception exception, object message);
    void Trace(TraceEventType type, Exception exception, string format, params object[] args);
}</pre>
<p>The BCL already has <a href="http://kzu.to/NbgvnD" target="_blank">TraceEventType</a> which can be used to determine the type of entry to create, although some logging library might not support all of the values in the enumeration (although I would love it if they do, because the activity tracing ones are really really useful if leveraged properly, but that’s another post <img src='http://blogs.clariusconsulting.net/kzu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Of course some usability overloads to do a direct tracer.Warn(….) are nice, but those can be easily placed in a static class as extension methods, allowing us to keep the main interface clean:</p>
<pre class="brush: csharp;">public static void Error(this ITracer tracer, object message)
{
    tracer.Trace(TraceEventType.Error, message);
}</pre>
<p>Note that the message parameter is an object. This allows each implementation to support their own fancy formatting/rendering of arbitrary objects. </p>
<p>We’ll also need a way to retrieve tracers for use in our app, and that’s another very small piece we need for the abstraction to work:</p>
<pre class="brush: csharp;">static class Tracer
{
    public static ITracer Get(string name) { ... }    // Convenience...    public static ITracer Get&lt;T&gt;() { ... }
    public static ITracer Get(Type type) { ... } }</pre>
<p>This static class would need a static Initialize method where you’d pass the implementation that retrieves the actual tracer implementations for each specific logging framework. The bridge there could be something like an ITracerManager, with the same API as the static facade:</p>
<pre class="brush: csharp;">interface ITracerManager
{
    ITracer Get(string name);
}</pre>
<p>That’s all. A general-purpose logging abstraction does not need anything more than this. </p>
<p>Now, given that this is SUCH a small abstraction, does it justify being a full-blown assembly? I don’t think so, and in the spirit of <a href="http://kzu.to/ltBifS" target="_blank">NETFx</a>, I’ve made it a source-only nuget package. So you can, right now, go and add <a href="http://kzu.to/PEgjcT" target="_blank">this package</a> to your own “Common” project, or “Core.Interfaces” that is shared by all of your app components:</p>
<pre class="brush: csharp;">Install-Package Tracer</pre>
<p>Next, just start using it by retrieving (ideally statically) a tracer for use in your components:</p>
<pre class="brush: csharp;">public class MyComponent
{
    private static readonly ITracer tracer = Tracer.Get&lt;MyComponent&gt;();

    public void DoSomething()
    {
        tracer.Info(&quot;Doing something...&quot;);
        ...
    }
}</pre>
<p>Then your bootstrapper/application startup code, can take a dependency on a specific implementation of the tracer, and initialize it appropriately. Choose your option of <a href="http://kzu.to/PEgl4A" target="_blank">log4net</a>, <a href="http://kzu.to/PEgncC" target="_blank">NLog</a> or <a href="http://kzu.to/PEgoxc" target="_blank">Enterprise Library</a>:</p>
<pre class="brush: csharp;">Install-Package Tracer.log4net
Install-Package Tracer.NLog
Install-Package Tracer.EntLib</pre>
<p>and perform&#160; the one-liner initialization:</p>
<pre class="brush: csharp;">Tracer.Initialize(new TracerManager());</pre>
<p>Done!</p>
<p>&#160;</p>
<p>The source is BSD-licensed, so you can do whatever you want with it. </p>
<p>&#160;</p>
<p>Happy tracing/logging!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=oWJnchu9WIw:bZC2tfNv15U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=oWJnchu9WIw:bZC2tfNv15U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?i=oWJnchu9WIw:bZC2tfNv15U:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/DanielCazzulino?a=oWJnchu9WIw:bZC2tfNv15U:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/DanielCazzulino?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanielCazzulino/~4/oWJnchu9WIw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.clariusconsulting.net/kzu/tracer-the-unified-dead-simple-api-for-all-logging-frameworks-in-existence/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://blogs.clariusconsulting.net/kzu/tracer-the-unified-dead-simple-api-for-all-logging-frameworks-in-existence/</feedburner:origLink></item>
	</channel>
</rss>
