<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
    <channel>
        <title>Mahendra Mavani's # Corner</title>
        <link>http://mahendramavani.com/blog/Default.aspx</link>
        <description>My experiments with software development</description>
        <language>en-US</language>
        <copyright>Mahendra Mavani</copyright>
        <managingEditor>mahendra.mavani@gmail.com</managingEditor>
        <generator>Subtext Version 2.1.0.5</generator>
        <image>
            <title>Mahendra Mavani's # Corner</title>
            <url>http://mahendramavani.com/blog/images/RSS2Image.gif</url>
            <link>http://mahendramavani.com/blog/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/MahendraMavani" type="application/rss+xml" /><item>
            <title>Database change management just made easy with Tarantino</title>
            <link>http://feedproxy.google.com/~r/MahendraMavani/~3/uvqusCiFMiQ/database-change-management-just-made-easy-with-tarantino.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;One of the challenge we face while developing software is database change management. We, at Headspring, have developed NAnt task to facilitate this process and is part of &lt;a href="http://code.google.com/p/tarantino/" target="_blank"&gt;tarantino&lt;/a&gt; library, an open source project owned and managed by &lt;a href="http://khurwitz.blogspot.com/" target="_blank"&gt;Kevin Hurwitz&lt;/a&gt;.  &lt;/p&gt;  &lt;p&gt;I do not intent to repeat same documentation as already been posted by project team. If you want to know about it’s nut and bolt then go &lt;a href="http://code.google.com/p/tarantino/wiki/DatabaseChangeManagement" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Recently we faced little different problem related to database change management. In an attempt to preserve initial set of data that we and product owner uses to test user stories, we wanted to switch from dropping database every time and regenerating it using nhibernate export schema to update only mode.&lt;/p&gt;  &lt;p&gt;Technically what that mean is we need to change our build process to remove “dropDatabase” and “CreateDatabase” task and instead use”Update” database. However challenge was to use the same script for managing test instance of database as well. This is the db against which all our integration tests run. We wanted all schema changes to apply on this db but no data. I.e. only create/alter/drop script and no insert or update scripts.&lt;/p&gt;  &lt;p&gt;In an attempt to solve the issue in” simplest possible things that work” manner, I decided to use convention over configuration option and added one more attribute to the “manageSqlDatabase” task in tarantino. Originally it looked like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;target name="manageSqlDatabase"&amp;gt;     &lt;br /&gt;        &amp;lt;tstamp&amp;gt;&amp;lt;/tstamp&amp;gt;      &lt;br /&gt;        &amp;lt;manageSqlDatabase      &lt;br /&gt;            action="${action}"      &lt;br /&gt;            scriptDirectory="${database.script.directory}"            &lt;br /&gt;            database="${database.catalog}"      &lt;br /&gt;            server="${database.server}"      &lt;br /&gt;            integratedAuthentication="${database.integrated}"            &lt;br /&gt;            username="${database.username}"      &lt;br /&gt;            password="${database.password}"      &lt;br /&gt;        /&amp;gt;      &lt;br /&gt;        &amp;lt;if test="${action != 'Drop'}"&amp;gt;      &lt;br /&gt;            &amp;lt;echo message="Current Database Version: ${usdDatabaseVersion}" /&amp;gt;      &lt;br /&gt;        &amp;lt;/if&amp;gt;      &lt;br /&gt;    &amp;lt;/target&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The newer version looks like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;target name="manageSqlDatabase"&amp;gt;     &lt;br /&gt;        &amp;lt;tstamp&amp;gt;&amp;lt;/tstamp&amp;gt;      &lt;br /&gt;        &amp;lt;manageSqlDatabase      &lt;br /&gt;            action="${action}"      &lt;br /&gt;            scriptDirectory="${database.script.directory}"            &lt;br /&gt;            database="${database.catalog}"      &lt;br /&gt;            server="${database.server}"      &lt;br /&gt;            integratedAuthentication="${database.integrated}"            &lt;br /&gt;            username="${database.username}"      &lt;br /&gt;            password="${database.password}"      &lt;br /&gt;            skipFileNameContaining="${database.skipFileNameContaining}"      &lt;br /&gt;        /&amp;gt;      &lt;br /&gt;        &amp;lt;if test="${action != 'Drop'}"&amp;gt;      &lt;br /&gt;            &amp;lt;echo message="Current Database Version: ${usdDatabaseVersion}" /&amp;gt;      &lt;br /&gt;        &amp;lt;/if&amp;gt;      &lt;br /&gt;    &amp;lt;/target&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;As you can see, the difference is &lt;strong&gt;skipFileNameContaining&lt;/strong&gt; attribute. By specifying value to this attribute, you can effectively skip execution of those sql file under Update/ExistingSchema folder for which file name contains the specified word (in case sensitive manner) . &lt;/p&gt;  &lt;p&gt;In our case we adopted convention that &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;We will never put schema change and data script in same sql file &lt;/li&gt;    &lt;li&gt;We will include work _Data_ as part of file name when doing data insert or update&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This change is available in tarantino from revision&lt;/p&gt;  &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:422fa2fc-2c02-4df6-8e39-628a4c66f9f0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/tarantino+db-change-mgnt+nant" rel="tag"&gt;tarantino db-change-mgnt nant&lt;/a&gt;&lt;/div&gt;  &lt;p&gt; 142 onwards from trunk&lt;/p&gt;  &lt;p&gt;Develop smartly :)&lt;/p&gt;&lt;img src="http://mahendramavani.com/blog/aggbug/5.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mahendra Mavani</dc:creator>
            <guid isPermaLink="false">http://mahendramavani.com/blog/archive/2009/07/09/database-change-management-just-made-easy-with-tarantino.aspx</guid>
            <pubDate>Fri, 10 Jul 2009 01:52:50 GMT</pubDate>
            <wfw:comment>http://mahendramavani.com/blog/comments/5.aspx</wfw:comment>
            <comments>http://mahendramavani.com/blog/archive/2009/07/09/database-change-management-just-made-easy-with-tarantino.aspx#feedback</comments>
            <wfw:commentRss>http://mahendramavani.com/blog/comments/commentRss/5.aspx</wfw:commentRss>
            <trackback:ping>http://mahendramavani.com/blog/services/trackbacks/5.aspx</trackback:ping>
        <feedburner:origLink>http://mahendramavani.com/blog/archive/2009/07/09/database-change-management-just-made-easy-with-tarantino.aspx</feedburner:origLink></item>
        <item>
            <title>Presenting at AustinCodeCamp 2009</title>
            <category>CodeCamp</category>
            <category>Presentation</category>
            <link>http://feedproxy.google.com/~r/MahendraMavani/~3/uMo7K1QQ6rg/presenting-at-austincodecamp-2009.aspx</link>
            <description>&lt;p&gt;Tomorrow I will be presenting at AustinCodeCamp 2009. Topic is “Apply Refactoring Techniques and prune your legacy code”.&lt;/p&gt;  &lt;p&gt;Here is the Abstract:&lt;/p&gt;  &lt;p&gt;This is session, full of code demo to demonstrate refactoring techniques mostly influenced by Michael Feathers in his book, “&lt;em&gt;Working Effectively with Legacy Code”. I would prefer to keep the session lively by mean of audience interaction while demonstrating how to approach this refactoring for practical scenarios. Session will start with discussion on the topic of dependency and will go towards the direction of how to break those dependencies and introduce testing harness for any legacy code. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I have uploaded sample app and presentation in code camp repository and you can get both from &lt;a href="http://code.google.com/p/austincodecamp09/source/checkout" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you don’t want to click the line here is direct instruction to checkout the code and presentation:&lt;/p&gt;  &lt;p&gt;//Use this command to anonymously check out the latest project source code:&lt;/p&gt;  &lt;p&gt;&lt;tt&gt;# Non-members may check out a read-only working copy anonymously over HTTP.&lt;/tt&gt;&lt;/p&gt;  &lt;p&gt;&lt;tt&gt;svn checkout &lt;strong&gt;&lt;em&gt;http&lt;/em&gt;&lt;/strong&gt;://austincodecamp09.googlecode.com/svn/trunk/ austincodecamp09-read-only&lt;/tt&gt;&lt;/p&gt;  &lt;p&gt;&lt;tt /&gt;&lt;/p&gt;  &lt;p&gt;&lt;tt&gt;See you all there&lt;/tt&gt;&lt;/p&gt;&lt;img src="http://mahendramavani.com/blog/aggbug/4.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mahendra Mavani</dc:creator>
            <guid isPermaLink="false">http://mahendramavani.com/blog/archive/2009/05/30/presenting-at-austincodecamp-2009.aspx</guid>
            <pubDate>Sat, 30 May 2009 05:08:14 GMT</pubDate>
            <wfw:comment>http://mahendramavani.com/blog/comments/4.aspx</wfw:comment>
            <comments>http://mahendramavani.com/blog/archive/2009/05/30/presenting-at-austincodecamp-2009.aspx#feedback</comments>
            <wfw:commentRss>http://mahendramavani.com/blog/comments/commentRss/4.aspx</wfw:commentRss>
            <trackback:ping>http://mahendramavani.com/blog/services/trackbacks/4.aspx</trackback:ping>
        <feedburner:origLink>http://mahendramavani.com/blog/archive/2009/05/30/presenting-at-austincodecamp-2009.aspx</feedburner:origLink></item>
        <item>
            <title>Announcing my Official Blog</title>
            <category>Anouncement</category>
            <link>http://feedproxy.google.com/~r/MahendraMavani/~3/lXghjqf6fn4/announcing-my-official-blog.aspx</link>
            <description>&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Thanks to the setup guidance I received from my buddy and Mentor, &lt;a href="http://www.lostechies.com/blogs/hex/" target="_blank"&gt;Eric Hexter&lt;/a&gt;, my blog is up and running here.  &lt;/p&gt;
