<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.5 (http://www.squarespace.com/) on Fri, 30 Jul 2010 18:13:14 GMT--><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:cc="http://web.resource.org/cc/"><rss:channel rdf:about="http://abdullin.com/wiki/"><rss:title>Wiki</rss:title><rss:link>http://abdullin.com/wiki/</rss:link><rss:description></rss:description><dc:language>en-US</dc:language><dc:date>2010-07-30T18:13:14Z</dc:date><admin:generatorAgent rdf:resource="http://www.squarespace.com/">Squarespace Site Server v5.11.5 (http://www.squarespace.com/)</admin:generatorAgent><rss:items><rdf:Seq><rdf:li rdf:resource="http://abdullin.com/wiki/xmpp-and-jabber.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/explore-mysql-database.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/command-query-responsibility-segregation-cqrs.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/what-is-api.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/what-is-virtual-machine-vm.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/agile-software-development.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/unit-testing.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/version-control-system-vcs.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/test-driven-development-tdd.html"/><rdf:li rdf:resource="http://abdullin.com/wiki/cloud-computing.html"/></rdf:Seq></rss:items></rss:channel><rss:item rdf:about="http://abdullin.com/wiki/xmpp-and-jabber.html"><rss:title>XMPP and Jabber</rss:title><rss:link>http://abdullin.com/wiki/xmpp-and-jabber.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2010-07-25T08:01:06Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>What are XMPP (Extensible Messaging and Presence Protocol) and Jabber?</p>

<blockquote>
  <p>Extensible Messaging and Presence Protocol (XMPP) (<strong>formerly named Jabber</strong>) is an open, XML-based protocol originally aimed at near-real-time, extensible instant messaging (IM) and presence information (e.g., buddy lists), but now expanded into the broader realm of message-oriented middleware.[2]  It was developed by the Jabber open-source community in 1999. Built to be extensible, the protocol has been extended with features such as Voice over Internet Protocol and file transfer signaling.</p>
</blockquote>

<h2>XMPP PROs</h2>

<ul>
<li><strong>Decentralization</strong> - like in email; anyone can run their own XMPP server and there is no central master server.</li>
<li><strong>Open standards</strong> - the Internet Engineering Task Force has formalized XMPP as an approved instant messaging and presence technology under the name of XMPP, and the XMPP specifications have been published as RFC 3920 and RFC 3921.</li>
<li><strong>Long History</strong> - XMPP technologies are used since 1998. Multiple implementations exist and are supported by companies like Sun Microsystems and Google.</li>
<li><strong>Security</strong> - XMPP servers may be isolated from the public XMPP network (e.g., on a company intranet), and robust security (via SASL and TLS) has been built into the core XMPP specifications. </li>
<li><strong>Flexibility</strong> - Custom functionality can be built on top of XMPP. </li>
</ul>

<h2>XMPP CONs</h2>

<ul>
<li><p><strong>Presence data overhead</strong> - XMPP currently has a large overhead in delivering presence data to multiple recipients. </p></li>
<li><p><strong>In-band binary data transfer is inefficient</strong> - Because XMPP is encoded as a single long XML document, binary data must be first base64 encoded before it can be transmitted in-band. Therefore any significant amount of binary data (e.g., file transfers) is best transmitted out-of-band, using in-band messages to coordinate. </p></li>
</ul>

<h2>How to Query XMPP Server</h2>

<pre><code>cmd&gt;nslookup
Default Server:  XXX
Address:  8.8.8.8

&gt; set q=SRV
&gt; set noverbose
&gt; _xmpp-client._tcp.gmail.com.
</code></pre>

<h2>References</h2>

<ul>
<li><a href="http://en.wikipedia.org" target="_blank" class="offsite-link-inline">XMPP  wiki page</a> (this article contains excerpts from it)</li>
<li><strong>XMPP Standards Foundation</strong>
<ul>
<li><a href="http://xmpp.org/software/clients.shtml" target="_blank" class="offsite-link-inline">Clients</a></li>
<li><a href="http://xmpp.org/software/servers.shtml" target="_blank" class="offsite-link-inline">Servers</a></li>
<li><a href="http://xmpp.org/software/libraries.shtml" target="_blank" class="offsite-link-inline">Libraries</a></li>
</ul></li>
</ul>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/explore-mysql-database.html"><rss:title>Explore mySQL Database</rss:title><rss:link>http://abdullin.com/wiki/explore-mysql-database.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2010-07-22T04:04:22Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>List all tables:</p>

<pre><code>show tables;
</code></pre>

<p><a href="http://dev.mysql.com/doc/refman/5.0/en/show.html" target="_blank" class="offsite-link-inline">Other show statements</a></p>

<p>Table creation script:</p>

<pre><code>show create table %tablename%;
</code></pre>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/command-query-responsibility-segregation-cqrs.html"><rss:title>Command-Query Responsibility Segregation - CQRS</rss:title><rss:link>http://abdullin.com/wiki/command-query-responsibility-segregation-cqrs.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2010-04-23T21:21:10Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Command-Query Responsibility Segregation (CQRS) is a way of designing and developing scalable and robust enterprise solutions with rich business value.</p>

<p>In an oversimplified manner, <b>CQRS separates commands</b> (that change the data) <b>from the queries</b> (that read the data). This simple decision brings along a few changes to the classical architecture with service layers along with some positive side effects and opportunities. Instead of the RPC and Request-Reply communications, messaging and Publish-Subscribe are used.</p>

<p>If we go deeper, <em>Command-query Responsibility Separation</em> is about development principles, patterns and the guidance to build enterprise solution architecture on top of them.</p>

<p>Such enterprise solutions aim to be:</p>

<ul>
<li>Scalable </li>
<li>Focused on the business rather than the technology</li>
<li>Can grow to handle complex problems without growing development costs</li>
<li>Adapt to changing business requirements</li>
<li>Efficiently integrate with other software and systems</li>
<li>Benefit from the cloud computing</li>
<li>Inherently handle multiple users</li>
</ul>

<p>While going for these goals, CQRS attempts to solve problems of:</p>

<ul>
<li>Performance bottlenecks and scalability</li>
<li>Concurrency conflicts, their resolution and prevention</li>
<li>Data staleness</li>
<li>Complexity of the design, development and maintenance</li>
</ul>

<p><strong>Related links:</strong></p>

<ul>
<li><a href="http://skillsmatter.com/podcast/open-source-dot-net/udi-dahan-command-query-responsibility-segregation/rl-311" target="_blank" class="offsite-link-inline">CQRS introductory video</a>.</li>
<li><a href="http://www.udidahan.com/2009/12/09/clarified-cqrs/" target="_blank" class="offsite-link-inline">Clarified CQRS paper</a> by Udi Dahan.</li>
<li><a href="http://codebetter.com/blogs/gregyoung/archive/2008/05/20/devteach-talk.aspx" target="_blank" class="offsite-link-inline">DevTeach Video</a></li>
<li><a href="http://abdullin.com/journal/2010/3/23/dddd-cqrs-and-other-enterprise-development-buzz-words.html" target="_blank" class="offsite-link-inline">DDDD, CQRS and Other Enterprise Development Buzz-words</a></li>
</ul>

<p><em>This article is a part of <a href="http://abdullin.com/software-development-bok/">Software Development Body of Knowledge ABC</a> series. You can <a href="http://feeds.abdullin.com/RinatAbdullin"><strong>subscribe to RSS feed to stay updated</strong></a></em>.</p>

<p>Related Links:</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/what-is-api.html"><rss:title>What is API?</rss:title><rss:link>http://abdullin.com/wiki/what-is-api.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-07-24T17:06:06Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Application Programming Interface (API) is a specification for interacting with software application or service programmatically. Usually it is exposed as a set of allowed method calls along with:</p>

<ul>
<li>defined parameters and return arguments;</li>
<li>calling conventions;</li>
<li>usage limitations.</li>
</ul>

<p>For example, here's how a piece of Twitter REST API looks like:</p>

<ul>
<li>Twitter REST API Method: <em>statuses update</em></li>
<li>URL: <em>http://twitter.com/statuses/update.format</em></li>
<li>Formats: <em>xml, json, rss, atom</em></li>
<li>HTTP Method(s): <em>POST</em></li>
<li>Requires Authentication: <em>true</em></li>
<li>API rate limited: <em>false</em></li>
<li>Parameters: ...</li>
<li>Response: ...</li>
</ul>

<p>There are a few categorizations of APIs in the software development world.</p>

<p><strong>Web APIs</strong> define interfaces for interacting with various web sites and services in the Internet. These APIs usually use Hypertext Transfer Protocol (HTTP) requests for passing around data represented in JavaScript Object Notation (JSON) or Extensible Markup Language (XML) formats.</p>

<p>Twitter REST API, mentioned above, is an example of such Web API.</p>

<p><strong>Operating System APIs</strong> represent low-level methods exposed by the operating system (OS) that could be used by software applications to integrate with it. <em>Windows API</em> (or Win32) and <em>POSIX</em> definitions are among the most known examples.</p>

<p><strong>Software APIs</strong> are usually exposed by software vendors willing to provide integration capabilities for their products.</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/what-is-virtual-machine-vm.html"><rss:title>What is Virtual Machine - VM?</rss:title><rss:link>http://abdullin.com/wiki/what-is-virtual-machine-vm.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-07-20T08:38:23Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>In computer science a Virtual Machine (VM) is a software implementation of a hardware (or a part of it) that executes programs, applications and scripts just like the real machine would do.</p>

<p>Here's the simplest example of Virtual Machine - Windows 7 running Windows XP in a VM to provide backwards compatibility for the older applications:</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/07/2009-07-20_virtual_machine.png" alt="Virtual Machine running Windows XP within Windows 7"/></span></span></p>

<p>Here's another example - Sun VirtualBox running Ubuntu x64 server within Windows 7:</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/07/2009-07-20_ubuntu_vm.png" alt=""/></span></span></p>

<p>These were the examples of <em>Operating System Virtual Machines</em>. Another type of VM is <em>Application Virtual Machine</em>, that runs applications and scripts in an isolated virtual environment. Examples of that would be Java VM or .NET Framework VM.</p>

<h1>VMs and Software Development</h1>

<p><br />
Virtual Machines are getting very important and widely used these days. This happens due to the improvements in hardware and virtualization capabilities along with the numerous benefits offered by the technology. </p>

<p>Some of usage scenarios include:</p>

<ul>
<li><p>Quality Assurance teams get the ability to test applications, their deployments and upgrades more efficiently. Testers don't need to have multiple OS and installation configurations available any more. A set of VM files (that are easy to share) is a replacement for that.</p>

<p>Additionally, it is quite easy to configure <a href="http://abdullin.com/wiki/continuous-integration.html">continuous integration</a> to run actual integration tests within differet virtual machines (emulating various OS and setup configurations), thus providing a better code coverage and issue detection.</p></li>
<li><p>Software Developers could try out latest changes and various multi-server deployment configurations within <a href="http://abdullin.com/journal/2008/8/19/configuring-virtual-development-environment.html">virtual development environments</a>.</p></li>
<li><p>Cloud service providers could sell finely-grained computing capacities to customers in form of the VM slices. Customer is able to configure his Virtual Machine any way he wants.</p>

<p>Should they want to change hosting provider, they just need to move a single VM from one environment to another.</p></li>
<li><p>For complex enterprise applications (spawning multiple machines and server roles) virtual machines provide high-level separation of concerns, simplifying software evolution and maintenance.</p></li>
<li><p>It is really easy to launch multiple virtual machine clones from one VM file. This simplifies <a href="http://abdullin.com/journal/2009/6/20/cloud-bursting-scenarios-for-small-companies.html">scaling and cloud bursting scenarios for organizations</a>.</p></li>
</ul>

<p><strong>Related links:</strong></p>

<ul>
<li><a href="http://en.wikipedia.org/wiki/Virtual_machine" target="_blank" class="offsite-link-inline">Virtual Machine</a> on Wikipedia</li>
<li><a href="http://abdullin.com/journal/2008/7/31/development-server-meets-virtualization.html">Development server meets virtualization</a></li>
<li><a href="http://abdullin.com/journal/2008/8/19/configuring-virtual-development-environment.html">Configuring Virtual Development Environment</a></li>
</ul>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/agile-software-development.html"><rss:title>Agile Software Development</rss:title><rss:link>http://abdullin.com/wiki/agile-software-development.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-06-13T07:50:08Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p><em>Agile Software Development</em> is an <em>iterative and incremental approach</em> in software development, where <em>requirements and solutions evolve</em> through a <em>tight collaboration</em> of self-organizing cross-functional teams.</p>

<p>Simply put, Agile Software Development is a <em>group of software development methodologies</em> that work quite well when:</p>

<ul>
<li>projects are not mission-critical;</li>
<li>business requirements change extremely fast;</li>
<li>there are great developers available;</li>
<li>development teams are small;</li>
<li>development culture and mentality favors self-organization and self-learning.</li>
</ul>

<p>In other words, Agile works quite well in situations when some <strong>unique software project has to be delivered really fast</strong> in order to seize the market opportunity. This works because Agile software methodologies allow development teams to <em>adapt quickly to the rapidly changing business requirements</em>. This happens because of:</p>

<ul>
<li><strong>short development iterations</strong> allowing to start getting feedback early in the project's life-cycle and incorporate it into the product fast by delivering working software repeatedly and in a timely manner;</li>
<li><strong><a href="http://abdullin.com/wiki/continuous-integration.html">continuous integration</a></strong> helping to reduce development friction and improve quality of a rapidly developing project in self-organizing environment;</li>
<li><strong>feature-driven development</strong> focusing development on delivering features (functionality) bringing real business value to the client (and the project);</li>
<li><strong>lean software development</strong> laying out common principles for efficient software development process;</li>
<li><strong>eXtreme Programming</strong> pushing lightweight software development methodologies to the extreme.</li>
</ul>

<p>Long-term planning (along with some other formalities of a totally controlled project management process) is mostly sacrificed in favor of the flexibility, fast delivery and self-organization. In such a situation we still have to maintain high quality of the project deliverables (while reducing the resource consumption). This is achieved with the help from:</p>

<ul>
<li><a href="http://abdullin.com/wiki/test-driven-development-tdd.html"><strong>test-driven development</strong></a> - provides foundation for the <em>Continuous Integration</em> and facilitates change while maintaining stability of the software project;</li>
<li><strong>pair programming</strong> - improves code quality and allows to have more efficient knowledge sharing.</li>
</ul>

<p><strong>Related Links:</strong></p>

<ul>
<li><a href="http://en.wikipedia.org/wiki/Agile_software_development" target="_blank" class="offsite-link-inline">Agile Software Development</a> on Wikipedia</li>
<li><a href="http://en.wikipedia.org/wiki/Lean_software_development" target="_blank" class="offsite-link-inline">Lean Software Development</a> on Wikipedia</li>
<li><a href="http://en.wikipedia.org/wiki/Scrum_(development)" target="_blank" class="offsite-link-inline">Scrum</a> on Wikipedia</li>
<li><a href="http://en.wikipedia.org/wiki/Planning_poker" target="_blank" class="offsite-link-inline">Planning poker</a> on Wikipedia</li>
<li><a href="http://www.extremeprogramming.org/what.html" target="_blank" class="offsite-link-inline">eXtreme Programming</a> on ExtremeProgramming.com</li>
</ul>

<p><em>This article is a part of <a href="http://abdullin.com/software-development-bok/">Software Development Body of Knowledge ABC</a> series. You can <a href="http://feeds.abdullin.com/RinatAbdullin"><strong>subscribe to RSS feed to stay updated</strong></a></em>.</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/unit-testing.html"><rss:title>Unit Testing</rss:title><rss:link>http://abdullin.com/wiki/unit-testing.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-06-12T20:19:31Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p><em>Unit Testing</em> in software development is a <strong>way to quickly verify that smallest blocks of software (units) behave as expected</strong> even as the software changes and evolves.</p>

<p>Here's how it works. </p>

<p>Any program could be logically separated into distinct units (in <em>object-oriented programming</em> the smallest unit usually being a <em>class</em>). <strong>Developers, while coding these program units, also create tests for them</strong> (code blocks containing some assertions and expectations about units). These tests could be used to rapidly verify behavior of the code being tested.</p>

<p>When some other developer introduces new units or changes something in existing units, he can run all the tests available for the program and verify that everything is still operating as expected. Usually running unit tests is a fast operation (less than 30 seconds), so developers are encouraged to do that often.</p>

<p>Here's how unit test suite looks for the Lokad Shared Libraries project (running all 176 tests for the primary assembly takes just 3 seconds):</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/06/2009-06-14_UnitTesting.png?__SQUARESPACE_CACHEVERSION=1244975875863" alt="Unit test suite for Lokad Shared Libraries"/></span></span></p>

<p>If unit tests indicate that something has gone wrong, then the root of these problems could be detected rather quickly (since failing tests point directly to the misbehaving unit).</p>

<p><strong>Unit Testing is extremely important for software development</strong>, since delivering projects efficiently without unit testing is nearly impossible. There are software development practices depending on unit testing:</p>

<ul>
<li><a href="http://abdullin.com/wiki/test-driven-development-tdd.html">Test-Driven Development (TDD)</a> - software design method requiring developers to write tests before writing code (this may sound strange, but it works)</li>
<li><a href="http://abdullin.com/wiki/continuous-integration.html">Continuous Integration</a> - software development practice that allows to isolate some bugs in time by automatically running unit tests after each change to the code.</li>
</ul>

<p>There are some additional benefits of unit testing:</p>

<ul>
<li>it <strong>facilitates change</strong> - developers are encouraged to refactor and change code, since they have a way to rapidly verify that program units still behave as expected.</li>
<li>a good unit test is <strong>living documentation</strong> for the code, since it describes how the code is expected to behave;</li>
<li>unit test is a good way to communicate over issues in the code and distribute work between multiple developers.</li>
</ul>

<p>It is important to keep in mind, that unit tests only facilitate change by testing individual code units. They do not guarantee that the entire program will be free from bugs.</p>

<p>Here's the simplest unit test in C#, using <a href="http://www.nunit.org/index.php" target="_blank" class="offsite-link-inline">NUnit framework</a>:</p>

<pre><code>[TestFixture]
public class CalculatorTests
{

  [Test, ExpectedException(typeof(DivideByZeroException))]
  public void Divide_by_zero_should_throw_exception()
  {
    new Calculator().Divide(1, 0);
  }

  [Test]
  public void Adding_actually_works()
  {
    var result = new Calculator().Add(1, 15);
    Assert.AreEqual(16, result);
  }
}
</code></pre>

<p>As you can see, a unit test is simply a class that contains methods checking behavior of some <em>Calculator</em> class. This test class is sometimes also called <em>test fixture</em> or <em>test suite</em>. In this snippet above test methods are decorated with a special attributes that are used by NUnit framework to recognize them, run as needed (i.e.: within an automated build) and print results.</p>

<p>Although this unit test suite may look extremely simple, it does not have to stop there. Here are some <strong>advanced usage scenarios</strong> that simplify development of complex enterprise applications:</p>

<ul>
<li>setup a temporary database before unit tests start up and then check all data access routines against this sample database;</li>
<li>have a test suite that executes every hour against methods in your web services, verifying that they are alive and processing data properly.</li>
<li>use non-deterministic reproducible tests that verify behavior of your class in various unexpected situations, reporting back when something goes wrong;</li>
<li>use unit testing framework to write code quality tests, that check and enforce some guidelines (i.e.: every controller class should be immutable and have name ending with <em>Controller</em>).</li>
</ul>

<p><strong>Related Links:</strong></p>

<ul>
<li><a href="Continuous Integration">Continuous Integration</a></li>
<li><a href="http://abdullin.com/wiki/test-driven-development-tdd.html">Test-Driven Development</a></li>
<li><a href="http://abdullin.com/journal/2009/2/13/using-lokad-rules-to-simplify-net-unit-tests.html">Using Lokad Rules to Simplify .NET Unit Tests</a></li>
<li><a href="http://abdullin.com/journal/2008/12/5/how-to-use-systemutil-to-write-net-code-with-testable-sleep.html">How to Use SystemUtil to Write .NET Code With Testable Sleep and Time Calls</a></li>
<li><a href="http://abdullin.com/journal/2008/11/29/shortcuts-for-nunit-exception-expectations.html">Shortcuts for NUnit Exception Expectations</a></li>
<li><a href="http://en.wikipedia.org/wiki/Unit_testing" target="_blank" class="offsite-link-inline">Unit Testing</a> on Wikipedia</li>
</ul>

<p><em>This article is a part of <a href="http://abdullin.com/software-development-bok/">Software Development Body of Knowledge ABC</a> series. You can <a href="http://feeds.abdullin.com/RinatAbdullin"><strong>subscribe to RSS feed to stay updated</strong></a></em>.</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/version-control-system-vcs.html"><rss:title>Version Control System - VCS</rss:title><rss:link>http://abdullin.com/wiki/version-control-system-vcs.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-06-12T19:21:23Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p><em>Version Control System</em> (VCS) is a software that allows to manage changes of documents, programs, images and other information that is stored in form of computer files. Changes are usually identified by an incrementing number or letter code also known as <em>revision number</em> or <em>revision</em>. </p>

<p>The simplest usage of versioning is - <em>you can easily go back to the previous working version of your files</em>, should you mess something up with the latest changes.</p>

<p>Changes could range from fixing a typo in a text file up to a huge refactoring in a software project, spanning hundreds of files. Each change usually has name of the person introduced it, time of the change and an optional description message.</p>

<p><strong>Version Control Systems became an essential part of software development</strong> due to the following benefits:</p>

<ul>
<li><strong>collaboration</strong> - a team of developers (which could be distributed geographically) may be working on the same set of files at once without interrupting each other's work;</li>
<li><strong>change management</strong> - changes can be inspected, reviewed or rolled back as needed; if you need that App.config file the way it was on May 17, 2008 - no problem;</li>
<li><strong>tracking ownership</strong> - every change is associated with the name of the person, so we know whom to give kudos to or ask questions;</li>
<li><strong>tracking evolution</strong> - every change is associated with a short description, so you just need to pull a change log of some class to see how it evolved and who did what;</li>
<li><strong>branching</strong> - it is possible to create a copy (branch) of the entire project for some specific purpose (i.e.: prototyping or developing a fix for the important customer) without disrupting development workflow;</li>
<li><a href="http://abdullin.com/wiki/continuous-integration.html"><strong>continuous integration</strong></a> - ability to split evolution of a software project into incremental changes allows to run all sorts of checks and tests against each incremental change in a continuous manner.</li>
</ul>

<h1>Language</h1>

<p><strong>Common terms:</strong></p>

<ul>
<li><em>Repository</em> - database server that contains all files and their history.</li>
<li><em>Working copy</em> - local version of files on somebody's machine. It may contain local unversioned changes.</li>
<li><em>Trunk</em> - home folder for some project within the repository. It usually contains all the latest changes.</li>
<li><em>History</em> (or <em>ChangeLog</em>) - a list of changes that were done to a file or folder since it was created.</li>
<li><em>Latest</em> (or <em>Head</em>) - latest available version of some file or folder.</li>
<li><em>Revision</em> - another word that means current version of file or folder.</li>
</ul>

<p><strong>Common operations:</strong></p>

<ul>
<li><em>Check out</em> - first operation required to work with any repository. It involves creating <em>working copy</em> that mirrors some folder on the server (usually that's <em>trunk</em>).</li>
<li><em>Commit</em> (or <em>Check In</em>) - sending your local changes back to the server, so that other people can get them as well.</li>
<li><em>Update</em> - updating local <em>working copy</em> to have all the lasted changes that were committed to the server since the last time you've checked it.</li>
<li><em>Revert</em> - discard all your local changes to the <em>working copy</em>.</li>
<li><em>Diff</em> (or <em>Change</em>, <em>Delta</em>) - differences between two versions of the same file; or an operation involving actually looking up what was changed between two versions.</li>
<li><em>Create patch</em> - automatically create a file that describes all the changes that were done to the <em>working copy</em> (basically containing all <em>diffs</em>). Then these changes could be reviewed by somebody else and committed to the repository.</li>
</ul>

<p><strong>Advanced operations:</strong></p>

<ul>
<li><em>Conflict</em> - that happens when somebody else changed the file, while you were working on it locally. </li>
<li><em>Resolve</em> - to fix contradicting changes by reviewing and manually merging them (VCSs can automatically resolve majority of the conflicts).</li>
<li><em>Tag</em> - to place a human readable label on some revision (i.e.: when releasing a product); or a noun representing such a label.</li>
<li><em>Branch</em> - to start a separate line of development over some old revision (i.e.: when fixing bugs for the previously released version).</li>
<li><em>Merge</em> - bringing together changes from different sources (i.e.: when applying a bug fix from some <em>branch</em> to a <em>trunk</em>).</li>
</ul>

<h1>How it looks</h1>

<p>Here's how usage of Version Control Systems looks like.</p>

<p>Checking out the trunk of Autofac IoC project:</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/06/2009-06-14_Version_Control_System_in_action3.png?__SQUARESPACE_CACHEVERSION=1244974613144" alt="Checking out sources of Autofac IoC Container for .NET"/></span></span></p>

<p>Browsing through the revision history:</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/06/2009-06-14_Version_Control_System_in_action1.png?__SQUARESPACE_CACHEVERSION=1244974363275" alt="Browsing revisions with a TortoiseSVN UI for SVN Version Control System"/></span></span></p>

<p>Looking at some revision in detail:</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/06/2009-06-14_Version_Control_System_in_action2.png?__SQUARESPACE_CACHEVERSION=1244974435065" alt="Looking at some revision in Autofac trunk with TortoiseSVN"/></span></span></p>

<p>These screen-shots show <a href="http://tortoisesvn.tigris.org/" target="_blank" class="offsite-link-inline">TortoiseSVN</a>, which is a widely-used open source software for accessing Subversion repositories. Here's the bigger picture featuring some popular Version Control Systems:</p>

<ul>
<li><a href="http://subversion.tigris.org/" target="_blank" class="offsite-link-inline">Subversion</a> - cross-platform open source VCS with great User Interface implementations (TortoiseSVN is the most known implementation for Windows shell integration).</li>
<li><a href="http://git-scm.com/" target="_blank" class="offsite-link-inline">Git</a> - open-source VCS for distributed development that does not require a central server, yet lacks a convenient UI.</li>
<li><a href="http://www.selenic.com/mercurial/wiki/" target="_blank" class="offsite-link-inline">Mercurial</a> - yet another distributed open source version control system which is less popular than Git (5 times less popular, if you trust Google).</li>
</ul>

<p><strong>Related Links:</strong></p>

<ul>
<li><a href="http://abdullin.com/wiki/Continuous%20Integration">Continuous Integration</a></li>
<li><a href="http://en.wikipedia.org/wiki/Version_control_system">Version Control System</a> on Wikipedia</li>
</ul>

<p><em>This article is a part of <a href="http://abdullin.com/software-development-bok/">Software Development Body of Knowledge ABC</a> series. You can <a href="http://feeds.abdullin.com/RinatAbdullin"><strong>subscribe to RSS feed to stay updated</strong></a></em>.</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/test-driven-development-tdd.html"><rss:title>Test-Driven Development - TDD</rss:title><rss:link>http://abdullin.com/wiki/test-driven-development-tdd.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-06-09T20:26:11Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p><em>Test-Driven Development</em> (TDD) is a software design method based on short development iterations requiring developers to <strong>create automated <a href="http://abdullin.com/wiki/unit-testing.html">unit tests</a> that define code requirements, before writing code itself</strong>. These unit tests contain multiple assertions (returning true or false) that could be used to <strong>rapidly verify correct behavior of the code</strong> being tested. </p>

<p><em>Once the produced code passes unit tests, it could be refactored and cleaned up</em>. Developer will be able to ensure code staying stable in the process, by running unit tests frequently. Next iteration could be started afterwards.</p>

<p>Writing a test before the actual code and its refactoring helps to achieve higher quality, because:</p>

<ul>
<li>it forces developer to refine code contracts before working on the implementation;</li>
<li>it forces developer to make and keep code easily testable. This requires loose coupling and a separation of <a href="http://abdullin.com/wiki/cross-cutting-concern.html">cross-cutting concerns</a>;</li>
<li>presence of unit tests gives developers more psychological freedom to experiment with the code and refactor it; managers get lower risks related to introducing high-level changes to the project.</li>
</ul>

<p>There are some limitations of the TDD:</p>

<ul>
<li>badly written or simply <em>brittle</em> tests can create a tremendous maintenance overhead and hinder any code evolution;</li>
<li>complete code coverage by unit tests creates a false perception of security and may result in less QA than needed;</li>
<li>unit tests written by the same developer tend to have similar <em>blind spots</em> that may actually require testing.</li>
</ul>

<h1>Unit Test Code Coverage</h1>

<p>One of the most important metrics in the Test-Driven Development is <em>unit test code coverage</em>. It could be calculated automatically and indicates percentage of the code that is executed while unit tests are running.</p>

<p><span class="full-image-block ssNonEditable"><span><img src="http://abdullin.com/storage/uploads/2009/06/2009-06-11_code_coverage_for_TDD.png?__SQUARESPACE_CACHEVERSION=1244748228052" alt=""/></span></span></p>

<p>Although code coverage does not indicate quality of the unit tests, it is still a good measure of code testability. It is a common practice to set a certain code coverage threshold (i.e.: 80%) and enforce it within the <a href="http://abdullin.com/wiki/continuous-integration.html">continuous integration</a> scripts. This way, if a developer commits a significant amount of code without unit tests, this is likely to break the build, forcing him to concentrate on testing his code.</p>

<p><em>Test-Driven Development</em> plays well along with <a href="http://abdullin.com/wiki/component-driven-development.html">Component-Driven Development</a>, since both of these approaches favor doing design before the actual implementation.</p>

<p><strong>Related links:</strong></p>

<ul>
<li><a href="http://abdullin.com/wiki/unit-testing.html">Unit Testing</a></li>
<li><a href="http://en.wikipedia.org/wiki/Test-driven_development" target="_blank" class="offsite-link-inline">Test-Driven Development</a> on Wikipedia</li>
<li><a href="http://abdullin.com/journal/2009/4/11/testing-mvc-controllers-with-mock-container.html">Testing MVC Controllers with Mock Containers</a></li>
<li><a href="http://abdullin.com/journal/2009/2/13/using-lokad-rules-to-simplify-net-unit-tests.html">Using Lokad Rules to Simplify .NET Unit Tests</a></li>
<li><a href="http://abdullin.com/journal/2008/12/5/how-to-use-systemutil-to-write-net-code-with-testable-sleep.html">How to Use SystemUtil to Write .NET Code With Testable Sleep and Time Calls</a></li>
<li><a href="http://abdullin.com/journal/2008/11/29/shortcuts-for-nunit-exception-expectations.html">Shortcuts for NUnit Exception Expectations</a></li>
<li><a href="http://abdullin.com/journal/2008/10/21/how-to-ensure-that-complex-methods-are-covered-with-tests.html">How to ensure that complex methods are covered with tests</a></li>
<li><a href="http://abdullin.com/journal/2008/10/14/writing-net-code-analysis-rules-as-unit-tests.html">Writing .NET code analysis rules as unit tests</a></li>
</ul>

<p><em>This article is a part of <a href="http://abdullin.com/software-development-bok/">Software Development Body of Knowledge ABC</a> series. You can <a href="http://feeds.abdullin.com/RinatAbdullin"><strong>subscribe to RSS feed to stay updated</strong></a></em>.</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://abdullin.com/wiki/cloud-computing.html"><rss:title>Cloud Computing</rss:title><rss:link>http://abdullin.com/wiki/cloud-computing.html</rss:link><dc:creator>Rinat Abdullin</dc:creator><dc:date>2009-06-05T09:11:15Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p><em>Cloud computing</em> is about hardware-based services (involving computing, network and storage capacities), where:</p>

<ul>
<li>Services are <strong>provided on-demand</strong>; customers can pay for them as they go, without the need to invest into a datacenter.</li>
<li>Hardware management is abstracted from the customers.</li>
<li>Infrastructure capacities are elastic and can easily scale up and down.</li>
</ul>

<p>There is a powerful economic force behind this simple model: <em>providing and consuming cloud computing services generally allows to have</em> far more <em>efficient resource utilization</em>, compared to self-hosting and data center type of hosting. </p>

<p>This is especially true for <em>bursting into cloud scenarios</em> when cloud consumers use elasticity of the cloud services to handle any spikes they might get. More information is available in article <a href="http://abdullin.com/journal/2009/4/14/why-is-cloud-computing-important-for-us.html">Why is cloud computing important for us?</a>.</p>

<p>Obviously, consuming raw hardware capacities may be too hardcore for some consumers that merely want to have a scalable storage. So it is natural that cloud computing services already got some diversity around them: </p>

<ul>
<li><p><strong>Infrastructure as a Service</strong> (IaaS), where customer gets raw hardware resources (i.e.: <a href="http://abdullin.com/wiki/what-is-virtual-machine-vm.html">virtual machines</a> with OS of choice). Examples:</p>

<ul>
<li><a href="http://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud" target="_blank" class="offsite-link-inline">Amazon Elastic Compute Cloud</a> - part of AWS that offers scalable Xen-based virtual machines.</li>
<li><a href="http://www.mosso.com/"  target="_blank" class="offsite-link-inline">Mosso</a> - .NET or LAMP web sites, Storage and Linux-based virtual servers. <a href="http://www.google.ru/search?client=firefox-a&amp;rlz=1R1GGGL_en-GB&amp;hs=D7K&amp;q=Mosso+sucks&amp;btnG=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA&amp;aq=f&amp;oq=" target="_blank" class="offsite-link-inline">People complain</a>.</li>
</ul></li>
<li><p><strong>Platform as a Service</strong> (PaaS), where service provider builds a platform to simplify solving some technological tasks. This simplifies life for the customer, but also comes with a lock-down cost. Some providers:</p>

<ul>
<li><a href="http://www.microsoft.com/azure/default.mspx" target="_blank" class="offsite-link-inline">Microsoft Windows Azure</a> - .NET driven and Microsoft-owned cloud infrastructure, <a href="http://abdullin.com/journal/2009/4/11/cloud-computing-could-windows-azure-catch-up-with-amazon.html">which is behind Amazon in some areas</a>.</li>
<li><a href="http://aws.amazon.com/" target="_blank" class="offsite-link-inline">Amazon Web Services</a> - collection of scalable infrastructure pieces for building your cloud application.</li>
<li><a href="http://code.google.com/appengine/" target="_blank" class="offsite-link-inline">Google App Engine</a> - Python-based cloud framework.</li>
<li><a href="http://abdullin.com/journal/2009/4/11/cloud-computing-could-windows-azure-catch-up-with-amazon.html">Amazon Elastic Map Reduce</a> - <a href="http://hadoop.apache.org/core/" target="_blank" class="offsite-link-inline">Apache Hadoop</a> hosted on Amazon cloud services (EC2 and S3)</li>
</ul></li>
<li><p><strong>Software as a Service</strong> (SaaS). At this level everything is way more simple for the customers to consume, since they are provided with actual services generating business value to them. Service providers handle all the technological complexity and provide the support as needed.</p></li>
</ul>

<p>From the development perspective, cloud computing is a brand new field (which is especially true for the .NET world). So <em>there are no established patterns and pactices in the field yet</em>. However, common development guidelines tend to work quite well:</p>

<ul>
<li><a href="http://abdullin.com/wiki/component-driven-development.html">Component-Driven Development</a> with Inversion of Control Containers</li>
<li>Test-Driven Development</li>
<li><a href="http://abdullin.com/wiki/continuous-integration.html">Continuous Integration</a> for the projects</li>
<li>Separation of <a href="http://abdullin.com/wiki/cross-cutting-concern.html">Cross-Cutting Concerns</a></li>
</ul>

<p><strong>Related links:</strong>  </p>

<ul>
<li><a href="http://abdullin.com/cloud-computing-in-net">Cloud Computing article series</a></li>
<li><a href="http://abdullin.com/journal/2009/4/14/why-is-cloud-computing-important-for-us.html">Why is Cloud Computing important for us?</a></li>
<li><a href="http://blog.vermorel.com/?p=94" target="_blank" class="offsite-link-inline">Cloud computing: a personal review about Azure, Amazon, Google Engine, VMWare and the others</a> by Joannes Vermorel</li>
<li><a href="http://en.wikipedia.org/wiki/Cloud_computing">Cloud Computing</a> on Wikipedia</li>
</ul>

<p><em>This article is a part of <a href="http://abdullin.com/software-development-bok/">Software Development Body of Knowledge ABC</a> series. You can <a href="http://feeds.abdullin.com/RinatAbdullin"><strong>subscribe to RSS feed to stay updated</strong></a></em>.</p>
]]></content:encoded></rss:item></rdf:RDF>