<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>modularity &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/modularity/</link>
	<description>Feed of posts on WordPress.com tagged "modularity"</description>
	<pubDate>Mon, 08 Sep 2008 13:03:59 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[End-to-End Arguments in System Design]]></title>
<link>http://berthalemu.wordpress.com/?p=11</link>
<pubDate>Tue, 02 Sep 2008 07:26:47 +0000</pubDate>
<dc:creator>berthalemu</dc:creator>
<guid>http://berthalemu.wordpress.com/?p=11</guid>
<description><![CDATA[This paper argues that the cost of placing functions at low levels of a system often outweigh any of]]></description>
<content:encoded><![CDATA[<p>This paper argues that the cost of placing functions at low levels of a system often outweigh any of the little value of placing them there. The rise of communications networks validates the end-to-end function placement argument and helps explain why it's good to move a function upward, closer to the application. A motivating example in the OS domain: using a file transfer application, how to move a file from computer A to computer B without any file damage? There are a number of threats to the file integrity. A brute force technique of reinforcing every step would require too much effort and programming, and would be uneconomical for low-probability threats. A better approach is an end-to-end-and-retry: A has a checksum on the data, B calculates the checksum and sends it back to A. This example shows how a communications layer cannot handle all necessary checking required. Introducing reliability into the lower levels to relieve work done by the application is a performance improvement, not correctness. Lower level functionality can be costly if the subsystem does not have as much information as the application, and thus does its job less efficiently. Also, all applications will have to use it.</p>
<p>The authors explore the end-to-end argument for data communications systems range of functions via examples of wasted effort implementing  each function in the low level. With data delivery acknowledgments,  the "request for next message" is rarely useful; It would be more meaningful to have an acknowledgment from the target application, especially in a two-phase-commit situation. Data encryption shouldn't be done in the communications layer because then the subsystem has to manage keys, messages are in clear-text outside the communications layer, and the message authenticity still needs to be checked by the application. Applications can better detect duplicate messages that look different to the subsystem, e.g. retries. FIFO guarantees need a higher level mechanism to control ordering of messages from different sites. In transaction management, acknowledgment for a successful write can only be given by the application.</p>
<p>Background for this paper includes that for the DARPA paper.  Regarding system design, the paper starts from the idea that there is a boundary around a communication subsystem that interfaces between it and the rest of the system. The design problem is the choice of function implementation method. The "end-to-end argument" asserts the that correct function implementation occurs only with application knowledge at both ends, thus arguing against low-level implementation.</p>
<p>I liked the simplicity of this paper; its examples were real and motivating. The examples show why pushing functions to the application level are not only sensible, but necessary as well. I liked the description of the differing needs of the real-time conferencing voice audio and the digitized speech system. The distinction reemphasizes the reasoning behind the creation of UDP versus TCP as seen in the DARPA paper, enhancing the idea of modularity in layered systems.</p>
<p>In a few examples, some functionality in the communications layer was helpful for performance. It wasn't clear to me if the authors were suggesting that this functionality should be implemented to be used for all applications, or for all applications using a particular transport service. I would have liked to see a more general discussion of the tradeoff of using low-level functions.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[REVISED--Part 1:  Configurations &amp; Modular Design]]></title>
<link>http://cadcraft.wordpress.com/?p=158</link>
<pubDate>Thu, 31 Jul 2008 04:03:05 +0000</pubDate>
<dc:creator>Jamal</dc:creator>
<guid>http://cadcraft.wordpress.com/?p=158</guid>
<description><![CDATA[I went back and reviewed where I was going with this post, and more critically, what was needed to e]]></description>
<content:encoded><![CDATA[<p><span style="font-size:10pt;font-family:Georgia;">I went back and reviewed where I was going with this post, and more critically, what was needed to effectively get across the comprehensive grasp of these principles, and I came to the conclusion that this needs more illustrations, and it needs to be in at least three parts. What follows is Part 1, with some fairly significant revisions...</span></p>
<p style="text-align:center;"><span style="font-size:10pt;font-family:Georgia;"><strong>&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;&#62;&#60;</strong></span></p>
<p><span style="font-size:10pt;font-family:Georgia;"><strong><span style="text-decoration:underline;">Principles &#38; Concepts</span></strong></span></p>
<p><span style="font-size:10pt;font-family:Georgia;">One of the challenges many CAD newbies complain about is that most high end CAD packages start with the assumption that the newbie is coming from a CAD background of some sort, most likely from a competittor program. With the growing confluence of design tools I have been commenting on here, this is more and more often <strong>not</strong> the case. That's why I'm going to start this discussion with the basic concepts and 'build' from there.</span></p>
<p><span style="font-size:10pt;font-family:Georgia;">While there are various tutorials &#38; guides online about configurations,  a discussion of the 'when' &#38; 'why' -- even the what -- is not often covered.  Configurations are one of those features which, if you don't know about it, you might not even think to wonder about it, especially if you don't come from an engineering background. However, in many ways, the premise behind configurations is intimately linked to foundation engineering principles, including modularity, or modular design.</span></p>
<p><span style="font-size:10pt;font-family:Georgia;">Let's use an example we're all familiar with -- computers. When <a href="http://en.wikipedia.org/wiki/IBM_Personal_Computer/AT" target="_blank"><span style="color:#ff9900;">IBM opened its PC architecture to other vendors, triggering the 'flood of the clones'</span></a>, this was a grand lesson in the +'s &#38; -'s of modular design. The PC is an example of modular design:</span></p>
<ul>
<li><span style="font-size:10pt;font-family:Georgia;">The core of a personal computer is the motherboard, which mounts the CPU, among other things. It is the nexus point coordinating all of the peripherals to function in unison, including<span style="font-family:Georgia;">             </span></span>
<ul>
<li><span style="font-size:10pt;font-family:Georgia;">Video card</span></li>
<li><span style="font-size:10pt;font-family:Georgia;">Network card</span></li>
<li><span style="font-size:10pt;font-family:Georgia;">Modem card(for some)</span></li>
<li><span style="font-size:10pt;font-family:Georgia;">Sound card(most newer computers have integrated this into the mother board), etc.</span></li>
</ul>
</li>
</ul>
<p><span style="font-size:10pt;font-family:Georgia;">As the indentation shows, the peripheral cards are subsidiary to the motherboard. Each type of peripheral is a component which fulfills a specific function needed by the systmem, and facilitated by the motherboard. It is worth noting as an aside that this "indentation" is a mode of representation which carries a specific meaning in engineering -- it is used in what we call an <a href="http://mysite.verizon.net/res6pe7p/indexPartsList.htm" target="_blank"><span style="color:#ff9900;">indentured parts list</span></a>. It is a valuable documentation tool.</span></p>
<p><span style="font-size:10pt;font-family:Georgia;">The PC is a good example of modularity because once IBM set the interconnect standards -- what sort of edge connectors did each card need to interface with the motherboard -- vendors then based their designs around this constraint. Parameters of size, including net component height were also important. What this meant was that it created a broad spectrum of vendors who chose a niche, an area of expertise, which became the basis of a subsidiary industry. There are now multimillion $ corporations who only build one type of peripheral, like ATI or NVIDIA who make video adapter cards. Each card is its own module. Because there are many types of video cards, even from the same manufacturer, each model corresponds to a 'configuration' in the context of our discussion. Obviously, you can have configuraitons within configurations, but let's look at some examples of this.</span></p>
<p> </p>
[caption id="attachment_97" align="aligncenter" width="270" caption="Figure 1: A simple gear drive assembly"]<a href="http://cadcraft.wordpress.com/files/2008/07/axial-example.jpg"><img class="size-full wp-image-97" src="http://cadcraft.wordpress.com/files/2008/07/axial-example.jpg" alt="A simple gear drive assembly" width="270" height="194" /></a>[/caption]
<p> </p>
<p><span style="font-size:10pt;font-family:Georgia;">This simple drive assy can have a series of various configurations. For instance, there might be several configurations of the gear wheel alone, based on the number &#38;/or size of teeth, the diameter of the wheel, and combinations of these. Each variation in a parameter of the wheel would constitute a configuration of the wheel <strong><em>AND</em></strong> the assembly. So, for example, a version of the assembly where the two wheels are of different sizes would also constitute a different set of configurations. This might be done to facilitate the use of the assembly in an application where the gear ratio needed to step down or step up in order to effectively engage the systems involved.</span></p>
<p><span style="font-size:10pt;font-family:Georgia;">Seeing how this could impact this assembly, we can look at how configurations in the model facilitate these variations in the assembly.</span></p>
<p><span style="font-size:10pt;font-family:Georgia;"><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/t90E_diBejA'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/t90E_diBejA&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span><br />
</span></p>
<p><span style="font-size:10pt;font-family:Georgia;">In the above video, you can see that I already have created secondary configurations in the Gear Wheel part, the Gear-Shaft assembly, as well as the top assembly, Axial Example. In the video, follow as I switch between configurations in each model, and the resulting effect. This gives some insight into configurations. As stated, part of what this enables is a reduction in the number of models, and a simplification in the feature &#38; assembly trees at the left.</span></p>
<p><span style="font-size:10pt;font-family:Georgia;">One of the key aspects of this, which I will show in Part 2 later this week, is how you can control configurations as you create the part through the specification of which configuration a given sketch, sketch dimension or feature is intended to apply to. I will also discuss the use of design tables in creating &#38; managing configurations.</span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Modularity is key to scalability]]></title>
<link>http://insequor.wordpress.com/?p=32</link>
<pubDate>Mon, 28 Jul 2008 16:25:18 +0000</pubDate>
<dc:creator>ozgur</dc:creator>
<guid>http://insequor.wordpress.com/?p=32</guid>
<description><![CDATA[Note: This is one of failed  &#8220;let&#8217;s start now and finish later&#8221; attempts. I decide]]></description>
<content:encoded><![CDATA[<p><em>Note: This is one of failed  "let's start now and finish later" attempts. I decided to publish them even they are not finished. My experience with myself (more than 30 years) if I don't complete it in a reasonable time, I never will. So here it is, with hope that it will all make sense one day...</em></p>
<p><em>Note II: "Scalability" here is used as the project size rather than problem size. I noticed that it was not the best choice of words.</em></p>
<p>I was listening <a href="http://www.youtube.com/watch?v=ozUmWZdWBsk">a talk</a> on google tech talks and this came up: This morning I was thinking <em>modularity is key to simplicity</em> at the office. As a developer I love modularity, especially if you are dealing with large scale projects involving tens of developers you appreciate the ability to take a piece of functionality and dig into it knowing it fits all together at some level.</p>
<p>A developer learns to appreciate the modulariy (either for scalability or for simplicity) but hopefully your software has some users, and users do not always makes the connection between lack of modularity and the pain he is facing. Since user has an easy way out (<em>this software suck, let's uninstall</em>) it is better someone walks him through the <em>logic</em>.</p>
<p>Modularity requires avoiding duplications in functionality. Simpler your modules are, or more specialized in their functionality, the better. However, users like <em>short cuts</em>. <em>Yes I know that command is available there but can't we put a small button here too</em> he says. Most of the time it is simple to add and developers like that. But then, <em>can't we have that list box here too</em> he says. It looks like it's becoming simple at first since <em>number of clicks</em> is getting less and less to perform a certain functionality with each click. But, short cuts start becoming duplicated or worse imitated functionalities since it is not always easy to be that much modular.</p>
<p>I thought about lego blocks this morning. Each block has a one and only one functionality (at least the ones I know). Success of lego comes from the way different blocks work together, not how much additional built-in functionality each block comes with.</p>
<p>...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Composite WPF: Improving Out-of-the-Box Module Dependency Resolution]]></title>
<link>http://eprystupa.wordpress.com/?p=11</link>
<pubDate>Mon, 07 Jul 2008 21:24:43 +0000</pubDate>
<dc:creator>eprystupa</dc:creator>
<guid>http://eprystupa.wordpress.com/?p=11</guid>
<description><![CDATA[Introduction
Microsoft has recently released its long awaited composite application framework for WP]]></description>
<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Microsoft has recently released its long awaited composite application framework for WPF (<a href="http://www.codeplex.com/CompositeWPF">http://www.codeplex.com/CompositeWPF</a>). As a heavy user and a big fan of the original CAB/Smart Client framework I rushed to explore it. To say that I was impressed is to say nothing. The [patterns &#38; practices] team has done a tremendous job. The first thing that amazed me is the quality of the supporting documentation: direct mentioning and in-depth discussion of patterns used and architectural&#160; decisions made, extensive tutorials and walk-throughs on all major concepts, and very cool reference implementation. So I immersed myself in CompositeWPF implementation to figure out how it stands against its CAB predecessor. I was specifically interested to see what CAB’s deficiencies were addressed and what are the areas improved and polished. So I started from the very beginning…</p>
<p>At the core of the composite application framework lies dynamic discovery and dependency resolution of its modules. This article discusses dependency resolution implementation in the new framework, its limitations (in both new and original frameworks), and suggests the ways to overcome those limitations. </p>
<p> <!--more-->
</p>
<h3>Problem</h3>
<p>Some modules in composite application framework have dependencies. Some don’t. Dependent modules must load before the modules depending on them. This goal is achieved using dependency solver that ships with the framework. Individual module developers indicate their module’s <strong>direct</strong> dependencies using metadata. They don’t have to worry about full dependency chain, cyclic dependencies, etc. It is the job of module dependency solver. The solver that comes with Composite WPF does a nice job of resolving dependency chain, detecting cyclic dependencies, detecting missing modules, etc. But when it comes to modules that don’t specify explicit dependencies results may be not what you expect. Consider the following simple module configuration (provided in application’s app.config):</p>
<div>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;"><span style="color:#0000ff;">&#60;?</span><span style="color:#800000;">xml</span> <span style="color:#ff0000;">version</span><span style="color:#0000ff;">=&#34;1.0&#34;</span> <span style="color:#ff0000;">encoding</span><span style="color:#0000ff;">=&#34;utf-8&#34;</span> ?<span style="color:#0000ff;">&#62;</span>
<span style="color:#0000ff;">&#60;</span><span style="color:#800000;">configuration</span><span style="color:#0000ff;">&#62;</span>
  <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">configSections</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">section</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&#34;modules&#34;</span>
             <span style="color:#ff0000;">type</span><span style="color:#0000ff;">=&#34;Microsoft.Practices.Composite.Modularity.ModulesConfigurationSection, Microsoft.Practices.Composite&#34;</span><span style="color:#0000ff;">/&#62;</span>
  <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">configSections</span><span style="color:#0000ff;">&#62;</span>
  <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">modules</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">module</span> <span style="color:#ff0000;">assemblyFile</span><span style="color:#0000ff;">=&#34;Modules/ModuleA.dll&#34;</span>
            <span style="color:#ff0000;">moduleType</span><span style="color:#0000ff;">=&#34;ModuleA.ModuleA&#34;</span>
            <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleA&#34;</span><span style="color:#0000ff;">/&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">module</span> <span style="color:#ff0000;">assemblyFile</span><span style="color:#0000ff;">=&#34;Modules/ModuleB.dll&#34;</span>
            <span style="color:#ff0000;">moduleType</span><span style="color:#0000ff;">=&#34;ModuleB.ModuleB&#34;</span>
            <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleB&#34;</span><span style="color:#0000ff;">/&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">module</span> <span style="color:#ff0000;">assemblyFile</span><span style="color:#0000ff;">=&#34;Modules/ModuleC.dll&#34;</span>
            <span style="color:#ff0000;">moduleType</span><span style="color:#0000ff;">=&#34;ModuleC.ModuleC&#34;</span>
            <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleC&#34;</span><span style="color:#0000ff;">/&#62;</span>
  <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">modules</span><span style="color:#0000ff;">&#62;</span>
<span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">configuration</span><span style="color:#0000ff;">&#62;</span></pre>
</div>
<p>This configuration lists three modules in the following order: “ModuleA”, “ModuleB”,&#34; “ModuleC” and specifies no explicit dependencies. You may naturally expect that the framework will load the modules in this order. Unfortunately, it won’t. The implementation of the solver that ships with Composite WPF (the same applies to original CAB) gives no order guarantees for non-explicitly stated dependencies. Speaking in &#34;sorting&#34; terms resolution algorithm is not stable. In practical terms (due to the solver implementation details) it will exactly <strong>reverse</strong> the order. If you run “ConfigurationModularity” quick start that ships with the framework with the above shown configuration you can visually observe that modules are, in fact, loaded in reverse:</p>
<p><a href="http://eprystupa.files.wordpress.com/2008/07/image1.png"><img style="border-width:0;" height="484" alt="image" src="http://eprystupa.files.wordpress.com/2008/07/image-thumb1.png" width="343" border="0" /></a></p>
<p>The only way to guarantee deterministic module load order is to explicitly state the dependency on the previous one for every module. Our configuration now becomes:</p>
<div>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;"><span style="color:#0000ff;">&#60;?</span><span style="color:#800000;">xml</span> <span style="color:#ff0000;">version</span><span style="color:#0000ff;">=&#34;1.0&#34;</span> <span style="color:#ff0000;">encoding</span><span style="color:#0000ff;">=&#34;utf-8&#34;</span> ?<span style="color:#0000ff;">&#62;</span>
<span style="color:#0000ff;">&#60;</span><span style="color:#800000;">configuration</span><span style="color:#0000ff;">&#62;</span>
  <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">configSections</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">section</span> <span style="color:#ff0000;">name</span><span style="color:#0000ff;">=&#34;modules&#34;</span>
             <span style="color:#ff0000;">type</span><span style="color:#0000ff;">=&#34;Microsoft.Practices.Composite.Modularity.ModulesConfigurationSection, Microsoft.Practices.Composite&#34;</span><span style="color:#0000ff;">/&#62;</span>
  <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">configSections</span><span style="color:#0000ff;">&#62;</span>
  <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">modules</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">module</span> <span style="color:#ff0000;">assemblyFile</span><span style="color:#0000ff;">=&#34;Modules/ModuleA.dll&#34;</span>
            <span style="color:#ff0000;">moduleType</span><span style="color:#0000ff;">=&#34;ModuleA.ModuleA&#34;</span>
            <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleA&#34;</span><span style="color:#0000ff;">/&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">module</span> <span style="color:#ff0000;">assemblyFile</span><span style="color:#0000ff;">=&#34;Modules/ModuleB.dll&#34;</span>
            <span style="color:#ff0000;">moduleType</span><span style="color:#0000ff;">=&#34;ModuleB.ModuleB&#34;</span>
            <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleB&#34;</span><span style="color:#0000ff;">&#62;</span>
      <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">dependencies</span><span style="color:#0000ff;">&#62;</span>
        <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">dependency</span> <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleA&#34;</span><span style="color:#0000ff;">/&#62;</span>
      <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">dependencies</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">module</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">module</span> <span style="color:#ff0000;">assemblyFile</span><span style="color:#0000ff;">=&#34;Modules/ModuleC.dll&#34;</span>
            <span style="color:#ff0000;">moduleType</span><span style="color:#0000ff;">=&#34;ModuleC.ModuleC&#34;</span>
            <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleC&#34;</span><span style="color:#0000ff;">&#62;</span>
      <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">dependencies</span><span style="color:#0000ff;">&#62;</span>
        <span style="color:#0000ff;">&#60;</span><span style="color:#800000;">dependency</span> <span style="color:#ff0000;">moduleName</span><span style="color:#0000ff;">=&#34;ModuleB&#34;</span><span style="color:#0000ff;">/&#62;</span>
      <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">dependencies</span><span style="color:#0000ff;">&#62;</span>
    <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">module</span><span style="color:#0000ff;">&#62;</span>
  <span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">modules</span><span style="color:#0000ff;">&#62;</span>
<span style="color:#0000ff;">&#60;/</span><span style="color:#800000;">configuration</span><span style="color:#0000ff;">&#62;</span></pre>
</div>
<p>If you compare this new configuration with our original one it is obvious that it has a lot of noise. In my opinion this is an overkill for a very simple task at hand. What’s missing is the concept of “implied order”. What we want is a dependency solver mechanism that keeps the relative order of modules intact, unless explicit dependency calls for order change.</p>
<h3>Solution</h3>
<p>Fortunately, Composite Application Library ships in source code and is well covered with unit tests. So I armed with debugger and dove in. As it turned out the task of dependency resolution is very well abstracted from module discovery and concentrated in a single class: ModuleDependencySolver.cs (in Modularity folder). Moreover, dependency resolution logic itself is fully contained in its public Solve() method. All I needed to do is to rewrite rather simplistic existing implementation, verify that all existing tests still pass, and add a bunch of new tests that verify the relative order preservation for modules with no explicitly stated dependencies. My implementation uses two passes (versus multiple passes in the out-of-the-box implementation) through the module list: one to resolve the dependencies and one to check for cycles and missing modules. This is a full listing of my Solve method implementation:</p>
<div>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">string</span>[] Solve()
{
 LinkedList&#60;<span style="color:#0000ff;">string</span>&#62; result = SolvePass();
 ValidationPass(result);

 <span style="color:#0000ff;">return</span> result.ToArray();
}

<span style="color:#0000ff;">private</span> LinkedList&#60;<span style="color:#0000ff;">string</span>&#62; SolvePass()
{
 LinkedList&#60;<span style="color:#0000ff;">string</span>&#62; result = <span style="color:#0000ff;">new</span> LinkedList&#60;<span style="color:#0000ff;">string</span>&#62;();

 <span style="color:#0000ff;">foreach</span> (var module <span style="color:#0000ff;">in</span> dependencyMatrix.Keys)
 {
  var node = result.First;
  <span style="color:#0000ff;">while</span> (node != <span style="color:#0000ff;">null</span>)
  {
   <span style="color:#0000ff;">if</span> (dependencyMatrix[module].Contains(node.Value))
    <span style="color:#0000ff;">break</span>;
   node = node.Next;
  }

  <span style="color:#0000ff;">if</span> (node == <span style="color:#0000ff;">null</span>)
   result.AddLast(module);
  <span style="color:#0000ff;">else</span>
   result.AddBefore(node, module);
 }
 <span style="color:#0000ff;">return</span> result;
}

<span style="color:#0000ff;">private</span> <span style="color:#0000ff;">void</span> ValidationPass(LinkedList&#60;<span style="color:#0000ff;">string</span>&#62; result)
{
 <span style="color:#0000ff;">for</span> (var node = result.First; node != <span style="color:#0000ff;">null</span>; node = node.Next)
 {
  <span style="color:#0000ff;">string</span> module = node.Value;

  <span style="color:#0000ff;">for</span> (var next = node; next != <span style="color:#0000ff;">null</span>; next = next.Next)
  {
   <span style="color:#0000ff;">if</span> (dependencyMatrix[next.Value].Contains(module))
    <span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> CyclicDependencyFoundException();
  }
 }

 <span style="color:#0000ff;">string</span>[] missing = result.Except(knownModules).ToArray();
 <span style="color:#0000ff;">if</span> (missing.Length &#62; 0)
 {
  <span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> ModuleLoadException(
   String.Format(CultureInfo.CurrentCulture,
    Resources.DependencyOnMissingModule,
    <span style="color:#0000ff;">string</span>.Join(<span style="color:#006080;">&#34;, &#34;</span>, missing)));
 }
}</pre>
</div>
<p>These are additional unit tests to complement the out-of-the-box ones and verify implied order preservation:</p>
<div>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;">[TestMethod]
<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Solve_preserves_independent_modules_order()
{
 <span style="color:#008000;">// Arrange</span>
 solver.AddModule(<span style="color:#006080;">&#34;ModuleA&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleB&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleC&#34;</span>);

 <span style="color:#008000;">// Act</span>
 <span style="color:#0000ff;">string</span>[] actual = solver.Solve();

 <span style="color:#008000;">// Assert</span>
 CollectionAssert.AreEqual(&#160; <span style="color:#0000ff;">new</span> <span style="color:#0000ff;">string</span>[] {&#160; <span style="color:#006080;">&#34;ModuleA&#34;</span>, <span style="color:#006080;">&#34;ModuleB&#34;</span>, <span style="color:#006080;">&#34;ModuleC&#34;</span> },&#160; actual);
}

[TestMethod]
<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Solve_solves_simple_dependency_and_preserves_independent_modules()
{
 <span style="color:#008000;">// Arrange</span>
 solver.AddModule(<span style="color:#006080;">&#34;ModuleA&#34;</span>);
 solver.AddDependency(<span style="color:#006080;">&#34;ModuleA&#34;</span>, <span style="color:#006080;">&#34;ModuleB&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleB&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleC&#34;</span>);

 <span style="color:#008000;">// Act</span>
 <span style="color:#0000ff;">string</span>[] actual = solver.Solve();

 <span style="color:#008000;">// Assert</span>
 CollectionAssert.AreEqual(&#160; <span style="color:#0000ff;">new</span> <span style="color:#0000ff;">string</span>[] { <span style="color:#006080;">&#34;ModuleB&#34;</span>, <span style="color:#006080;">&#34;ModuleA&#34;</span>, <span style="color:#006080;">&#34;ModuleC&#34;</span> },&#160; actual);
}

[TestMethod]
<span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Solve_solves_complex_dependency_and_preserves_independent_modules()
{
 <span style="color:#008000;">// Arrange</span>
 solver.AddModule(<span style="color:#006080;">&#34;ModuleFirst&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleA&#34;</span>);
 solver.AddDependency(<span style="color:#006080;">&#34;ModuleA&#34;</span>, <span style="color:#006080;">&#34;ModuleB&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleB&#34;</span>);
 solver.AddDependency(<span style="color:#006080;">&#34;ModuleB&#34;</span>, <span style="color:#006080;">&#34;ModuleC&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleC&#34;</span>);
 solver.AddModule(<span style="color:#006080;">&#34;ModuleLast&#34;</span>);

 <span style="color:#008000;">// Act</span>
 <span style="color:#0000ff;">string</span>[] actual = solver.Solve();

 <span style="color:#008000;">// Assert</span>
 CollectionAssert.AreEqual(&#160; <span style="color:#0000ff;">new</span> <span style="color:#0000ff;">string</span>[] { <span style="color:#006080;">&#34;ModuleFirst&#34;</span>, <span style="color:#006080;">&#34;ModuleC&#34;</span>, <span style="color:#006080;">&#34;ModuleB&#34;</span>, <span style="color:#006080;">&#34;ModuleA&#34;</span>, <span style="color:#006080;">&#34;ModuleLast&#34;</span> },&#160; actual);
}</pre>
</div>
<h3>Conclusion</h3>
<p>If default solver implementation and its lack of “implied order” concept bothers you, you can easily overcome this by modifying the Solve() method in ModuleDependencySolver. I’m going to submit this as an issue for the Composite WPF team to consider and will update the blog with the issue link. It will be great if they agree to amend their current implementation. Even better if they can treat dependency solver like any other service: define an interface (IModuleDependencySolver) and publish its out-of-the-box implementation to DI container. This way applications have a chance to replace default solver implementation with their own without having to modify any original framework code.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[RGB high power circuit]]></title>
<link>http://davidsjunnesson.wordpress.com/?p=43</link>
<pubDate>Thu, 03 Apr 2008 09:45:33 +0000</pubDate>
<dc:creator>zervez</dc:creator>
<guid>http://davidsjunnesson.wordpress.com/?p=43</guid>
<description><![CDATA[Have been talking to David Cuartielles about what kind of circuit would fit my project. Togheter we ]]></description>
<content:encoded><![CDATA[<p>Have been talking to David Cuartielles about what kind of circuit would fit my project. Togheter we came to the conclusion that a circuit that has the ability to talk to other chips over I2C and dim high power leds would be the best solution. That would give the opportunity to scale the project up fast and easily and have the modularity that I like. So if I finds out that I need to have 3 or 4 of this modules every meter instead of 2 as planned I can easily just slap antoher one in without affecting the other. It would probably be one of the cheapest solutions and it has never been done before (at least not what I have found) which is nice. Would be a little bit like <a href="http://thingm.com/products/blinkm.html">BlinkM </a>but with added high power leds to get some power out. Hope that it will turn out nice.</p>
<p>If anyone feels that this sounds interesting Im thinking of maybe selling this circuits after I have tested it out. Please contact me if there is any questions.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[modularity.]]></title>
<link>http://ry4ntan.wordpress.com/?p=48</link>
<pubDate>Tue, 25 Mar 2008 21:33:28 +0000</pubDate>
<dc:creator>ry4ntan</dc:creator>
<guid>http://ry4ntan.wordpress.com/?p=48</guid>
<description><![CDATA[Two years of Architecture has taught me a lot about design principles. In particular, I discovered t]]></description>
<content:encoded><![CDATA[<p>Two years of Architecture has taught me a lot about design principles. In particular, I discovered the power and beauty of simple and modular structural systems. Modularity does not mean boring. On the contrary, it is to take a simple unit and multiply it systematically - applying certain principles and conceptual rules - to form flexible and dynamic systems.</p>
<p>Take a look at the pine cone. What do you see?</p>
<p><img src="http://www.scottcamazine.com/photos/webphotos3/pinecone.jpg" alt="" width="400" height="417" /></p>
<p>My first assignment was to study pine cones. Pretty random and complex structure it seems?</p>
<p>No kidding, pine cones actually display the Fibonacci sequence in their structures! (<a href="http://http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibnat.html#pinecones" target="_blank">This</a> might help you understand the structure more clearly.) Every system you see is composed of a simpler system or a series of simpler systems. The degree of complexity is build up through different grouping combinations of many such simple systems, even the pine cones. And there is no limit to the size of the system. It can keep growing infinitely, without losing its aesthetic and functional values. That is the power of modularity.</p>
<p>How can modularity be applied to product design?</p>
<p>Taking a simple surge protector as an example. Two months ago, I found out about <a href="http://ry4ntan.wordpress.com/2008/01/03/no-more-old-fashioned-surge-protectors-we-want-ufos/" target="_blank">Powramid, a UFO-looking surge protector</a> that not only resolved the issue of clustered plugs on traditional surge protectors but also redefined the aesthetic standards of what surge protectors could look like. The product design is clearly innovative, but only temporal. A Powramid can take up to 6 plugs. What happens when you have to power more than 6 appliances? You'll need an extension strip that you plug into the Powramid and it goes on when your work station grows larger. Rather nasty in terms of the looks and all the cables crossing over each other and entangling. I use about 9-10 sockets at home at all times: Monitor, CPU, 2 external hard-drives, external DVD-burner, speakers, USB-ports hub, cellphone/digital camera charger, desk lamp.</p>
<p><a href="http://industrealdesign.com/erope/erope.html" target="_blank"><strong>E-rope Modular Power Strip</strong></a></p>
<p>The E-rope is an <a href="http://www.idsa.org/IDEA2008/index.html" target="_blank">IDEA (International Design Excellence Awards)</a> <a href="http://www.idsa.org/IDEA2006/galleries/idea/idea2006/award_details.asp?id=79&#38;cat=12" target="_blank">Bronze winner</a> in 2006. Although it is only a design project, the concept of taking a power socket module and multiplying it to grow into a power strip really creates a flexible solution to fit different power needs. Whether it's 4 sockets or 12 sockets, big plugs or small plugs, E-rope is completely customizable. Imagine each little unit is a surge protector itself...</p>
<p><img src="http://industrealdesign.com/erope/images/erope_00_r1_c1_f11.jpg" alt="" width="392" height="310" /></p>
<p><img src="http://industrealdesign.com/erope/images/erope_00_r1_c1_f12.jpg" alt="" width="392" height="310" /></p>
<p><img src="http://industrealdesign.com/erope/images/erope_00_r1_c1_f13.jpg" alt="" width="392" height="310" /></p>
<p><img src="http://industrealdesign.com/erope/twist-on-the-wall.gif" alt="" width="392" height="310" /></p>
<p>A lot still needs to be refined when taking this design concept into actuality. Such as considering the amount of space required when more than a dozen modules wriggle out from the wall socket. And how realistic it is for cables to be coming in from different directions? What about the space in between when the strip makes a corner? By connecting the modules in series, it means that when one plug is switched off, the rest in line would be off too. What if I want to switch off some, but keep others powered? Can the modules be modified so that they can be connected in parallel?</p>
<p><a href="http://eubiq.com/" target="_blank"><strong>Eubiq Power Outlet System</strong></a></p>
<p>Perhaps it's not too difficult to realize a modularize and practical power strip design. The Eubiq Power Outlet System is an example and can be an architectural solution for modern homes, where you can have sockets anywhere you want and exactly where you wanted it. Just watch the <a href="http://eubiq.com" target="_blank">demo</a>. Really cool. Seriously, turn this into a Power Protection Outlet System and future homes could automatically enjoy the benefits of reliable power usage. Might be a bit costly to re-install it throughout the house when it's time to change the protector, but c'mon.. everything needs to be built-in nowadays! Houses are no exceptions. :D</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[My grandmother is where?]]></title>
<link>http://brainethics.wordpress.com/?p=427</link>
<pubDate>Fri, 21 Mar 2008 12:36:20 +0000</pubDate>
<dc:creator>tzramsoy</dc:creator>
<guid>http://brainethics.wordpress.com/?p=427</guid>
<description><![CDATA[How specific &#8212; or sparse &#8212; is the neural representation of a memory trace? Quian Quiroga]]></description>
<content:encoded><![CDATA[<p><img src="http://brainethics.wordpress.com/files/2008/03/aniston.jpeg" alt="aniston.jpeg" align="left" />How specific -- or sparse -- is the neural representation of a memory trace? Quian Quiroga and colleagues now have an <a href="http://www.vis.caltech.edu/~rodri/papers/TiCS_2008.pdf" target="_blank">article</a> in Neuron (PDF), where they describe their well-known studies using single-cell recordings to well-known faces. As you most likely know, this has given rise to the debate about the <a href="http://www.newscientist.com/article.ns?id=dn7567" target="_blank">"Jennifer Aniston neuron"</a>. Their findings, briefly put, have demonstrated that single cells show quite specific responses to very specific visual stimuli. While one cell may have a preferential response to the Sidney Opera House, another responds dramatically more to Hale Berry, while yet another cell responds to, well, Jennifer Aniston.</p>
<p>The Quiroga studies have re-iterated the debate (if it ever went dead) about how specific the neural coding is in the brain. Is it really so that the brain has such a specific code that one cell can represent one percept? Do we have a grandmother cell, a President Nixon cell and Marilyn Monroe cell?</p>
<p>Today, there is wide agreement that the one-cell-one-percept idea is untenable and unsupported by the literature. Rather than cingle cells, we see that networks represent a percept, rather than single cells. However, the findings by Quiroga et al. have nevertheless stunned the scientific (and global) community with regard to just <i>how</i> specific the neural code can be, and that it can be detected in a single neuron. The findings that we can record how one single neuron responds to one, and only one, percept, is quite surprising.</p>
<p>So forget about the grandmother cell, right? Or maybe not. After all, following the idea from these findings, we should not be surprised that there would in fact be one neuron that responded preferentially to our grandmother. Yes, it would be an expression of a "network code" representing our grandmothers as such, but nevertheless, you may in fact have that one neuron that responds to ol' granny.</p>
<p>While we leave it at that, it is still surprising that this team of researchers use the term "medial temporal lobe" (or MTL for short). Why doe they say that there is sparse coding in the MTL? It's a rather big region, and a region packed with qualitatively different regions. Not only are these regions different anatomically, but also functionally, they are thought to be involved in different functions. The perirhinal cortex is involved in processing (and encoding) of complex visual objects as well as novelty processing and working memory, the (posterior) parahippocampal cortex is involved in spatial processing (remember the parahippocampal place area). The entorhinal cortex has a medial and lateral part that deal with spatial and object information, respectively. And in addition to the hippocampus and amygdala, with their quite different functions, we may extend the MTL concept to include the temporopolar cortex, and maybe even the inferotemporal cortex.</p>
<p>Where in this complex system do Quiroga et al. find their sparse coding? Everywhere? My bet is on the perirhinal cortex due to its involvement in complex visual object processing. I've come to know that the researchers have not had structural scans available to determine the exact location of their electrodes. The scans have obviously been made, but they have not been able to use that information (hush hush, don't tell anyone...).</p>
<p>So, while these studies are indeed important to our understanding of the coding of specific information, we're left with a huge gap in terms of their anatomical properties. While most of the research community focuses on MTL subdivisions to an increasing extent, it is a bit puzzling to me that nobody have ever criticised these studies for their sparsity of anatomical information. Maybe I'll be the first?</p>
<p align="right">-Thomas</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Modu: can you say modularity?]]></title>
<link>http://zeroratio.wordpress.com/?p=143</link>
<pubDate>Sun, 09 Mar 2008 19:08:54 +0000</pubDate>
<dc:creator>zeroratio</dc:creator>
<guid>http://zeroratio.wordpress.com/?p=143</guid>
<description><![CDATA[Wikipedia:
In computer science, modularity is the property of computer programs that measures the ex]]></description>
<content:encoded><![CDATA[<p>Wikipedia:</p>
<blockquote><p>In computer science, <b>modularity</b> is the property of <a href="http://en.wikipedia.org/wiki/Computer_program" title="Computer program">computer programs</a> that measures the extent to which they have been composed out of separate parts called modules.</p></blockquote>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/m8-APnUMzBs'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/m8-APnUMzBs&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></p>
<p>ZeroRatio:</p>
<blockquote><p>In computer science, modularity... holy shit, I want that phone.</p></blockquote>
]]></content:encoded>
</item>

</channel>
</rss>
