<?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 for Elegant Programming</title>
	<atom:link href="http://elegant-programming.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegant-programming.com</link>
	<description>Writing code that's clear, brief, efficient, and effective</description>
	<pubDate>Wed, 07 Jan 2009 03:48:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>Comment on Project Euler by solrize</title>
		<link>http://elegant-programming.com/2008-06-23/project-euler/#comment-14</link>
		<dc:creator>solrize</dc:creator>
		<pubDate>Mon, 06 Oct 2008 10:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://elegant-programming.com/?p=38#comment-14</guid>
		<description>Here is my 5 line (not counting comments) haskell solution:

-- d n is the sum of all divisors of n from 1 to n-1
d n =  sum [d &#124; d&#60;-[1..n-1], n`mod`d == 0]

-- two numbers are amicable if they are unequal and (d a=b) and (d b=a)
amicable a b = (a /= b) &#38;&#38; (d a == b) &#38;&#38; (d b == a)

-- list of all the amicable pairs [a,b] up to 10000
all_amicables = [[a, d a] &#124; a&#60;-[1..m], b&#60;-[a+1..m], amicable a b]
  where m = 10000

-- find all the amicable pairs and add up the numbers in them
-- this takes about 1 minute on my 1 ghz pentium 3
main = print (sum [a+b &#124; [a,b] &#60;- all_amicables])</description>
		<content:encoded><![CDATA[<p>Here is my 5 line (not counting comments) haskell solution:</p>
<p>&#8211; d n is the sum of all divisors of n from 1 to n-1<br />
d n =  sum [d | d&lt;-[1..n-1], n`mod`d == 0]</p>
<p>&#8211; two numbers are amicable if they are unequal and (d a=b) and (d b=a)<br />
amicable a b = (a /= b) &amp;&amp; (d a == b) &amp;&amp; (d b == a)</p>
<p>&#8211; list of all the amicable pairs [a,b] up to 10000<br />
all_amicables = [[a, d a] | a&lt;-[1..m], b&lt;-[a+1..m], amicable a b]<br />
  where m = 10000</p>
<p>&#8211; find all the amicable pairs and add up the numbers in them<br />
&#8211; this takes about 1 minute on my 1 ghz pentium 3<br />
main = print (sum [a+b | [a,b] &lt;- all_amicables])</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Object-Oriented Design Principles by Object-oriented design principles &#124; Elegant Programming</title>
		<link>http://elegant-programming.com/object-oriented-design-principles/#comment-10</link>
		<dc:creator>Object-oriented design principles &#124; Elegant Programming</dc:creator>
		<pubDate>Wed, 16 Jul 2008 18:28:45 +0000</pubDate>
		<guid isPermaLink="false">http://elegant-programming.com/?page_id=39#comment-10</guid>
		<description>[...] article has been moved to http://elegant-programming.com/object-oriented-design-principles/   Share and Enjoy: These icons link to social bookmarking sites where readers can share and [...]</description>
		<content:encoded><![CDATA[<p>[...] article has been moved to <a href="http://elegant-programming.com/object-oriented-design-principles/" rel="nofollow">http://elegant-programming.com/object-oriented-design-principles/</a>   Share and Enjoy: These icons link to social bookmarking sites where readers can share and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Observer design pattern in .NET, part 1 by The Observer design pattern in .NET, part 2 &#124; Elegant Programming</title>
		<link>http://elegant-programming.com/2008-05-26/the-observer-design-pattern-in-net-part-1/#comment-6</link>
		<dc:creator>The Observer design pattern in .NET, part 2 &#124; Elegant Programming</dc:creator>
		<pubDate>Tue, 10 Jun 2008 01:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://elegant-programming.com/?p=25#comment-6</guid>
		<description>[...] is part 2 in a series about the Observer design pattern in .NET. In part one, we saw how to implement the pattern using the &#8220;classical&#8221; approach. In this part, [...]</description>
		<content:encoded><![CDATA[<p>[...] is part 2 in a series about the Observer design pattern in .NET. In part one, we saw how to implement the pattern using the &#8220;classical&#8221; approach. In this part, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VbRoboCode: Robot battle simulator by Mike Gold</title>
		<link>http://elegant-programming.com/vbrobocode/#comment-2</link>
		<dc:creator>Mike Gold</dc:creator>
		<pubDate>Wed, 09 Apr 2008 03:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://scott-thomason.org/?page_id=3#comment-2</guid>
		<description>why not write this up as an article on C# Corner? That way 1000's will see what you've done.  And maybe you can give screen shots of what it looks like and explain how to program a robot.

Best,

-Mike Gold</description>
		<content:encoded><![CDATA[<p>why not write this up as an article on C# Corner? That way 1000&#8217;s will see what you&#8217;ve done.  And maybe you can give screen shots of what it looks like and explain how to program a robot.</p>
<p>Best,</p>
<p>-Mike Gold</p>
]]></content:encoded>
	</item>
</channel>
</rss>