&lt;p&gt;My earlier feed at &lt;a href="http://feeds2.feedburner.com/MahendraMavani"&gt;http://feeds2.feedburner.com/MahendraMavani&lt;/a&gt; has been redirected to point to this new blog. Alternatively you can also subscribe to direct feed at &lt;a href="http://www.mahendramavani.com/blog/rss.aspx"&gt;http://www.mahendramavani.com/blog/rss.aspx&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Other part of the Website is still in planning phase so I don’t know when it would be ready but I am hoping for sooner than later.&lt;/p&gt;
&lt;p&gt;With the site and blog running smoothly, now my personal goal is to beat &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/default.aspx" target="_blank"&gt;Jimmy Bogard&lt;/a&gt;, very talented buddy of mine. (I am shooting for high, you see:) ) &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I am planning to record my learning experiences with exciting new tools and technology/methodology. Part of that should cover usage of productivity doubling tools like R#, OSS projects like &lt;a href="www.nhibernate.org/" target="_blank"&gt;nhibernate&lt;/a&gt;, &lt;a href="http://code.google.com/p/tarantino/" target="_blank"&gt;tarrantino&lt;/a&gt;, &lt;a href="http://www.codeplex.com/AutoMapper" target="_blank"&gt;AutoMapper&lt;/a&gt;, &lt;a href="http://code.google.com/p/naak/" target="_blank"&gt;NAAK&lt;/a&gt; and in general topics on design pattern, object oriented programming, agile/scrum/XP methodology.&lt;/p&gt;
&lt;p&gt;All in all, stay tuned…&lt;/p&gt;
&lt;p&gt;-Favor Smart work over hard work&lt;/p&gt;&lt;img src="http://mahendramavani.com/blog/aggbug/3.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Mahendra Mavani</dc:creator>
            <guid isPermaLink="false">http://mahendramavani.com/blog/archive/2009/04/23/announcing-my-official-blog.aspx</guid>
            <pubDate>Thu, 23 Apr 2009 15:31:00 GMT</pubDate>
            <wfw:comment>http://mahendramavani.com/blog/comments/3.aspx</wfw:comment>
            <comments>http://mahendramavani.com/blog/archive/2009/04/23/announcing-my-official-blog.aspx#feedback</comments>
            <wfw:commentRss>http://mahendramavani.com/blog/comments/commentRss/3.aspx</wfw:commentRss>
            <trackback:ping>http://mahendramavani.com/blog/services/trackbacks/3.aspx</trackback:ping>
        <feedburner:origLink>http://mahendramavani.com/blog/archive/2009/04/23/announcing-my-official-blog.aspx</feedburner:origLink></item>
    </channel>
</rss>
