<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Inforbiomatica</title>
	
	<link>http://www.moseshohman.com/blog</link>
	<description>software development, informatics, etc.</description>
	<lastBuildDate>Fri, 06 Aug 2010 07:22:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/inforbiomatica" /><feedburner:info uri="inforbiomatica" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>UX designers need to learn more about agile development, and vice versa</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/YsGDvTP8JIw/</link>
		<comments>http://www.moseshohman.com/blog/2010/04/07/ux-designers-need-to-learn-more-about-agile-development-and-vice-versa/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 19:19:49 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[agileux]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/2010/04/07/ux-designers-need-to-learn-more-about-agile-development-and-vice-versa/</guid>
		<description><![CDATA[I&#8217;ve been reading a lot about UX design and user research lately (trying to hold up my personal end of the bargain I&#8217;m about to propose). Reading what some (emphasis on some) designers write about agile, it strikes me that &#8230; <a href="http://www.moseshohman.com/blog/2010/04/07/ux-designers-need-to-learn-more-about-agile-development-and-vice-versa/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading a lot about UX design and user research lately (trying to hold up my personal end of the bargain I&#8217;m about to propose). Reading what some (emphasis on <em>some</em>) designers write about agile, it strikes me that they seem to see agile as this weird way developers insist on working that designers must accommodate so they aren&#8217;t ignored.</p>

<p>First, I feel sad that designers fear being ignored, feeling that their work or expertise is not appreciated. Second, I think designers need to do the work and research to understand agile better, so that they better understand its perspective and the benefits it can provide. Conversely, I think developers need to learn about UX design and user research, for the same reason. Otherwise it seems to me that even if you get both groups into the same room (or on the same team) to learn how to work together and to love each other better, they won&#8217;t have enough shared understanding to make real progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2010/04/07/ux-designers-need-to-learn-more-about-agile-development-and-vice-versa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2010/04/07/ux-designers-need-to-learn-more-about-agile-development-and-vice-versa/</feedburner:origLink></item>
		<item>
		<title>Turns out, cucumber/webrat is worse</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/R7DUMaPjQ44/</link>
		<comments>http://www.moseshohman.com/blog/2010/03/16/turns-out-cucumberwebrat-is-worse/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 05:17:30 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/?p=72</guid>
		<description><![CDATA[At CDD we use a fairly strange stack to run our automated in-browser (Selenium RC) integration tests. When we started writing these tests back in 2007, we used the best technology we knew of that was then available, a Rails &#8230; <a href="http://www.moseshohman.com/blog/2010/03/16/turns-out-cucumberwebrat-is-worse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At CDD we use a fairly strange stack to run our automated in-browser (Selenium RC) integration tests.</p>

<p>When we started writing these tests back in 2007, we used the best technology we knew of that was then available, a Rails plugin called funkytown, since-abandoned brainchild of Pivotal Labs. Funkytown&#8217;s code is a little weird, and we&#8217;ve had to fix bugs and inflexibilities from time to time. We monkeypatched its rake tasks. Over the years we updated the bundled version of the selenium RC jar file several times.</p>

<p>We wrote another library (selenium-spec, which we open sourced once a while back) on top of funkytown that integrated selenium tests into rspec, provided the ability to chain examples (see <a href="http://www.moseshohman.com/blog/2007/08/08/chained-selenium-rspec-examples/">this blog post</a>), as well as
 some webrat-like helper methods, except better, enabling code like <code>element('results').should be_visible</code>.</p>

<p>So that&#8217;s what we&#8217;ve been using for a few years now. It&#8217;s not pretty, but it works. When cucumber and webrat came out, all the buzz made me think that we&#8217;d inevitably switch over some day in the beautiful future when everything will be perfect. However, I recently had the opportunity to try them out on a another pet project of mine, and I was surprised to learn that even though they have a much bigger install base than our install base of one, our crazy stack turns out to be better.</p>

<p>There are three major problems with cucumber/webrat/selenium RC, as far as I can tell:</p>

<ol>
    <li>You can&#8217;t really use fixtures.</li>
    <li>Debugger breakpoints in your application code don&#8217;t work.</li>
    <li>I swear there was a number three.</li>
</ol>

<p>All of those (well, at least the first two) aren&#8217;t true of our crazy stack, and I wouldn&#8217;t want to give them up.</p>

<p>There are some nice things about cucumber/webrat. The annotations are neat, and it&#8217;s kind of cool that you can run your tests as both Rails integration and selenium RC tests (although I imagine once your tests get realistically complex at all that is no longer so assured).</p>

<p>Perhaps a good opportunity, one day in that beautiful future, for us to clean up our stack, rebase it on some more modern infrastructure (or rewrite our own), and open source what for us has been a really useful tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2010/03/16/turns-out-cucumberwebrat-is-worse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2010/03/16/turns-out-cucumberwebrat-is-worse/</feedburner:origLink></item>
		<item>
		<title>Agile/UX Retreat</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/I2XfQtShZUA/</link>
		<comments>http://www.moseshohman.com/blog/2010/02/03/agileuxretreat/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 00:23:46 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[agileuxretreat]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/?p=66</guid>
		<description><![CDATA[Last weekend I attended an interesting &#8220;retreat&#8221;, really a mini conference run in the unconference style. The topic of the retreat was &#8220;Agile/UX&#8221;, where UX = User Experience design. The motivating idea was that while the agile and UX movements &#8230; <a href="http://www.moseshohman.com/blog/2010/02/03/agileuxretreat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last weekend I attended an interesting &#8220;retreat&#8221;, really a mini conference run in the unconference style. The topic of the retreat was &#8220;Agile/UX&#8221;, where UX = User Experience design. The motivating idea was that while the agile and UX movements have made important discoveries in their respective fields (software development and design, respectively) and really changed how people work for the better, both would be better together.</p>

<p>No agile methodology I know explicitly discusses how user experience design activities fit into the workflow. In the agile context, design usually means the design of code, not the design of the user experience. The standard response of agile to this accusation is &#8220;of course each project involves other roles, and they will just fit in wherever makes sense that fits with the principles and practices of the team&#8221;. While this may be true, by leaving design out of the explicit picture, many agile software development teams who are doing lots of other things right continue to ignore the importance of incorporating iterative UX design into their process, and therefore are delivering software efficiently that is not as effective as it could be.</p>

<p>I assume something similar is wrong with standard UX practice. For one, it seems that perhaps the design community still tends to think of design as something only done Big and Upfront at the beginning of a project, missing an opportunity to learn from their mistakes and iteratively improve their design as implemented in the hands of real users.</p>

<p>Based on my personal experience, this seemed like a great idea, so I was really looking forward to attending the retreat. At CDD we do work with designers, and although (if I may be so bold) we&#8217;re doing better than most informatics companies in this regard, it&#8217;s still clear to me that we could do even better. Thus far we&#8217;ve have a hard time testing/validating and iterating on user designs and working these activities into our software development workflow.</p>

<p>The retreat was inspiring and motivation building, having so many people in one room who care passionately about making great software  from both design and development. One enduring theme was the abolition of &#8220;Us and Them&#8221; thinking. Two points are important here. One, we should think of designers and developers primarily as people, rather than as roles, people who work together and bring their competencies to bear on a common goal. Two, a given set of competencies that normally would be thought of as belonging to two separate roles can be found in the same person, so we should never be limited by thinking that a given person is either a designer or a developer, isolating them accordingly from activities that involve the other discipline. Design and development must work together, even within the same brain.</p>

<p>I would have liked more detailed discussion at the retreat, however this was difficult to accomplish in two short days. I also would have liked more representatives of the &#8220;business&#8221; or &#8220;money&#8221; role, because I think the same principle applies: abolish us vs. them thinking, and find ways for enlightened practitioners from a mix of all of these roles to combine their expertise effectively.</p>

<p>Further activity is planned, targeting something concrete to be presented at the Agile 2010 conference. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2010/02/03/agileuxretreat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2010/02/03/agileuxretreat/</feedburner:origLink></item>
		<item>
		<title>Problems with apt, python2.5 and Ubuntu Hardy?</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/UTIyg22ZWb4/</link>
		<comments>http://www.moseshohman.com/blog/2009/07/29/problems-with-apt-python2-5-and-ubuntu-hardy/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 18:19:37 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/2009/07/29/problems-with-apt-python2-5-and-ubuntu-hardy/</guid>
		<description><![CDATA[I couldn&#8217;t find a good solution to this on the Web, so I&#8217;m providing one in case it helps anyone else. I recently had a weird problem applying updates to Ubuntu Hardy, due to a failure while dpkg was configuring &#8230; <a href="http://www.moseshohman.com/blog/2009/07/29/problems-with-apt-python2-5-and-ubuntu-hardy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find a good solution to this on the Web, so I&#8217;m providing one in case it helps anyone else.</p>

<p>I recently had a weird problem applying updates to Ubuntu Hardy, due to a failure while dpkg was configuring python2.5, giving me error messages like:</p>


<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">dpkg: error processing python2.5 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python2.5-minimal
 python2.5</pre></div></div>


<p>I fixed this by allowing the pycentral rtinstall command to overwrite &#8220;local&#8221; files (which weren&#8217;t actually local, I think they were left over from previous versions of Ubuntu&#8211;I have upgraded the OS several times). In /etc/python/debian_config, I added:</p>


<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">overwrite-local = True</pre></div></div>


<p>&#8220;aptitude safe-upgrade&#8221; then ran without a hitch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2009/07/29/problems-with-apt-python2-5-and-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2009/07/29/problems-with-apt-python2-5-and-ubuntu-hardy/</feedburner:origLink></item>
		<item>
		<title>R makes NYT</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/bKyJho1qV6Q/</link>
		<comments>http://www.moseshohman.com/blog/2009/01/07/r-makes-nyt/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 07:34:50 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Informatics]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/?p=60</guid>
		<description><![CDATA[Nice: http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html]]></description>
			<content:encoded><![CDATA[<p>Nice: <a href="http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html">http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2009/01/07/r-makes-nyt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2009/01/07/r-makes-nyt/</feedburner:origLink></item>
		<item>
		<title>Pair programming and microarrays</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/F09Qe2Ub9PY/</link>
		<comments>http://www.moseshohman.com/blog/2008/07/09/pair-microarrays/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 09:46:13 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Informatics]]></category>
		<category><![CDATA[Open R&D]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[microarrays pairing]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/?p=59</guid>
		<description><![CDATA[Yesterday I met with folks at Lawrence Berkeley labs. The PI entered the room, full of energy and clearly ducking briefly out of the fray to speak with us. Part of the discussion revolved around microarray experiments. We&#8217;ve all heard &#8230; <a href="http://www.moseshohman.com/blog/2008/07/09/pair-microarrays/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I met with folks at Lawrence Berkeley labs. The PI entered the room, full of energy and clearly ducking briefly out of the fray to speak with us. Part of the discussion revolved around microarray experiments. We&#8217;ve all heard about how notoriously difficult it is to reproduce microarray experiments. People have proposed minimum information standards (really they&#8217;re guidelines) to combat this problem, and we&#8217;ve also all heard that often these standards aren&#8217;t enough. Even if people are following the guidelines, inevitably a crucial piece of information isn&#8217;t obviously critical and therefore isn&#8217;t communicated.</p>

<p>The PI noted that he has seen it to be helpful when more than one lab conducts an experiment, so that each can help the other avoid finicky and/or tacit experimental conditions that would prevent others from reproducing their results. I have wondered for some time (and for the case of microarrays in particular) whether the practice of &#8220;pair programming&#8221; that we use in software development would be more helpful than minimum information standards to increase the reproducibility of complex experiments. The problem with this, as the PI pointed out, is that duplicating every experiment can get expensive, and in the world of soft money (especially today&#8217;s world), people are always looking for ways to make the research dollar go farther. The possible long term efficiency of duplicating some efforts to increase data value and reduce a tendency to go down blind alleys might not be easy to quantify, and thus not easy to weigh quantitatively against the immediate penalty of &#8220;getting half as much work done&#8221;. (That&#8217;s certainly true in software.)</p>

<p>The PI pointed out that even if direct duplication was too expensive, he still advocated some kind of collaboration on experiments. In particular he advocated getting people together in the same room to look at the experiment together <em>as it was being performed</em>, so that the collaborator might catch important things that weren&#8217;t immediately apparent to the person performing the experiment. This, at most, only costs a small amount of travel funds.</p>

<p>I asked the PI if others shared his views, and he said that most of the larger microarray efforts had some sort of distributed work going on, but he wasn&#8217;t sure that this idea had been formalized anywhere.</p>

<p>I&#8217;m interested in this not only because of its parallel with software work, but also because I work for a <a target="_blank" href="http://www.collaborativedrug.com">company focused on facilitating collaborative science</a>. I&#8217;m very interested in the different forms that scientific collaboration can take, and how best to help them along.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2008/07/09/pair-microarrays/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2008/07/09/pair-microarrays/</feedburner:origLink></item>
		<item>
		<title>DTrace predicate hack</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/0DcwtC3bdOs/</link>
		<comments>http://www.moseshohman.com/blog/2008/07/06/dtrace-predicate-hack/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 00:23:15 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/2008/07/06/dtrace-predicate-hack/</guid>
		<description><![CDATA[One of the things I keep wanting in DTrace&#8217;s D language but isn&#8217;t there (right?) is a richer set of string comparison functions. Ideally I want full regular expression functionality, so that I can predicate actions on, say, regex matches &#8230; <a href="http://www.moseshohman.com/blog/2008/07/06/dtrace-predicate-hack/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the things I keep wanting in DTrace&#8217;s D language but isn&#8217;t there (right?) is a richer set of string comparison functions. Ideally I want full regular expression functionality, so that I can predicate actions on, say, regex matches of a class and/or method name. For instance, a while back, while profiling some Java, I wanted to only count time spent in methods of classes that belonged to a particular package (org/apache/solr) or to its subpackages. There is no &#8220;starts with&#8221; string operator in D. However, the following did the trick:</p>


<div class="wp_syntax"><div class="code"><pre class="dtrace" style="font-family:monospace;">hotspot$target:::method-entry
/(self-&gt;class = copyinstr(arg1)) != NULL &amp;&amp; self-&gt;class &gt;= &quot;org/apache/solr/&quot; &amp;&amp; self-&gt;class &lt; &quot;org/apache/sols&quot;/
{
  /* action goes here */
}</pre></div></div>


<p>A little ugly, but it worked. The choice of &#8220;org/apache/sols&#8221; as the upper bound was somewhat arbitrary.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2008/07/06/dtrace-predicate-hack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2008/07/06/dtrace-predicate-hack/</feedburner:origLink></item>
		<item>
		<title>Too many mock objects == ruby refactoring death</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/nc2dPNbbGzo/</link>
		<comments>http://www.moseshohman.com/blog/2008/07/06/too-many-mock-objects-ruby-refactoring-death/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 00:22:36 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/2008/07/06/too-many-mock-objects-ruby-refactoring-death/</guid>
		<description><![CDATA[It&#8217;s a question we face as test-driven ruby programmers: Should we use mock objects or real objects in our tests? Both approaches have trade-offs, and their biggest downsides both have to do with wasting programmer time. If you test with &#8230; <a href="http://www.moseshohman.com/blog/2008/07/06/too-many-mock-objects-ruby-refactoring-death/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a question we face as test-driven ruby programmers: Should we use mock objects or real objects in our tests?</p>

<p>Both approaches have trade-offs, and their biggest downsides both have to do with wasting programmer time. If you test with real objects, then your tests run slowly (especially if you use an ORM that binds your domain objects tightly to the database like ActiveRecord). Your tests hit the database, and this is slow. There are other sources of slowness, but nothing has anywhere near as great an effect as hitting the DB.</p>

<p>If you test with mock objects, once your app has any kind of complexity, your refactoring and test writing processes become slow. This is not immediately apparent when you start using mock objects. But as you start writing more and more code, eventually you start having to come up with a crazy number of mock expectations just to test some of your methods. It is true that this is good feedback that the class you&#8217;re testing presents too complex an interface to other collaborating objects, or that it collaborates with too many objects, etc. What starts simple will eventually become too complex, and at some point you&#8217;re going to need to refactor.</p>

<p>More insidious than this, however, is the effect this web of mocks you&#8217;ve wrapped yourself in has on refactoring. You don&#8217;t notice how thoroughly you&#8217;ve painted yourself into a corner until you want to refactor some ugly aspect of a core class that collaborates with many objects in your system. Suddenly all of those collaborating objects&#8217; tests break because they expect certain method calls from this core object. These tests break because you&#8217;ve changed a method signature, a method name, or even worse just an implementation, because no matter what those BDDers tell you, if you test with mocks, to too great a degree that means you&#8217;re testing implementation, not behavior (or is that behaviour).</p>

<p>So, now you have to go through all of those mock-based tests and &#8220;correct&#8221; them, i.e. change their expectations so that they fit the new method name/signature/implementation. This is horrible. The whole point of tests during refactoring is to verify that your refactoring hasn&#8217;t changed the behavior of the system (that being half of the definition of refactoring). The tests should pass before you refactor, and they should pass after you refactor. Not only does this break the fundamental refactoring process, it also can take a lot of time, because you have to remember the context of each of those test cases that you have to fix.</p>

<p>You can do something about slow running tests that hit a database (in extreme cases you can use a faster in-memory database, or even parallelize your tests). Of course they won&#8217;t run as fast as they would if they didn&#8217;t hit a database, but in my opinion it&#8217;s something you can live with. <a target="_blank" href="http://akuaku.org">Dav Yaginuma</a> has a good suggestion for what to do with this time: Go write that email you need to write, go take the bathroom break, go walk around the office and stretch your legs. It&#8217;s not like that&#8217;s really wasted time. It is wasted time, however, if you&#8217;re sitting there squinting at the screen fixing all of your mock expectations. You can&#8217;t do anything else with that time.</p>

<p>I&#8217;m kind of half-convinced now that people who advocate the heavy use of mocking either have really nice IDEs that make fixing the expectations a breeze, or they don&#8217;t refactor. And if they&#8217;re using Ruby that means they don&#8217;t refactor. Ok, tongue out of cheek. Seriously, I&#8217;d love to hear from folks who have used and continue to use mocks heavily on long running projects, to hear how they handle the refactoring issue. I have pretty much sworn off mocks except in old-school traditional cases (&#8220;mocking out an external  dependency too expensive to call directly&#8221;) because of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2008/07/06/too-many-mock-objects-ruby-refactoring-death/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2008/07/06/too-many-mock-objects-ruby-refactoring-death/</feedburner:origLink></item>
		<item>
		<title>MacPorts Ruby, now with DTrace</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/fZPm0qQXV2I/</link>
		<comments>http://www.moseshohman.com/blog/2008/02/21/macports-ruby-now-with-dtrace/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 07:38:11 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ruby dtrace macports]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/2008/02/21/56</guid>
		<description><![CDATA[We are gearing up to do some profiling/performance improvement at work, and we use MacPorts (mostly at my stubborn insistence) to install Ruby on our OS X dev boxes. Unfortunately, the MacPorts version of Ruby is not DTrace-enabled, so we &#8230; <a href="http://www.moseshohman.com/blog/2008/02/21/macports-ruby-now-with-dtrace/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are gearing up to do some profiling/performance improvement at work, and we use MacPorts (mostly at my stubborn insistence) to install Ruby on our OS X dev boxes. Unfortunately, the MacPorts version of Ruby is not DTrace-enabled, so we were faced with the decision to either go with the Apple-installed Ruby or not use DTrace.</p>

<p>Fortunately, there was a third option. I spent some time massaging Joyent&#8217;s Ruby DTrace patch so that it would compile with Apple&#8217;s version of DTrace (subtly different from Solaris&#8217;s), and so it would play nice with the other patches in the official Ruby MacPort distribution. Anyway, long story short: you can get it via my newest RubyForge project, <a href="http://rubyforge.org/projects/rubyport-dtrace">rubyport-dtrace</a>. You can install either from the tarfile or by checking out from Subversion, see the instructions in the distribution.</p>

<p>Why I like MacPorts: I like being able to cleanly remove software I install. I also like that I can compile Ruby with DTrace and other patches that I might want (such as the Railsbench GC patch, which I&#8217;m also working in to the rubyport-dtrace (dare I call it) code, it might already work but I haven&#8217;t tested it).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2008/02/21/macports-ruby-now-with-dtrace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2008/02/21/macports-ruby-now-with-dtrace/</feedburner:origLink></item>
		<item>
		<title>Z factor refactored</title>
		<link>http://feedproxy.google.com/~r/inforbiomatica/~3/MBWfUIvAwkw/</link>
		<comments>http://www.moseshohman.com/blog/2007/11/11/z-factor-refactored/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 23:52:48 +0000</pubDate>
		<dc:creator>Moses</dc:creator>
				<category><![CDATA[Informatics]]></category>

		<guid isPermaLink="false">http://www.moseshohman.com/blog/2007/11/11/51</guid>
		<description><![CDATA[I recently reread the original Z factor paper (Zhang et al). The Z factor is a measure of assay reliability and comes in two flavors: the Z&#8217; factor, based entirely based on controls (those with and without the desired effect); &#8230; <a href="http://www.moseshohman.com/blog/2007/11/11/z-factor-refactored/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently reread the original Z factor paper (<a href="http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&amp;Cmd=ShowDetailView&amp;TermToSearch=10838414">Zhang et al</a>). The Z factor is a measure of assay reliability and comes in two flavors: the Z&#8217; factor, based entirely based on controls (those with and without the desired effect); and the Z factor, based on experimental data compared with the controls that should have the desired effect.</p>

<p>Rereading a paper months later often makes you wonder whether you read the paper at all the first time. This reading really clarified for me what the Z factor is, that it is not just for high-throughput screening, and raised a number of questions (especially after discussion with colleagues) not addressed in the paper.</p>

<p>The Z factor is the ratio of the &#8220;separation band&#8221; of the data to the assay dynamic range. A picture helps:</p>

<p><img src="/blog/wp-content/uploads/2007/11/z-factor.png" alt="separation band image" title="Z factor: the separation band" /></p>

<p>where &mu;<sub>+</sub> is the mean of the positive controls (in this case the controls with desired effect), &mu;<sub>s</sub> is the mean of the data, &sigma;<sub>+</sub> is the standard deviation of the positive controls, etc. The assay dynamic range in this diagram is &mu;<sub>+</sub> &#8211; &mu;<sub>s</sub>. The screening window is then (&mu;<sub>+</sub> &#8211; &mu;<sub>s</sub>) &#8211; (3&sigma;<sub>+</sub> + 3&sigma;<sub>s</sub>), and the ratio of this to the dynamic range is the Z factor = 1 &#8211; (3&sigma;<sub>+</sub> + 3&sigma;<sub>s</sub>)/(&mu;<sub>+</sub> &#8211; &mu;<sub>s</sub>).</p>

<p>(If you&#8217;re reading this in an RSS reader, the story continues on my website.)</p>

<p><span id="more-51"></span></p>

<p><a href="http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&amp;Cmd=ShowDetailView&amp;TermToSearch=10838414">Zhang et al</a> go on to describe desirable values of Z: Z = 1 is an &#8220;ideal assay&#8221; (the standard deviations are negligible compared to the difference between the means), 1 > Z ≥ 0.5 is an &#8220;excellent assay&#8221;, 0.5 > Z > 0 is a &#8220;double assay&#8221;, Z = 0 is a &#8220;yes/no assay&#8221; (no separation band, the two 3&sigma; regions touch), and for Z &lt; 0 &#8220;screening is essentially impossible&#8221;. Note that when the two distributions completely overlap (&mu;<sub>s</sub> = &mu;<sub>+</sub>), then Z is -&infin;.</p>

<p>As I mentioned above, the Z factor&#8217;s usefulness is not restricted to high-throughput screening assays. Indeed, it can be applied to any assay that measures a number of experimental subjects in an identical way and measures control values. However, when discussing application to assay optimization, the paper does point out that use of the Z factor requires &#8220;relatively large data sets&#8221;.</p>

<p>Three major questions arise:</p>

<ol>
<li>What do these significant values of Z mean, especially 0.5? What is a &#8220;double&#8221; or &#8220;yes/no&#8221; assay?</li>
<li>How large is a &#8220;relatively large data set&#8221;, i.e. how large does your data set need to be to use the Z factor?</li>
<li>Why is the range of of Z -&infin; to 1? Is there another parameter with a more intuitive range?</li>
</ol>

<p>A nice companion reading for deeper understanding is the <a href="http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&amp;Cmd=ShowDetailView&amp;TermToSearch=17218666">paper</a> published in March 2007 by <a href="http://www.stat.brown.edu/~ysui/">Sui</a> and <a href="http://www.stat.brown.edu/~zwu/">Wu</a>. They take on question #1, by examining the statistical power of an assay at different Z factor values. The statistical power, in the case of a drug screening assay, is the probability that an active compound is scored as a hit (i.e. the probability of &#8220;true positives&#8221;). Z factor is calculated without referring to the hit threshold, the value beyond which a compound is scored as a hit. Often people score all outliers three standard deviations outside the mean as &#8220;hits&#8221; (in our diagram above, this would be any measurements falling above &mu;<sub>s</sub> + 3&sigma;<sub>s</sub>, i.e. within the separation band or above). Sui and Wu show that if the standard deviations of sample data and controls are equal, then a Z factor of 0.5 corresponds to a statistical power of 0.999, i.e. there is only 0.1% chance that an active compound is not scored as a hit.</p>

<p>However, they also show that if the standard deviations are not equal, then interpreting the Z factor becomes considerably trickier. They also show that although the Z factor calculation does not necessarily rely on the error distributions being normal, for non-normal error distributions (where the sample (or the control data) is not well described by the normal distribution N(&mu;<sub>s</sub>, &sigma;<sub>s</sub><sup>2</sup>)) the Z factor does a poor job of describing the reliability of the assay, demonstrated by the fact that the Z factor is different if non-normally distributed data is transformed to be closer to normal.</p>

<p>Sui and Wu suggest caution when interpreting Z (and Z&#8217;) factor values, and recommend that analysts confirm normality of the data (transforming if necessary) and calculate the statistical power corresponding to the distributions of the sample/control data
 and the hit threshold to get a more reliable measure of assay reliability.</p>

<p>Humorous side note: Sui and Wu interpret &#8220;double assay&#8221; to mean &#8220;doable assay&#8221;. Who knows.</p>

<p>As for question #2 (&#8220;how large does a data set need to be to get a reliable estimate of Z factor?&#8221;), this can be calculated from the standard error of the estimators used to calculate the means and standard deviations. That is, when calculating Z factor, one can&#8217;t actually use the real means and standard deviations of the underlying distributions of the samples and controls, one can only estimate these quantities by making a number of measurements of the samples and controls. I plan to calculate these and publish them here at some point, but any statistician can do the same (probably more efficiently and correctly than I).</p>

<p>Finally, question #3: <a href="http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&amp;Cmd=ShowDetailView&amp;TermToSearch=10838414">Zhang et al</a>&#8216;s objective was to develop a dimensionless constant that took three distributional parameters into account: the difference of the means of the samples and controls, the variability of the controls and the variability of the sample data. There are other ways to combine these parameters into dimensionless constants that are different from the Z factor. For instance, one could calculate the ratio of the separation band to the sum of (3&sigma;<sub>+</sub> + 3&sigma;<sub>s</sub>), call this parameter C. C varies between -&infin; and +&infin;, and if &sigma; is the same for controls and samples, then C = -1 when Z = -&infin;, C = 0 when Z = 0, C = 1 when Z = 0.5, and C = +&infin; when Z = 1.</p>

<p>This gets rid of the weird &#8220;0.5&#8243; and the upper limit of 1, but I think that actually the Z factor is a more accurate reflection of reliability. The reason is that the reliability of an assay with Z of 0.9 vs. 1.0 is really quite small, even if the dynamic range in these two cases is very different, because 0.9 is already good enough. By contrast, the difference between the reliability of an assay with Z = 0 and Z = -&infin; is huge, because we go from having the data variability ranges ([&mu; - 3&sigma;, &mu; + 3&sigma;] with appropriate subscripts) touch to having the two distributions completely overlap. By contrast C would only vary from 0 and -1 between these two cases.</p>

<p>I may retouch the explanation above for clarity at some point, especially if people ask questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moseshohman.com/blog/2007/11/11/z-factor-refactored/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.moseshohman.com/blog/2007/11/11/z-factor-refactored/</feedburner:origLink></item>
	</channel>
</rss>
