<?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; Learning</title>
	<atom:link href="http://tore.vestues.no/category/learning/feed/" rel="self" type="application/rss+xml" />
	<link>http://tore.vestues.no</link>
	<description>On a quest for the silver bullet..</description>
	<lastBuildDate>Mon, 26 Jul 2010 12:22:05 +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>Speaking at NDC 2010</title>
		<link>http://tore.vestues.no/2010/04/13/speaking-at-ndc-2010/</link>
		<comments>http://tore.vestues.no/2010/04/13/speaking-at-ndc-2010/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 12:41:57 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Coding principles]]></category>
		<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/?p=92</guid>
		<description><![CDATA[I&#8217;m very proud to announce that I will be speaking at the Norwegian Developers Conference 2010 (track 6, day 3, 16:20). 
My talk is named &#8220;A Style of programming&#8221;:
&#8220;This talk describes a set of coding principles that constitutes a style of programming that focuses on ease of coding, ease of changing the code, and ease [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_93" class="wp-caption alignright" style="width: 210px"><img src="http://vestues.no/tore/wp-content/ndc2010.png" alt="Ndc 2010" title="ndc2010" width="200" height="83" class="size-full wp-image-93" /><p class="wp-caption-text">Ndc 2010</p></div>
<p>I&#8217;m very proud to announce that I will be speaking at the <a href="http://www.ndc2010.no/">Norwegian Developers Conference 2010</a> (track 6, day 3, 16:20). </p>
<p>My talk is named &#8220;A Style of programming&#8221;:</p>
<p>&#8220;This talk describes a set of coding principles that constitutes a style of programming that focuses on ease of coding, ease of changing the code, and ease of testing the code. The presentation aims at helping programmers understand how the principles relate to actual code. Every principle is made concrete through examples. This style of programming is influenced by leading object oriented and agile developers, and it is perfect for applying on object oriented languages such as C#.&#8221;</p>
<p>Hope to see you there!</p>
<p>- Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2010/04/13/speaking-at-ndc-2010/feed/</wfw:commentRss>
		<slash:comments>1</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>Recommended Books</title>
		<link>http://tore.vestues.no/2009/04/27/recommended-books/</link>
		<comments>http://tore.vestues.no/2009/04/27/recommended-books/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 11:53:04 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2009/04/27/recommended-books/</guid>
		<description><![CDATA[I just added a new page on my blog: Recommended Books. I will update it regurarly. You can also subscribe to the recommendations (feed at the bottom of that page).
]]></description>
			<content:encoded><![CDATA[<p>I just added a new page on my blog: <a href="http://tore.vestues.no/recommended-books/">Recommended Books</a>. I will update it regurarly. You can also subscribe to the recommendations (feed at the bottom of that page).</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2009/04/27/recommended-books/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>Prolog within Java</title>
		<link>http://tore.vestues.no/2008/02/15/prolog-within-java/</link>
		<comments>http://tore.vestues.no/2008/02/15/prolog-within-java/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 07:32:44 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://tore.vestues.no/2008/02/15/prolog-within-java/</guid>
		<description><![CDATA[Last night I attended a meeting at my local java user group. The theme of the presentation was actually Prolog, and a Prolog-framework for Java was presented.
I enjoy learning different ways to solve (the same) problems,  and I strongly believe it is important to do that. Seeing other ways to solve common problems will help expand [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I attended <a href="http://www4.java.no/web/show.do?page=42;7&amp;appmode=/showReply&amp;articleid=6108">a meeting at my local java user group</a>. The theme of the presentation was actually Prolog, and a <a href="https://jtrolog.dev.java.net/">Prolog-framework for Java </a>was presented.</p>
<p>I enjoy learning different ways to solve (the same) problems,  and I strongly believe it is important to do that. Seeing other ways to solve common problems will help expand your mind as to how you can solve problems yourself. That&#8217;s why i found this meeting so interesting too. Maybe I will not use Prolog so much myself, but I can still learn from it&#8217;s way of thinking, and enrich both my thinking and my code written in other languages.</p>
<p><strong>Prolog</strong> </p>
<p>Well, back to Prolog. I haven&#8217;t really been introduced to Prolog before, so I enjoyed the introduction we got. Three things strike me with Prolog:</p>
<p>1) How different it is from other mainstream programming languages.  Here we have a language that actually does not contain an &#8220;if&#8221;-statement, and it still solves problems. I find that fascinating in itself. It&#8217;s a completely different way to solve problems.</p>
<p>2) How declarative and explicit it is about the (domain) rules. Given a well defined domain I would love to express the rules for that domain in Prolog. It&#8217;s really beautiful.</p>
<p>3) It must be a nightmare to debug. When your ruleset and dataset starts to grow, it must be a nightmare to debug and even worse to try to make changes to it.</p>
<p><strong>Java and Prolog (<a href="https://jtrolog.dev.java.net/">jTrolog</a>)</strong></p>
<p>Given my observations about Prolog are &#8220;correct&#8221;, I believe Prolog can be a beautiful tool, but I think the domain must be small and specific. And given that many of us normally work on enterprise applications with not so small and well defined domains, maybe Prolog is not the thing.</p>
<p>But then again, what if we find smaller well defined sub-domains within those enterprise applications?</p>
<p>Enter<a href="https://jtrolog.dev.java.net/"> jTrolog </a>(or one of it&#8217;s equivalents). jTrolog let&#8217;s you define and execute Prolog in plain Java. What I see here is opportunity. Now we can still make our enterprise applications in Java, but all of a sudden we can introduce the elegance of Prolog for specific sub-domains.</p>
<p>When it comes to it, it&#8217;s ofcourse not just that easy to introduce Prolog in your next Java project. For instance, introducing a new language that probably no one else on the project understands well, will most often not be a smart thing to do. But such barriers are there to be overcome.</p>
<p>Expand the horizon!</p>
<p>- Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2008/02/15/prolog-within-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apply the knowledge</title>
		<link>http://tore.vestues.no/2007/09/13/learning-by-doing/</link>
		<comments>http://tore.vestues.no/2007/09/13/learning-by-doing/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 19:20:37 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://tore_.vestues.no/2007/09/13/learning-by-doing/</guid>
		<description><![CDATA[I&#8217;ve always been interested in improving myself as a developer. I read and study, I discuss, I attend presentations and seminars, and so on. I really invest alot of time and effort into my knowledge. The obvious question really, is why? Put short, it&#8217;s about writing better code, and designing better systems. There is no [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been interested in improving myself as a developer. I read and study, I discuss, I attend presentations and seminars, and so on. I really invest alot of time and effort into my knowledge. The obvious question really, is why? Put short, it&#8217;s about writing better code, and designing better systems. There is no point in aquiring the knowledge without applying the knowledge.</p>
<p class="vspace">Realizing this, I started using a simple, yet effective method of making this transition a bit easier in everyday life. Basically, whenever I read something interesting that I want to make use of, I study it, make out the essence of it, write it down, and put it over my desk (virtually or physically). Then I make a point out of considering/applying it whenever applicable.</p>
<p class="vspace">For instance, when I first read about the Law of Demeter, I wrote down the essence of it, and put it over my desk. whenever I got to a point where I broke that law, I was reminded by my note, and started to dwell abit about what the Law of Demeter was about, how my design would look if I solved my problem without breaking it, and the costs and benefits for doing it this way. Pretty soon I really understood the point, and it became a part of my general skills. I learned by doing. Doing it this way kind of forces you to actively consider the theory, testing it, applying it, and evaluating the results.</p>
<p class="vspace">I&#8217;m really happy with this technique, and nowadays there is always a note over my desk.</p>
<p class="vspace">If you want to try it out, you really should. Here&#8217;s a few simple guidelines:</p>
<ul>
<li><em>Keep your scope simple</em>. Don&#8217;t write things like: &#8220;apply XP&#8221;. It&#8217;s too general. Keep the scope narrow and concrete, like: &#8220;always write the test first&#8221;. It&#8217;s easier to apply, and it&#8217;s easier to evaluate the costs and benefits.</li>
<li><em>Do not have more than one scope at a time</em>. It&#8217;s important that you can be focused. Having to many things to consider, will complicate things, and you&#8217;ll probably fail applying anything.</li>
<li><em>Commit yourself</em>. When you have a scope, be true to it. This is the best way to learn it.</li>
<li><em>Switching scope</em>. Don&#8217;t switch the topic before you feel you&#8217;ve learned it properly.</li>
</ul>
<p>Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2007/09/13/learning-by-doing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://tore.vestues.no/2007/09/12/hello-world/</link>
		<comments>http://tore.vestues.no/2007/09/12/hello-world/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 19:54:08 +0000</pubDate>
		<dc:creator>Tore Vestues</dc:creator>
				<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi,
Finally I’m up and running.
Communication is the key to learning. Through communication we learn from others, and through discussion we develop new knowledge together. This blog is an attemt to communicate. It&#8217;s about sharing my thoughts, and getting feedback on them from the larger community. I think there is a lot of learning in that [...]]]></description>
			<content:encoded><![CDATA[<p class="main_post">Hi,</p>
<p>Finally I’m up and running.</p>
<p>Communication is the key to learning. Through communication we learn from others, and through discussion we develop new knowledge together. This blog is an attemt to communicate. It&#8217;s about sharing my thoughts, and getting feedback on them from the larger community. I think there is a lot of learning in that process. So give me a comment, and let’s learn together!</p>
<p> Tore Vestues</p>
]]></content:encoded>
			<wfw:commentRss>http://tore.vestues.no/2007/09/12/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
