<?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>Manuel Aldana &#187; Uncategorized</title>
	<atom:link href="http://www.aldana-online.de/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aldana-online.de</link>
	<description>Software Engineering: blog &#38; .lessons_learned</description>
	<lastBuildDate>Sun, 22 Aug 2010 13:11:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Codebase size implications on Software development</title>
		<link>http://www.aldana-online.de/2010/05/09/process-implications-of-metric-lines-of-code-loc/</link>
		<comments>http://www.aldana-online.de/2010/05/09/process-implications-of-metric-lines-of-code-loc/#comments</comments>
		<pubDate>Sun, 09 May 2010 19:17:59 +0000</pubDate>
		<dc:creator>manuel aldana</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Software Maintenance]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aldana-online.de/?p=158</guid>
		<description><![CDATA[Following discusses the implications of big codebases. Codebase size can be measured with the well known &#8216;lines of code&#8217; (LOC) metric. 
The following codebase size and LOC metric scope is not fine grained on function or class level but for complete codebase or at least on subcomponent level.
Bad (anti-pattern): Codebase size as progress metric
Sometimes (though [...]]]></description>
			<content:encoded><![CDATA[<p>Following discusses the implications of big codebases. Codebase size can be measured with the well known &#8216;lines of code&#8217; (LOC) metric. </p>
<p>The following codebase size and LOC metric scope is not fine grained on function or class level but for complete codebase or at least on subcomponent level.</p>
<h3>Bad (anti-pattern): Codebase size as progress metric</h3>
<p>Sometimes (though fortunately rarely) QA or project management is taking codebase size and LOC as a progress metric to see what the project&#8217;s state is. The more lines of code have been written the closer the project is seen to have been completed. This is a definite anti-pattern for following reasons:</p>
<ul>
<li>It is extremely difficult to estimate, how much code will be necessary for a certain scope or a set of requirements. This implies that project or product management cannot know, how much code is missing to mark the requirements as done.</li>
<li>It is more about quality as of quantity of code. Well structured code with avoidance of duplication tends to have less lines of code.</li>
<li>It is very important and valuable to throw away dead code (code which isn&#8217;t used or executed anywhere). Using lines of code as a progress metric would mean this important refactoring will cause a negative project progress.</li>
</ul>
<h3>Good: Codebase size as compexity metric</h3>
<p>With a higher LOC metric you are likely to face following problems:</p>
<ul>
<li>Increase of feeback time: It takes longer to build deployable artifacts, to startup application and to verify implementation behaviour (this both applies to local development and CI servers).</li>
<li>Tougher requirements on development tools: Working on large codebases makes the IDE often run less smoothly (e.g. while doing refactorings, using several debugging techniques).</li>
<li>Code comprehension: More time has to be spent for reverse engineering or reading/understanding documentation. Code comprehension is vital to integrate changes and debugging.</li>
<li>More complex test-setup: Bigger codebases tend to have more complicated test-setup. This includes setting up external components (like databases, containers, message-queues) and also defining test-data (the domain model is likely to be rich).</li>
<li>Fixing bugs: First of all exposing a bug is harder (see test-setup). Further more localization of bug is tougher, because more code has to be narrowed down. Potentially more theories exist to have causes the bug.</li>
<li>Breaking code: New requirements are more difficult to implement and integrate without breaking existing functionality.</li>
<li>Product knowledge leakage: Bigger codebases tend to cover more functionality. The danger increases, that at some point the organization loses knowledge which functionality the software supports. This blindness has very bad implications on defining further requirements or strategies.
<li>Compatibility efforts: The larger a codebase the more likely it is that it already has a long lifetime (codebases tend to grow over the years). Along the age of software down-compatibility is a constant requirement, which increases (a lot of) effort.</li>
<li>Team size + fluctuation: Bigger codebases tend to have been touched by a big size of developers, which can cause knowledge leakage. Due to communication complexity, each developer only knows just a little part of the system and does not distribute it. Even worse due to team-size fluctuation is likely to be higher and knowledge gets completely lost for company.</li>
<li>etc. &#8230;</li>
</ul>
<h3>Quantification of LOC impact is hard</h3>
<p>Above statements are more qualitative and are not quantifiyable, because the exact mapping of a certain LOC number to a magic complexity number is unfeasible. For instance there are other criterias which have an impact on the complexity of a software system, which are independent of LOC:</p>
<ul>
<li>Choice of programming language/system: Maintaining 1.000 LOC of assembly is a complete different story as doing it with 1.000 of Java code.</li>
<li>Problem domain: Complex algorithms (e.g. to be found in AI or image processing) tend to have less lines of code but still are complicated.</li>
<li>Heterogenity of chosen technology in your complete source-code ecosystem: E.g. using 10 different frameworks and/or programming-languages and making them integrate to the overall system harder as concentrating on one  framework.</li>
<li>Quality and existence of documentation: E.g. Api-interfaces aren&#8217;t documented or motivations for major design decision are unknown. From developers point of view such a system is effectively more complex because a lot of effort has to be spent in reverse engineering.</li>
<li>etc. &#8230;</li>
</ul>
<h3>Conclusion</h3>
<p>The metric LOC representing codebase size has a big impact on your whole software development cycle. Therefore it should be measured, observed and tracked over time (also by subcomponent). Apart from showing you the current state and evolution of your codebase from historical point of view you can also use it proactively for future:</p>
<ul>
<li>Estimation/planning: When estimating features take the LOC metric has influence criteria. The higher the LOC the more complicated it will be to integrate feature.</li>
<li>YAGNI: Take YAGNI (&#8220;you ain&#8217;t gonna need it&#8221;) principle to the extreme. Only implement really necessary features. Do not make your software over-extensible and as simple as possible.</li>
<li>Refactor out dead code: Being aware of LOC as a complexity metric, you can create a culture of dead-code awareness. Throw away as much unused code away as you can.</li>
<li>Refactor out dead functionality: Software products often are unneccessarily overcomplex. Also push business towards are more simple product strategy and throw away unused features and achieve a smaller codebase.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.aldana-online.de/2010/05/09/process-implications-of-metric-lines-of-code-loc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending source-code syntax highlighting</title>
		<link>http://www.aldana-online.de/2009/12/13/extending-source-code-syntax-highlighting/</link>
		<comments>http://www.aldana-online.de/2009/12/13/extending-source-code-syntax-highlighting/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 12:39:13 +0000</pubDate>
		<dc:creator>manuel aldana</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aldana-online.de/?p=133</guid>
		<description><![CDATA[After all the decades of software development, and recently hyped trends (e.g. &#8220;programming in graphical diagrams&#8221;) plain text source code is still the most powerful way to build software systems. Regarding this a high degree of importance is readability and comprehension of source code. In fact you&#8217;re spending more time in reading as with writing [...]]]></description>
			<content:encoded><![CDATA[<p>After all the decades of software development, and recently hyped trends (e.g. &#8220;programming in graphical diagrams&#8221;) plain text source code is still the most powerful way to build software systems. Regarding this a high degree of importance is readability and comprehension of source code. In fact you&#8217;re spending more time in reading as with writing code. Apart from improving the structure of the code itself (the refactoring concept plays a big role here) syntax highlighting is also very important to get a quick overview. Following gives an example how and  why to tweak your editor defaults.</p>
<h3>IDE defaults</h3>
<p>Defaults from several IDEs or more simple text-editors are already giving big help, e.g. in showing keywords, instance fields or comments. Still in my view they can be tweaked, most of editors give options to extend things. Either they work with a graphical interface for changing settings (IDEs like IntelliJ, Eclipse etc.) or are working themselves with plain text highlighting configuration files (vim, krusader etc.). Your syntax highlighting toolbox contains text-decorations (like italic, underscored, bold) and coloring (foreground, background).<br />
For my tweaks I used my favorite IDE IntelliJ, which offers many syntax highlighting options. Just checkout your editor and see what is possible.</p>
<h3>Example BEFORE</h3>
<p>Following annoyed me on the default settings:</p>
<ul>
<li>Could not instantly see parameters and variables</li>
<li>No difference between local-vars and parameters</li>
<li>Non-javadoc comments were too grey. I write comments to explain the &#8216;Why&#8217; or a important block of a code statement. So comments should be better visible.</li>
<li>Todo comments were blue. Blue is a too &#8220;friendly&#8221; color to me, whereas looking at todos should wake me up!</li>
<li>Instance and static vars were colored the same though they have different semantics.</li>
<li>I tend to use more smaller methods as one monster method. The default highlighting does not separate between method declarations and calls.</li>
</ul>
<p>The BEFORE snippet:<br />
<img class="aligncenter" src="http://www.aldana-online.de/wp-content/uploads/2009/12/before.png" alt="before" /></p>
<h3>Example AFTER</h3>
<p>I changed settings to:</p>
<ul>
<li>Non-instance + static variables are blue now. Parameters should be handled with more care. (changing them side-effect the callee), so they are bold.</li>
<li>Static and instance vars have different colors now (pink vs. violet).</li>
<li>Comments have slight green background now.</li>
<li>Todo flags have the signal-color orange</li>
<li>Methods are underscored. Declarations are bold, calls are non-bold.</li>
</ul>
<p>The AFTER snippet:<br />
<img class="aligncenter" src="http://www.aldana-online.de/wp-content/uploads/2009/12/after.png" alt="after" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aldana-online.de/2009/12/13/extending-source-code-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
