<?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>stacyprowell.com &#187; Uncategorized</title>
	<atom:link href="http://stacyprowell.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://stacyprowell.com/blog</link>
	<description>Ugh, Stacy's talking again...</description>
	<lastBuildDate>Tue, 27 Apr 2010 20:09:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Car Talk and the Longest Word</title>
		<link>http://stacyprowell.com/blog/2009/06/14/car-talk-and-the-longest-word/</link>
		<comments>http://stacyprowell.com/blog/2009/06/14/car-talk-and-the-longest-word/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 02:50:47 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[puzzler]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=284</guid>
		<description><![CDATA[I recently heard about a Car Talk puzzler.  I don&#8217;t listen to Car Talk as much as I used to.  Anyway, you can read about the puzzler and the fellow who solved it here.  This is an excerpt.
During Christmas week on the popular National Public Radio show Car Talk, the weekly puzzler required listeners to [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_235" class="wp-caption alignright" style="width: 160px"><img class="size-full wp-image-235" title="programming" src="http://stacyprowell.com/blog/wp-content/uploads/2009/05/1ebeb1d2f212046a4e47fcd414dbad9b1-150x150.jpg" alt="Programming" width="150" height="150" /><p class="wp-caption-text">Programming</p></div>
<p>I recently heard about a <a href="http://www.cartalk.com/" target="_blank">Car Talk</a> puzzler.  I don&#8217;t listen to Car Talk as much as I used to.  Anyway, you can read about the puzzler and the fellow who solved it <a href="http://www.hmc.edu/newsandevents/thomasbarr.html" target="_blank">here</a>.  This is an excerpt.</p>
<blockquote><p>During Christmas week on the popular National Public Radio show Car Talk, the weekly puzzler required listeners to find the longest English word that remains a valid English word as you remove its letters one at a time, but without rearranging any of the letters. For example: sprite, spit, pit, it, I. There are many such words, but, as Barr discovered, only one with 11 letters.</p></blockquote>
<p>So, only one word with eleven letters: <em>complecting</em>.  Maybe.  I&#8217;m not convinced, but finding out is easy.<br />
<span id="more-284"></span></p>
<h2>Recursion</h2>
<p>Okay, so how would you know?  Well, suppose you had a list of valid words.  The statement of the problem suggests a simple recursive algorithm to find a solution.</p>
<ul>
<li>Put the words in a heap, ordered longest to shortest.</li>
<li>Iterate until the heap is empty.
<ul>
<li>Take the next word $w$ from the heap, and perform $\mbox{search}(w)$</li>
</ul>
</li>
</ul>
<p>The procedure $\mbox{search}(w)$ works as follows.  It returns true if it finds a solution.</p>
<ul>
<li>If $w$ is the empty string, then return true.</li>
<li>For each letter $l$ of $w$, do the following.
<ul>
<li>Drop $l$ from $w$, generating the candidate word $v$.</li>
<li>If $v$ is in the dictionary, then execute $r=\mbox{search}(v)$.
<ul>
<li>If $r$ is true, then write out $w$ and return true.</li>
</ul>
</li>
</ul>
</li>
<li>The word $w$ is a dead end; drop it from the dictionary and return false.</li>
</ul>
<p>Dropping the words from the dictionary, or otherwise marking them as dead ends in some other way is necessary to avoid re-searching them later.  The time complexity is roughly $O(n)$, where $n$ is the size of the dictionary to search.  If the average length of a word is $k$, then we can be more specific, and say the complexity is $O(kn)$, but $k$ is very small with respect to $n$, and does not vary much with the data size, so it can be safely ignored.</p>
<h2>Iteration</h2>
<p>The problem was explained to me in the reverse fashion.  Given a letter, generate words by adding a single letter at a time.  Every word must be in the dictionary.  Find the longest word you can generate from a single letter.  This suggests a different algorithm.</p>
<ul>
<li>Put the words in a heap, ordered shortest to longest.</li>
<li>Mark the empty string as reachable and set $long$ to the empty string.</li>
<li>Iterate through the heap, considering each word $w$.
<ul>
<li>For each position $i$ of $w$, do the following.
<ul>
<li>Drop the $i$th letter from $w$, generating the candidate word $v$.
<ul>
<li>If $v$ is marked as reachable, then mark $w$ as reachable by omitting $i$, and set $long=w$.</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>While $long$ is not the empty string, do the following.
<ul>
<li>Write $long$.</li>
<li>Omit the character $i$ by which $long$ was reached, and set $long$ equal to the new word.</li>
</ul>
</li>
</ul>
<p>We can improve this by checking against the length of the longest word reached.  If we ever have $|w|&gt;|longest|+1$, then we can stop the loop immediately, since we cannot reach any further words.  We can&#8217;t do that with the prior algorithm.</p>
<h2>So&#8230; What&#8217;s the Longest Word?</h2>
<p>The solution given was <em>complecting</em>, at 11 letters.  When I download the <a href="http://aspell.net/" target="_blank">aspell</a> dictionaries, and run the algorithm (the iterative one), I find the following derivation.</p>
<p>-&gt; a<br />
-&gt; ah<br />
-&gt; ach<br />
-&gt; bach<br />
-&gt; banch<br />
-&gt; banchi<br />
-&gt; branchi<br />
-&gt; branchia<br />
-&gt; branchiae<br />
-&gt; branchiate<br />
-&gt; abranchiate<br />
-&gt; abranchiates</p>
<p>Ooh.  12 letters.  But, it&#8217;s a plural.  Does that count?  Well, complecting is a participle, so it seems it should.  Time to send a note to Tom and Ray?</p>
<h2>So&#8230; Which Algorithm?</h2>
<p>Well, I coded up the iterative one in Java, since originally I was asked how I would code it in Java.  Again, the question suggesting the solution.  I suspect there are a lot of long words that are not reachable, so it seemed better to use the trick to terminate the search when the current word is longer than the longest found (so far) plus one.  Plus, it isn&#8217;t recursive, and I don&#8217;t have to modify the data structure by deleting an item from the heap.</p>
<h2>The Java</h2>
<p>So&#8230; here&#8217;s the Java source.  Enjoy!</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * Given some iterable object that provides strings, find the longest
 * string in the collection that can be reached from the empty string
 * by adding one character at a time such that every intermediate step
 * is also in the collection.
 *
&nbsp;
 * For example, if the collection is {@code {@literal {}a,
 * at, cat, chat, chart, cart, car{@literal }}},
 * then the longst word is {@code chart}, and it's derivation is:
 * {@code a =&amp;gt; at =&amp;gt; cat =&amp;gt; cart =&amp;gt; chart}.  If there are multiple
 * longest words, then only one is detected.
 *
&nbsp;
 * Note that if single letters are not in the collection, then no words
 * can be derived, and only the empty derivation is returned.
 *
 * @param strings    An iterable providing the strings.
 * @return    The derivation of the longest, from the shortest word to the
 *             longest.  If there is no longest word, then the empty
 *             derivation is returned.
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">List</span> search<span style="color: #009900;">&#40;</span>Iterable strings<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>strings <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">NullPointerException</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The string iterator is null.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Read each string from the iterable.  The strings assumed to be</span>
    <span style="color: #666666; font-style: italic;">// single words, and the words are not assumed to occur in any</span>
    <span style="color: #666666; font-style: italic;">// particular order.  We put the words we read into a heap, ordered</span>
    <span style="color: #666666; font-style: italic;">// by length.  Our &quot;heap&quot; is a sorted map.</span>
    <span style="color: #666666; font-style: italic;">//</span>
    <span style="color: #666666; font-style: italic;">// Every entry in the map has an associated integer value, which</span>
    <span style="color: #666666; font-style: italic;">// tells us the position of the last inserted character.  This can</span>
    <span style="color: #666666; font-style: italic;">// be used to &quot;unwind&quot; the derivation of the word.  If there is not</span>
    <span style="color: #666666; font-style: italic;">// (yet) any way to reach the word, then the word is mapped to -1.</span>
    <span style="color: #003399;">TreeMap</span> heap <span style="color: #339933;">=</span>
        <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">TreeMap</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Comparator</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> compare<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> first, <span style="color: #003399;">String</span> second<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">// Okay, we sort first by length, and then alphabetically.</span>
                <span style="color: #666666; font-style: italic;">// This is necessary because of the way TreeMap tests</span>
                <span style="color: #666666; font-style: italic;">// equality; it uses the comparator.  Thus we must only</span>
                <span style="color: #666666; font-style: italic;">// return zero if the two are actually equal.  So, we</span>
                <span style="color: #666666; font-style: italic;">// first order by length, and then for items of the same</span>
                <span style="color: #666666; font-style: italic;">// length, we order using the natural comparator for</span>
                <span style="color: #666666; font-style: italic;">// strings.</span>
                <span style="color: #000066; font-weight: bold;">int</span> order <span style="color: #339933;">=</span> first.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> second.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>order <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    order <span style="color: #339933;">=</span> first.<span style="color: #006633;">compareToIgnoreCase</span><span style="color: #009900;">&#40;</span>second<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000000; font-weight: bold;">return</span> order<span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> str <span style="color: #339933;">:</span> strings<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        heap.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span>str,<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// Add all strings to the heap.</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Prime the pump by adding the empty string as &quot;reachable.&quot;</span>
    <span style="color: #003399;">String</span> longest <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">int</span> length <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    heap.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span>, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// At this point the heap is constructed.  We now iterate over the</span>
    <span style="color: #666666; font-style: italic;">// heap looking for connected words.  If we find one, we mark it.</span>
    <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> str <span style="color: #339933;">:</span> heap.<span style="color: #006633;">keySet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Watch for a case where we skip a length.  If we do, we're done.</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>str.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> length<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        length <span style="color: #339933;">=</span> str.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Now we have a string, we need to find out if the string is</span>
        <span style="color: #666666; font-style: italic;">// reachable from a previously-reached string.  We drop each</span>
        <span style="color: #666666; font-style: italic;">// character, and then check if the resulting string is</span>
        <span style="color: #666666; font-style: italic;">// present in the heap and is marked.</span>
        <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> index <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> index <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> str.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> index<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// Omit the character at position index.</span>
            <span style="color: #003399;">String</span> test <span style="color: #339933;">=</span> str.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,index<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> str.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span>index<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #666666; font-style: italic;">// See if the resulting test string is in the heap.</span>
            <span style="color: #003399;">Integer</span> pos <span style="color: #339933;">=</span> heap.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>test<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Now there are three cases:</span>
            <span style="color: #666666; font-style: italic;">// (1) The test string is not in the heap.</span>
            <span style="color: #666666; font-style: italic;">// (2) The test string is in the heap, but not reachable.</span>
            <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>pos <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">||</span> pos <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #666666; font-style: italic;">// (3) The test string is in the heap, and is reachable.</span>
            <span style="color: #666666; font-style: italic;">// In this last case we know we can reach the current string</span>
            <span style="color: #666666; font-style: italic;">// from the test string by adding the character at position</span>
            <span style="color: #666666; font-style: italic;">// index, so put this in the heap.</span>
            heap.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span>str, index<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #666666; font-style: italic;">// Note that whenever this happens, we might have just found</span>
            <span style="color: #666666; font-style: italic;">// (one of) the longest words, so save it.</span>
            longest <span style="color: #339933;">=</span> str<span style="color: #339933;">;</span>
            <span style="color: #666666; font-style: italic;">// We don't need to test any other positions.</span>
            <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// Construct new words by omitting each character.</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// Search the heap for words.</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Now we have (hopefully) found a long word.  We need to generate</span>
    <span style="color: #666666; font-style: italic;">// the derivation and return it.</span>
    <span style="color: #003399;">List</span> derivation <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">LinkedList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>longest.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Get the insertion position from the heap.</span>
        <span style="color: #000066; font-weight: bold;">int</span> pos <span style="color: #339933;">=</span> heap.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>longest<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Add the word to the derivation.</span>
        derivation.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, longest<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Generate the prior string in the derivation.</span>
        longest <span style="color: #339933;">=</span> longest.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>, pos<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> longest.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span>pos<span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// Build the derivation.</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Done!  Return the derivation.</span>
    <span style="color: #000000; font-weight: bold;">return</span> derivation<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The code isn&#8217;t optimal, but it is commented.  I assume you are all capable of putting this in a class and feeding it a dictionary.  Have fun!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F06%2F14%2Fcar-talk-and-the-longest-word%2F&amp;linkname=Car%20Talk%20and%20the%20Longest%20Word"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/06/14/car-talk-and-the-longest-word/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to be Successful</title>
		<link>http://stacyprowell.com/blog/2009/06/05/how-to-be-successful/</link>
		<comments>http://stacyprowell.com/blog/2009/06/05/how-to-be-successful/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 18:48:25 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[powerpoint]]></category>
		<category><![CDATA[snark]]></category>
		<category><![CDATA[success]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=251</guid>
		<description><![CDATA[Sure, we all want to be successful, but we can&#8217;t all be, since success must be measured against the failures of your peers.  Preferably spectacular failures, with a well-timed &#8220;I told them so.&#8221;  But you aren&#8217;t like other people: you read my blog, so you&#8217;re gonna get some inside information to make you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Sarcasm???" src="http://science.kukuchew.com/wp-content/uploads/2008/06/dilbert-sarcasm-supportiveness-difference.jpg" alt="" width="164" height="152" />Sure, we all want to be successful, but we can&#8217;t all be, since success must be measured against the failures of your peers.  Preferably spectacular failures, with a well-timed &#8220;I told them so.&#8221;  But you aren&#8217;t like other people: you read my blog, so you&#8217;re gonna get some inside information to make you $ucce$$ful!<span id="more-251"></span></p>
<h2>The Secret Steps</h2>
<ol>
<li><a href="http://lifedev.net/2006/08/7-idea-dumping-tips/" target="_blank">Have a really, really good idea</a>.  Don&#8217;t bother with &#8220;good&#8221; ideas.  We all have those all the time.</li>
<li>Summarize your idea in short, choppy sentences suitable for bullet points.  Drop articles, verbs, and anything else that gets in the way.  Have you ever known a <a href="http://en.wikipedia.org/wiki/Disputes_in_English_grammar" target="_blank">successful grammar teacher</a>?</li>
<li>Identify forceful art that is in some way related to your points.  Got a great idea to make cars safer?  Find a <a href="http://www.houseoftheorangemonkey.co.uk/monkey/mobile/vroom.htm" target="_blank">picture of a monkey driving a car</a>!  Or that <a href="http://www.youtube.com/watch?v=m9wAqNN-Dic" target="_blank">movie of the monkey washing the cat</a>!  Or <a href="http://www.amazon.com/Hang-There-Inspirational-Art-1970s/dp/0811839974" target="_blank">that kitten hanging in mid air</a>!  That&#8217;s classic.</li>
<li>Combine the results of steps 2 and 3 on slides in <a href="http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001yB&amp;topic_id=1" target="_blank">PowerPoint</a>.  Remember: Good ideas fit on slides.  After all, if you can&#8217;t fit it on a slide, how are you going to prepare an <a href="http://en.wikipedia.org/wiki/Elevator_pitch" target="_blank">elevator pitch</a>?  But I don&#8217;t have time for that, because we&#8217;re on to the next step!</li>
<li>Read the slides to a room of otherwise intelligent people who are already successful because they followed the Secret Steps.  They&#8217;ll love that kitten picture.  The kitten&#8217;s just hanging there, and it says &#8220;hang in there!&#8221;  So cute.  <a href="http://en.wikipedia.org/wiki/Misdirection" target="_blank">What were we talking about</a>?</li>
<li>Pick three points from your presentation to re-emphasize on the last slide.  Keep them short.  I recommend you keep them to single words, if you can.  Something like &#8220;monkey washing cat.&#8221;  That&#8217;s the &#8220;hook.&#8221;</li>
<li>A long process of phone and email tag ensues.  Be forceful!  Remind them of the three points.  It won&#8217;t hurt to say how brilliant your idea is, and how these folks are super smart because they &#8220;get it.&#8221;</li>
<li>Profit!</li>
<li>Repeat.</li>
</ol>
<h2>Conclusion</h2>
<p>Remember: All projects eventually fail, even if they succeed first.  <a href="http://www.airspacemag.com/space-exploration/other-moon.html" target="_blank">Going to the moon</a>?  We don&#8217;t go there any more.  <a href="http://www.secretsofworldwar2.co.uk/" target="_blank">WW2</a>?  That war is sooo over.  Curing polio?  Now there&#8217;s <a href="http://www.cprf.org.uk/" target="_blank">very little money in polio research</a>.</p>
<p>The trick is to realize when the project is about to fail and get out fast.  I recommend bailing out right after the project kicks off, since that&#8217;s the only time you can be sure the project isn&#8217;t failing.  Then you get a reputation as a starter, an <a href="http://www.amazon.com/Complete-Idiots-Guide-Starting-Business/dp/0028638883" target="_blank">entrepreneur</a>, a &#8220;go to&#8221; guy.</p>
<p>Now, go forth and $ucceed!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F06%2F05%2Fhow-to-be-successful%2F&amp;linkname=How%20to%20be%20Successful"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/06/05/how-to-be-successful/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress and jsMath</title>
		<link>http://stacyprowell.com/blog/2009/04/20/wordpress-and-jsmath/</link>
		<comments>http://stacyprowell.com/blog/2009/04/20/wordpress-and-jsmath/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 03:00:22 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jsmath]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=145</guid>
		<description><![CDATA[How to use jsMath in WordPress blogs.]]></description>
			<content:encoded><![CDATA[<p>Well&#8230; I&#8217;ve been using jsMath on my Wiki, and now I&#8217;m keen to use it on my blog.  There does not seem to be a WordPress plugin explicitly for jsMath (if anyone knows of one, please let me know), but you don&#8217;t <em>need</em> one.  Using jsMath from WordPress is actually easy via a <em>different</em> plugin.<span id="more-145"></span></p>
<p>The plugin is <a href="http://wordpress.org/extend/plugins/wp-hooks/">WP Hooks</a>.  This is a plugin that lets you add content to the page head, and that&#8217;s just what we want!</p>
<ol>
<li>Download and install <a href="http://www.math.union.edu/~dpvc/jsMath/">jsMath</a> on your local server.</li>
<li>Download, install, and activate <a href="http://amwhalen.com/blog/projects/wp-hooks">WP Hooks</a> in WordPress.</li>
<li>Configure this and add the following to the header (<em>change</em> the path to point to your local installation of jsMath):<br />
<tt>&lt;SCRIPT SRC="jsMath/easy/load.js"&gt;&lt;/SCRIPT&gt;</tt></li>
<li>Start writing math on pages.</li>
</ol>
<p>This seems to work fine.  Here&#8217;s an example.  \[\int \sin x\ dx= -\cos\ x + C\]</p>
<p>This was created as a display equation via writing <tt>\<em></em>[\int \sin x\ dx= -\cos\ x + C\]</tt> in the page.</p>
<p><strong>Update</strong>: As pointed out in the comments, you need to install the fonts on the client (browser) side for things to look really nice and for math rendering to be fast; otherwise you get a warning and bitmap fonts.  It&#8217;s really easy; the instructions are <a href="http://www.math.union.edu/~dpvc/jsMath/users/fonts.html" target="_blank">here</a>.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F04%2F20%2Fwordpress-and-jsmath%2F&amp;linkname=WordPress%20and%20jsMath"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/04/20/wordpress-and-jsmath/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Put Christ Back Into Schools???</title>
		<link>http://stacyprowell.com/blog/2009/03/20/put-christ-back-into-schools/</link>
		<comments>http://stacyprowell.com/blog/2009/03/20/put-christ-back-into-schools/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 19:51:57 +0000</pubDate>
		<dc:creator>stacy</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Religion]]></category>
		<category><![CDATA[Society]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=29</guid>
		<description><![CDATA[There&#8217;s a cause group on Facebook called &#8220;Put Christ Back Into Schools.&#8221;  I&#8217;ll wait while you decide whether to join up.  Done?  Okay, let&#8217;s move on.
The Cause
This group espouses the following two principles, which I shamelessly copied verbatim from their site.


Allow Teaching of and only the Bible by teachers at any time [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-101 alignright" title="7a2217cb7fff59139b1488cbf0884faa" src="http://stacyprowell.com/blog/wp-content/uploads/2009/03/7a2217cb7fff59139b1488cbf0884faa-150x150.jpg" alt="7a2217cb7fff59139b1488cbf0884faa" width="150" height="150" />There&#8217;s a cause group on Facebook called &#8220;<a href="http://apps.facebook.com/causes/61923">Put Christ Back Into Schools</a>.&#8221;  I&#8217;ll wait while you decide whether to join up.  Done?  Okay, let&#8217;s move on.<span id="more-29"></span></p>
<h1>The Cause</h1>
<p>This group espouses the following two principles, which I shamelessly copied verbatim from their site.</p>
<blockquote>
<ol>
<li>Allow Teaching of and only the Bible by teachers at any time to students anytime.</li>
<li>Allowing the Bible (and only the Bible) to be an elective in all schools, and not forced upon.</li>
</ol>
</blockquote>
<p>Continuing on, they state:</p>
<blockquote><p>We believe every teacher should have the right to teach the Bible at any time.</p>
<p>Please note: To clearify, this group is for teaching of the entire Bible, and only the Bible.</p>
<p>According 1st Amendment of the Constitution of the United States of America, every person has the right to religion. Why is praying/reading of the Bible not allowed in most schools?</p></blockquote>
<p>The last question is the interesting one.  Why is praying / reading of the Bible not allowed in most schools?  I&#8217;ll take on the challenge of answering that here.</p>
<p>First, neither prayer nor reading the Bible (or any other holy text) is disallowed <em>per se</em>.  Courts in the United States have consistently held that religious expression by students cannot be suppressed or abridged <em>unless</em> it can be shown to cause substantial disruption.  What <em>is</em> disallowed is <em>school sponsored</em> prayer or Bible reading, even when it is ostensibly student-led.</p>
<h1>Agents of the State and the Establishment Clause</h1>
<p>The trick is that education is <em>compulsory</em> in the United States, and for this reason public schools are provided using public funding (i.e., <em>our</em> money).  The schools are an institution of the government, and teachers and staff are acting as agents of the government.</p>
<p>Even so, prior to Reconstruction the individual states were free to do more or less what they wanted in this regard.  The passage of the 14th Amendment to the U.S. Constitution applied the restrictions of the 1st Amendment to the several states via its &#8220;due process&#8221; clause.  The historians and lawyers will correct me here if I&#8217;m incorrect, I&#8217;m sure.</p>
<p>Anyway, the 1st Amendment:</p>
<blockquote><p>Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.</p></blockquote>
<p>The first two clauses are the &#8220;establishment&#8221; clause and the &#8220;free exercise&#8221; clause, respectively.  The free exercise clause protects students who wish to pray.  The establishment clause restricts what teachers, administrators, or other agents of the government can do and, importantly, what they can use their positions to promote.</p>
<p>So, in summary, this is what has been interpreted by the courts (consistently, I might add) to prohibit school-sponsored religious activities.</p>
<h1>The Courts</h1>
<p>Daily prayer and Bible readings continued long after Reconstruction ended.  In particular, there was a daily Bible reading and devotional at my <em>public</em> junior high school.  So why doesn&#8217;t this continue?</p>
<p>The answer is that there have been court cases that have ruled that this is not permissible.  There seems to be a misconception that those pesky atheists, led by the pesky Madalyn Murray O&#8217;Hair were the cause of all the trouble.  Not (entirely) true.</p>
<p>The challenges to Bible reading and prayer that make up the case law were predominantly brought by religious people, and usually Christians.  Some cases of note are the following.</p>
<p>In <strong><a href="http://en.wikipedia.org/wiki/Edgerton_Bible_Case">Weiss v. District Board, 1890</a></strong>, Catholics objected to the use of the King James Bible in Wisconsin Public Schools.  I assume everyone knows the story of the formation of the Church of England, and why Catholics would prefer a translation such as the Douay-Rheims be used.</p>
<p>This case was later cited by Justice Brennan in <strong><a href="http://en.wikipedia.org/wiki/Abington_School_District_v._Schempp">Abington School District v. Schempp, 1963</a></strong>.  This is actually the case where the Supreme Court articulated the ban on school-sponsored Bible reading.  Schempp was a Unitarian, and here&#8217;s where Madalyn O&#8217;Hair shows up.  She had a separate case that was consolidated with Schempp&#8217;s.</p>
<p>Back to prayer.  In <strong><a href="http://en.wikipedia.org/wiki/Engel_v._Vitale">Engel v. Vitale, 1962</a></strong> (the previous year), the Supreme Court ruled that <em>school sponsored</em> prayer violated the establishment clause.  The plaintiff&#8217;s were primarily rabbinical organizations who objected to opening the school day with a prayer.</p>
<p>The Engel v. Vitale decision has since been extended in a variety of cases, and it is to many of <em>these</em> cases that most recent attention appears to be paid.  For instance, in <strong><a href="http://en.wikipedia.org/wiki/Santa_Fe_Independent_School_Dist._v._Doe">Santa Fe Independent School District v. Doe, 2000</a></strong> the Court ruled that a school policy sanctioning student-initiated and student-led prayer at school events violated the establishment clause.  This action was brought by Catholic and Mormon families.  Note that the <em>school policy</em> was held to violate the Constitution, not the prayer itself.</p>
<p>In the majority opinion written by Justice Stevens, the Court objected to prayer:</p>
<blockquote><p>[...] on school property, at school-sponsored events, over the school&#8217;s public address system, by a speaker representing the student body, under the supervision of school faculty, and pursuant to a school policy that explicitly and implicitly encourages public prayer [...]</p></blockquote>
<p>In short, the student was held to be acting as an agent of the school, and thus of the government.  Teachers, administrators, and staff cannot act by proxy through students.</p>
<p>The Court&#8217;s position is nicely summarized in the &#8220;Lemon Test&#8221; arising from <strong><a href="http://en.wikipedia.org/wiki/Lemon_v._Kurtzman">Lemon v. Kurtzman</a></strong>.  A government action is deemed unconstitutional under the establishment clause if it fails to pass all three prongs of the test:</p>
<blockquote>
<ol>
<li>The government&#8217;s action must have a secular legislative purpose;</li>
<li>The government&#8217;s action must not have the primary effect of either advancing or inhibiting religion;</li>
<li>The government&#8217;s action must not result in an &#8220;excessive government entanglement&#8221; with religion.</li>
</ol>
</blockquote>
<h1>Solutions?</h1>
<p>I personally believe it is not necessary to have prayer or Bible reading in the public schools.  We have churches and, for that matter, private religious schools.  The real issue hinges on compulsory education and public schools.</p>
<p>I would suggest that the members of this particular cause instead consider supporting the elimination of or alternatives to public schools to disentangle the federal government from education altogether.  If we wish to retain compulsory education (and most of us probably do), then we could institute a voucher system or other mechanism to provide more school choice.</p>
<p>I&#8217;ll close with the following quotation, that I believe summarizes my point quite nicely.</p>
<blockquote><p>[...] we should at least be able to see that our interest would be best served not by asking the state to promulgate our values but by forbidding the state to promulgate any values at all. If the state can espouse some value that we love in spite of evidence and reason, it can, with equal justice, espouse others that we do not love.</p>
<p>&#8211; Richard Mitchell, <em><a href="http://www.sourcetext.com/grammarian/newslettersv06/6.7.htm">The Underground Grammarian</a></em>, v. 6, n. 7</p></blockquote>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2009%2F03%2F20%2Fput-christ-back-into-schools%2F&amp;linkname=Put%20Christ%20Back%20Into%20Schools%3F%3F%3F"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2009/03/20/put-christ-back-into-schools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://stacyprowell.com/blog/2008/07/03/hello-world/</link>
		<comments>http://stacyprowell.com/blog/2008/07/03/hello-world/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 06:20:04 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://stacyprowell.com/blog/?p=1</guid>
		<description><![CDATA[Welcome to Stacy&#8217;s blog.  There isn&#8217;t much here, since Stacy is rather busy at the moment.  But he may be adding content in the near future&#8230; or not.
]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-99 alignright" title="photo-17" src="http://stacyprowell.com/blog/wp-content/uploads/2008/07/photo-17-150x150.jpg" alt="photo-17" width="150" height="150" />Welcome to Stacy&#8217;s blog.  There isn&#8217;t much here, since Stacy is rather busy at the moment.  But he may be adding content in the near future&#8230; or not.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fstacyprowell.com%2Fblog%2F2008%2F07%2F03%2Fhello-world%2F&amp;linkname=Welcome"><img src="http://stacyprowell.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://stacyprowell.com/blog/2008/07/03/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
