blob: 08b902a6dbb11875bce406e0edf160818f82e097 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.epf.uma:TaskDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.epf.uma="http://www.eclipse.org/epf/uma/1.0.3/uma.ecore" epf:version="1.0.0" xmi:id="-kNZQ2Mr_nyfmCboprjMNTg" name="write_code,{8F6CB99A-D2EA-44BB-8CE5-F97220D44088}" guid="-kNZQ2Mr_nyfmCboprjMNTg" version="1.0.0">
<sections xmi:id="_oUbPkGE-EdqnIZeW8YpHcA" name=" Get a Pair Programming Partner " guid="_oUbPkGE-EdqnIZeW8YpHcA">
<sectionDescription>&lt;a id=&quot;Step1&quot; name=&quot;Step1&quot;&gt;&lt;/a&gt;
&lt;p&gt;
Pair Programming is an Extreme Programming best practice. The basic rule regarding pair programming in XP is that all
production code is developed in pairs. One programmer has the responsibility to complete a task. That programmer asks
other programmers to pair with him to complete the task. The pairings are short term, usually less than half a day.
Find a partner who has experience or skill you need to complete your task. Your task may include modifying a database
table. Ask the person on the team most knowledgeable to help you effectively use the database API. Later, you might
need to display the data in a GUI window, but you have not seen that part of the GUI. Get someone who knows about it to
help.
&lt;/p&gt;</sectionDescription>
</sections>
<sections xmi:id="_oUbPkWE-EdqnIZeW8YpHcA" name=" Write Failing Test Case " guid="_oUbPkWE-EdqnIZeW8YpHcA">
<sectionDescription>&lt;a id=&quot;Step2&quot; name=&quot;Step2&quot;&gt;&lt;/a&gt;
&lt;p&gt;
When looking at an Engineering Task, you should consider how to add the capability to the system. Does the system
require new classes? Are there classes that would be useful? Regardless of how these decisions come out, the addition
of functionality requires the creation of a test case. You write the test case to demonstrate that a portion of the
functionality you need isn't in the system. This test case should fail.
&lt;/p&gt;</sectionDescription>
</sections>
<sections xmi:id="_oUbPkmE-EdqnIZeW8YpHcA" name=" Write Code to Make Tests Pass " guid="_oUbPkmE-EdqnIZeW8YpHcA">
<sectionDescription>&lt;a id=&quot;Step3&quot; name=&quot;Step3&quot;&gt;&lt;/a&gt;
&lt;p&gt;
When you have a failing test case, you then write only the code that is necessary to satisfy the test case. Test cases
should have a very narrow focus. A failing test case may trigger the creation of a new class or method named in the
test case, or it may simply require you to add more code to existing classes and methods.
&lt;/p&gt;</sectionDescription>
</sections>
<sections xmi:id="_oUbPk2E-EdqnIZeW8YpHcA" name=" Refactor Immediately " guid="_oUbPk2E-EdqnIZeW8YpHcA">
<sectionDescription>&lt;a id=&quot;Step4&quot; name=&quot;Step4&quot;&gt;&lt;/a&gt;
&lt;p&gt;
After the test case passes, go back and make the code as clean as possible. Have you added code to a method and caused
the method to have more than one primary job? If so, extract a method. Has a class grown too large? Consider extracting
a class. Have you noticed duplication? Refactor to remove it.
&lt;/p&gt;</sectionDescription>
</sections>
<sections xmi:id="_oUbPlGE-EdqnIZeW8YpHcA" name=" Repeat Until Engineering Task is Done " guid="_oUbPlGE-EdqnIZeW8YpHcA">
<sectionDescription>&lt;a id=&quot;Step5&quot; name=&quot;Step5&quot;&gt;&lt;/a&gt;
&lt;p&gt;
The preceding three steps should be done in sequence over and over until you and your pair partner are done with the
engineering task. It is important to refactor as you go because refactoring, even on a micro-scale, makes additional
work easier.
&lt;/p&gt;</sectionDescription>
</sections>
<purpose>&lt;a id=&quot;XE_write_code__activity_definition&quot; name=&quot;XE_write_code__activity_definition&quot;&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;
To specify the design of the system in a way which is precise enough to allow computers to generate efficient
processes automatically and clear enough for people to understand during ongoing work and maintenance.
&lt;/li&gt;
&lt;/ul&gt;</purpose>
</org.eclipse.epf.uma:TaskDescription>