<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>gyanjadal</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/gyanjadal/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/gyanjadal/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:47:50 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Quick overview of CAP Theorem</title>
      <link>https://docs.microsoft.com/archive/blogs/gyanjadal/quick-overview-of-cap-theorem</link>
      <pubDate>Thu, 05 Mar 2015 23:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Gyan Jadal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gyanjadal/2015/03/05/quick-overview-of-cap-theorem/</guid>
      <description><![CDATA[CAP stands for Consistency, Availability, and Partitioning tolerance. &nbsp;CAP Theory states that...]]></description>
      <content:encoded><![CDATA[<p>CAP stands for Consistency, Availability, and Partitioning tolerance. &nbsp;CAP Theory states that you can only have TWO of the three capabilities in a system that needs to persist state.</p>
<p>Examples of each of the following</p>
<p>CA - Relational databases - The data is persisted using the ACID properties of a transaction thus keeping it consistent. Availability is achieved by storing data on multiple nodes.</p>
<p>AP - NoSQL databases - The data is made available by persisting it on multiple nodes. The nodes are partition tolerant by allowing the clients to access the data on different nodes even if the nodes&nbsp;are not in sync or consistent</p>
<p>CP - A system with a master slave configuration. The data is always consistent across the master and slaves with read-write on master and read on slaves. If master goes offline, then slaves are still available for read but no updates are allowed to the system.</p>
<p>That said, a system should be designed with a balance in mind, giving priority to the more relevant two capabilities and not fully leaving out the third.</p>]]></content:encoded>
    </item>
    <item>
      <title>Quick steps for Creating a Pull request for code review in VSO Git</title>
      <link>https://docs.microsoft.com/archive/blogs/gyanjadal/quick-steps-for-creating-a-pull-request-for-code-review-in-vso-git</link>
      <pubDate>Mon, 05 Jan 2015 21:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Gyan Jadal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gyanjadal/2015/01/05/quick-steps-for-creating-a-pull-request-for-code-review-in-vso-git/</guid>
      <description><![CDATA[Getting code reviewed in VSO Git is considerably different that VSTF where it was as simple as right...]]></description>
      <content:encoded><![CDATA[<p style="text-align: justify;">Getting code reviewed in VSO Git is considerably different that VSTF where it was as simple as right click on your changes and request for review. There is currently no option in the Visualstudio to directly send code for review with Git repositories.</p>
<p style="text-align: justify;">Developers new to Git often find this as a stumbling block and have a bit of learning curve. This post will help in getting quickly up to speed without having to dig deep to find the end to end process.</p>
<p style="text-align: justify;">Below are the steps to perform a Git code review. (assumptions: you know how to get to the portal of your git repository)</p>
<ol>
<li>
<p style="text-align: justify;">Create a topic branch from the master and publish the branch.</p>
</li>
<li style="text-align: justify;">
<p>Make your necessary code changes in your topic branch</p>
</li>
<li style="text-align: justify;">
<p>Commit your changes to your topic branch (this could be done multiple times)</p>
</li>
<li style="text-align: justify;">
<p>When you are ready to get your work reviewed, from the web portal, create a pull request</p>
</li>
<li style="text-align: justify;">
<p>Select your topic branch as the source and the branch you want to merge into as the target branch.</p>
</li>
<li style="text-align: justify;">
<p>Specify the title, description, and assign reviewers.&nbsp; (Reviewers can be a team name), after submitting for review, click on email on the left hand menu to notify the reviewers).</p>
</li>
<li style="text-align: justify;">
<p>Reviewers make comments on specific lines of code.&nbsp;To target&nbsp;a specific block of code, highlight it before inserting the comment.</p>
</li>
<li style="text-align: justify;">
<p>To act on the feedback,the requestor revises the code on their dev machine and pushes the changes so that reviewers can see them</p>
</li>
<li style="text-align: justify;">
<p>Each reviewer approves or rejects the pull request.</p>
</li>
<li style="text-align: justify;">
<p>When the requestor and the reviewers are satisfied that the pull request is ready to merge, perform the merge from the portal.</p>
</li>
<li style="text-align: justify;">
<p>After the merge, the&nbsp;master branch is updated with the changes from the topic branch</p>
</li>
<li style="text-align: justify;">
<p>You can reuse the topic branch for future requests.</p>
</li>
</ol>
<p style="text-align: justify;">Hopefully this will help you quickly get an overview of the steps involved in a VSO&nbsp;Git code review process.</p>
<p style="text-align: justify;">For full details refer to the blog</p>
<p style="text-align: justify;"><a href="http://blogs.msdn.com/b/visualstudioalm/archive/2014/06/10/git-pull-request-visual-studio-online.aspx">http://blogs.msdn.com/b/visualstudioalm/archive/2014/06/10/git-pull-request-visual-studio-online.aspx</a></p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Difference between Strategy and Bridge Patterns</title>
      <link>https://docs.microsoft.com/archive/blogs/gyanjadal/difference-between-strategy-and-bridge-patterns</link>
      <pubDate>Mon, 05 Jan 2015 11:04:00 GMT</pubDate>
      <dc:creator><![CDATA[Gyan Jadal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/gyanjadal/2015/01/05/difference-between-strategy-and-bridge-patterns/</guid>
      <description><![CDATA[This question has come up umpteen times and has mystified many of us. Why? Because to a developer...]]></description>
      <content:encoded><![CDATA[<p>This question has come up umpteen times and has mystified many of us. Why? Because to a developer looking at the code, the implementations look the same. So where is the difference?</p>
<p>The simple answer is &ldquo;They are similar but different&rdquo;. The implementations are similar but the intentions are different. To give an analogy, a city bus and school bus are both similar vehicles, but they are used for different purposes. One is used to transport people between various parts of the city as a commuter service. The other is used for transporting kids to schools.</p>
<p>Let&rsquo;s start with the definitions of each of these patterns and then look at some practical applications.</p>
<p>Strategy Pattern:</p>
<ul>
<li>
<p>Define a family of algorithms, encapsulate each one, and make them interchangeable.</p>
</li>
<li>
<p>Strategy lets the algorithm vary independently from the clients that use it.</p>
</li>
<li>
<p>Capture the abstraction in an interface, bury implementation details in derived classes</p>
</li>
<li>
<p>A bind once behavioral pattern.</p>
</li>
</ul>
<p>Bridge Pattern:</p>
<ul>
<li>
<p>Decouple an abstraction from its implementation so that the two can vary independently.</p>
</li>
<li>
<p>Publish interface in an inheritance hierarchy, and bury implementation in its own inheritance hierarchy.</p>
</li>
<li>
<p>A structural pattern.</p>
</li>
</ul>
<p>Enough of theory. Let&rsquo;s get to some scenarios and learn when to use each of these patterns.</p>
<p><strong>Strategy Scenario:</strong></p>
<p>As part of my daily exercise routine, I want to choose an appropriate workout strategy for the day before starting my workout.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/54/6153.strategy.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-54/6153.strategy.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/54/6153.strategy.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x300/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-54/6153.strategy.png" alt="" border="0" /></a><br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />An exercise routine consists of a specific workout. Before the workout begins, a workout strategy is chosen by the client. The following code snippet explains the behavior.</p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var routine = new ExcerciseRoutine(new AerobicsStrategy);</em></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; routine.Workout();</em></p>
<p>The algorithm for the specific type of workout is encapsulated from the client who interacts only with the interface of the strategy.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Bridge Scenario:</strong></p>
<p>Let&rsquo;s see if we can apply the same concept of an exercise routine for the Bridge pattern.</p>
<p>As part of my exercise routine, I want to have a weekday exercise routine and a weekend routine. The routine involves running either on a treadmill, park or sidewalk.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/54/5025.bridge.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-54/5025.bridge.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/41/54/5025.bridge.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x300/__key/communityserver-blogs-components-weblogfiles/00-00-01-41-54/5025.bridge.png" alt="" border="0" /></a></p>
&nbsp; &nbsp;
<p>The client sets the Runner type and invokes the workout as below</p>
<p><em>&nbsp;&nbsp;&nbsp; var weekdayRoutine = new WeekdayRoutine();</em></p>
<p><em>&nbsp;&nbsp;&nbsp; weekdayRoutine.Runner = new Treadmill();</em></p>
<p><em>&nbsp;&nbsp;&nbsp; weekdayRoutine.Workout();</em></p>
<p><em>&nbsp;</em></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;//Change the Runner and perform the workout again</em></p>
<p><em>&nbsp;&nbsp;&nbsp; weekdayRoutine.Runner = new Sidewalk();</em></p>
<p><em>&nbsp;&nbsp;&nbsp; weekdayRoutine.Workout();</em></p>
<p><em><br clear="all" /></em>An exercise routine can vary independently of the implementation of the run. For example, I may decide to add a new runner SchoolPlayground without having to change the client. On the other hand, I can add a new routine MondayRoutine without impacting the implementation of the Runner.</p>
<p>Hope this helps understand the difference between a Strategy and a Bridge pattern.</p>
<p><em>&nbsp;</em></p>]]></content:encoded>
    </item>
  </channel>
</rss>