<?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"
	>
<channel>
	<title>Comments on: VBA Functions</title>
	<atom:link href="http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/</link>
	<description>Simon Murphy on professional spreadsheet development stuff</description>
	<pubDate>Fri, 08 Aug 2008 19:50:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: Nick Hebb</title>
		<link>http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7877</link>
		<dc:creator>Nick Hebb</dc:creator>
		<pubDate>Mon, 29 Oct 2007 22:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7877</guid>
		<description>Where possible, I try to boil it down to a single responsibility per function/sub. Sometimes that responsibility is to manage flow between other functions/subs. 

I'm not obsessive about it, but it makes the logic easier to follow when you look at your code a few years, months, days, or (fatigued) minutes later.</description>
		<content:encoded><![CDATA[<p>Where possible, I try to boil it down to a single responsibility per function/sub. Sometimes that responsibility is to manage flow between other functions/subs. </p>
<p>I&#8217;m not obsessive about it, but it makes the logic easier to follow when you look at your code a few years, months, days, or (fatigued) minutes later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus</title>
		<link>http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7873</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Mon, 29 Oct 2007 21:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7873</guid>
		<description>I do care about function length but I'm not obsessed by it. 

Although is not always possible (or even pragmatic) is to make functions as generic as possible. This allows them to be tested independently and encourages reuse adding to my code library. 

Often (but not always), simply by defining a simple, single task that a function needs to achieve is enough to help from letting the size get out of control.

Cheers - Marcus</description>
		<content:encoded><![CDATA[<p>I do care about function length but I&#8217;m not obsessed by it. </p>
<p>Although is not always possible (or even pragmatic) is to make functions as generic as possible. This allows them to be tested independently and encourages reuse adding to my code library. </p>
<p>Often (but not always), simply by defining a simple, single task that a function needs to achieve is enough to help from letting the size get out of control.</p>
<p>Cheers - Marcus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harlan Grove</title>
		<link>http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7863</link>
		<dc:creator>Harlan Grove</dc:creator>
		<pubDate>Mon, 29 Oct 2007 17:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7863</guid>
		<description>Some modularity makes sense, but I've seen examples of programs that look like

(Pascal syntax)
program ...
Initialize();
Input();
Process();
Output();
CleanUp();
end.

(C syntax)
main(...) {
init();
while ( ! feof(STDIN) ) {
  proc();
}
wrapup();
}

That's foolish. It's one thing to encapsulate specific functionality in a function or procedure, quite another to make the main program skeleton reusable.

I can see the JOS guy's point: functions and procedures are only needed when specific bits of code would be run multiple times within the same program or from multiple programs. It's pointless to compartmentalize anything that's truly once-off.</description>
		<content:encoded><![CDATA[<p>Some modularity makes sense, but I&#8217;ve seen examples of programs that look like</p>
<p>(Pascal syntax)<br />
program &#8230;<br />
Initialize();<br />
Input();<br />
Process();<br />
Output();<br />
CleanUp();<br />
end.</p>
<p>(C syntax)<br />
main(&#8230;) {<br />
init();<br />
while ( ! feof(STDIN) ) {<br />
  proc();<br />
}<br />
wrapup();<br />
}</p>
<p>That&#8217;s foolish. It&#8217;s one thing to encapsulate specific functionality in a function or procedure, quite another to make the main program skeleton reusable.</p>
<p>I can see the JOS guy&#8217;s point: functions and procedures are only needed when specific bits of code would be run multiple times within the same program or from multiple programs. It&#8217;s pointless to compartmentalize anything that&#8217;s truly once-off.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7859</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Mon, 29 Oct 2007 13:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://smurfonspreadsheets.wordpress.com/2007/10/28/vba-functions/#comment-7859</guid>
		<description>I don't care specifically about function length. Splitting code arbitrarily into ever smaller pieces until they all fit in one screen can be counterproductive. However, using as few functions as possible is also counterproductive, as it reduces your opportunities to modularize and reuse your code.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t care specifically about function length. Splitting code arbitrarily into ever smaller pieces until they all fit in one screen can be counterproductive. However, using as few functions as possible is also counterproductive, as it reduces your opportunities to modularize and reuse your code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
