<?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: Assertions Parameterized by Location</title>
	<atom:link href="http://hostilefork.com/2005/05/01/location-parameterized-assertions/feed/" rel="self" type="application/rss+xml" />
	<link>http://hostilefork.com/2005/05/01/location-parameterized-assertions/</link>
	<description>a disgruntled developer taking a stand in the information multiverse</description>
	<pubDate>Sun, 05 Sep 2010 14:12:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Hostile Fork</title>
		<link>http://hostilefork.com/2005/05/01/location-parameterized-assertions/#comment-850</link>
		<dc:creator>Hostile Fork</dc:creator>
		<pubDate>Fri, 09 Jan 2009 00:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/05/01/location-parameterized-assertions/#comment-850</guid>
		<description>Ah, although off the top of my head it seemed you could put a codeplace into a variable and then compare against the variable in multiple places... I now see that defeats the purpose.  It would indicate the location of the variable declaration and wouldn't live right next to the "interesting" line of code.

But bear in mind this article is out of date in terms of capturing my attempts to put identity-in-text...for reasons like that and others.  For my own projects, I've bitten the bullet and drop Base64 UUIDs all over my source, which some people might think is pointless but I find it very valuable.  The build process makes a table of them and what line numbers they are at off to the side.  Winds up looking more like:

&lt;pre lang="cpp"&gt;
phone.hangUp(HERE("cRBhRW1wQ+ZJk+22SUv4Lg"));
&lt;/pre&gt;

Guess it's obvious that I do not care much for programming in text files!  I feel like if I can point to something on the screen with my finger I should have a way of expressing that "place" in my program.  I should be able to say "I mean that dot, there!" without having to say "the dot between phone and hangUp".  Of course, that requires a special kind of editor...one that recognizes the difference between moving that dot to another place and creating a new one...</description>
		<content:encoded><![CDATA[<p>Ah, although off the top of my head it seemed you could put a codeplace into a variable and then compare against the variable in multiple places&#8230; I now see that defeats the purpose.  It would indicate the location of the variable declaration and wouldn&#8217;t live right next to the &#8220;interesting&#8221; line of code.</p>
<p>But bear in mind this article is out of date in terms of capturing my attempts to put identity-in-text&#8230;for reasons like that and others.  For my own projects, I&#8217;ve bitten the bullet and drop Base64 UUIDs all over my source, which some people might think is pointless but I find it very valuable.  The build process makes a table of them and what line numbers they are at off to the side.  Winds up looking more like:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp">phone.<span style="color: #00eeff;">hangUp</span><span style="color: #008000;">&#40;</span>HERE<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;cRBhRW1wQ+ZJk+22SUv4Lg&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>;</pre></div></div>

<p>Guess it&#8217;s obvious that I do not care much for programming in text files!  I feel like if I can point to something on the screen with my finger I should have a way of expressing that &#8220;place&#8221; in my program.  I should be able to say &#8220;I mean that dot, there!&#8221; without having to say &#8220;the dot between phone and hangUp&#8221;.  Of course, that requires a special kind of editor&#8230;one that recognizes the difference between moving that dot to another place and creating a new one&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Friesner</title>
		<link>http://hostilefork.com/2005/05/01/location-parameterized-assertions/#comment-849</link>
		<dc:creator>Jeremy Friesner</dc:creator>
		<pubDate>Thu, 08 Jan 2009 23:38:05 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/05/01/location-parameterized-assertions/#comment-849</guid>
		<description>Hmm, it's hard to see what security concern there could be, since they don't actually change the state of anything.  You're right about requiring debug symbols in your executable if you want human-readable function names.

As for testing for specific codeplaces, that would be pretty fragile, since whenever you inserted/deleted a line of code in the file above where the codeplace was declared, the codeplace's identity would change and any test for that codeplace would break.</description>
		<content:encoded><![CDATA[<p>Hmm, it&#8217;s hard to see what security concern there could be, since they don&#8217;t actually change the state of anything.  You&#8217;re right about requiring debug symbols in your executable if you want human-readable function names.</p>
<p>As for testing for specific codeplaces, that would be pretty fragile, since whenever you inserted/deleted a line of code in the file above where the codeplace was declared, the codeplace&#8217;s identity would change and any test for that codeplace would break.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hostile Fork</title>
		<link>http://hostilefork.com/2005/05/01/location-parameterized-assertions/#comment-848</link>
		<dc:creator>Hostile Fork</dc:creator>
		<pubDate>Thu, 08 Jan 2009 21:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/05/01/location-parameterized-assertions/#comment-848</guid>
		<description>Stack traces are useful, although those APIs are generally platform-dependent (and require that you're shipping a version of your program with debug symbols).  I imagine that those APIs generally trigger some sort of security concerns as well.

This allows some fairly useful information without going quite that far.  Also, you can use them in a comparative way.  You can save a codeplace in a value and then test against specific ones.  It's a little harder to pick over a stack data structure to extract the information you're interested in...</description>
		<content:encoded><![CDATA[<p>Stack traces are useful, although those APIs are generally platform-dependent (and require that you&#8217;re shipping a version of your program with debug symbols).  I imagine that those APIs generally trigger some sort of security concerns as well.</p>
<p>This allows some fairly useful information without going quite that far.  Also, you can use them in a comparative way.  You can save a codeplace in a value and then test against specific ones.  It&#8217;s a little harder to pick over a stack data structure to extract the information you&#8217;re interested in&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy friesner</title>
		<link>http://hostilefork.com/2005/05/01/location-parameterized-assertions/#comment-846</link>
		<dc:creator>Jeremy friesner</dc:creator>
		<pubDate>Wed, 07 Jan 2009 22:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/05/01/location-parameterized-assertions/#comment-846</guid>
		<description>It should be noted that most sane OS's (read: those not designed in Redmond) provide a handy backtrace_symbols() function that can be used to obtain the current stack trace in human readable form.  An assert() function could use that to print out the errant caller's full location, log it to a file, etc.

Jeremy</description>
		<content:encoded><![CDATA[<p>It should be noted that most sane OS&#8217;s (read: those not designed in Redmond) provide a handy backtrace_symbols() function that can be used to obtain the current stack trace in human readable form.  An assert() function could use that to print out the errant caller&#8217;s full location, log it to a file, etc.</p>
<p>Jeremy</p>
]]></content:encoded>
	</item>
</channel>
</rss>
