<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Greg Doolittle</title>
	<atom:link href="http://gregdoolittle.com/blog/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregdoolittle.com/blog</link>
	<description>Web Developer in San Francisco, CA</description>
	<lastBuildDate>Sat, 26 May 2012 07:48:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>eccola: &#8220;sweet charity&#8221;</title>
		<link>http://gregdoolittle.com/blog/2012/05/26/eccola-sweet-charity/</link>
		<comments>http://gregdoolittle.com/blog/2012/05/26/eccola-sweet-charity/#comments</comments>
		<pubDate>Sat, 26 May 2012 07:39:04 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=543</guid>
		<description><![CDATA[<p>i recently played trumpet in the pit orchestra for a production of &#8220;sweet charity&#8221;. this is the second time i&#8217;ve played this show (last time was in 2010, with west valley light opera), and it was even more fun this time through. i was looking for a video of a particular song from the original [...]]]></description>
			<content:encoded><![CDATA[<p>i recently played trumpet in the pit orchestra for a production of &#8220;sweet charity&#8221;. this is the second time i&#8217;ve played this show (last time was in 2010, with west valley light opera), and it was even more fun this time through. i was looking for a video of a particular song from the original show, and came across this documentary, which is the making of the production that i was part of, with city college of sf:</p>
<p><iframe src="http://player.vimeo.com/video/42737583" width="400" height="300" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>here&#8217;s the song i was looking for: &#8220;there&#8217;s gotta be something better than this&#8221;</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/1wGgfYJoZts" frameborder="0" allowfullscreen></iframe></p>
<p>i will admit that this story has always confused me.  a disillusioned dance hall hostess falls in love with a shy, neurotic tax accountant, and dreams of quitting her job and starting a new life, leaving her past behind.  it&#8217;s a cute story, but in the end she doesn&#8217;t make it.  her boyfriend proposes to her, but dumps her last minute (at her bridal shower!), then pushes her into a lake.</p>
<p>apparently this was one of the most popular broadway musicals of the 70&#8242;s.  i enjoyed the story, but i couldn&#8217;t articulate why, and had this overwhelming feeling that i didn&#8217;t &#8220;get it&#8221;.  were people marveling over the song and dance? or did it get such rave reviews at the time, because the costume and characters were so sentimental it brought them back to the 60&#8242;s? or was there some more important meaning that viewers got out of it and wanted to share with the rest of the world?  e.g. that we should all try to be as hopeful and resilient as the main character, charity?  that none of us have it as bad as these dance hall hostesses and should be grateful for the good things in our life?  or does the play try to teach about literal charity in the face of poverty and need? or was the writer just trying to teach us to be more optimistic?  </p>
<p>it&#8217;s far from a perfect show, but it is thoroughly entertaining.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/05/26/eccola-sweet-charity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting Out Sorting</title>
		<link>http://gregdoolittle.com/blog/2012/04/02/sorting-out-sorting/</link>
		<comments>http://gregdoolittle.com/blog/2012/04/02/sorting-out-sorting/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 01:29:14 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=531</guid>
		<description><![CDATA[<p>i&#8217;m wrote a quicksort algorithm for my python homework, and in the discussion forums for this question, someone posted this 80&#8242;s video from the university of toronto. the video is extremely dated, but the techniques are still in use today.</p> <p>&#8220;Learn about 9 different sorting algorithms in this 1980&#8242;s film. ENJOY!&#8221;<br /> </p>]]></description>
			<content:encoded><![CDATA[<p>i&#8217;m wrote a quicksort algorithm for my python homework, and in the discussion forums for this question, someone posted this 80&#8242;s video from the university of toronto. the video is extremely dated, but the techniques are still in use today.</p>
<p>&#8220;Learn about 9 different sorting algorithms in this 1980&#8242;s film. ENJOY!&#8221;<br />
<embed id=VideoPlayback src=http://video.google.com/googleplayer.swf?docid=-4110947752111188923&#038;hl=en&#038;fs=true style=width:400px;height:326px allowFullScreen=true allowScriptAccess=always type=application/x-shockwave-flash> </embed></p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/04/02/sorting-out-sorting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>khayyam/pascal&#8217;s triangle in python</title>
		<link>http://gregdoolittle.com/blog/2012/04/01/khayyampascals-triangle-in-python/</link>
		<comments>http://gregdoolittle.com/blog/2012/04/01/khayyampascals-triangle-in-python/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 09:12:00 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=516</guid>
		<description><![CDATA[<p>this was one of 8 questions in my last homework assignment for the online python course i&#8217;m taking at <a href="http://www.udacity.com/">udacity.com</a>. i wrote my solution in 12 lines of code (you can see it running <a href="http://codepad.org/users/gdoolittle">on codepad.org</a>). in the forums for the course, there&#8217;s a student who mentioned that he used the algorithm he [...]]]></description>
			<content:encoded><![CDATA[<p>this was one of 8 questions in my last homework assignment for the online python course i&#8217;m taking at <a href="http://www.udacity.com/">udacity.com</a>.  i wrote my solution in 12 lines of code (you can see it running <a href="http://codepad.org/users/gdoolittle">on codepad.org</a>).  in the forums for the course, there&#8217;s a student who mentioned that he used the algorithm he found on a wikipedia entry for khayyam/pascal&#8217;s triangle, and his solution is only 7 lines of code! so&#8230; even though i didn&#8217;t &#8220;use outside help&#8221; to find my answer, i still have room for improvement.</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">def</span> triangle<span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> n <span style="color: #66cc66;">==</span> <span style="color: #ff4500;">0</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; result <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> n <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; result <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span>n-<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newrow <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span>i<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newrow.<span style="color: black;">append</span><span style="color: black;">&#40;</span>result<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>j<span style="color: black;">&#93;</span>+result<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span>j+<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newrow.<span style="color: black;">append</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result.<span style="color: black;">append</span><span style="color: black;">&#40;</span>newrow<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i +<span style="color: #66cc66;">=</span> <span style="color: #ff4500;">1</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">return</span> result</div></div>
<p>i had to temporarily take down my solution, while the due date for the assignment passed, at the request of another student&#8230;  this post was ranked by google as #2 for &#8220;pascal&#8217;s triangle&#8221; and as #1 for &#8220;khayyam triangle python&#8221; only about 3 hours after i posted it.  i did not expect that.  the assignment&#8217;s due date has passed, so my answer&#8217;s back up again.</p>
<p>here&#8217;s the original assignment:</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">#The French mathematician, Blaise Pascal, who built a mechanical computer in the</span><br />
<span style="color: #808080; font-style: italic;">#17th century, studied a pattern of numbers now commonly known in parts of the</span><br />
<span style="color: #808080; font-style: italic;">#world as Pascal's Triangle (it was also previously studied by many Indian,</span><br />
<span style="color: #808080; font-style: italic;">#Chinese, and Persian mathematicians, and is known by different names in other</span><br />
<span style="color: #808080; font-style: italic;">#parts of the world).</span><br />
<br />
<span style="color: #808080; font-style: italic;">#The pattern is shown below:</span><br />
<br />
<span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1</span><br />
<span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 1</span><br />
<span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 2 1</span><br />
<span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 3 3 1</span><br />
<span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 4 6 4 1</span><br />
<span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...</span><br />
<br />
<span style="color: #808080; font-style: italic;">#Each number is the sum of the number above it to the left and the number above</span><br />
<span style="color: #808080; font-style: italic;">#it to the right (any missing numbers are counted as 0).</span><br />
<br />
<span style="color: #808080; font-style: italic;">#Define a procedure, triangle(n), that takes a number n as its input, and</span><br />
<span style="color: #808080; font-style: italic;">#returns a list of the first n rows in the triangle. Each element of the</span><br />
<span style="color: #808080; font-style: italic;">#returned list should be a list of the numbers at the corresponding row in the</span><br />
<span style="color: #808080; font-style: italic;">#triangle.</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">def</span> triangle<span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span>:<br />
<br />
<br />
<br />
<br />
<br />
<span style="color: #808080; font-style: italic;">#For example:</span><br />
<br />
<span style="color: #808080; font-style: italic;">#print triangle(0)</span><br />
<span style="color: #808080; font-style: italic;">#&gt;&gt;&gt; []</span><br />
<br />
<span style="color: #808080; font-style: italic;">#print triangle(1)</span><br />
<span style="color: #808080; font-style: italic;">#&gt;&gt;&gt; [[1]]</span><br />
<br />
<span style="color: #808080; font-style: italic;">#print triangle(2)</span><br />
<span style="color: #808080; font-style: italic;">#&gt;&gt; [[1], [1, 1]]</span><br />
<br />
<span style="color: #808080; font-style: italic;">#print triangle(3)</span><br />
<span style="color: #808080; font-style: italic;">#&gt;&gt;&gt; [[1], [1, 1], [1, 2, 1]]</span><br />
<br />
<span style="color: #808080; font-style: italic;">#print triangle(6)</span><br />
<span style="color: #808080; font-style: italic;">#&gt;&gt;&gt; [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1]]</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/04/01/khayyampascals-triangle-in-python/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>base10/base26 converter in php</title>
		<link>http://gregdoolittle.com/blog/2012/03/19/base10base26-converter-in-php/</link>
		<comments>http://gregdoolittle.com/blog/2012/03/19/base10base26-converter-in-php/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 04:15:24 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=500</guid>
		<description><![CDATA[<p>here are two functions i wrote that will encode and decode a base-10 integer into a base-26 alphabetical code. (an example use case would be bit.ly&#8217;s url shortening system, where a url like &#8220;bit.ly/qrzcf&#8221; gets transferred to bit.ly/7627365, which then maps to a database ID&#8230; though i think their system uses 26 lowercase and 26 [...]]]></description>
			<content:encoded><![CDATA[<p>here are two functions i wrote that will encode and decode a base-10 integer into a base-26 alphabetical code.  (an example use case would be bit.ly&#8217;s url shortening system, where a url like &#8220;bit.ly/qrzcf&#8221; gets transferred to bit.ly/7627365, which then maps to a database ID&#8230; though i think their system uses 26 lowercase and 26 uppercase letters (so, base-52), allowing for even shorter URL&#8217;s):</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> alpha_to_int<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$result</span> <span style="color: #339933;">+=</span> getint<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <a href="http://www.php.net/pow"><span style="color: #990000;">pow</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">26</span><span style="color: #339933;">,</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> int_to_alpha<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> getchar<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> getchar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">26</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$input</span> <span style="color: #339933;">-=</span> <span style="color: #000088;">$input</span> <span style="color: #339933;">%</span> <span style="color: #cc66cc;">26</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$input</span> <span style="color: #339933;">/=</span> <span style="color: #cc66cc;">26</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/array_reverse"><span style="color: #990000;">array_reverse</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> getchar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$int</span><span style="color: #009900;">&#41;</span> <br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;abcdefghijklmnopqrstuvwxyz&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$pattern</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$int</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> getint<span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/ord"><span style="color: #990000;">ord</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <a href="http://www.php.net/ord"><span style="color: #990000;">ord</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/03/19/base10base26-converter-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the serpent beguiled me and i did eat.</title>
		<link>http://gregdoolittle.com/blog/2012/03/16/the-serpent-beguiled-me-and-i-did-eat/</link>
		<comments>http://gregdoolittle.com/blog/2012/03/16/the-serpent-beguiled-me-and-i-did-eat/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 06:14:45 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=493</guid>
		<description><![CDATA[<p>A few weeks ago I decided I wanted to learn Python, and found an excellent online class at <a href="http://www.udacity.com/overview/Course/cs101">udacity.com</a>. Enrollment has swelled since the course was featured in the <a href="http://www.nytimes.com/2012/03/05/education/moocs-large-courses-open-to-all-topple-campus-walls.html">New York Times</a>. The class is almost over, but if you&#8217;re interested in taking it, the next session starts mid-April. </p> <p>Although the class [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I decided I wanted to learn Python, and found an excellent online class at <a href="http://www.udacity.com/overview/Course/cs101">udacity.com</a>.  Enrollment has swelled since the course was featured in the <a href="http://www.nytimes.com/2012/03/05/education/moocs-large-courses-open-to-all-topple-campus-walls.html">New York Times</a>.  The class is almost over, but if you&#8217;re interested in taking it, the next session starts mid-April.  </p>
<p>Although the class is meant as an Introduction to Computer Science, it is done through Python, which so far has allowed me to get a pretty good feel for the language.  The teacher, David Evans, and his assistant are excellent lecturers.  It&#8217;s a little weird to watch lectures through your laptop, but it&#8217;s really not that different from being in a large lecture hall.  I almost prefer this venue, because I can rewind parts if i miss something, and fast-forward through some sections (use the latter sparingly!)&#8230; though a real classroom would be nice, so that you can have more interaction with the teacher and other students.  This is a nice alternative.  There is a forum where you can post questions, and other students help each other out.  They also host live office hours on a weekly basis, using a Google hangout so you can ask your questions directly to the teacher in real time.  Best of all &mdash; it&#8217;s free.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/BQHMLD9bwq4" frameborder="0" allowfullscreen></iframe></p>
<p>CS101 Building a Search Engine (with Python) and CS373 Programming a Robotic Car (with Python) were their first two classes.  They will have 4 new courses when they launch their next session on April 16th, and plenty more in June.  you can find the full course offerings at <a href="http://www.udacity.com/">udacity.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/03/16/the-serpent-beguiled-me-and-i-did-eat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>development/production bookmarklets</title>
		<link>http://gregdoolittle.com/blog/2012/03/01/development-production-bookmarklets/</link>
		<comments>http://gregdoolittle.com/blog/2012/03/01/development-production-bookmarklets/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 00:45:21 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=481</guid>
		<description><![CDATA[<p>the cool thing about storing javascript code snippets inside of a bookmark, is that they allow you to replace small repetitive tasks with the click of a button in your toolbar. i wrote some bookmarklets a while back, because i was tired of hitting &#8220;command + L&#8221; and typing a new domain, to edit my [...]]]></description>
			<content:encoded><![CDATA[<p>the cool thing about storing javascript code snippets inside of a bookmark, is that they allow you to replace small repetitive tasks with the click of a button in your toolbar.  i wrote some bookmarklets a while back, because i was tired of hitting &#8220;command + L&#8221; and typing a new domain, to edit my url whenever i needed to switch from the production domain to the qa domain, or to my development domain.  instead, i wrote a bookmarklet, which looks at a URL, and loads the filepath on a different domain.  </p>
<p>for example, if you were at http://production.yoursite.com/shop/product/category/item-name, and you wanted to see the latest edits on development at http://development.yoursite.com/shop/product/category/item-name, instead of typing, you would just run your bookmarklet by clicking the bookmark in your toolbar.</p>
<p>small but mighty.</p>
<p>store your code in an anchor tag like this:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #3366CC;">'javascript: var url = document.location.href;<br />
var urlArray = url.split(&quot;/&quot;); <br />
urlArray.shift(); <br />
urlArray.shift(); <br />
urlArray.shift(); <br />
newUrl = urlArray.join(&quot;/&quot;); <br />
document.location = document.location.protocol+&quot;//production.yoursite.com/&quot; + newUrl;'</span><span style="color: #339933;">&gt;</span>production<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#40;</span>production.<span style="color: #660066;">yoursite</span>.<span style="color: #660066;">com</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #3366CC;">'javascript: var url = document.location.href; <br />
var urlArray = url.split(&quot;/&quot;); <br />
urlArray.shift(); <br />
urlArray.shift(); <br />
urlArray.shift(); <br />
newUrl = urlArray.join(&quot;/&quot;); <br />
document.location = document.location.protocol+&quot;//development.yoursite.com:8080/&quot; + newUrl;'</span><span style="color: #339933;">&gt;</span>development<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#40;</span>development.<span style="color: #660066;">yoursite</span>.<span style="color: #660066;">com</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;/</span>li<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span></div></div>
<p>load the html you just wrote in your browser, then right-click and bookmark the link, or drag it to your bookmarks toolbar.</p>
<ul>
<li><a href='javascript: var url = document.location.href;<br />
var urlArray = url.split("/");<br />
urlArray.shift();<br />
urlArray.shift();<br />
urlArray.shift();<br />
newUrl = urlArray.join("/");<br />
document.location = document.location.protocol+"//production.yoursite.com/" + newUrl;'>production</a> (production.yoursite.com)</li>
<li><a href='javascript: var url = document.location.href;<br />
var urlArray = url.split("/");<br />
urlArray.shift();<br />
urlArray.shift();<br />
urlArray.shift();<br />
newUrl = urlArray.join("/");<br />
document.location = document.location.protocol+"//development.yoursite.com/" + newUrl;'>development</a> (development.yoursite.com)</li>
</ul>
<p>for the ultimate bookmarklet, check out Jash, the JavaScript Shell:<br />
<a href="http://billyreisinger.com/jash/">Jash</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/03/01/development-production-bookmarklets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>well, that was different&#8230;</title>
		<link>http://gregdoolittle.com/blog/2012/02/27/well-that-was-different/</link>
		<comments>http://gregdoolittle.com/blog/2012/02/27/well-that-was-different/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 20:50:24 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[army]]></category>
		<category><![CDATA[trumpet]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=454</guid>
		<description><![CDATA[<p>Yesterday I took part in my first military funeral, in Los Gatos, CA. </p> <p>The Air Force Honor Guard came out from Travis Air Force Base, to render <a href="http://en.wikipedia.org/wiki/Military_funeral">full honors</a> for a retired master sergeant who served during the Vietnam era. The family had asked specifically for a live bugler to play &#8220;Taps&#8221;, and [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I took part in my first military funeral, in Los Gatos, CA.  </p>
<p>The Air Force Honor Guard came out from Travis Air Force Base, to render <a href="http://en.wikipedia.org/wiki/Military_funeral">full honors</a> for a retired master sergeant who served during the Vietnam era.  The family had asked specifically for a live bugler to play &#8220;Taps&#8221;, and the Travis AFB Honor Guard didn&#8217;t have one.  They normally have one of the honor guards hold up a bugle with a built-in speaker, which plays an MP3 of &#8220;Taps&#8221;.  Through a long chain of contacts, they found me, an MOSQ&#8217;ed Army Trumpeter, and asked me to play bugle for the ceremony.</p>
<p>Needless to say, it was a somber experience.  When I arrived, the deceased sergeants&#8217;s wife saw my bugle and started crying.  She told me that &#8220;he would be so happy to know that we were able to get a live bugle player at his memorial,&#8221; and that &#8220;it was a specific request he had made before he died.&#8221;  I was brought to a back room in the funeral home and met the honor guard team.  We compared Army BCT with Air Force BCT, and they explained their various MOS&#8217;s to me (none of them were musicians).  One of them told me I was brave for playing trumpet at a funeral &mdash; I told him going to Vietnam is a lot braver.  </p>
<p>Several high ranking Army and Air Force officers trickled in before the ceremony started.  After several family members and colleagues and others had delivered their eulogies, they called the honor guard forward.  We marched into the nave of the funeral home.  Six members of the honor guard marched to the front, I right-faced into the back right corner with one other member.  There was a long, well-rehearsed flag-folding ceremony &#8212; which included a bounty of &#8220;painfully exact and spasmodic gestures&#8221;.  They were so rigid while they performed the folding, it was like watching animatronic soldiers.  Then they asked everyone to rise (if they are able) for a 21-gun salute.  The order was called to &#8220;present arms&#8221;, which was my cue to start playing.  This man&#8217;s final expression on this planet was through a song on my trumpet.</p>
<p>No pressure, or anything.</p>
<p>Despite how nervous I was, it went surprisingly well.  I hit every note, and my tone was steady.  I *could* have played more musically, with better intonation, and with more expression &mdash; but for my first ceremony, I&#8217;m happy with my performance.  I hit every partial I needed to, and played the rhythm correctly.  I&#8217;m glad I could be there to honor this person&#8217;s military career.  I&#8217;m really looking forward to doing it again.</p>
<p>Thank you for your service, MSgt. Steele!</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/Nhtr5J00ntA" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/02/27/well-that-was-different/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>little bitty jQuery change (that merely affects every jQuery project i&#8217;ve worked on!)</title>
		<link>http://gregdoolittle.com/blog/2012/01/31/little-bitty-jquery-change-that-merely-affects-every-jquery-project-ive-worked-on/</link>
		<comments>http://gregdoolittle.com/blog/2012/01/31/little-bitty-jquery-change-that-merely-affects-every-jquery-project-ive-worked-on/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 23:39:25 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=440</guid>
		<description><![CDATA[<p>i recently upgraded a WordPress installation, and consequently, updated my jQuery library to a new version. instead of rolling back to a previous version of jQuery, i wanted to figure out why the scripts i had written were no longer working. before you find yourself beating your head on your desk, take note that as [...]]]></description>
			<content:encoded><![CDATA[<p>i recently upgraded a WordPress installation, and consequently, updated my jQuery library to a new version.  instead of rolling back to a previous version of jQuery, i wanted to figure out why the scripts i had written were no longer working.  before you find yourself beating your head on your desk, take note that as of jQuery 1.7, you can no longer use the dollar sign as a reference to the jQuery object. so for every reference to &#8220;$.xyz&#8221; and &#8220;$(xyz)&#8221; shortcuts&#8230;. use &#8220;jQuery.xyz&#8221; or &#8220;jQuery(xyz)&#8221; instead.</p>
<p>that is all.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/01/31/little-bitty-jquery-change-that-merely-affects-every-jquery-project-ive-worked-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>don&#8217;t be lazy. do your part to stop SOPA!</title>
		<link>http://gregdoolittle.com/blog/2012/01/18/dont-be-lazy-do-your-part-to-stop-sopa/</link>
		<comments>http://gregdoolittle.com/blog/2012/01/18/dont-be-lazy-do-your-part-to-stop-sopa/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 09:18:14 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=435</guid>
		<description><![CDATA[<p>it&#8217;s pretty easy to voice your opinion about SOPA. take the mere 5 seconds you need to get it done. ending piracy is a worthy endeavor but giving control of web censorship to the hollywood &#038; the film industry doesn&#8217;t seem like a good idea. </p> <p></p> <p>one-step process to notify your congressional representative:<br /> [...]]]></description>
			<content:encoded><![CDATA[<p>it&#8217;s pretty easy to voice your opinion about SOPA. take the mere 5 seconds you need to get it done. ending piracy is a worthy endeavor but giving control of web censorship to the hollywood &#038; the film industry doesn&#8217;t seem like a good idea. </p>
<p><iframe src="http://player.vimeo.com/video/31100268?byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>one-step process to notify your congressional representative:<br />
<a href="http://www.google.com/takeaction/">http://www.google.com/takeaction/</a></p>
<p>more information about SOPA and the strike across the web on January 18th:<br />
<a href="http://www.sopastrike.com/">http://www.sopastrike.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2012/01/18/dont-be-lazy-do-your-part-to-stop-sopa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dave Herman: The Future of JavaScript</title>
		<link>http://gregdoolittle.com/blog/2011/12/18/dave-herman-the-future-of-javascript/</link>
		<comments>http://gregdoolittle.com/blog/2011/12/18/dave-herman-the-future-of-javascript/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 08:33:35 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregdoolittle.com/blog/?p=429</guid>
		<description><![CDATA[<p></p> <p>if doug crockford is javascript jesus, then dave herman is an ecma apostle.</p> <p>ecmascript 6 has a lot of really cool stuff! i will be using several of the new features as soon as there is a shiv to make them compatible &#8211; they look really useful. some of the new features are beyond [...]]]></description>
			<content:encoded><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/u4IdoBU1uKE" frameborder="0" allowfullscreen></iframe></p>
<p>if doug crockford is javascript jesus, then dave herman is an ecma apostle.</p>
<p>ecmascript 6 has a lot of really cool stuff! i will be using several of the new features as soon as there is a shiv to make them compatible &#8211; they look really useful. some of the new features are beyond my level of programming. sad that the ship date for the spec is not until 2013, but happy to see the vendors are already working on shiv&#8217;s to make it backwards compatible.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregdoolittle.com/blog/2011/12/18/dave-herman-the-future-of-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.971 seconds -->
<!-- Cached page served by WP-Cache -->

