Retidy, removing align=left from headings and empty paragraphs

This commit is contained in:
James Gregory 2013-12-30 15:37:13 +11:00
commit a96a114403
362 changed files with 8472 additions and 5040 deletions

View file

@ -1,5 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -19,17 +18,21 @@
<center>
<table border="1">
<tr>
<td><a href="09-07.html">Previous</a></td>
<td>
<a href="09-07.html">Previous</a>
</td>
<td><a href="index.html">Table of Contents</a></td>
<td>
<a href="index.html">Table of Contents</a>
</td>
<td><a href="10-02.html">Next</a></td>
<td>
<a href="10-02.html">Next</a>
</td>
</tr>
</table>
</center>
<p><br /></p>
<h2 id="Heading1">Chapter 10<br />
Patient Coding, Faster Code</h2>
@ -57,7 +60,7 @@
<p>In this chapter, I&rsquo;m going to walk you through a simple but illustrative case history that nicely points up the wisdom of delaying gratification when faced with programming problems, so that your mind has time to chew on the problems from other angles. The alternative solutions you find by doing this may seem obvious, once you&rsquo;ve come up with them. They may not even differ greatly from your initial solutions. Often, however, they will be much better&mdash;and you&rsquo;ll never even have the chance to decide whether they&rsquo;re better or not if you take the first thing that comes into your head and run with it.</p>
<h4 align="left" id="Heading3">The Case for Delayed Gratification</h4>
<h4 id="Heading3">The Case for Delayed Gratification</h4>
<p>Once upon a time, I set out to read <i>Algorithms</i>, by Robert Sedgewick (Addison-Wesley), which turned out to be a wonderful, stimulating, and most useful book, one that I recommend highly. My story, however, involves only what happened in the first 12 pages, for it was in those pages that Sedgewick discussed Euclid&rsquo;s algorithm.</p>
@ -71,16 +74,20 @@
<p>You see, I fell victim to a common programming pitfall, the &ldquo;brute-force&rdquo; syndrome. The basis of this syndrome is that there are many problems that have obvious, brute-force solutions&mdash;with one small drawback. The drawback is that if you were to try to apply a brute-force solution by hand&mdash;that is, work a single problem out with pencil and paper or a calculator&mdash;it would generally require that you have the patience and discipline to work on the problem for approximately seven hundred years, not counting eating and sleeping, in order to get an answer. Finding all the prime numbers less than 1,000,000 is a good example; just divide each number up to 1,000,000 by every lesser number, and see what&rsquo;s left standing. For most of the history of humankind, people were forced to think of cleverer solutions, such as the Sieve of Eratosthenes (we&rsquo;d have been in big trouble if the ancient Greeks had had computers), mainly because after about five minutes of brute force-type work, people&rsquo;s attention gets diverted to other important matters, such as how far a paper airplane will fly from a second-story window.</p>
<p><br /></p>
<center>
<table border="1">
<tr>
<td><a href="09-07.html">Previous</a></td>
<td>
<a href="09-07.html">Previous</a>
</td>
<td><a href="index.html">Table of Contents</a></td>
<td>
<a href="index.html">Table of Contents</a>
</td>
<td><a href="10-02.html">Next</a></td>
<td>
<a href="10-02.html">Next</a>
</td>
</tr>
</table>
</center>