<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>toniBlog &#187; rules</title>
	<atom:link href="http://www.the-arm.com/tag/rules/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.the-arm.com</link>
	<description>A weblog about Methodologies for Development</description>
	<lastBuildDate>Tue, 22 Jun 2010 08:01:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Project Standards</title>
		<link>http://www.the-arm.com/2009/05/project-standards/</link>
		<comments>http://www.the-arm.com/2009/05/project-standards/#comments</comments>
		<pubDate>Fri, 08 May 2009 10:47:59 +0000</pubDate>
		<dc:creator>toni</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[leadership]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[project standard]]></category>
		<category><![CDATA[rules]]></category>

		<guid isPermaLink="false">http://www.the-arm.com/?p=427</guid>
		<description><![CDATA[I recently played a leadership role in a project where two of the biggest challenges where the time schedule and the team on boarding. I hate repeating myself, so after explaining the technology, architectural choices a couple of times I decided to write some kind of document or presentation. I&#8217;ve created a sample document containing [...]]]></description>
			<content:encoded><![CDATA[<p>I recently  played a leadership role in a project where two of the biggest challenges where the time schedule and the team on boarding.</p>
<p>I hate repeating myself, so after explaining the technology, architectural choices a couple of times I decided to write some kind of document or presentation.</p>
<p>I&#8217;ve created a sample document containing for each of the areas of the project a paragraph explaining shortly all the decisions made so far.</p>
<p>The document has been then showcased to the whole team for feedback.</p>
<p>So, let&#8217;s see some part of the document, as example:</p>
<p><strong>Services</strong> (A similar paragraph was written for each component of the architecture)</p>
<p>Why?</p>
<ul>
<li>To decouple layers</li>
<li>To have isolated Transactionality</li>
</ul>
<p>How</p>
<ul>
<li>POJO configured with Spring (context-service.xml)</li>
<li>@Transactional annotation on any method call that requires Transactionality</li>
<li>@Service class annotation for Spring</li>
<li>@Autowiring constructor annotation for Spring</li>
<li>Completely stateless</li>
</ul>
<p>References</p>
<ul>
<li>Domain Driven Design</li>
</ul>
<p><strong>Mock tests</strong><br />
Why</p>
<ul>
<li>We want a fast feedback and test only objects interactions rather than effects</li>
<li>Test Double</li>
</ul>
<p>How</p>
<ul>
<li>Mockito framework to verify objects interactions</li>
<li>A Mock test should be written at least for</li>
<li>Services (mocking DAOs, JMS)</li>
<li>DWR Objects (mocking Services)</li>
</ul>
<p>References</p>
<ul>
<li>Mockito homepage</li>
<li>TestDouble page</li>
<li>Martin’s Mocks aren’t stubs page</li>
</ul>
<p>And then for each major framework chosen, for <strong>Spring</strong> was something like:</p>
<p>Why</p>
<ul>
<li>Lightweight solution</li>
<li>Easy to test out of the container (POJO beans)</li>
<li>Goes very well with DWR, Terracotta and Atomikos</li>
</ul>
<p>How</p>
<ul>
<li>Every bean is configured in a file called context-xxx.xml</li>
</ul>
<p>References</p>
<ul>
<li>Spring Vs EJB 3</li>
<li>New Spring 2.5 Features</li>
<li>Spring Reference Documentation</li>
</ul>
<p>What about code conventions?</p>
<p>Ground rules</p>
<ul>
<li>All fields private, information hiding</li>
<li>Reduce as much as possible private methods (usually the logic that sits in private methods can be extracted in another class), also a private method is not directly testable by unit tests.</li>
<li>use composition rather than private methods or utility classes, with composition every object can have isolated responsibilities and isolated own test</li>
<li>Methods, variable, package, class names should be speaking and tell to who’s reading the code what they’re there for</li>
<li>Avoid code smells, in particular:</li>
<li>DuplicatedCode</li>
<li>Methods too big</li>
<li>Classes with too many instance variables</li>
<li>Classes with too much code</li>
<li>Strikingly similar subclasses</li>
<li>An instance variable that is only set in some circumstances</li>
<li>Comparing variables to null</li>
<li>Too many private (or protected) methods</li>
<li>Many messages to the same object from the same method</li>
<li>ExcessiveOverloading</li>
<li>SameNameDifferentMeaning</li>
<li>Code not actually ever used</li>
<li>Classes with too few instance variables</li>
<li>Classes with too little code</li>
<li>Methods with no messages to self</li>
<li>Empty catch clauses</li>
<li>Explicitly setting variables to null</li>
<li>Comments</li>
<li>ExcessiveLogging</li>
<li>ContrivedInterfaces</li>
<li>LawOfDemeter Violations</li>
<li>SwitchStatements</li>
</ul>
<p>and so on&#8230;</p>
<p>We got also a section on process, since everybody implements Scrum in its own way we highlighted our numbers:</p>
<p>For <strong>Scrum</strong> for example the list looked like this one:</p>
<ul>
<li>Daily Stand-ups 9.30 AM</li>
<li>Two weeks long Sprints</li>
<li>End Of The Sprint Retrospective</li>
<li>Planning Game at the start of the Sprint</li>
<li>Product Backlog</li>
</ul>
<p>References</p>
<ul>
<li>Control Chaos Homepage</li>
<li>Any Mike Cohn’ presentation or article about Scrum</li>
<li>Any Mike Cohn’ presentation about estimating and planning</li>
</ul>
<p><strong>Conclusions</strong></p>
<p>Documentation in Agile is often  enemy number one, however, if you are planning to scale out your project you will need some help, Office tools are a bad beast, you can always write this type of ground rules on some cards and leave them on the wall (oh well, what if you offshore the project!).</p>
<p>This type of document helped me to do not miss anything, I kept it up to date with the code as soon as a new team member was joining it and I&#8217;ve got good feedback from the team (they liked the concise style and the references for further investigation).<br />
The client loved it too, finding out that we had a well defined stack of rules and process to follow, so no surprises.</p>
<p>Technical discussion were still allowed, the document wasn&#8217;t written in stone: every body in the team should feel free to criticise and then contribute to make the code/process better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.the-arm.com/2009/05/project-standards/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
