<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>log.lowmag.net &#187; coding</title>
	<atom:link href="http://log.lowmag.net/tag/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://log.lowmag.net</link>
	<description></description>
	<lastBuildDate>Tue, 29 Jun 2010 22:19:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Say you have a routine/sub/function, and&#8230;</title>
		<link>http://log.lowmag.net/say-you-have-a-routinesubfunction-and/788/</link>
		<comments>http://log.lowmag.net/say-you-have-a-routinesubfunction-and/788/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 22:04:20 +0000</pubDate>
		<dc:creator>lowmagnet</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[refactoring]]></category>

		<guid isPermaLink="false">http://lowmag.net/say-you-have-a-routinesubfunction-and/788/</guid>
		<description><![CDATA[Say you have a routine/sub/function, and you end up calling it several times throughout a project. Say it takes 5 parameters. Through analysis tools, you find out you&#8217;re always calling four parameters the same way, and only the 5th changes. Let us also assume that the code is not under your control. Would you: turn [...]]]></description>
			<content:encoded><![CDATA[<p>Say you have a routine/sub/function, and you end up calling it several times throughout a project. Say it takes 5 parameters. Through analysis tools, you find out you&#8217;re always calling four parameters the same way, and only the 5th changes. Let us also assume that the code is not under your control.</p>
<p>Would you:</p>
<ol>
<li>turn the parameters in your calls into constants</li>
<li>mass search-replace throughout your project when the owner of the function changes its behavior or inputs</li>
<li>&#8220;wrap&#8221; the function in your own, renamed function to future-proof your project and mitigate change</li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://log.lowmag.net/say-you-have-a-routinesubfunction-and/788/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
