<?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>A Better Manual</title>
	<atom:link href="http://abettermanual.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://abettermanual.com</link>
	<description>for all things technical</description>
	<lastBuildDate>Mon, 21 Sep 2009 21:15:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ruby vs. Java in Solving The Perfect Shuffle Problem, Part 3 of 3</title>
		<link>http://abettermanual.com/2009/09/10/ruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3/</link>
		<comments>http://abettermanual.com/2009/09/10/ruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 21:35:31 +0000</pubDate>
		<dc:creator>Ian Bowman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[perfect shuffle problem]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://abettermanual.com/?p=241</guid>
		<description><![CDATA[Prev: The Perfect Shuffle Problem
The Code
Both Java and Ruby based solutions to the Perfect Shuffle Problem are available for download below. In addition to comparing styles, they are informative for anyone learning Ruby with a Java background, or vice versa.
The Java based solution is 82 lines of code, while the Ruby version is 76 lines. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabettermanual.com%2F2009%2F09%2F10%2Fruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabettermanual.com%2F2009%2F09%2F10%2Fruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3%2F" height="61" width="51" /></a></div><p>Prev: <a href="http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3/">The Perfect Shuffle Problem</a></p>
<h3>The Code</h3>
<p>Both Java and Ruby based solutions to the Perfect Shuffle Problem are available for download below. In addition to comparing styles, they are informative for anyone learning Ruby with a Java background, or vice versa.</p>
<p>The Java based solution is 82 lines of code, while the Ruby version is 76 lines. Not a huge discrepancy. The character count is quite different though: 1,943 (Java) versus 1,615 (Ruby). Looking at the two code excerpts, we see why.<br />
<span id="more-241"></span><br />
The Java program&#8217;s main loop is shown below.<br />
<code><br />
private long getNumPerfectShuffles() {<br />
    int pos = 0;<br />
    long totalShuffles = 1;<br />
    while( (pos = getFirstUnvisited(pos) ) < _visited.size() ) {<br />
	long shuffles = 0;<br />
	do {<br />
	    _visited.set(pos, true);<br />
	    pos = shuffle(pos);<br />
	    ++shuffles;<br />
	} while (!_visited.get(pos));<br />
	totalShuffles = lcm(totalShuffles, shuffles);<br />
    }<br />
    return totalShuffles;<br />
}<br />
</code><br />
If you are used to programming with Java, the verbose aspects of the above code above may not be obvious to you, such as</p>
<ul>
<li>Explicit type declarations.</li>
<li>Static typing.</li>
<li>Mandatory parenthesis after method names.</li>
<li>Mandatory semicolons on each line.</li>
</ul>
<p>Comparing the preceding Java code to the equivalent Ruby snippet makes the verbosity of Java more obvious.<br />
<code><br />
def get_num_perfect_shuffles<br />
  pos = 0<br />
  total_shuffles = 1<br />
  while (pos = get_first_unvisited pos) < @visited.size<br />
    shuffles = 0<br />
    begin<br />
      pos = shuffle pos<br />
      shuffles += 1<br />
    end while !@visited[pos]<br />
    total_shuffles = lcm(total_shuffles, shuffles)<br />
  end<br />
  return total_shuffles<br />
end<br />
</code></p>
<h3>What I Think</h3>
<p>I like the Ruby version more. </p>
<p>I don't care about static typing. The static typing in Java does prevent some bugs.  Also I admit that to do any serious development with Ruby I use a unit testing framework. But I've found static typing to prevent only a small minority of bugs, and not even those particularly challenging. So I still need to use unit tests with Java anyways. </p>
<p>I also like not having to place parenthesis, braces and semicolons all over the place.<br />
<code><br />
while (pos = get_first_unvisited pos) < @visited.size<br />
  shuffles = 0<br />
</code><br />
will always be easier for me to read than<br />
<code><br />
while( (pos = getFirstUnvisited(pos) ) < _visited.size() ) {<br />
	long shuffles = 0;<br />
</code></p>
<p>When Ruby is explicit, I feel it gets it right. Note that in the java version I place an underscore at the beginning of <i>_visited</i> to remember it is an instance variable. That's just my technique. With Ruby, this convention is formally enforced with an at character. So the <i>@</i> denotes <i>@visited</i> is an instance variable. </p>
<p>Finally, with the above two code snippets I did not even touch upon the deeper features unique to the Ruby language, such as blocks and metaprogramming. Such features have no practical significance in solving The Perfect Shuffle Problem though. </p>
<h3>Conclusion and Download</h3>
<p>But my preference for Ruby is simply that: my preference. I didn't write this article to convert you into Ruby believer. I hope you will compare and contrast Java and Ruby for yourself. </p>
<p>Please download the Java version here: <a href='http://abettermanual.com/wp-content/uploads/2009/09/PerfectShuffle.java'>http://abettermanual.com/wp-content/uploads/2009/09/PerfectShuffle.java</a></p>
<p>The Ruby version is available here: <a href='http://abettermanual.com/wp-content/uploads/2009/09/perfect_shuffle.rb'>http://abettermanual.com/wp-content/uploads/2009/09/perfect_shuffle.rb</a></p>
<p>I hope you found this series of articles informative. I welcome your feedback. Good luck with all your programming endeavors. </p>
]]></content:encoded>
			<wfw:commentRss>http://abettermanual.com/2009/09/10/ruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby vs. Java in Solving The Perfect Shuffle Problem, Part 2 of 3</title>
		<link>http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3/</link>
		<comments>http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 21:55:50 +0000</pubDate>
		<dc:creator>Ian Bowman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://abettermanual.com/?p=219</guid>
		<description><![CDATA[Prev: Introduction
The Perfect Shuffle Problem
The Perfect Shuffle Problem involves determining how many shuffles are required to return a deck of cards to its original order . The following is a formal definition from halfbaked.net.
Given a deck of nCards unique cards, cut the deck iCut cards from top and perform a perfect shuffle. A perfect shuffle [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabettermanual.com%2F2009%2F09%2F04%2Fruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabettermanual.com%2F2009%2F09%2F04%2Fruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3%2F" height="61" width="51" /></a></div><p>Prev: <a href="http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-1-of-3/">Introduction</a></p>
<h3>The Perfect Shuffle Problem</h3>
<p>The Perfect Shuffle Problem involves determining how many shuffles are required to return a deck of cards to its original order . The following is a formal <a href="http://halfbaked.net/Halfbaked/Perfect%20Shuffle%20Problem.html">definition from halfbaked.net</a>.</p>
<blockquote><p>Given a deck of nCards unique cards, cut the deck iCut cards from top and perform a perfect shuffle. A perfect shuffle begins by putting down the bottom card from the top portion of the deck followed by the bottom card from the bottom portion of the deck followed by the next card from the top portion, etc., alternating cards until one portion is used up. The remaining cards go on top. The problem is to find the number of perfect shuffles required to return the deck to its original order.</p>
<p>Your function should be declared as:</p>
<p><code>static long shuffles(int nCards,int iCut);</code></p>
<p>What is the result of shuffles(1002,101)?</p></blockquote>
<p>We need to conceptualize what we are going to solve, and we are not going to do that thinking about a 1002 card deck and a 101 card cut. Most of us are familiar with a 52 card deck. But even shuffling 52 cards is difficult to visualize. So, let&#8217;s first investigate how many perfect shuffles are required to bring a 6 card deck with a 2 card cut to its original order.<br />
<span id="more-219"></span><br />
The initial position of the cards is shown in the following image. I number the cards 1 through 6. I also number the position of the cards, 1 through 6. So the original position of cards 1 &#8211; 6 is positions 1 &#8211; 6 respectively.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/09/InitialPosition2.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/InitialPosition2-300x216.jpg" alt="InitialPosition" title="InitialPosition" width="300" height="216" class="alignnone size-medium wp-image-272" /></a></p>
<p>If we perform a two card cut, we end up with two stacks of cards. One stack contains cards 1 and 2, and the other contains 3 &#8211; 6. Performing a perfect shuffle on these yields the descending card order <strong>3, 4, 1, 5, 2, 6</strong>. Another perfect shuffle brings us <strong>1, 5, 3, 2, 4, 6</strong>.</p>
<table border="0">
<tbody>
<tr>
<td><a href="http://abettermanual.com/wp-content/uploads/2009/09/FirstShuffle6.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/FirstShuffle6-300x216.jpg" alt="FirstShuffle" title="FirstShuffle" width="250" height="196" class="alignleft size-medium wp-image-270" /></a></td>
<td><a href="http://abettermanual.com/wp-content/uploads/2009/09/SecondShuffle3.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/SecondShuffle3-300x216.jpg" alt="SecondShuffle" title="SecondShuffle" width="250" height="196" class="alignright size-medium wp-image-273" /></a></td>
</tr>
</tbody>
</table>
<p>The third perfect shuffle renders <strong>3, 2, 1, 4, 5, 6</strong>. The fourth <strong>1, 4, 3, 5, 2, 6</strong>.</p>
<table border="0">
<tbody>
<tr>
<td><a href="http://abettermanual.com/wp-content/uploads/2009/09/ThirdShuffle1.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/ThirdShuffle1-300x216.jpg" alt="ThirdShuffle" title="ThirdShuffle" width="250" height="196" class="alignleft size-medium wp-image-275" /></a></td>
<td><a href="http://abettermanual.com/wp-content/uploads/2009/09/FourthShuffle1.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/FourthShuffle1-300x216.jpg" alt="FourthShuffle" title="FourthShuffle" width="250" height="196" class="alignright size-medium wp-image-271" /></a></td>
</tr>
</tbody>
</table>
<p>The fifth shuffle leads to the order <strong>3, 5, 1, 2, 4, 6</strong>. Finally, the sixth shuffle returns the cards to their original positions.</p>
<table border="0">
<tbody>
<tr>
<td><a href="http://abettermanual.com/wp-content/uploads/2009/09/FifthShuffle2.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/FifthShuffle2-300x216.jpg" alt="FifthShuffle" title="FifthShuffle" width="250" height="196" class="alignleft size-medium wp-image-269" /></a></td>
<td><a href="http://abettermanual.com/wp-content/uploads/2009/09/SixthShuffle1.jpg"><img src="http://abettermanual.com/wp-content/uploads/2009/09/SixthShuffle1-300x216.jpg" alt="SixthShuffle" title="SixthShuffle" width="250" height="196" class="alignright size-medium wp-image-274" /></a></td>
</tr>
</tbody>
</table>
<h3>Brute Force Solution</h3>
<p>So six cards with a cut of two cards needs six shuffles? Not too bad. At this point you may be tempted simply use a brute force implementation.</p>
<p>The pseudo-code for the brute force implementation is straightforward.</p>
<p><code>1. Initialize each card <strong>C<sub>i</sub></strong> in deck <strong>D</strong> to position <strong>i</strong>.</code></p>
<p><code>2. Shuffle deck <strong>D</strong>.</code></p>
<p><code>3.Until each card <strong>C<sub>i</sub></strong> is in its original position <strong>i</strong>:<br />
increment shuffle count,<br />
shuffle again <strong>(2)</strong>.</code></p>
<p>Such a method works fine for six shuffles. However, if you try to use brute force to solve 1001 cards with a cut of 101, which I encourage you to do, you will quickly find it doesn&#8217;t work. Or well, you&#8217;ll slowly find it doesn&#8217;t work &#8212; it takes too long. Your brute force program will need to shuffle the deck 5,812,104,600 times! With each shuffle your program manipulates and investigates an array of 1001 elements. So, the brute force solution is of the order <strong>C × S</strong>, where <strong>C</strong> is the number of cards in the deck, and <strong>S</strong> is the number of shuffles required. We need to improve upon <strong>C × S</strong>.</p>
<p>There is no way to reduce <strong>C</strong>. In other words, there is no magic formula to determine where a card will be after shuffling it, without shuffling it. There is a way to improve upon <strong>S</strong> however.</p>
<h3>Cycle Based Solution</h3>
<p>Understanding the improved solution requires that we observe the way each card shuffles within the deck. Look at what happens to card 1 during the first two shuffles in the example above.</p>
<p>The first obvious conclusion is that card 1 returns to position 1 after the second shuffle. The second conclusion is less obvious but key to improving upon the brute force algorithm: any card in position 3 will return to it&#8217;s original position after two shuffles as well. That&#8217;s because card 1 passes through position 3, and shuffling by definition is the exchange of one card&#8217;s position with another. Looking at the image again, we see that card 3 is indeed back at it&#8217;s original position after two shuffles</p>
<p>For a slightly more complicated example, look at card 2 above. It visits position 5, then 4, then returns to position 2 on the third shuffle. Given the cyclical nature of shuffling we expect cards 5 and 4 to return to their initial locations after three shuffles as well. Indeed they do.</p>
<p>We have looked at cards 1 &#8211; 5. The final card, 6 remains in place throughout. In other words, it is at its original position after only one shuffle.</p>
<p>So, some of the cards require two perfect shuffles, some require three, and one card requires one. To determine the number of shuffles required for the entire deck, we simply find the lowest common multiple of these, which is six.</p>
<p>Now we have a way to determine the number of perfect shuffles required by examining the deck on a card by card basis. We need to look at each card position once, and only once. The pseudocode is below.</p>
<p><code>1. Intialize each card <strong>C<sub>i</sub></strong> in deck <strong>D</strong> to position <strong>i</strong>.</code></p>
<p><code>2. Until <strong>C<sub>i</sub></strong> is in position <strong>i</strong>:<br />
shuffle <strong>C<sub>i</sub></strong> to new position <strong>j,</strong><br />
increase shuffle count,<br />
mark <strong>j</strong> as visited.</code></p>
<p><code>3. Record the shuffle count at all visited positions.</code></p>
<p><code>4. Repeat shuffle process <strong>(2)</strong> for the next <strong>C<sub>i</sub></strong><br />where <strong>i</strong> has not been visited.</code></p>
<p><code>5. When we have visited each position:</code><br />
<code>calculate total perfect shuffles required which is<br/>the lowest common multiple of shuffles required for every <strong>C<sub>i</sub></strong>.</code></p>
<p>Again, this new algorithm requires that each position in the deck needs to be investigated only once. We need to shuffle the deck <strong>C</strong> times and therefore our new order of complexity is simply <strong>C</strong>, a major improvement.</p>
<p>But we need to implement our algorithm. In the next post I&#8217;ll provide both Java and Ruby code to do just that.</p>
<p>Next: <a href="http://abettermanual.com/2009/09/10/ruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3/">The Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby vs. Java in Solving the Perfect Shuffle Problem, Part 1 of 3</title>
		<link>http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-1-of-3/</link>
		<comments>http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-1-of-3/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 21:55:08 +0000</pubDate>
		<dc:creator>Ian Bowman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://abettermanual.com/?p=170</guid>
		<description><![CDATA[Introduction
I once read a comparison of Java and Ruby that said, &#8220;Ruby is terse, Java is not.&#8221; And that was it. 
OK thanks. I&#8217;ve read equally uninformative statements about English and Japanese. Such generalizations do not answer my main concern as a developer, which is why and when to use either language. 
A more educational [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabettermanual.com%2F2009%2F09%2F04%2Fruby-vs-java-for-solving-the-perfect-shuffle-problem-part-1-of-3%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabettermanual.com%2F2009%2F09%2F04%2Fruby-vs-java-for-solving-the-perfect-shuffle-problem-part-1-of-3%2F" height="61" width="51" /></a></div><h3>Introduction</h3>
<p>I once read a comparison of Java and Ruby that said, &#8220;Ruby is terse, Java is not.&#8221; And that was it. </p>
<p>OK thanks. I&#8217;ve read equally uninformative statements about English and Japanese. Such generalizations do not answer my main concern as a developer, which is why and when to use either language. </p>
<p>A more educational way to compare the two languages is to write a Java and Ruby program to solve the same challenging problem. Ideally, the problem&#8217;s solution would be relatively short. </p>
<p>Therefore, in part 2 of this article I describe the Perfect Shuffle Problem, and how to solve it without using brute force. I follow this up in part 3 by presenting both a Java and Ruby based solution. </p>
<p>If you are impatient to get to the comparison, feel free to skip to <a href="http://abettermanual.com/2009/09/10/ruby-vs-java-in-solving-the-perfect-shuffle-problem-part-3-of-3/">Part 3</a>. </p>
<p>Next: <a href="http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-2-of-3/">The Perfect Shuffle Problem</a></p>
]]></content:encoded>
			<wfw:commentRss>http://abettermanual.com/2009/09/04/ruby-vs-java-for-solving-the-perfect-shuffle-problem-part-1-of-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing And Configuring Mint For Wordpress</title>
		<link>http://abettermanual.com/2009/08/28/installing-and-configuring-mint-for-wordpress/</link>
		<comments>http://abettermanual.com/2009/08/28/installing-and-configuring-mint-for-wordpress/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 22:46:43 +0000</pubDate>
		<dc:creator>Ian Bowman</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[bluehost]]></category>
		<category><![CDATA[haveamint]]></category>
		<category><![CDATA[mint]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://abettermanual.com/?p=128</guid>
		<description><![CDATA[Someone told you installing Mint was straightforward. Someone was right. I tell you installing and configuring Mint for WordPress is more straightforward. I am more right.

Below I show you why. And how.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabettermanual.com%2F2009%2F08%2F28%2Finstalling-and-configuring-mint-for-wordpress%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabettermanual.com%2F2009%2F08%2F28%2Finstalling-and-configuring-mint-for-wordpress%2F" height="61" width="51" /></a></div><p>Someone told you installing Mint was straightforward. Someone was right. I tell you installing and configuring Mint for WordPress is more straightforward. I am more right.</p>
<p>Below I show you why. And how.<br />
<span id="more-128"></span></p>
<h3>Uploading Mint To Your Web Host</h3>
<p>The first step is to download the latest mint archive from  <a href="http://haveamint.com/">haveamint.com</a>.</p>
<p>Next, log into your web host. Access the File Manager from the cPanel.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/filemanager-m.gif"><img class="alignnone size-medium wp-image-131" title="filemanager-m" src="http://abettermanual.com/wp-content/uploads/2009/08/filemanager-m-300x259.gif" alt="filemanager-m" width="300" height="259" /></a></p>
<p>Using the File Manager, upload the archive to your host. Then extract it, and move the &#8220;mint&#8221; folder to <strong>yourdomain.com/mint</strong>. In my case, I moved the mint folder to <strong>abettermanual.com/mint</strong>.</p>
<p>Now you need to add your database information to <strong>mint/config/db.php</strong>. Luckily WordPress stores all of the information you need in <strong>wp-config.php</strong>. By default <strong>wp-config.php</strong> is in the root directory of your domain. View <strong>wp-config.php</strong> and take note of the the following:</p>
<ul>
<li>The server.</li>
<li>The username.</li>
<li>The password.</li>
<li>The database.</li>
</ul>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/mint-wp-config-m.gif"><img class="alignnone size-medium wp-image-132" title="mint-wp-config-m" src="http://abettermanual.com/wp-content/uploads/2009/08/mint-wp-config-m-300x259.gif" alt="mint-wp-config-m" width="300" height="259" /></a></p>
<p>Now edit <strong>mint/db.php</strong> and insert the information recorded from <strong>wp-config.php</strong>.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/mint-db-php-m.gif"><img class="alignnone size-medium wp-image-133" title="mint-db-php-m" src="http://abettermanual.com/wp-content/uploads/2009/08/mint-db-php-m-300x259.gif" alt="mint-db-php-m" width="300" height="259" /></a></p>
<p>Now you&#8217;re done with the hard part. The rest of the directions discuss configuration.</p>
<h3>Configuring Mint</h3>
<p>Point your browser to <strong>http://yourdomain.com/mint</strong>. You&#8217;ll see the Mint End User License Agreement page.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/mint-EULA1.gif"><img class="alignnone size-medium wp-image-135" title="mint-EULA" src="http://abettermanual.com/wp-content/uploads/2009/08/mint-EULA1-300x259.gif" alt="mint-EULA" width="300" height="259" /></a></p>
<p>After you accept the terms of the EULA, the next screen will aks you to enter your activation key. The page after that lists various configuration parameters, as shown below. For now, <strong>leave &#8220;Ignore my visits (uses cookies)&#8221; unchecked</strong>. You will want to use your visits for testing later. After testing, I&#8217;ll show you how to ignore them.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/mint-install.gif"><img class="alignnone size-medium wp-image-136" title="mint-install" src="http://abettermanual.com/wp-content/uploads/2009/08/mint-install-300x259.gif" alt="mint-install" width="300" height="259" /></a></p>
<p>Finally, you are brought to a screen instructing you to manually insert code. You can ignore those instructions. Below I show you how to install the Micro Mint plugin. It makes manually inserting code unnecessary.</p>
<h3>Installing Micromint Plugin</h3>
<p>The <a href="http://wordpress.org/extend/plugins/micromint/">Micromint Plugin</a> inserts mint tracking code for you. It vastly simplifies your life when you decide to change WordPress themes, for example. But first you need to install it.</p>
<p>Start from the WordPress dashboard. In the left sidebar, select Plugins -&gt; Add New. Then enter &#8220;micromint&#8221; in the text box and click &#8220;Search Plugins&#8221; to find the plugin. Finally, click on the &#8220;install&#8221; link.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/micromint-search-m.gif"><img class="alignnone size-medium wp-image-137" title="micromint-search-m" src="http://abettermanual.com/wp-content/uploads/2009/08/micromint-search-m-300x259.gif" alt="micromint-search-m" width="300" height="259" /></a></p>
<p>When the installation completes, select Settings -&gt; µMint. Check the box next to &#8220;Track Stats,&#8221; and ensure the Mint Location is correct. After that, click &#8220;Mintify.&#8221;</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/micromint-config-m.gif"><img class="alignnone size-medium wp-image-143" title="micromint-config-m" src="http://abettermanual.com/wp-content/uploads/2009/08/micromint-config-m-300x259.gif" alt="micromint-config-m" width="300" height="259" /></a></p>
<p>You&#8217;re done! Next we&#8217;ll verify that everything works.</p>
<h3>Testing 1, 2, 3</h3>
<p>Open up a new browser window, and go to your WordPress website. Then, in a separate window go to <strong>http://yourdomain.com/mint</strong>. You should see your visits listed there. Refresh both your WordPress site and your mint page a few times for a more thorough verification.</p>
<p>Now you probably want to ignore visits from your own computer. To do that, first click on preferences.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/mint-initial-populated-m.gif"><img class="alignnone size-medium wp-image-138" title="mint-initial-populated-m" src="http://abettermanual.com/wp-content/uploads/2009/08/mint-initial-populated-m-300x259.gif" alt="mint-initial-populated-m" width="300" height="259" /></a></p>
<p>Then check the box next to &#8220;Ignore my visits (uses cookies).&#8221;</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/mint-pref-disable-m.gif"><img class="alignnone size-medium wp-image-139" title="mint-pref-disable-m" src="http://abettermanual.com/wp-content/uploads/2009/08/mint-pref-disable-m-300x259.gif" alt="mint-pref-disable-m" width="300" height="259" /></a></p>
<p>That&#8217;s it! Now Mint will keep you up to date with visitor information, and ignore visits from your computer.</p>
<p>You&#8217;ll need to install some Pepper to enable Mint to display detailed user demographics. In a future post I&#8217;ll describe how to do that.</p>
]]></content:encoded>
			<wfw:commentRss>http://abettermanual.com/2009/08/28/installing-and-configuring-mint-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Best Way to Upgrade a Manual WordPress Installation &#8212; Importing WordPress to SimpleScripts</title>
		<link>http://abettermanual.com/2009/08/25/the-best-way-to-upgrade-a-manual-wordpress-installation-importing-a-manual-wordpress-installation-to-simplescripts/</link>
		<comments>http://abettermanual.com/2009/08/25/the-best-way-to-upgrade-a-manual-wordpress-installation-importing-a-manual-wordpress-installation-to-simplescripts/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 21:12:21 +0000</pubDate>
		<dc:creator>Ian Bowman</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[importing wordpress installation]]></category>
		<category><![CDATA[simplescripts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress upgrade]]></category>

		<guid isPermaLink="false">http://abettermanual.com/?p=83</guid>
		<description><![CDATA[WordPress features an automatic upgrade option since version 2.7, which apparently often works. Great. But what if it doesn&#8217;t work? Or what if you manually installed a prior version?
The detailed WordPress manual upgrade instructions inform you that indeed, you don&#8217;t want to perform a manual upgrade. So you feel stuck with say, Wordpress 2.3.2. And [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabettermanual.com%2F2009%2F08%2F25%2Fthe-best-way-to-upgrade-a-manual-wordpress-installation-importing-a-manual-wordpress-installation-to-simplescripts%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabettermanual.com%2F2009%2F08%2F25%2Fthe-best-way-to-upgrade-a-manual-wordpress-installation-importing-a-manual-wordpress-installation-to-simplescripts%2F" height="61" width="51" /></a></div><p>WordPress features an automatic upgrade option since version 2.7, which apparently <a href="http://codex.wordpress.org/Upgrading_WordPress">often works</a>. Great. But what if it doesn&#8217;t work? Or what if you manually installed a prior version?</p>
<p>The <a href="http://codex.wordpress.org/Upgrading_WordPress_Extended">detailed WordPress manual upgrade instructions</a> inform you that indeed, you don&#8217;t want to perform a manual upgrade. So you feel stuck with say, Wordpress 2.3.2. And you are depressed.</p>
<p>Actually, you are merely a few clicks away from an up-to-date Wordpress installation. I show you what to do, below.  I do however make one assumption: your web host features SimpleScripts. Most do.<br />
<span id="more-83"></span></p>
<h3>Life Improvement Through Software Import</h3>
<p>First, we will import your manual installation to SimpleScripts. The entire process can be carried out via the SimpleScripts dashboard.</p>
<p>The first step is to locate the SimpleScripts button in your host&#8217;s cPanel.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/cPanel-m.jpg"><img class="alignnone size-medium wp-image-88" title="cPanel-m" src="http://abettermanual.com/wp-content/uploads/2009/08/cPanel-m-300x259.jpg" alt="cPanel-m" width="300" height="259" /></a></p>
<p>Then find the WordPress link.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-m-2.jpg"><img class="alignnone size-medium wp-image-89" title="ssDashboard-m-2" src="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-m-2-300x259.jpg" alt="ssDashboard-m-2" width="300" height="259" /></a></p>
<p>In the WordPress menu, click on the &#8220;Import&#8221; button.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/wpImport-m.jpg"><img class="alignnone size-medium wp-image-90" title="wpImport-m" src="http://abettermanual.com/wp-content/uploads/2009/08/wpImport-m-300x259.jpg" alt="wpImport-m" width="300" height="259" /></a></p>
<p>Once on the import page, you&#8217;ll see two import options. One is to import from a manual installation. Enter the url of your manual installation in the text box.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/wpImport-2-m.jpg"><img class="alignnone size-medium wp-image-91" title="wpImport-2-m" src="http://abettermanual.com/wp-content/uploads/2009/08/wpImport-2-m-300x259.jpg" alt="wpImport-2-m" width="300" height="259" /></a></p>
<p>If everything went well, your imported installation is listed as shown below. Now your WordPress installation is managed by Simple Scripts.</p>
<p>Next is the fun part: upgrading to the latest and greatest WordPress.</p>
<h3>Life Improvement Through Software Upgrade</h3>
<p>Under your installation listing, click on &#8220;Upgrade Available.&#8221;</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-m.jpg"><img class="alignnone size-medium wp-image-92" title="ssDashboard-m" src="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-m-300x259.jpg" alt="ssDashboard-m" width="300" height="259" /></a></p>
<p>At the upgrade page, be sure to read carefully where it says &#8220;Read Carefully!&#8221;</p>
<p>It would be prudent to follow the listed precautionary steps. Certainly you want to deactivate your plugins. Backups are good, too.</p>
<p>When you&#8217;re ready, agree to the legal terms and click on &#8220;Upgrade Now.&#8221;</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/wpUpgrade-m.jpg"><img class="alignnone size-medium wp-image-93" title="wpUpgrade-m" src="http://abettermanual.com/wp-content/uploads/2009/08/wpUpgrade-m-300x259.jpg" alt="wpUpgrade-m" width="300" height="259" /></a></p>
<p>Back at the SimpleScripts page, your newly updated WordPress installation will be listed.</p>
<p>Now is a good time to log in to the WordPress dashboard, activate your plugins, and make sure your blog looks right. If not, you will need to restore from backup, or tweak a few files. I never had any problems with an upgrade, though.</p>
<p>You&#8217;re almost done. In fact, maybe you are done. But most likely the automatic upgrade did not bring you to the latest version of WordPress since you imported from a manual installation, and the &#8220;Upgrade Available&#8221; link is still shown.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-2-m.jpg"><img class="alignnone size-medium wp-image-94" title="ssDashboard-2-m" src="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-2-m-300x259.jpg" alt="ssDashboard-2-m" width="300" height="259" /></a></p>
<p>So, now you can again deactivate your plugins, and iteratively upgrade using Simple Scripts. First click on &#8220;Upgrade Available,&#8221; and then repeat the previous upgrade process.  To be extra safe, you can activate your plugins, make sure your blog looks good, then deactivate your plugins each time.</p>
<p>Finally, your WordPress installation will be up to date, with no upgrade option shown.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-3-m.jpg"><img class="alignnone size-medium wp-image-95" title="ssDashboard-3-m" src="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-3-m-300x259.jpg" alt="ssDashboard-3-m" width="300" height="259" /></a></p>
<p>Now you have the latest version of WordPress. Awesome! I recommend logging in to WordPress and checking out some of the new features.</p>
]]></content:encoded>
			<wfw:commentRss>http://abettermanual.com/2009/08/25/the-best-way-to-upgrade-a-manual-wordpress-installation-importing-a-manual-wordpress-installation-to-simplescripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Best Way To Install Wordpress &#8212; using SimpleScripts</title>
		<link>http://abettermanual.com/2009/08/21/the-best-way-to-host-a-wordpress-blog-the-hows-and-whys-of-installing-wordpress-on-bluehost/</link>
		<comments>http://abettermanual.com/2009/08/21/the-best-way-to-host-a-wordpress-blog-the-hows-and-whys-of-installing-wordpress-on-bluehost/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 01:35:59 +0000</pubDate>
		<dc:creator>Ian Bowman</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[bluehost]]></category>
		<category><![CDATA[simple scripts]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://abettermanual.com/?p=22</guid>
		<description><![CDATA[If you are looking for a WordPress installation guide, you found it. And if you&#8217;re on the fence about hosting and self-installation, this guide illustrates the simplicity of the process.

Why To Do It
Hosting your own blog costs money. It also requires technical skill. So, why host a blog yourself rather than using say, blogger.com?
In short, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fabettermanual.com%2F2009%2F08%2F21%2Fthe-best-way-to-host-a-wordpress-blog-the-hows-and-whys-of-installing-wordpress-on-bluehost%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fabettermanual.com%2F2009%2F08%2F21%2Fthe-best-way-to-host-a-wordpress-blog-the-hows-and-whys-of-installing-wordpress-on-bluehost%2F" height="61" width="51" /></a></div><p>If you are looking for a WordPress installation guide, you found it. And if you&#8217;re on the fence about hosting and self-installation, this guide illustrates the simplicity of the process.<br />
<span id="more-22"></span></p>
<h3>Why To Do It</h3>
<p>Hosting your own blog costs money. It also requires technical skill. So, why host a blog yourself rather than using say, blogger.com?</p>
<p>In short, hosting is the best choice if you want to:</p>
<ul>
<li><strong>Completely control of the look and feel of your site.</strong></li>
<li><strong>Maximize the monetization of your content.</strong></li>
</ul>
<p>For a more detailed analysis, an excellent article is on <a href="http://www.expand2web.com/blog/wordpressorg-vs-wordpresscom-which-one-should-i-use/">Don Campbell&#8217;s site</a>.</p>
<h3>How To Do It</h3>
<p>The first time I installed WordPress, I followed the manual installation <a href="http://codex.wordpress.org/Installing_WordPress">instructions on their site</a>. The pain of the corresponding upgrades meant manually installing WordPress wasn&#8217;t the best choice. You&#8217;ll understand what I mean if you check out these <a href="http://codex.wordpress.org/Upgrading_WordPress_Extended">instructions for upgrading a manual installation</a>.</p>
<p>Luckily there is an alternative: SimpleScripts. In addition to automating the initial install, SimpleScripts will upgrade WordPress with a few clicks of the mouse.</p>
<p>To install Wordpress with SimpleScripts, first access the SimpleScripts menu from your web host&#8217;s cPanel.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/cPanel-m.jpg"><img class="alignnone size-medium wp-image-88" title="cPanel-m" src="http://abettermanual.com/wp-content/uploads/2009/08/cPanel-m-300x259.jpg" alt="cPanel-m" width="300" height="259" /></a></p>
<p>Then click on the WordPress link.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-m-2.jpg"><img class="alignnone size-medium wp-image-89" title="ssDashboard-m-2" src="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-m-2-300x259.jpg" alt="ssDashboard-m-2" width="300" height="259" /></a></p>
<p>From there click on &#8220;Install.&#8221;</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/install-wordpress-m.gif"><img class="alignnone size-medium wp-image-111" title="install-wordpress-m" src="http://abettermanual.com/wp-content/uploads/2009/08/install-wordpress-m-300x259.gif" alt="install-wordpress-m" width="300" height="259" /></a></p>
<p>That&#8217;s it. You&#8217;re done.</p>
<p>To check out your installation in the future, you can again access the SimpleScripts dashboard from the cPanel. When a WordPress upgrade is available, SimpleScripts will display a red link. Click on it to keep your WordPress up-to-date.</p>
<p><a href="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-2-m.jpg"><img class="alignnone size-medium wp-image-94" title="ssDashboard-2-m" src="http://abettermanual.com/wp-content/uploads/2009/08/ssDashboard-2-m-300x259.jpg" alt="ssDashboard-2-m" width="300" height="259" /></a></p>
<p>Simple, right? Now you are part of the WordPress community.</p>
<p>The next step is to upload some quality content to your new blog. I look forward to reading it.</p>
]]></content:encoded>
			<wfw:commentRss>http://abettermanual.com/2009/08/21/the-best-way-to-host-a-wordpress-blog-the-hows-and-whys-of-installing-wordpress-on-bluehost/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
