<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Define local macros in one place, use them everywhere</title>
	<atom:link href="http://enoriver.net/index.php/2010/02/18/define-local-macros-in-one-place-use-them-everywhere/feed/" rel="self" type="application/rss+xml" />
	<link>http://enoriver.net/index.php/2010/02/18/define-local-macros-in-one-place-use-them-everywhere/</link>
	<description>computing for fun and profit</description>
	<lastBuildDate>Wed, 18 Apr 2012 00:10:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Michael P. Manti</title>
		<link>http://enoriver.net/index.php/2010/02/18/define-local-macros-in-one-place-use-them-everywhere/comment-page-1/#comment-4318</link>
		<dc:creator>Michael P. Manti</dc:creator>
		<pubDate>Sat, 27 Feb 2010 19:16:41 +0000</pubDate>
		<guid isPermaLink="false">http://enoriver.net/?p=1028#comment-4318</guid>
		<description>Thanks for the pointer to your previous post. Like you, I outline my do-files, and I do have master do-files that call other do-files in sequence. But I suspect that you take encapsulation farther than I do. If I recall correctly, you have clients that you provide regularly updated analyses, right? Whereas I often perform an analysis only once, but I want and need it to be reproducible by myself and others.

I adapted my workflow from J. Scott Long&#039;s The Workflow of Data Analysis Using Stata. (I&#039;m still trying to get my colleagues to drink the Kool Aid.) Have you read it? I think you would find it interesting.

I&#039;m curious about your profiler! Please do embed it in a future post. Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for the pointer to your previous post. Like you, I outline my do-files, and I do have master do-files that call other do-files in sequence. But I suspect that you take encapsulation farther than I do. If I recall correctly, you have clients that you provide regularly updated analyses, right? Whereas I often perform an analysis only once, but I want and need it to be reproducible by myself and others.</p>
<p>I adapted my workflow from J. Scott Long's The Workflow of Data Analysis Using Stata. (I'm still trying to get my colleagues to drink the Kool Aid.) Have you read it? I think you would find it interesting.</p>
<p>I'm curious about your profiler! Please do embed it in a future post. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabi Huiber</title>
		<link>http://enoriver.net/index.php/2010/02/18/define-local-macros-in-one-place-use-them-everywhere/comment-page-1/#comment-4314</link>
		<dc:creator>Gabi Huiber</dc:creator>
		<pubDate>Sat, 27 Feb 2010 18:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://enoriver.net/?p=1028#comment-4314</guid>
		<description>No, I hadn&#039;t profiled it, but I did now -- meaning, I wrote a do-file that ran both solutions 500, then 1000 times and checked run time. You&#039;re right that there&#039;s no noticeable performance gain in what I propose. I&#039;m surprised. Thanks for bringing it up.

About my use case: I seldom write ado-files. Instead, I write do-files, but my usual do-file is structured as a collection of separate programs that call each other as needed. It doesn&#039;t always start that way, but that&#039;s what it looks like in its final form. This way I can avoid repeating code and I can debug pieces of it individually, without worrying about stuff that already works. I explained the general structure &lt;a href=&quot;http://enoriver.net/index.php/2009/01/03/do-file-rules-one-suggestion/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; a while back. When I make do-files reference each other, it&#039;s always the case that a parent do-file runs a child do-file and the child has no explicit program calls (it&#039;s missing Section 4, Program execution). The child, in other words, just makes some additional program definitions available to the parent.

If anybody&#039;s curious about my profiler, I put it all on &lt;a href=&quot;http://snipt.org&quot; rel=&quot;nofollow&quot;&gt;snipt&lt;/a&gt; and I could embed it in a future post.</description>
		<content:encoded><![CDATA[<p>No, I hadn't profiled it, but I did now -- meaning, I wrote a do-file that ran both solutions 500, then 1000 times and checked run time. You're right that there's no noticeable performance gain in what I propose. I'm surprised. Thanks for bringing it up.</p>
<p>About my use case: I seldom write ado-files. Instead, I write do-files, but my usual do-file is structured as a collection of separate programs that call each other as needed. It doesn't always start that way, but that's what it looks like in its final form. This way I can avoid repeating code and I can debug pieces of it individually, without worrying about stuff that already works. I explained the general structure <a href="http://enoriver.net/index.php/2009/01/03/do-file-rules-one-suggestion/" rel="nofollow">here</a> a while back. When I make do-files reference each other, it's always the case that a parent do-file runs a child do-file and the child has no explicit program calls (it's missing Section 4, Program execution). The child, in other words, just makes some additional program definitions available to the parent.</p>
<p>If anybody's curious about my profiler, I put it all on <a href="http://snipt.org" rel="nofollow">snipt</a> and I could embed it in a future post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael P. Manti</title>
		<link>http://enoriver.net/index.php/2010/02/18/define-local-macros-in-one-place-use-them-everywhere/comment-page-1/#comment-4308</link>
		<dc:creator>Michael P. Manti</dc:creator>
		<pubDate>Sat, 27 Feb 2010 00:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://enoriver.net/?p=1028#comment-4308</guid>
		<description>Maybe I don&#039;t understand your use case. If you run any other program that stores its results to return space, you&#039;ve got to call -defineMyLocals- again because your locals have been clobbered. Doesn&#039;t this negate the performance advantage?

I suppose I structure my work differently. I usually write my programs as -ado- files that are passed information via -syntax-; I rarely write programs midstream in a -do- file. When necessary, I will pass information via judicious use of -global- a la the -ml- suite of programs. But, then, when I encapsulate code via -program-, it typically performs a well-defined task of general utility such as a statistical procedure or a data manipulation.

Also, I use -include- in my -do- files rather liberally, and I haven&#039;t noticed a significant performance hit. Have you profiled this? How much speed are you gaining?</description>
		<content:encoded><![CDATA[<p>Maybe I don't understand your use case. If you run any other program that stores its results to return space, you've got to call -defineMyLocals- again because your locals have been clobbered. Doesn't this negate the performance advantage?</p>
<p>I suppose I structure my work differently. I usually write my programs as -ado- files that are passed information via -syntax-; I rarely write programs midstream in a -do- file. When necessary, I will pass information via judicious use of -global- a la the -ml- suite of programs. But, then, when I encapsulate code via -program-, it typically performs a well-defined task of general utility such as a statistical procedure or a data manipulation.</p>
<p>Also, I use -include- in my -do- files rather liberally, and I haven't noticed a significant performance hit. Have you profiled this? How much speed are you gaining?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

