<?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>Freya.no</title>
	<atom:link href="http://wp.freya.no/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp.freya.no</link>
	<description>Knowledge is power</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:50:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Flex: force focus on parent change</title>
		<link>http://wp.freya.no/2010/07/flex-force-focus-on-parent-change/</link>
		<comments>http://wp.freya.no/2010/07/flex-force-focus-on-parent-change/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 08:36:05 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=743</guid>
		<description><![CDATA[I was trying to solve a problem of resetting a focus if the parent changes. I had different buttons that show the same .mxml-form but with different data. The problem was that I needed the focus to be on the first date-field whenever the form is shown so that the user can begin typing data [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to solve a problem of resetting a focus if the parent changes. I had different buttons that show the same .mxml-form but with different data. The problem was that I needed the focus to be on the first date-field whenever the form is shown so that the user can begin typing data right away.</p>
<pre class="brush: xml;">
&lt;mx:HBox&gt;
       &lt;mx:Button id=&quot;noData&quot; click=&quot;showPanelWithNoData()&quot; /&gt;
       &lt;mx:Button id=&quot;someData&quot; click=&quot;showPanelWithSomeData()&quot; /&gt;
       &lt;mx:Button id=&quot;withData&quot; click=&quot;showPanelWithData()&quot; /&gt;

       &lt;myCustomForm:DataForm width=&quot;100%&quot; /&gt;
&lt;/mx:HBox&gt;
</pre>
<p>So for each time one of the buttons is pushed I need the focus to be on myDate-field. To solve the problem I used &#8220;<strong>updateComplete</strong>&#8220;-property of the field.</p>
<p>DataForm.mxml</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;DataForm
    xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;&gt;
    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.managers.FocusManager;

            private function resetFocus():void {
                if (focusManager != null &amp;&amp; myDate.focusManager != null) {
                    focusManager.setFocus(myDate);
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:FormItem&gt;
        &lt;mx:TextField id=&quot;myDate&quot;
            updateComplete=&quot;resetFocus()&quot;/&gt;
    &lt;/mx:FormItem&gt;

&lt;/DataForm&gt;
</pre>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=743" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/07/flex-force-focus-on-parent-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When will house building start working like programmers?</title>
		<link>http://wp.freya.no/2010/07/when-will-house-building-start-working-like-programmers/</link>
		<comments>http://wp.freya.no/2010/07/when-will-house-building-start-working-like-programmers/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 11:45:28 +0000</pubDate>
		<dc:creator>kent</dc:creator>
				<category><![CDATA[Memorable]]></category>
		<category><![CDATA[house building]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=735</guid>
		<description><![CDATA[1. Painters need to start painting the interiors before the house foundation is started on. 2. Carpenters must finish the roof before the walls are strong enough to support it. 3. The exterior should look like gold, but in reality made of mud. 4. Skip the foundation. Nobody will ever care to take a look [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wp.freya.no/files/2010/07/house-may20031.jpg"><img class="alignleft size-medium wp-image-736" title="Unfinished house" src="http://wp.freya.no/files/2010/07/house-may20031-300x225.jpg" alt="" width="300" height="225" /></a>1. Painters need to start painting the interiors before the house foundation is started on.</p>
<p>2. Carpenters must finish the roof before the walls are strong enough to support it.</p>
<p>3. The exterior should look like gold, but in reality made of mud.</p>
<p>4. Skip the foundation. Nobody will ever care to take a look there, or have access there.</p>
<p>5. The electricity, water pipes and waste disposal can go through the same pipe.</p>
<p>6. When the house is almost finished, the owner wants to move a couple of walls, add some floors, at no extra cost.</p>
<p>7. When the house is &#8220;finished&#8221;, the owner must expect to patch it up when it rains, apply service personell monthly and within 2 years the house it out of date.</p>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=735" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/07/when-will-house-building-start-working-like-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010, TR1 and Boost.</title>
		<link>http://wp.freya.no/2010/06/visual-studio-2010-tr1-and-boost/</link>
		<comments>http://wp.freya.no/2010/06/visual-studio-2010-tr1-and-boost/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 06:36:31 +0000</pubDate>
		<dc:creator>kent</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[TR1]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=732</guid>
		<description><![CDATA[When porting projects from Visual Studio 2008 or earlier to Visual Studio 2010, and you&#8217;re using boost::shared_ptr or other features present in TR1, there will be conflicts. Boost has their own implementation of shared_ptr in boost::shared_ptr and with VS2010 they have put shared_ptr in std::tr1 and they have made shared_ptr available through std::shared_ptr. When using [...]]]></description>
			<content:encoded><![CDATA[<p>When porting projects from Visual Studio 2008 or earlier to Visual Studio 2010, and you&#8217;re using boost::shared_ptr or other features present in TR1, there will be conflicts. Boost has their own implementation of shared_ptr in boost::shared_ptr and with VS2010 they have put shared_ptr in std::tr1 and they have made shared_ptr available through std::shared_ptr. When using using namespace std; and using namespace boost; there will be ambiguities.</p>
<p>To disable the C++0x/TR1 headers from VS2010 and use the boost implementation, define _HAS_CPP0X=0 in the project settings for your VS2010 project.</p>
<p><strong>Edit</strong>: The define was in error set to _HAS_CPP0X=1. It should be _HAS_CPP0X=0 to disable TR1 headers from Visual Studio 2010.</p>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=732" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/06/visual-studio-2010-tr1-and-boost/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sybase: how to update a column</title>
		<link>http://wp.freya.no/2010/05/sybase-how-to-update-a-column/</link>
		<comments>http://wp.freya.no/2010/05/sybase-how-to-update-a-column/#comments</comments>
		<pubDate>Wed, 26 May 2010 11:09:05 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=714</guid>
		<description><![CDATA[If you need to update a column in a table than you can use different approaches: 1) To modify a datatype of the column: alter table Person modify COLUMN_A char(2) null 2) To make a column required: First look if the column has some constraints: sp_helpconstraint Person If the column has constraints than you need [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to update a column in a table than you can use different approaches:</p>
<p>1) To modify a datatype of the column:</p>
<pre class="brush: sql;">
alter table Person modify COLUMN_A char(2) null
</pre>
<p>2) To make a column required:</p>
<p>First look if the column has some constraints:</p>
<pre class="brush: sql;">
sp_helpconstraint Person
</pre>
<p>If the column has constraints than you need to drop them first:</p>
<pre class="brush: sql;">
alter table Person drop constraint FK_PERSON_REF_ADRESS
</pre>
<p>Then if you can specify a default value for the column you can drop the column and create it again:</p>
<pre class="brush: sql;">
alter table Person drop COLUMN_A
alter table Person add COLUMN_A char(2) default 0 not null
</pre>
<p>But there is not the way we always need it. In such a case we need to drop the hole table and create it again:</p>
<pre class="brush: sql;">
drop table Person

create table Person(
   COLUMN_B     numeric(9,0)   null,
   COLUMN_C     char(2)        not null,
   COLUMN_D     date           not null,
   COLUMN_A     numeric(9,0)   identity,
   constraint PK_PERSON primary key (COLUMN_A),
   constraint FK_PERSON_REF_ADRESS foreign key (COLUMN_B)
         references Adress (COLUMN_ADRESS_A)
)
</pre>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=714" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/05/sybase-how-to-update-a-column/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ugly code: The Law of Demeter</title>
		<link>http://wp.freya.no/2010/05/ugly-code-the-law-of-demeter/</link>
		<comments>http://wp.freya.no/2010/05/ugly-code-the-law-of-demeter/#comments</comments>
		<pubDate>Fri, 21 May 2010 21:20:12 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[ugly code]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=708</guid>
		<description><![CDATA[I&#8217;ve recently come to a heuristic called the Law of Demeter (LoD) or Principle of Least Knowledge that says a module should not know about the innards of the objects it manipulates. More precisely, the method of a particular class should call: other methods of the same class objects created by the method itself objects [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently come to a heuristic called the <a href="http://en.wikipedia.org/wiki/Law_of_Demeter">Law of Demeter</a> (LoD) or Principle of Least Knowledge that says a module should not know about the innards of the objects it manipulates. More precisely, the method of a particular class should call:</p>
<ul>
<li>other methods of the same class</li>
<li>objects created by the method itself</li>
<li>objects passed as arguments to the method</li>
<li>objects held in an instance variable of the same class</li>
</ul>
<p>And that&#8221;s all!</p>
<p>So the following code appears to violate the Law:</p>
<pre class="brush: java;">
String output = obj.getContext().getOptions().getDir().getPath();
</pre>
<p>It&#8217;s easy to forget something around such a structure. This one can solve the issue:</p>
<pre class="brush: java;">
String output = obj.getPathFromContext();
</pre>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=708" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/05/ugly-code-the-law-of-demeter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some funny smilies</title>
		<link>http://wp.freya.no/2010/04/some-funny-smilies/</link>
		<comments>http://wp.freya.no/2010/04/some-funny-smilies/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 21:44:11 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Tip]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[smiley]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=643</guid>
		<description><![CDATA[d]]></description>
			<content:encoded><![CDATA[<p><a href="http://wp.freya.no/files/2010/04/kaffesmile.gif"><img class="alignnone size-full wp-image-660" title="kaffesmile" src="http://wp.freya.no/files/2010/04/kaffesmile.gif" alt="" width="44" height="27" /></a> <a href="http://wp.freya.no/files/2010/04/mirror.gif"><img class="alignnone size-full wp-image-661" title="mirror" src="http://wp.freya.no/files/2010/04/mirror.gif" alt="" width="120" height="35" /></a><br />
<a href="http://wp.freya.no/files/2010/04/kryss.gif"><img class="alignnone size-full wp-image-663" title="kryss" src="http://wp.freya.no/files/2010/04/kryss.gif" alt="" width="71" height="28" /></a><a href="http://wp.freya.no/files/2010/04/doctor.gif"><img class="alignnone size-full wp-image-658" title="doctor" src="http://wp.freya.no/files/2010/04/doctor.gif" alt="" width="38" height="63" /></a> <a href="http://wp.freya.no/files/2010/04/jeeves.gif"><img class="alignnone size-full wp-image-659" title="jeeves" src="http://wp.freya.no/files/2010/04/jeeves.gif" alt="" width="54" height="41" /></a></p>
<p><a href="http://wp.freya.no/files/2010/04/fotball-fan1.gif"><img class="alignnone size-full wp-image-664" title="fotball fan" src="http://wp.freya.no/files/2010/04/fotball-fan1.gif" alt="" width="51" height="25" /></a><a href="http://wp.freya.no/files/2010/04/futball.gif"><img class="alignnone size-full wp-image-648" title="futball" src="http://wp.freya.no/files/2010/04/futball.gif" alt="" width="75" height="30" /></a> <a href="http://wp.freya.no/files/2010/04/hi2.gif"><img class="alignnone size-full wp-image-665" title="hi" src="http://wp.freya.no/files/2010/04/hi2.gif" alt="" width="50" height="20" /></a></p>
<p>d<a href="http://wp.freya.no/files/2010/04/bear.gif"><img class="alignnone size-full wp-image-652" title="bear" src="http://wp.freya.no/files/2010/04/bear.gif" alt="" width="42" height="36" /></a><a href="http://wp.freya.no/files/2010/04/car.gif"><img class="alignnone size-full wp-image-653" title="car" src="http://wp.freya.no/files/2010/04/car.gif" alt="" width="53" height="29" /></a><a href="http://wp.freya.no/files/2010/04/dancegirl.gif"><img class="alignnone size-full wp-image-655" title="dancegirl" src="http://wp.freya.no/files/2010/04/dancegirl.gif" alt="" width="36" height="34" /></a><a href="http://wp.freya.no/files/2010/04/negr.gif"><img class="alignnone size-full wp-image-656" title="negr" src="http://wp.freya.no/files/2010/04/negr.gif" alt="" width="30" height="50" /></a><a href="http://wp.freya.no/files/2010/04/dans.gif"><img class="alignnone size-full wp-image-666" title="dans" src="http://wp.freya.no/files/2010/04/dans.gif" alt="" width="42" height="25" /></a></p>
<p><a href="http://wp.freya.no/files/2010/04/prison.gif"><img class="alignnone size-full wp-image-662" title="prison" src="http://wp.freya.no/files/2010/04/prison.gif" alt="" width="130" height="67" /></a></p>
<p><a href="http://wp.freya.no/files/2010/04/veeg.gif"><img class="alignnone size-full wp-image-669" title="veeg" src="http://wp.freya.no/files/2010/04/veeg.gif" alt="" width="42" height="27" /></a><a href="http://wp.freya.no/files/2010/04/duss.gif"><img class="alignnone size-full wp-image-670" title="duss" src="http://wp.freya.no/files/2010/04/duss.gif" alt="" width="33" height="40" /></a></p>
<p><a href="http://wp.freya.no/files/2010/04/telephone.gif"><img class="alignnone size-full wp-image-667" title="telephone" src="http://wp.freya.no/files/2010/04/telephone.gif" alt="" width="22" height="18" /></a><a href="http://wp.freya.no/files/2010/04/cathug2.gif"><img class="alignnone size-full wp-image-668" title="cathug2" src="http://wp.freya.no/files/2010/04/cathug2.gif" alt="" width="41" height="22" /></a></p>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=643" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/04/some-funny-smilies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User warnings for MS Visual Studio</title>
		<link>http://wp.freya.no/2010/04/user-warnings-for-ms-visual-studio/</link>
		<comments>http://wp.freya.no/2010/04/user-warnings-for-ms-visual-studio/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 09:43:39 +0000</pubDate>
		<dc:creator>kent</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=639</guid>
		<description><![CDATA[This little macro prints out user warnings to the output window in a format the &#8220;Error List&#8221; within Visual Studio will understand and parse. Taken from Stack Overflow and modified a little. #define STRINGISE_IMPL(x) #x #define STRINGISE(x) STRINGISE_IMPL(x) // Use: #pragma message WARN(&#34;My message&#34;) #if _MSC_VER # define FILE_LINE_LINK __FILE__ &#34;(&#34; STRINGISE(__LINE__) &#34;) : &#34; [...]]]></description>
			<content:encoded><![CDATA[<p>This little macro prints out user warnings to the output window in a format the &#8220;Error List&#8221; within Visual Studio will understand and parse. <a href="http://stackoverflow.com/questions/471935/user-warnings-on-msvc-and-gcc" target="_blank">Taken from Stack Overflow and modified a little</a>.</p>
<pre class="brush: cpp;">
#define STRINGISE_IMPL(x) #x
#define STRINGISE(x) STRINGISE_IMPL(x)

	// Use: #pragma message WARN(&quot;My message&quot;)
#if _MSC_VER
#   define FILE_LINE_LINK __FILE__ &quot;(&quot; STRINGISE(__LINE__) &quot;) : &quot;
#   define WARN(exp) (FILE_LINE_LINK &quot;warning: &quot; exp)
#else//__GNUC__ - may need other defines for different compilers
#   define WARN(exp) (&quot;WARNING: &quot; exp)
#endif
</pre>
<p>It will produce output like this:</p>
<pre class="brush: plain;">
1&gt;.\src\bug.cpp(82) : warning: check me
</pre>
<p>When this line is present in the source file.</p>
<pre class="brush: cpp;">
#pragma message WARN(&quot;check me&quot;)
</pre>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=639" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/04/user-warnings-for-ms-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EJB 3.0 Roles</title>
		<link>http://wp.freya.no/2010/03/ejb-3-0-roles/</link>
		<comments>http://wp.freya.no/2010/03/ejb-3-0-roles/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 19:14:18 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[ejb3]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=619</guid>
		<description><![CDATA[I had some difficult time understanding all the roles regarding EJB3. Here is an easy-to-remember description of these roles that I found here. Imagine a factory producing computers: Bean Provider: Chip manufacturer. On the chip, there will be a label with &#8220;Warranty void if removed&#8221; the chip has the logic and the label sets a [...]]]></description>
			<content:encoded><![CDATA[<p>I had some difficult time understanding all the roles regarding EJB3. Here is an easy-to-remember description of these roles that I found <a href="http://www.coderanch.com/t/485260/EJB-Certification-SCBCD/certification/EJB-roles">here</a>.</p>
<p>Imagine a factory producing computers:</p>
<p><strong>Bean Provider: </strong><br />
Chip manufacturer. On the chip, there will be a label with  &#8220;Warranty void if removed&#8221; the chip has the logic and the label sets a  Role. If you are not authorized to repair it, warranty voids. (i.e. you  cannot access the internal chip if you are not in the role of &#8220;Warranty  Repair Person&#8221;.)</p>
<p><strong>Application Assembler</strong><br />
Mainboard assembler. It takes various chips and puts them on the  mainboard. If any additional resistor or cable are required, it will put  everything togheter to have something that is some kind of working unit  but requires additional assembling.</p>
<p><strong>EJB Server Provider</strong><br />
The EJB Server provider is the Computer Case manufacturer providing  a case with a power supply. Is a container for the mainboard</p>
<p><strong>Deployer</strong><br />
As every computer case is different and power voltage vary country  by country, the Deployer makes sure to adapt the mainboard to the  working environment. In this case adjusts the Voltage on the power  supply, and connects the cables. At the same time he will define who are  the person allowed to repair it (i.e. provide a list of authorized  repair centers)</p>
<p><strong>Persistence Provider</strong><br />
the persistence provider could be the network card company that  provides the driver to connect to a network.</p>
<p><strong>System Administrator</strong><br />
Is the person in charge to install the operating system and do  necessary configuration changes to the OS to connect to the server, and  will make sure to monitor that everything is working fine.</p>
<p>More about Enterprise Java Beans 3.0 and Sun Certified Business Component Developer (SCBCD) certification <a href="http://tatyana.freya.no/scbcd/">here</a>.</p>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=619" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/03/ejb-3-0-roles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clean code</title>
		<link>http://wp.freya.no/2010/02/clean-code/</link>
		<comments>http://wp.freya.no/2010/02/clean-code/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:13:49 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Memorable]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=585</guid>
		<description><![CDATA[The book by Robert C. Martin &#8220;Clean Code&#8221; is a really very useful material for all programmers. You can disagree with him sometimes (as I do), but it still provides some useful notes that helped me to place my programmer experience and knowledge where they belong. Here I&#8217;ll provide some key notes that I did [...]]]></description>
			<content:encoded><![CDATA[<p>The book by Robert C. Martin &#8220;Clean Code&#8221; is a really very useful material for all programmers. You can disagree with him sometimes (as I do), but it still provides some useful notes that helped me to place my programmer experience and knowledge where they belong. Here I&#8217;ll provide some key notes that I did while reading the book and that I&#8217;d like to memorize.</p>
<p>What you as a programmer <strong>SHOULD DO</strong>:</p>
<p>1. Give everything meaningful, searchable and pronounceable names.<br />
2. Use names that other programmers can understand. Remember that the code is for programmers, not customers.<br />
3. Functions should be small and smaller than that.<br />
4. Functions should do one thing. They should do it well. They should do it only.<br />
5. The ideal number of arguments for a function is zero. Max 3.<br />
6. Prefer exceptions to returning error codes. Create informative error messages.<br />
7. Prefer meaningful names to comments.<br />
8. Write JavaDoc only for public API&#8217;s.<br />
9. Format your code. While working in a team use a single formatting style.<br />
10. Test your code with clean tests. Remember that test code is just as important as production code.<br />
11. Test just one concept per test.<br />
12. Test should follow the FIRST rule:</p>
<ul> <strong>Fast </strong>-  tests should be fast.<br />
<strong>Independent </strong>- tests should not depend on each other<br />
<strong>Repeatable </strong>- tests should be repeatable in any environment<br />
<strong>Self-validating</strong> &#8211; the test should have a boolean output<br />
<strong>Timely </strong>- write unit tests before the production code.</ul>
<p>What you as a programmer should <strong>AVOID</strong>:<br />
1. Avoid encoding<br />
2. Avoid duplicate code. Watch out not only duplicate functions but also duplicate functionality.<br />
3. Avoid noisy, redundant, uninformative comments. Remember that one of the more common motivations for writing comments is bad code.</p>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=585" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/02/clean-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java certification preparation tools</title>
		<link>http://wp.freya.no/2010/02/java-certification-preparation-tools/</link>
		<comments>http://wp.freya.no/2010/02/java-certification-preparation-tools/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 21:55:56 +0000</pubDate>
		<dc:creator>Tatyana</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[certification]]></category>

		<guid isPermaLink="false">http://wp.freya.no/?p=469</guid>
		<description><![CDATA[SCJP &#8211; Sun Certified Java Programmer SCBDC &#8211; Sun Certified Business Component Developer]]></description>
			<content:encoded><![CDATA[<p><a href="http://tatyana.freya.no/scjp/">SCJP &#8211; Sun Certified Java Programmer</a><br />
<a href="http://tatyana.freya.no/scbcd/">SCBDC &#8211; Sun Certified Business Component Developer</a></p>
 <img src="http://wp.freya.no/wp-content/plugins/feed-statistics.php?view=1&post_id=469" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://wp.freya.no/2010/02/java-certification-preparation-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
