<?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>Sadek Drobi's Blog &#187; Productivity</title>
	<atom:link href="http://sadekdrobi.com/category/productivity/feed/" rel="self" type="application/rss+xml" />
	<link>http://sadekdrobi.com</link>
	<description>Sadek Drobi</description>
	<lastBuildDate>Tue, 08 Mar 2011 22:56:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Abstraction for People: Configurations, Patterns, DSLs and Monads</title>
		<link>http://sadekdrobi.com/2009/03/29/abstraction-for-people-configurations-patterns-dsls-and-monads/</link>
		<comments>http://sadekdrobi.com/2009/03/29/abstraction-for-people-configurations-patterns-dsls-and-monads/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 23:10:53 +0000</pubDate>
		<dc:creator>Sadache</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[DOTNET]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[F#]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[LinQ]]></category>
		<category><![CDATA[Model Mismatch]]></category>
		<category><![CDATA[Paradigm Oriented Programming Language]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Useability]]></category>

		<guid isPermaLink="false">http://sadekdrobi.com/2009/03/29/abstraction-for-people-configurations-patterns-dsls-and-monads/</guid>
		<description><![CDATA[

LinQ is often understood in terms of introducing a Domain Specific Language to work with data to C# and .Net in general. The fact is:it is not, and there is a considerable difference between LinQ syntax nature and a DSL. The problem is that DSL definition is blur enough to take anything interesting or cool [...]]]></description>
			<content:encoded><![CDATA[</p>
<p><a href="http://sadekdrobi.com/wp-content/uploads/2009/03/dsc-2692a3.jpg"><img style="border-right-width: 0px; margin: 0px 20px 0px 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="DSC_2692a3" align="left" src="http://sadekdrobi.com/wp-content/uploads/2009/03/dsc-2692a3-thumb.jpg" width="222" height="327"></a></p>
<p>LinQ is often understood in terms of introducing a Domain Specific Language to work with data to C# and .Net in general. The fact is:it is not, and there is a considerable difference between LinQ syntax nature and a DSL. The problem is that DSL definition is blur enough to take anything interesting or cool under it!</p>
<p><span id="more-596"></span>
<p>Back to the beginning. When faced to doing software for a business that has some moving parts, a good practice is to make a generalization or an abstraction of the fixed part and express what is moving through some sort of configurations. That is in some respect what most of enterprise frameworks do when implementing the fixed part and letting you nicely only express what varies for your context. This way you are almost only concerned about your part since the framework itself is supposed to be steady and well abstracted and as a result implicit in your context. This experience hasn&#8217;t been nice enough when XML used to be involved. As someone that defends multi-paradigm design I could argue that XML can play a best fit in some contexts but this is out of the scope of this post. XML charset is not optimal for a lot of cases, so why not creating our own charset, and here comes DSLs.</p>
<p>Of course here I am only talking about the rise of DSLs in the enterprise and not the DSLs that FP been doing for ages, and I&#8217;ll get back to this one later.</p>
<p>Now using my favorite meta magical super dynamic language, I&#8217;d like to construct my customized embedded(or internal) domain specific language, and I&#8217;ll make my best to be English like/business like/ host language unlike to be really specific. And that is where my brains blocks! How can I get grasp of that thing, that &#8216;lil&#8217; language? It might be a personal problem I have because of the nature of my profession as a consultant: I switch contexts often, and&#8230; well I can only hope that it is 1:designed, 2: designed considering practices, rules and well established&#8230; did I say patterns?</p>
<p>&nbsp;</p>
<h3>P for Patterns :</h3>
<p>Another way of providing a solution to the problem of generality/variability is use a catalogue of non-formal generalization of recurring solutions to recurrent problems that provide a rich knowledge base of experience about tackling the kind of problem. Being of non-formal nature means that patterns aren&#8217;t provided as a framework but rather as a set of vocabulary and description that has its power in being adaptive&nbsp; and flexible. In my own experience, what I found particularly interesting when working with code that uses patterns is the way they communicate intent. If I find &#8220;Strategy&#8221; postfix I start searching for the other parts of the patterns and then start building on that. Providing this shared vocabulary helps me getting operational quite fast and help me scan code faster in a more &#8220;visual&#8221; way.</p>
<p>The good thing also about patterns is that I am still playing under the rules of my preferred hosting language. I know very well doing two very important things with it: combining and abstraction. A programming language is a set primitives together with a way to combine them and a mechanism for abstraction. What about my lil DSL? well it depends&#8230; Did I make sure to break any host language logic in there? Did I fight the intuitive nice &#8220;.&#8221;? Or did I decide that to implement my DSL for scratch? A programming language without means of abstraction results inevitably in long flat copy/paste configurations files and please don&#8217;t argue with me about their maintainability. What is the problem? The problem is that I am not a programming language designer, and to create a programming language no matter how simple and small it is, you need to have programming language design skills, so do you?</p>
<h3>Abstraction and Communication for People:</h3>
<p>Something that really drew my attention in functional programming languages like Haskell is their solid formal abstractions used for expressing computational patterns. These abstractions are packaged into a framework, and have a clear identity defined by a set of rules and are useable whenever semantics match. Take monads for example. It doesn&#8217;t matter if you are working with state, a database, the web, the screen or a robitic arm: you just use the do notation. The do notation in Haskell is a convenient way of working with a sound abstraction that is <a href="http://en.wikipedia.org/wiki/Monads_in_functional_programming">THE MONAD</a>. And all what you need to do for your framework is to verify that you satisfy the Monad laws and then you can safely use that syntax for it. This sharing of well identified semantics of the abstraction help developers reuse a well established mental model. LinQ syntax is the same, the dot &#8220;.&#8221; operator is the same, F#&#8217;s&nbsp; &#8220;|&gt;&#8221; operator is the same and examples are a lot. And I tend to prefer these kind of abstractions as they don&#8217;t sacrifice readability for developers for &#8220;readability&#8221; for users. I guess they have both the communicative property of Design Patterns yet they are formal and are offered as a concrete framework. Then of course you can name them DSLs, if you insist :) .</p>
<p>Now, if you are from the functional programming camp, and you have been doing embedded domain specific language using Lisp or Haskell for long time, then I apologize for wasting your time. I know you guys know best about doing abstractions, and you have lessons to tell if we&#8217;d only listen. And for those interested in some examples in EDSLs from the functional world, <a href="http://www.amazon.com/Haskell-School-Expression-Functional-Programming/dp/0521644089/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1238371080&amp;sr=1-1">Paul Hudak goes through the design of a language for reactive animation in his book</a>, <a href="http://augustss.blogspot.com/">Lennart Augustsson</a> discussed EDSLs in Haskell on his blog.</p>
<h3>Conclusion</h3>
<p>Though an attractive option of abstraction, DSLs trade off readability for developers for &#8220;potential&#8221; readability of users. Haskell monads, F#&#8217;s &#8220;|&gt;&#8221; operator and LinQ are examples of sound formal abstraction that can be offered as frameworks (code). These abstractions can save developers time being in a form of a recurring pattern that can be used in different contexts that match semantically, thus reusing developers&#8217; understanding of the abstraction&#8217;s mental model. </p>
]]></content:encoded>
			<wfw:commentRss>http://sadekdrobi.com/2009/03/29/abstraction-for-people-configurations-patterns-dsls-and-monads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quizz:: SharpLight &#124;&gt; What does this do?</title>
		<link>http://sadekdrobi.com/2009/01/19/quizz-sharplight-what-does-this-do/</link>
		<comments>http://sadekdrobi.com/2009/01/19/quizz-sharplight-what-does-this-do/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 10:40:58 +0000</pubDate>
		<dc:creator>Sadache</dc:creator>
				<category><![CDATA[DOTNET]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[F#]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[sharplight]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://sadekdrobi.com/2009/01/19/quizz-sharplight-what-does-this-do/</guid>
		<description><![CDATA[div &#60;&#60;   &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; a &#34;sadekdrobi.com&#34;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;&#60; img &#34;http://is.gd/gqVX&#34;    &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ++ &#34;my lil&#8217; friend&#34;
]]></description>
			<content:encoded><![CDATA[<p>div &lt;&lt;   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; a &quot;sadekdrobi.com&quot;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;&lt; img &quot;<a title="http://is.gd/gqVX" href="http://is.gd/gqVX">http://is.gd/gqVX</a>&quot;    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ++ &quot;my lil&#8217; friend&quot;</p>
]]></content:encoded>
			<wfw:commentRss>http://sadekdrobi.com/2009/01/19/quizz-sharplight-what-does-this-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refx :: Is OOP Better for Structuring your Code?</title>
		<link>http://sadekdrobi.com/2008/11/30/refx-is-oop-better-for-structuring-your-code/</link>
		<comments>http://sadekdrobi.com/2008/11/30/refx-is-oop-better-for-structuring-your-code/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 16:49:23 +0000</pubDate>
		<dc:creator>Sadache</dc:creator>
				<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Polyglot Programming]]></category>
		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://sadekdrobi.com/2008/11/30/refx-is-oop-better-for-structuring-your-code/</guid>
		<description><![CDATA[Programming languages that offer more power and flexibility have been lately gaining momentum. Johnatan Tang highlights, however, the flexibility vs. productivity tradeoff in terms of program structure. Whereas multi-dispatch languages provide more flexibility in arranging code, traditional object orientation makes organizing programs easier.


Originally posted on http://www.infoq.com/news/2008/11/oop-vs-fp-4-code-structure
Programming languages that offer more power and flexibility have been [...]]]></description>
			<content:encoded><![CDATA[<p>Programming languages that offer more power and flexibility have been lately gaining momentum. Johnatan Tang highlights, however, the flexibility vs. productivity tradeoff in terms of program structure. Whereas multi-dispatch languages provide more flexibility in arranging code, traditional object orientation makes organizing programs easier.</p>
<p><span id="more-546"></span></p>
<p>
<p>Originally posted on <a href="http://www.infoq.com/news/2008/11/oop-vs-fp-4-code-structure">http://www.infoq.com/news/2008/11/oop-vs-fp-4-code-structure</a>
<p>Programming languages that offer more power and flexibility have been lately gaining momentum. Johnatan Tang highlights, however, the flexibility vs. productivity tradeoff due, amongst other things, to the fact that traditional <a href="http://eve-language.blogspot.com/2008/11/oo-as-organizing-principle.html">object orientation makes organizing programs easier and more straightforward</a>.
<p>He argues that in languages with single dispatch, â€œgiven a parameter or other value, you know exactly what you can do with itâ€. Whereas in statically typed languages code is more revealing about values involved, in structurally typed languages it is more general, but still gives an immediate idea what operations are available on a given value. And for both, statically and structurally typed languages, it is pretty clear what to do if you want to perform an operation that is not supported by a given object:<br />
<blockquote>
<p>You write a method that performs that operation. This is problematic if you don&#8217;t control that class, which is why Ruby and C# have moved to open classes. [â€¦]
<p>And it&#8217;s usually obvious where this method should go: on the class that you need to manipulate.</p>
</blockquote>
<p>In multi-dispatch languages, it is much less obvious where a method should be written and â€œwhich<i> </i>parameter of the new method might take [a given] valueâ€. This provides more flexibility in arranging code but this implies that more decisions should be taken about it and more efforts should be provided to keep these decisions in mind:<br />
<blockquote>
<p>And then every time someone uses the method, they need to remember where it was defined and add the appropriate import statement. If they forget, they might get behavior they don&#8217;t expect, as the appropriate method for the given generic function won&#8217;t even have been loaded.</p>
</blockquote>
<p>Establishing conventions can be considered a solution to this issue. However, Tang believes that â€œconventions that aren&#8217;t enforced by the language tend not to be followedâ€. Moreover, having tried to define some patterns for modules arrangements, he also asserts that â€œthis is inherently problem-domain-specific: there&#8217;s no one right organizing principle that applies to everyone&#8217;s programs.â€
<p>Hence, according to Johnatan Tang there is no obvious solution to this tradeoff of flexibility vs. productivity in organizing programs. What about your favorite languages? What solutions could you find? And, given your experience, is there any convenient compromise between the two?  </p>
]]></content:encoded>
			<wfw:commentRss>http://sadekdrobi.com/2008/11/30/refx-is-oop-better-for-structuring-your-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RefX:: ORMs, Relational Data, Mismatch, LinQ and DSLs</title>
		<link>http://sadekdrobi.com/2008/11/10/refx-orms-relational-data-mismatch-linq-and-dsls/</link>
		<comments>http://sadekdrobi.com/2008/11/10/refx-orms-relational-data-mismatch-linq-and-dsls/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 02:42:22 +0000</pubDate>
		<dc:creator>Sadache</dc:creator>
				<category><![CDATA[Agile in the Enterprise]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[D90]]></category>
		<category><![CDATA[DOTNET]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Domain Driven Design]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[LinQ]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Model Mismatch]]></category>
		<category><![CDATA[Multi-Paradigm Design]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Polyglot Programming]]></category>
		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://sadekdrobi.com/2008/11/10/refx-orms-relational-data-mismatch-linq-and-dsls/</guid>
		<description><![CDATA[   
Having worked with several Object-Relational mapping frameworks in the last few years, I got to a point where I couldn&#8217;t justify their complexity in my project. We often talk about the mismatch between the database and the object worlds, and that is where ORMs are often stated and referenced for &#8220;bridging the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sadekdrobi.com/wp-content/uploads/2008/11/raw000781.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="361" alt="Raw00078" src="http://sadekdrobi.com/wp-content/uploads/2008/11/raw00078-thumb1.jpg" width="534" border="0"></a> <a href="http://sadekdrobi.com/wp-content/uploads/2008/11/raw001701.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="379" alt="Raw00170" src="http://sadekdrobi.com/wp-content/uploads/2008/11/raw00170-thumb1.jpg" width="258" border="0"></a> <a href="http://sadekdrobi.com/wp-content/uploads/2008/11/dsc-01911.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="378" alt="DSC_0191" src="http://sadekdrobi.com/wp-content/uploads/2008/11/dsc-0191-thumb1.jpg" width="257" border="0"></a> </p>
<p>Having worked with several Object-Relational mapping frameworks in the last few years, I got to a point where I couldn&#8217;t justify their complexity in my project. We often talk about the mismatch between the database and the object worlds, and that is where ORMs are often stated and referenced for &#8220;bridging the gap&#8221;!</p>
<p>Well I prefer to call it lifting the gap, or highering the gap, to have it now between DAOs and the rest of the code than having it between database and code.But I wouldn&#8217;t call this in any way reducing the gap.</p>
<p><span id="more-538"></span></p>
<p>First thing to mention here, is that data structures are not evil. We often deal with XML data structure but we absolutely refuse to deal with relational data structures. The problem might be related to time, XML came with a whole arsenal of managed APIs that represent its model in a way that makes it more comfortable for you to manipulate these documents. All together with transformation APIs that made it a lot easier to fill your object model out of an XML. Relational data structure on the other hand did not have the luxury of standard APIs and representation models in mainstream languages, and that made dealing with a database request result so arbitrary (Datasets existed in .Net but they have been cursed heavily and has been forced out of the cool toolbox, do not know yet why!) .&nbsp; </p>
<p>In some way, I guess that the &#8220;mismatch&#8221; between Relational data structures and objects exists much similarly between XML and objects, however we didn&#8217;t think for so long of a doing a mapping between XML and object OXM? (no we are starting to do so, writing some XML to map XML to objects!).</p>
<p>With the experience I had with mapping technologies, I can say that they do not solve the problem for me. They merely add yet another useless level of abstraction where your domain types look nothing like relational data structures, but yet nothing like your target domain model! They have gone a half way, and now its your turn to poison your application with a lot of absurd ORM code trying to stretch this bridge to reduce the gap&#8230; </p>
<p>Geeks love talking about intrusivty of an ORMs and compare level of intrusivty in different terms. Intrusivty is much more than the lack of an interface or methods to implement in your domain objects. I guess I am ok to deal with that kind of intrusivity. However all ORMs I tried do not give me the opportunity to express my domain model in the way I would like to. I have to deal with notions of Lazy Loading, Attached/Detached entities, Entity sets, ids, back fields and a lot of other things that I don&#8217;t want to appear in my model and that make the resulting code so ugly and complex that I don&#8217;t wish to visit soon.</p>
<p>As Bob Martin said before, we are missing the opportunity to do oop, I would enforce and say we are missing the opportunity to model at all. And I guess we have gone too far with ORMs and it is time to go back to the basics, in the same way we have done after the EJB great abstraction.</p>
<p>It is very contradictory, while we are so excited about DSLs and the goodness they can potentially bring to enterprise development that results in a declarative semanticful style of programming, we can&#8217;t help but to engage all of our means in trying to bury SQL (and effective, semanticful, declarative powerful domain specific language) behind a dumb API to &#8220;abstract database access&#8221;! I guess we got to chose one strategy, either we keep SQL and we&nbsp; keep marketing DSLs or we hope for a new advanced GPL compiler that will hide all of this in the same way modern languages did with garbage collection, concurrency and synchronization.</p>
<p>Since I am not yet a compiler writer, and I aint got around an effective way of integrating database in mainstream languages (there is actually a very productive in memory database on Haskell that worth trying), I decide to keep the DSL, and to work with them without the need to hide them, but rather to get a better tooling to help converting between difference data structures.</p>
<p>I guess you&#8217;ve guessed it by now. For me LinQ is the mid-term solution for the data structure mismatch. No not LinQ to sql, nor Ado.Net entities (they are helpful and we might use them but lets focus on the solution). LinQ is a very productive tool that halps effectively transform anything to anything in few lines of code. I mean that I can still use powerful SQL to get data effeciently and then convert them with one line of LinQ into the destination data structure. No abstraction leak, less complexity: Use the right tool where it applies. </p>
<p>So what I would actually do is to use a framework that will execute my SQL or SQL like query on the database and get me the records in much the same way they are in the database,Much in the same way Active Record gets you records as they are in the database. No useless efforts from the framework to bend the data to make it look untruthfully like the destination model.&nbsp; I guess I know better my domain model, and with this better tooling I can get it done with no problem.</p>
<p>&nbsp;</p>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f663d4e1-de43-4d9c-9f89-7b45ec5b5a86" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Mots clÃ©s Technorati : <a href="http://technorati.com/tags/mapping" rel="tag">mapping</a>,<a href="http://technorati.com/tags/orm" rel="tag">orm</a>,<a href="http://technorati.com/tags/linq" rel="tag">linq</a>,<a href="http://technorati.com/tags/mismatch" rel="tag">mismatch</a>,<a href="http://technorati.com/tags/relational.%20data%20structure" rel="tag">relational. data structure</a>,<a href="http://technorati.com/tags/abstraction" rel="tag">abstraction</a>,<a href="http://technorati.com/tags/domain%20model" rel="tag">domain model</a>,<a href="http://technorati.com/tags/deseign" rel="tag">deseign</a></div>
]]></content:encoded>
			<wfw:commentRss>http://sadekdrobi.com/2008/11/10/refx-orms-relational-data-mismatch-linq-and-dsls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Opinions: Measuring Programmers&#8217; Productivity</title>
		<link>http://sadekdrobi.com/2008/10/05/opinions-measuring-programmers-productivity/</link>
		<comments>http://sadekdrobi.com/2008/10/05/opinions-measuring-programmers-productivity/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 18:48:43 +0000</pubDate>
		<dc:creator>Sadache</dc:creator>
				<category><![CDATA[Delivering Value]]></category>
		<category><![CDATA[InfoQ]]></category>
		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://sadekdrobi.com/2008/10/05/opinions-measuring-programmers-productivity/</guid>
		<description><![CDATA[In the field of software development, managers need measurable metrics to appreciate the performance of their programmers. Shahar Yair and Steve McConnell discuss common techniques focusing on source lines of code and function points. They highlight the limitations of these approaches and seek to define some principles that could guide the analysis of programmersâ€™ performance.

posted [...]]]></description>
			<content:encoded><![CDATA[<p>In the field of software development, managers need measurable metrics to appreciate the performance of their programmers. Shahar Yair and Steve McConnell discuss common techniques focusing on source lines of code and function points. They highlight the limitations of these approaches and seek to define some principles that could guide the analysis of programmersâ€™ performance.</p>
<p><span id="more-520"></span></p>
<p>posted originally on <a href="http://www.infoq.com/news/2008/10/measure-programmers-productivity">http://www.infoq.com/news/2008/10/measure-programmers-productivity</a>
<p>In the field of software development, just as in any other area, managers need to appreciate performance of their programmers and the progress of their projects. However, defining appropriate metrics to this end appears to be a tricky task.
<p>Measuring source lines of code (SLOC) is one of commonly used approaches that presents however a number of important limitations highlighted recently by <a href="http://www.dev102.com/index.php?s=measure+">Shahar Yair</a> and <a href="http://forums.construx.com/blogs/stevemcc/archive/2008/04/09/measuring-productivity-of-individual-programmers.aspx">Steve McConnell</a>. First of all, the amount of lines of code does not allow effectively measuring the progress of a project because it focuses on activity rather than results. LOC do not have any value as such: the value of the final product depends on its performance and quality, not on the amount of code. Hence, focusing on the latter is actually a very limited approach to productivity.
<p>SLOC doesnâ€™t tell anything about the complexity of the issue at hand or about the quality of the final product in terms of maintainability, flexibility, extensibility, etc. With regard to quality, it can actually be negatively correlated. Refactoring as well as some design patterns result in reducing LOC while improving codeâ€™s quality. Larger code base may mean more noise, more unnecessary complexity, less readability and flexibility.
<p>What is particularly risky about adopting such a reductive view of programmersâ€™ performance is that it creates wrong incentives. Rather than optimizing their work in terms of final product, developers may be encouraged to favor the quantity of code to the detriment of quality and even intentionally write more verbose code. â€œWhat gets measured gets doneâ€, recalls Steve McConnell.
<p>He points out that some of these issues can be solved by using function points as measuring metric. The program size is then determined by the number of inputs, outputs, queries and files. Nevertheless, this approach also has its downsides. McConnell mentions some practical issues like the necessity of having a certified function point counter and the difficulties with mapping each function point back to individual programmers. A certified function point specialist Daniel Yokomizo highlights in his comment other limitations of such approach: lack of tools to measure function pointsâ€™ complexity and to take into consideration things such as code sharing, frameworks, libraries, etc., that affect the time needed to create a feature.
<p>Even though many commentators involved in the discussion about measuring approaches agree on their limitations, they do not necessarily dismiss the need for measuring programmersâ€™ performance. Many insist on the fact that SLOC, for instance, can be used as a baseline for a more complex analysis combining different factors. This goes along the lines of four principles outlined by McConnell that should guide any analysis of programmersâ€™ productivity:<br />
<blockquote>
<p>1. Donâ€™t expect any single dimensional measure of productivity to give you a very good picture of individual productivity [â€¦]
<p>2. Donâ€™t expect any measures [â€¦] to support fine-grain discrimination in productivity among individuals. [They] give you questions to ask but they donâ€™t give you the answers [â€¦]
<p>3. Remember that trends are usually more important than single-point measures [â€¦]
<p>4. Ask why you need to measure individual productivity at all [â€¦]</p>
</blockquote>
<p>In which context measuring programmersâ€™ productivity is actually meaningful? What criteria can be used for it? How can they be combined? Many questions are still open for discussion and if your experience has brought you some answers, donâ€™t hesitate to share.</p>
]]></content:encoded>
			<wfw:commentRss>http://sadekdrobi.com/2008/10/05/opinions-measuring-programmers-productivity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

