<?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 for Shattered Terminal</title>
	<atom:link href="http://shatteredterminal.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://shatteredterminal.com</link>
	<description>i don't have a tagline yet</description>
	<lastBuildDate>Thu, 16 Dec 2010 12:23:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Random sample from a long linked list by Tritis</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-3061</link>
		<dc:creator>Tritis</dc:creator>
		<pubDate>Thu, 16 Dec 2010 12:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-3061</guid>
		<description>Can sb pls give the proof for this! why is the probablity of every element getting picked the same</description>
		<content:encoded><![CDATA[<p>Can sb pls give the proof for this! why is the probablity of every element getting picked the same</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Random sample from a long linked list by Tritis</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-3018</link>
		<dc:creator>Tritis</dc:creator>
		<pubDate>Mon, 13 Dec 2010 20:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-3018</guid>
		<description>Hey, 
can you pls give the proof of induction for the probability part?

Btw, your code is REALLY impressive</description>
		<content:encoded><![CDATA[<p>Hey,<br />
can you pls give the proof of induction for the probability part?</p>
<p>Btw, your code is REALLY impressive</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C++&#8217;s scoped_ptr and unique_ptr smart pointers by shards</title>
		<link>http://shatteredterminal.com/2008/11/scoped_ptr-and-unique_ptr-smart-pointers/comment-page-1/#comment-1336</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Thu, 04 Feb 2010 13:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=91#comment-1336</guid>
		<description>You&#039;re perfectly right that there are cases where shared ownership is vital. However, many times shared ownership is really not required with a change of design, most of the time for the better. I guess what I was trying to say is that whenever a shared ownership somehow becomes needed, we should try to determine whether it is really needed.

In your second case, for example. I rarely saw two (or more classes) really needing an actual ownership of the same object, i.e. as a member of the class. Most of the time, 1 class (I really mean object) is the owner of the pointer, and the other object only needs it in a single method or two, and hence not needing to actually &quot;own&quot; the pointer. In this case, I&#039;d pass a naked pointer that clearly indicates that the object receiving the naked pointer is not owning the pointer (but this is my coding convention, yours might vary). Here I make sure that the naked pointer is never stored as a member of any other object (or a callback).

Again, I&#039;m not claiming this to be universal, there are indeed cases where shared ownership is needed.

(And thanks! I didn&#039;t think the article was good. I was just hoping that it&#039;d help beginners. I have had some good helps when I started.)</description>
		<content:encoded><![CDATA[<p>You&#8217;re perfectly right that there are cases where shared ownership is vital. However, many times shared ownership is really not required with a change of design, most of the time for the better. I guess what I was trying to say is that whenever a shared ownership somehow becomes needed, we should try to determine whether it is really needed.</p>
<p>In your second case, for example. I rarely saw two (or more classes) really needing an actual ownership of the same object, i.e. as a member of the class. Most of the time, 1 class (I really mean object) is the owner of the pointer, and the other object only needs it in a single method or two, and hence not needing to actually &#8220;own&#8221; the pointer. In this case, I&#8217;d pass a naked pointer that clearly indicates that the object receiving the naked pointer is not owning the pointer (but this is my coding convention, yours might vary). Here I make sure that the naked pointer is never stored as a member of any other object (or a callback).</p>
<p>Again, I&#8217;m not claiming this to be universal, there are indeed cases where shared ownership is needed.</p>
<p>(And thanks! I didn&#8217;t think the article was good. I was just hoping that it&#8217;d help beginners. I have had some good helps when I started.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C++&#8217;s scoped_ptr and unique_ptr smart pointers by Danny77uk</title>
		<link>http://shatteredterminal.com/2008/11/scoped_ptr-and-unique_ptr-smart-pointers/comment-page-1/#comment-1335</link>
		<dc:creator>Danny77uk</dc:creator>
		<pubDate>Thu, 04 Feb 2010 12:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=91#comment-1335</guid>
		<description>Good article!

&quot;There should be a very, very rare situation where it demands shared ownership of an object. In a good software design, only one object should owned a particular object.&quot;

Actually there are many cases where shared ownership is vital - the command pattern upon which most Undo systems is based relies on the command objects sharing ownership of their pointers for example. You must also often reference the same object amongst many and you must use shared pointers for that (or use .get() and return a bald pointer but then what&#039;s the point in using smart pointers?)</description>
		<content:encoded><![CDATA[<p>Good article!</p>
<p>&#8220;There should be a very, very rare situation where it demands shared ownership of an object. In a good software design, only one object should owned a particular object.&#8221;</p>
<p>Actually there are many cases where shared ownership is vital &#8211; the command pattern upon which most Undo systems is based relies on the command objects sharing ownership of their pointers for example. You must also often reference the same object amongst many and you must use shared pointers for that (or use .get() and return a bald pointer but then what&#8217;s the point in using smart pointers?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Random sample from a long linked list by anon</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-843</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Wed, 11 Nov 2009 04:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-843</guid>
		<description>lol! Yes, good assumption there with the size method ;)</description>
		<content:encoded><![CDATA[<p>lol! Yes, good assumption there with the size method ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Random sample from a long linked list by shards</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-842</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Mon, 09 Nov 2009 23:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-842</guid>
		<description>No, that&#039;s not true. (: I&#039;m sure you can come up with this one too. Just take your time while coding, it&#039;ll help. I&#039;ll write one version that works. Unsatisfied, I&#039;ll try rewriting it to be simpler. Usually you&#039;ll learn a new trick or two whenever you do that. The next time you write a new code, the code will already be simpler.</description>
		<content:encoded><![CDATA[<p>No, that&#8217;s not true. (: I&#8217;m sure you can come up with this one too. Just take your time while coding, it&#8217;ll help. I&#8217;ll write one version that works. Unsatisfied, I&#8217;ll try rewriting it to be simpler. Usually you&#8217;ll learn a new trick or two whenever you do that. The next time you write a new code, the code will already be simpler.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Random sample from a long linked list by huy</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-838</link>
		<dc:creator>huy</dc:creator>
		<pubDate>Sat, 07 Nov 2009 07:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-838</guid>
		<description>LOL. That must means I&#039;m a very bad programmer ):</description>
		<content:encoded><![CDATA[<p>LOL. That must means I&#8217;m a very bad programmer ):</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Random sample from a long linked list by shards</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-834</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Thu, 05 Nov 2009 08:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-834</guid>
		<description>Thanks! Yes, the proof by induction is very straightforward, involving just a teensy bits of probability. (:

I didn&#039;t think the Java implementation is that nice though, it&#039;s just normal. Actually, I&#039;m pretty sure someone can produce an even nicer code than this.</description>
		<content:encoded><![CDATA[<p>Thanks! Yes, the proof by induction is very straightforward, involving just a teensy bits of probability. (:</p>
<p>I didn&#8217;t think the Java implementation is that nice though, it&#8217;s just normal. Actually, I&#8217;m pretty sure someone can produce an even nicer code than this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Random sample from a long linked list by huy</title>
		<link>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-832</link>
		<dc:creator>huy</dc:creator>
		<pubDate>Thu, 05 Nov 2009 08:24:38 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-832</guid>
		<description>Nice indeed! I attempted to prove it and realize it&#039;s relatively easy as you said.

Like the Java implementation, very neat.</description>
		<content:encoded><![CDATA[<p>Nice indeed! I attempted to prove it and realize it&#8217;s relatively easy as you said.</p>
<p>Like the Java implementation, very neat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Copy and move semantics by shards</title>
		<link>http://shatteredterminal.com/2009/03/copy-and-move-semantics/comment-page-1/#comment-829</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Thu, 05 Nov 2009 03:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=137#comment-829</guid>
		<description>Yes, you&#039;re perfectly right. I actually have not had to use assignment operator at all recently (a lot of my code disallow copy&amp;assign specifically). But you&#039;re perfectly right, I&#039;ll edit the post to reflect this. (:

Thanks!

P.S. Sorry for the late reply, was extremely busy with work and research to check on the block.</description>
		<content:encoded><![CDATA[<p>Yes, you&#8217;re perfectly right. I actually have not had to use assignment operator at all recently (a lot of my code disallow copy&#038;assign specifically). But you&#8217;re perfectly right, I&#8217;ll edit the post to reflect this. (:</p>
<p>Thanks!</p>
<p>P.S. Sorry for the late reply, was extremely busy with work and research to check on the block.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
