<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.2" -->
<rss version="0.92">
<channel>
	<title>Tina Orooji</title>
	<link>http://benandtina.net/tina</link>
	<description>My useless ramblings on software development and other randomness...</description>
	<lastBuildDate>Sun, 22 Mar 2009 16:45:51 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Project Euler &#8211; Problem 6 Solution (Python)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#038;id=6

# Project Euler - Problem 6 (http://projecteuler.net/index.php?section=problems&#038;id=6)

# Generate the sum of squares and square of sums using summation formulas, then
# subtract.
def p6():
    n = 100
    squareOfSum = ((n*(n+1))/2)**2
    sumOfSquares = (n*(n+1)*(2*n+1))/6

    print squareOfSum - sumOfSquares

]]></description>
		<link>http://benandtina.net/tina/2009/02/01/project-euler-problem-6/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 13 Solution (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#038;id=13
This one was tricky until I Googled &#8220;java big integer&#8221; and found out about Java&#8217;s BigInteger, lol.  It made the problem much simpler.  After I got the answer I saw some posts on the forum saying that only the sum of the first 11-15 (it varied) digits were needed, but I&#8217;m not fully [...]]]></description>
		<link>http://benandtina.net/tina/2009/02/01/project-euler-problem-13/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 1 Solution (Take 2) (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#038;id=1
I mentioned Project Euler to some of my co-workers and one of them, Daniel, is hooked.  He came up with a better solution for Problem 1 than I had, but it was still an O(n) algorithm.  We talked about it a little and our discussion lead to this constant time solution.  Yay [...]]]></description>
		<link>http://benandtina.net/tina/2009/01/31/project-euler-problem-1-solution-take-2/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 9 Solution (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#038;id=9

	/* Project Euler - Problem 9 (http://projecteuler.net/index.php?section=problems&#038;id=9)
	 *
	 * Pretty simple brute force method.
	 */
	public static void p9(){
		double a = 0, b = 0, c = 0;

		for(a=0; a&#60;1000; a++){
			for(b=a+1; b&#60;1000; b++){
				c = Math.sqrt(Math.pow(a, 2) + Math.pow(b,2));
				if(b&#60;c &#038;&#038; a+b+c == 1000) break;
			}
			if(b&#60;c &#038;&#038; a+b+c == 1000) break;
		}

		System.out.println((int)(a*b*c));
	}

Note: After writing this I saw a mathematical solution on [...]]]></description>
		<link>http://benandtina.net/tina/2009/01/30/project-euler-problem-9/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 5 Solution (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#38;id=5
I&#8217;ll be honest, I solved this one on paper first and then figured out how to do it programatically.  I don&#8217;t mean that I brainstormed a solution for a simpler case and then came up with an algorithm to get a solution for this problem&#8230;  I mean I did the whole thing on [...]]]></description>
		<link>http://benandtina.net/tina/2009/01/30/project-euler-problem-5/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 4 Solution (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#38;id=4

	/* Project Euler - Problem 4 (http://projecteuler.net/index.php?section=problems&#038;id=4)
	 *
	 * I was able to reduce some of the iterations by setting up the loops to not repeat
	 * computations (ie, don't do 998 x 912 and 912 * 998), but this is basically a
	 * brute force solution.
	 */
	public static void p4(){
		int pal = 0;

		for(int i=1; [...]]]></description>
		<link>http://benandtina.net/tina/2009/01/28/project-euler-problem-4/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 2 Solution (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#38;id=2

	/* Project Euler - Problem 2 (http://projecteuler.net/index.php?section=problems&#038;id=2)
	 *
	 * I did realize that every 3rd Fibonacci number is even, but I haven't quite come
	 * up with a way to utilize that knowledge to simplify the loop.  I'll keep thinking
	 * about it and see if I come up with something better.
	 */
	public static [...]]]></description>
		<link>http://benandtina.net/tina/2009/01/28/project-euler-problem-2/</link>
			</item>
	<item>
		<title>Project Euler &#8211; Problem 1 Solution (Java)</title>
		<description><![CDATA[http://projecteuler.net/index.php?section=problems&#38;id=1

	/* Project Euler - Problem 1 (http://projecteuler.net/index.php?section=problems&#038;id=1)
	 *
	 * This problem is pretty straightforward, however, rather than going the brute-force
	 * route and checking each number from 1 to 999 to see if 3 or 5 is a divsor,
	 * I realized that I can break the numbers up in to groups of 15 (3*5) [...]]]></description>
		<link>http://benandtina.net/tina/2009/01/28/project-euler-problem-1/</link>
			</item>
	<item>
		<title>Rails Document Manager Tutorial &#8211; Part 1</title>
		<description><![CDATA[Being married to one of those academic types is rough.  I can handle the 15-syllable words and the excited recaps of various studies, but amount of literature that one man can claim to read is amazing.  Ben has access to thousands of psychology journal articles and insists that he can not read them in electronic [...]]]></description>
		<link>http://benandtina.net/tina/2008/12/14/rails-document-manager-tutorial-part-1/</link>
			</item>
	<item>
		<title>Podcasts</title>
		<description><![CDATA[Since I pretty much have my earbuds in all day while I am at work, a colleague asked me for a list of podcasts that I regularly listen to.  I decided to post it here in case anyone else is interested!  Here&#8217;s an export of everything I listen to&#8230;  it&#8217;s a pretty eclectic mix of technical, [...]]]></description>
		<link>http://benandtina.net/tina/2008/12/10/podcasts/</link>
			</item>
</channel>
</rss>
