<?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>Tore Vestues blogs &#187; Practices</title>
	<atom:link href="http://tore.vestues.no/category/practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://tore.vestues.no</link>
	<description>On a quest for the silver bullet..</description>
	<lastBuildDate>Sun, 19 Jun 2011 19:34:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Your relation to your source control system</title>
		<link>http://tore.vestues.no/2010/03/06/your-relation-to-your-source-control-system/</link>
		<comments>http://tore.vestues.no/2010/03/06/your-relation-to-your-source-control-system/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 07:16:24 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Practices]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/?p=81</guid>
		<description><![CDATA[Do you feel that your source control system is working against you? Well, it might not be perfect, but maybe you&#8217;re just rubbing it the wrong way. I find that if you are a bit unstructured in your approach towards it, you can easily get into some unnecessary problems. And a little structure is all [...]]]></description>
			<content:encoded><![CDATA[<p>Do you feel that your source control system is working against you? Well, it might not be perfect, but maybe you&#8217;re just rubbing it the wrong way. I find that if you are a bit unstructured in your approach towards it, you can easily get into some unnecessary problems. And a little structure is all that it takes in order to make your source control system a lot more frictionless.</p>
<p>This is how I work with my source control system:</p>
<p>First, what do I check in? Logical chunks that work.</p>
<p>Then, how do I check it in?:</p>
<ol>
<li>You start with no local changes (that&#8217;s the best way to start the day)</li>
<li>Get the latest source from the source control system.</li>
<li>At this point you want to be certain that not anyone else have broken anything, do one of the two:</li>
<ul>
<li>Have a build server that notifies when there is a check in, if the last check in was ok, then you&#8217;re good to go (this is by far the preferred way)</li>
<li>Run the tests just after getting the latest source</li>
</ul>
<li>Do what you came here for: code. Whenever you have a logical &#8220;chuck&#8221; of code, proceed to the next step. </li>
<li>You want to be certain that what you are about to check in is working: Run the unit tests one last time to make sure your code is working.</li>
<li>You have to merge your changes with anything else that might have changed: Get latest from the source control system.</li>
<li>Run the unit tests: At this point, you want to be certain that the combination of your code and the code from the repository is not failing anything. (Here it is a great advantage to have a build server that tells you that the source you are getting from the source control is working, so any failing tests you get now are guaranteed your fault)</li>
<li>Fix whatever is broken</li>
<li>check in (when all tests are green)</li>
<li>Repeat</li>
</ol>
<p>Also note:</p>
<ul>
<li>On a general note, do your best not to check in failing code (failing tests, or even not compiling code). Failing code impeeds all the other team members. Don&#8217;t you get really annoyed when someone else on your team are messing up the source, and making lots of extra unnecceary work for you? I do not want to be that person.</li>
<li>Do not, I repeat: <em>do not</em>, check in anything before getting the latest source. You want to make sure that all the latest source (not just yours) are working together.</li>
<li>Do not wait too long to check in (to check in at least once a day is a good rule of thumb). The longer you wait, the more merging you will probably have to do.</li>
<li>It is also a big advantage to have a build server that notifies if someone checks in failing code (so you do not have to be uncertain if it was you or someone else that broke the code when you get the latest source)</li>
</ul>
<p>I am very interested in hearing your experiences with how to work with source control systems, feel free to post comments.</p>
<p>- Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2010/03/06/your-relation-to-your-source-control-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tell, don&#8217;t ask</title>
		<link>http://tore.vestues.no/2009/08/16/tell-dont-ask/</link>
		<comments>http://tore.vestues.no/2009/08/16/tell-dont-ask/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 17:43:29 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Coding principles]]></category>
		<category><![CDATA[Practices]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2009/08/16/tell-dont-ask/</guid>
		<description><![CDATA[Tell, don&#8217;t ask is a way of thinking when you&#8217;re programming software, a mindset. It is something that should be in the back of your head every time you write a line of code, or a chunk of code that describes some functionality. It is not something you merely apply when trying to solve a [...]]]></description>
			<content:encoded><![CDATA[<p><em>Tell, don&#8217;t ask</em> is a way of thinking when you&#8217;re programming software, a mindset. It is something that should be in the back of your head every time you write a line of code, or a chunk of code that describes some functionality. It is not something you merely apply when trying to solve a particular problem, it is something you apply all the time.</p>
<p>It is about how your entities communicate, it is about where you place your logic. It is about where to place the code. And when you are programming you are putting code somewhere all the time. That means this is one of the fundamental things to learn as a developer.</p>
<p><strong>So, what is it?</strong></p>
<p>The phrasing itself means that you should tell other objects to do things, instead of asking other objects for information and processing it yourself. (&#8221;you&#8221; are of course an object in this case).</p>
<p><strong>Example: The car dealer</strong></p>
<p>Say you&#8217;re making software for a car dealer. You want to create a report that lists all cars for sale that can be distributed to the customers.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> ForSaleReport
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> List<span style="color: #008000;">&lt;</span>Car<span style="color: #008000;">&gt;</span> allCars<span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF;">public</span> ForSaleReport<span style="color: #000000;">&#40;</span>List<span style="color: #008000;">&lt;</span>Car<span style="color: #008000;">&gt;</span> allCars<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">allCars</span> <span style="color: #008000;">=</span> allCars<span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">public</span> List<span style="color: #008000;">&lt;</span>Car<span style="color: #008000;">&gt;</span> GetAllCarsForSale<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">return</span> allCars.<span style="color: #0000FF;">FindAll</span><span style="color: #000000;">&#40;</span>car <span style="color: #008000;">=&gt;</span> car.<span style="color: #0000FF;">SoldDate</span> <span style="color: #008000;">!=</span> DateTime.<span style="color: #0000FF;">MinValue</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p><em>There is a violation of &#8220;Tell, don&#8217;t ask&#8221; right there</em>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">car.<span style="color: #0000FF;">SoldDate</span> <span style="color: #008000;">!=</span> DateTime.<span style="color: #0000FF;">MinValue</span></pre></td></tr></table></div>

<p>You <em>ask</em> for information (the cars SoldDate), then make a calculation based on it (calculating if the car is for sale). So, what should you have done? You should <em>tell</em> the Car-object to resolve if it is for sale. It is not your concern to figure it out (when you are in the ForSaleReport), your only concern is to list out cars that are for sale, not why or how they are. So, instead of trying to figure things out yourself, you should just ask the car:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">car.<span style="color: #0000FF;">IsForSale</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></pre></td></tr></table></div>

<p><img src='http://vestues.no/tore/wp-content/istock_000002694919xsmall_adjusted_smaller.jpg' alt='Head in the sand' style='float:right'/> <strong>Be ignorant</strong></p>
<p>It is easier to apply <em>Tell, don&#8217;t ask</em> if you think of your objects as ignorant. You give them a responsibility, and beyond that they should be totally ignorant. Always ask someone else to solve the problems. This makes them ask less questions. Asking less questions means less coupling. Only caring for a single concern means higher cohesion.</p>
<p><strong>And if I don&#8217;t .. ?</strong></p>
<p>Didn&#8217;t you see the major difference between the two (asking for the SoldDate versus telling the car to figure out if it IsForSale)? Well, there is a difference, and normally it doesn&#8217;t take long before it shows.</p>
<p>Say you ask for the SoldDate (thinking <em>Tell, don&#8217;t ask</em> are for stupid programmers that wouldn&#8217;t understand as advanced logic as yourself..). And  say that since this application is growing big you ask for SoldDate several places to resolve if the car is for sale (I&#8217;ve seen systems where asking for such &#8220;innocent&#8221; information is done hundreds of places). Then one day the owner of the car dealership comes to you, quite agitated, telling you that your reports are plain wrong: &#8220;A car doesn&#8217;t have to be for sale even though the sales date is not set. It can be held of or be in for repair. Fix it now!&#8221;</p>
<p>Hm, now you have to search for all the places where you did your &#8220;innocent&#8221; information asking, changing it everywhere, and test it to see if you broke something else. Pray that you do not have any indirect references to SoldDate (getting it from a car and sending it away for processing further away), that would be hell to track down. Wouldn&#8217;t it be better if you just had to change the logic in one place? in Cars &#8220;IsForSale&#8221; method? I would think so.</p>
<p>And that is not the only problem. Opening up a class, exposing information (like SoldDate in this case) makes it easier for other classes to hard wire itself to the class. This means more coupling, and more coupling means that the class will be harder to change. In this case, there is no way you easily can change the representation of SoldDate within Car. If you want to change it, you have to change every class that refers to it. This might be a very tedious task.</p>
<p>Another problem, which might not be so obvious since there is no &#8220;principle&#8221; attached to it, is the developer experience: How easy it is to write code in this system. I find this an important issue, and a bit underestimated at times. This is important because it has to do with productivity. When writing new code for this system, and you have to find out if the car is sold or not, it would be much easier just to write &#8220;car.IsSold()&#8221;, then it would be to actually have to find out how to calculate it, and then implement it (find somewhere else in the code that calculates it, copying that code, and so on&#8230;). Figuring out if a car is sold or not should be done once. When it is figured out and implemented, everyone else should just reuse that logic, never again caring for how it is implemented (unless of course, you have to fix or change something in that logic).</p>
<p><strong>Conclusion</strong></p>
<p>For me, <em>Tell, don&#8217;t ask</em> brings with it several realizations about programming:</p>
<ul>
<li>It is important to think about your modelling when you write code. Where you put your code has major implications on your softwares maintainability.</li>
<li>Modelling isn&#8217;t just for &#8220;architects&#8221;. As a developer you make decisions every day that can make or break the software.</li>
<li>Focus on responsibilities, and who should be concerned with what. This makes your application more cohesive and less coupled.</li>
<li>Don&#8217;t repeat yourself (DRY). <em>Tell, don&#8217;t ask</em> helps you put logic one place (where its concern is handled) instead of scattering and copying it all around.</li>
<li>When modelling, it is also important to consider how easy it is to read and use the code for the developers.</li>
</ul>
<p>So, if there is only one thing you want to keep in the back of your head when programming, I suggest it is <em>Tell, don&#8217;t ask</em>.</p>
<p>- Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2009/08/16/tell-dont-ask/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Understand, don&#8217;t just follow</title>
		<link>http://tore.vestues.no/2009/05/02/understand-dont-just-follow/</link>
		<comments>http://tore.vestues.no/2009/05/02/understand-dont-just-follow/#comments</comments>
		<pubDate>Sat, 02 May 2009 13:52:48 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Coding principles]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Practices]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2009/05/02/understand-dont-just-follow/</guid>
		<description><![CDATA[It still surprises me, and scares me, how many people in our industry that just follow ideas and practices just because &#8220;someone&#8221; says it is the way to go, and how those same people do not understand why they are actually doing it.
Let me give you an example.
When Kent Beck and his extreme programmers started [...]]]></description>
			<content:encoded><![CDATA[<p>It still surprises me, and scares me, how many people in our industry that just follow ideas and practices just because &#8220;someone&#8221; says it is the way to go, and how those same people do not understand <em>why</em> they are actually doing it.</p>
<p>Let me give you an example.</p>
<p>When Kent Beck and his extreme programmers started out (with XP &#8211; extreme programming), they were talking about not writing comments in your code. And they explained what they meant: Comments are often an indication that your code isn&#8217;t readable on its own, the fix is often to write code that is easier to understand, not to add comments.</p>
<p>For me this is great advice. I try to keep my code clean and readable, and when I feel the urge to write comments, I first check if I can make the code more self explainable on its own. I personally write some comments, but never to explain code that looks like crap.</p>
<p>The problem with this advice is that it is actually bad advice if you do not understand <em>why</em> you should follow it. Those that do not understand why they should reduce their amount of comments, but still dig the idea, are probably writing as unreadable code as they always did, but now explaining the mess with even less comments. The result is probably all over worse code than if they didn&#8217;t follow the advice in the first place!</p>
<p>There are at least two lessons to be learned here.</p>
<p>First, if you do not understand <em>why</em> you are doing something, you are probably doing it wrong. It is time to start questioning what you are doing, always ask why.</p>
<p>Second. Say too many people misunderstand the purpose of something, thus applies it wrong, and thus is actually producing worse results than before. In our &#8220;no comment&#8221; example, people would, based on empirical evidence of the practitioners, say that the &#8220;no comment&#8221;-idea is a joke (since most of its followers are actually writing worse code). So by applying the idea wrong you are probably discrediting the whole idea.</p>
<p>I like to define agile in one sentence: &#8220;Ask Why&#8221;. &#8220;Why should we write this piece of documentation?&#8221; &#8220;Why should we follow this process?&#8221; &#8220;Why should we follow this practice?&#8221; If we better understand what we are doing, and can adjust our practices accordingly, I think we will get a long way. I think this is the core of agile.</p>
<p>- Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2009/05/02/understand-dont-just-follow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unit tests should not test software</title>
		<link>http://tore.vestues.no/2009/03/20/unit-tests-should-not-test-software/</link>
		<comments>http://tore.vestues.no/2009/03/20/unit-tests-should-not-test-software/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 05:32:23 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Practices]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2009/03/20/unit-tests-should-not-test-software/</guid>
		<description><![CDATA[Register your claim
When I refactor or make changes to code I need somehow to verify that the changes do not break anything. I want to do it with unit tests. Unit tests are my safety net. My philosophy on unit testing is something like, if you do not want me to change some of your [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Register your claim</strong><br />
When I refactor or make changes to code I need somehow to verify that the changes do not break anything. I want to do it with unit tests. Unit tests are my safety net. My philosophy on unit testing is something like, if you do not want me to change some of your functionality then &#8220;register your claim&#8221; on that functionality as a unit test. </p>
<p><strong>Unit tests specify</strong><br />
There is a lot of functionality (or business logic) that is accidental, meaning that it is not really necessary and it might even be plain wrong, a bug. It happens, a lot. It is hard to know if a piece of code is accidental or not if you do not have a way to express it. A unit test is a great way to express your intent and your &#8220;real&#8221; functionality. For me, unit tests are specifications. They specify the intended functionality. This is explicit functionality. I love explicit functionality. In fact I love almost anything explicit when it comes to code. I want to read loud and clear what the intentions are. The opposite of explicit functionality is of course implicit functionality. This is the functionality that resides in the code without anything or one to claim its importance. Implicit functionality might always be accidental, and that is why it is so hard to work with that kind of functionality. You do not know if it&#8217;s supposed to be there. </p>
<p><strong>Unit tests verify</strong><br />
If all important functionality is ensured with unit tests, you have your safety net. The unit tests verify what you specified. Then refactoring is a dream. Keeping the codebase neat, up to date and clean is easy. To be able to nurture your codebase, through refactoring, you will need this safety net. It verifies your intentions and ignores all unnecessary code. </p>
<p><strong>Unit tests do not test software</strong><br />
This way unit tests ensures that the intended functionality in your classes stays there, and makes it easier to refactor. But it does not check if your system work. It does not verify that you have put it all together the right way. It does not check if everything goes right in the databases, on files or in the user interface. Partly integration tests will do this job for you, and partly manual testing. </p>
<p><strong>Abstractions through OO</strong><br />
When I talk about unit tests, I consider my units to be classes. I also want to stress the point of knowing where to put your logic. Responsibilities should be placed where it belongs, in the right concepts (on the right classes). This is the fundament of object orientation, expressed elegantly through domain driven design. The concepts are the classes. Thus it is very important to verify the logic where it belongs, on the classes. And why should we use classes and separate logic? There are mighty reasons for this, but for now let me just say: to avoid cognitive overload. </p>
<p><strong>You need all types of tests</strong><br />
So, unit tests are there to specify the behavior of the systems concepts (think DDD). This is imperative to be able to refactor the core of your system. But as I&#8217;ve said, this is far from enough to test your system. I find integration tests best for testing your software. Tests that are more like acceptance tests, checking a complete path of calls from top to bottom (and yes, I often include the database in these tests). In addition there are things you will not be able to test automatically (that easily). How does the gui look and feel? You need someone to test that too. </p>
<p>To conclude, you need a whole lot of unit tests to lock down functionality. You need integration tests to test your software, and you need people to test gui and other stuff that isn&#8217;t feasible to test any other way. And my opinion is that <i>you</i> should do all this before you send it to QA. </p>
<p>-Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2009/03/20/unit-tests-should-not-test-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The importance of code that communicates</title>
		<link>http://tore.vestues.no/2009/03/10/the-importance-of-code-that-communicates/</link>
		<comments>http://tore.vestues.no/2009/03/10/the-importance-of-code-that-communicates/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 19:03:51 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Coding principles]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Practices]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2009/03/10/the-importance-of-code-that-communicates/</guid>
		<description><![CDATA[One of the major reasons that our industry produces software that is full of bugs, with a massive cost of change and with a short life expectancy is that developers do not understand the importance of writing code that communicates. Yes, one of the most important aspects of software development is to write code that [...]]]></description>
			<content:encoded><![CDATA[<p>One of the major reasons that our industry produces software that is full of bugs, with a massive cost of change and with a short life expectancy is that developers do not understand the importance of writing code that communicates. Yes, <i>one of the most important aspects of software development is to write code that communicates</i>. </p>
<p><strong>Disclaimer:</strong> There are several reasons software projects fail and many of them are caused by management &#8211; way above the developers. Still, we as developers have to take our part of the blame, and crap code is our contribution to the failure. </p>
<p><strong>It is not about algorithms and performance</strong></p>
<p>I didn&#8217;t learn much about communicative code at the University. And I still do not think people learn a lot about it. Students probably still think that software development is all about performance and effective algorithms. I&#8217;m sorry, often it&#8217;s nothing like that. In most business applications today there are no fancy algorithms. It&#8217;s just a huge amount of code that is trying to express the rules and logic that exist in the business. Performance might be an issue, but it has nothing to do with tweaking algorithms, it&#8217;s about architecture, data loads and sometimes really bad code.</p>
<p><strong>So, what&#8217;s the problem?</strong></p>
<p>The major problem with business applications today is the huge amount of code. The amount is not a problem in itself, but it gets to be a problem very fast when it&#8217;s hard to understand what it does.</p>
<p>Let&#8217;s take a simple example: Methods in today’s software are often way too long. It takes a lot of time to understand 100 lines of code that does several different things, and it&#8217;s even harder to change it without breaking something. I&#8217;ve seen tons of code that looks like that, and I&#8217;ve spent ages fixing such code. Believe me, code like this is very expensive and it will soon be full of bugs. Such software deteriorates pretty fast, and before you know it you&#8217;re at a point where whenever you remove a bug, you add two new ones. We should all be ashamed, honestly.</p>
<p>Code that is hard to understand is hard to change; software that is hard to change will be expensive and slow to change, and the risk of the changes adding new bugs is high. Who wants an application where it costs a fortune to add features, takes forever, and adds new bugs?</p>
<p><strong>It&#8217;s about communication</strong></p>
<p>Yes, it is a mess, but what can you do? We have to understand that writing software is about communication!</p>
<p>Put simple: Code that is easy to understand is easy to change. When it&#8217;s easy to change the risk of introducing bugs is low. That&#8217;s the kind of software your customers want!</p>
<p>Martin Fowler hit the nail on the head when he said:</p>
<blockquote><p>&#8220;Any fool can write code that a computer can understand. Good programmers write programs that humans understand.&#8221;</p></blockquote>
<p><strong>What can I do?</strong></p>
<p>When I write software, my main concern is actually if I am expressing my code in a way that others will be able to understand. And the &#8220;others&#8221; are quite often myself. When I get back to code I wrote two months ago I want it to be really easy to both understand and change that code. </p>
<p>When I have to work with code that is hard to understand I often make it easier to understand first, then make the changes. I keep my methods short. I keep my classes short. I try to organize my code so that related logic is grouped together, and unrelated logic is separated.  I write tests for my code that explains the code. <i>I care about the code I write</i>.</p>
<p><i>Writing code that communicates is first and foremost a mindset. Get it!</i> Then it is a set of practices and principles. Read them, train them and practice them. Find out what works for you. Nothing can replace experience.</p>
<p>Robert &#8220;Uncle Bob&#8221; Martin has written an excellent book on the topic: <a href="http://www.amazon.co.uk/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1235312824&#038;sr=8-1">Clean Code</a>. Read it now! Kent Beck is also passionate about this, and wrote this book: <a href="http://www.amazon.co.uk/Implementation-Patterns-Addison-Wesley-Signature-Kent/dp/0321413091/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1235313000&#038;sr=1-1">Implementation Patterns</a>. </p>
<p>I&#8217;m holding various presentations about what I call Code Quality. Communication is a vital part of that. </p>
<p>- Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2009/03/10/the-importance-of-code-that-communicates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Refactoring</title>
		<link>http://tore.vestues.no/2009/01/19/refactoring/</link>
		<comments>http://tore.vestues.no/2009/01/19/refactoring/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 18:54:55 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Coding principles]]></category>
		<category><![CDATA[Practices]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2009/01/19/refactoring/</guid>
		<description><![CDATA[To make it clear: &#8220;Refactoring&#8221; (as the term made famous by Martin Fowler in his great book with the same name), means to change the code without changing its behavior. Too many people talk about refactoring when changing some of the behavior of a system. This interpretation is just plain wrong.
This distinction is not just [...]]]></description>
			<content:encoded><![CDATA[<p>To make it clear: &#8220;Refactoring&#8221; (as the term made famous by Martin Fowler in his great book with the same name), means <i>to change the code without changing its behavior.</i> Too many people talk about refactoring when changing some of the behavior of a system. This interpretation is just plain wrong.</p>
<p>This distinction is not just a play with words, it is important to understand what the practice of refactoring is.</p>
<p>When I stress the importance of the practice of continuously refactoring the code base, it would make no sense if you thought I was talking about changing requirements. When I talk about refactoring and its importance, <i>I talk about code quality</i>.</p>
<p>Refactoring means to enhance the code quality of the system. It is probably the single most important practice to prevent code rot and design debt.</p>
<p>That&#8217;s a major distinction.</p>
<p>Fowler defines refactoring this way: &#8220;a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior&#8221;.</p>
<p>Everyone should know of this practice, understand what it means, and understand its vital effects on the code base.</p>
<p>-Tore</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2009/01/19/refactoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

