Functional Programming

Functional programming is the programming methodology that puts great emphasis on statelessness and religiously avoids side effects of one function in the evaluation any other function. Functions in this methodology are like mathematical functions. The conventional programming style, on the other hand, is considered “imperative” and uses states and their changes for accomplishing computing tasks.

Adapting this notion of functional programming may sound like regressing back to the pre-object-oriented age, and sacrificing all the advantages thereof. But there are practitioners, both in academia and in the industry, who strongly believe that functional languages are the only approach that ensures stability and robustness in financial and number crunching applications.

Functional languages, by definition, are stateless. They do everything through functions, which return results that are, well, functions of their arguments. This statelessness immediately makes the functions behave like their mathematical counterparts. Similarly, in a functional language, variable behave like mathematical variables rather than labels for memory locations. And a statement like x = x + 1 would make no sense. After all, it makes no sense in real life either.

This strong mathematical underpinning makes functional programming the darling of mathematicians. A piece of code written in a functional programming language is a set of declarations quite unlike a standard computer language such as C or C++, where the code represents a series of instructions for the computer. In other words, a functional language is declarative — its statements are mathematical declarations of facts and relationships, which is another reason why a statement like x = x + 1 would be illegal.

The declarative nature of the language makes it “lazy,” meaning that it computes a result only when we ask for it. (At least, that is the principle. In real life, full computational laziness may be difficult to achieve.) Computational laziness makes a functional programming language capable of handling many situations that would be impossible or exceedingly difficult for procedural languages. Users of Mathematica, which is a functional language for symbolic manipulation of mathematical equations, would immediately appreciate the advantages of computational laziness and other functional features such as its declarative nature. In Mathematica, we can carry out an operation like solving an equation for instance. Once that is done, we can add a few more constraints at the bottom of our notebook, scroll up to the command to solve the original equation and re-execute it, fully expecting the later constraints to be respected. They will be, because a statement appearing at a later part in the program listing is not some instruction to be carried out at a later point in a sequence. It is merely a mathematical declaration of truism, no matter where it appears.

This affinity of functional languages toward mathematics may appeal to quants as well, who are, after all, mathematicians of the applied kind. To see where the appeal stems from, let us consider a simple example of computing the factorial of an integer. In C or C++, we can write a factorial function either using a loop or making use of recursion. In a functional language, on the other hand, we merely restate the mathematical definition, using the syntax of the language we are working with. In mathematics, we define factorial as:

n! = left{begin{array}{ll}1 & n=1 \n times (n-1)! & textrm{Otherwise}end{array}right.

And in Haskell (a well known functional programming language), we can write:

bang 1 = 1
bang n = n * bang (n-1)

And expect to make the call bang 12 to get the factorial of 12.

This example may look artificially simple. But we can port even more complicated problems from mathematics directly to a functional language. For an example closer to home, let us consider a binomial pricing model, illustrating that the ease and elegance with which Haskell handles factorial do indeed extend to real-life quantitative finance problems as well.

Sections

Magic of Object Oriented Languages

Nowhere is the dominance of paradigms more obvious than in object oriented languages. Just take a look at the words that we use to describe some their features: polymorphism, inheritance, virtual, abstract, overloading — all of them normal (or near-normal) everyday words, but signifying notions and concepts quite far from their literal meaning. Yet, and here is the rub, their meaning in the computing context seems exquisitely appropriate. Is it a sign that we have taken these paradigms too far? Perhaps. After all, the “object” in object oriented programming is already an abstract paradigm, having nothing to do with “That Obscure Object of Desire,” for instance.

We do see the abstraction process running a bit wild in design patterns. When a pattern calls itself a visitor or a factory, it takes a geekily forgiving heart to grant the poetic license silently usurped. Design patterns, despite the liberties they take with our sensitivities, add enormous power to object oriented programming, which is already very powerful, with all the built in features like polymorphism, inheritance, overloading etc.

To someone with an exclusive background in sequential programming, all these features of object oriented languages may seem like pure magic. But most of the features are really extensions or variations on their sequential programming equivalents. A class is merely a structure, and can even be declared as such in C++. When you add a method in a class, you can imagine that the compiler is secretly adding a global function with an extra argument (the reference to the object) and a unique identifier (say, a hash value of the class name). Polymorphic functions also can be implemented by adding a hash value of the function signature to the function names, and putting them in the global scope.

The real value of the object oriented methodology is that it encourages good design. But good programming discipline goes beyond mere adaptation of an object oriented language, which is why my first C++ teacher said, “You can write bad Fortran in C++ if you really want. Just that you have to work a little harder to do it.”

For all their magical powers, the object oriented programming languages all suffer from some common weaknesses. One of their major disadvantages is, in fact, one of the basic design features of object oriented programming. Objects are memory locations containing data as laid down by the programmer (and the computer). Memory locations remember the state of the object — by design. What state an object is in determines what it does when a method is invoked. So object oriented approach is inherently stateful, if we can agree on what “state” means in the object oriented context.

But in a user interface, where we do not have much control over the sequence in which various steps are executed, we might get erroneous results in stateful programming depending on what step gets executed at a what point in time. Such considerations are especially important when we work with parallel computers in complex situations. One desirable property in such cases is that the functions return a number solely based on their arguments. This property, termed “purity,” is the basic design goal of most functional languages, although their architects will concede that most of them are not strictly “pure.”

Sections

Paradigms All the Way

Paradigms permeate almost all aspects of computing. Some of these paradigms are natural. For instance, it is natural to talk about an image or a song when we actually mean a JPEG or an MP3 file. File is already an abstraction evolved in the file-folder paradigm popularized in Windows systems. The underlying objects or streams are again abstractions for patterns of ones and zeros, which represent voltage levels in transistors, or spin states on a magnetic disk. There is an endless hierarchy of paradigms. Like the proverbial turtles that confounded Bertrand Russell (or was it Samuel Johnson?), it is paradigms all the way down.

Some paradigms have faded into the background although the terminology evolved from them lingers. The original paradigm for computer networks (and of the Internet) was a mesh of interconnections residing in the sky above. This view is more or less replaced by the World Wide Web residing on the ground at our level. But we still use the original paradigm whenever we say “download” or “upload.” The World Wide Web, by the way, is represented by the acronym WWW that figures in the name of all web sites. It is an acronym with the dubious distinction of being about the only one that takes us longer to say than what it stands for. But, getting back to our topic, paradigms are powerful and useful means to guide our interactions with unfamiliar systems and environments, especially in computers, which are strange and complicated beasts to begin with.

A basic computer processor is deceptively simple. It is a string of gates. A gate is a switch (more or less) made up of a small group of transistors. A 32 bit processor has 32 switches in an array. Each switch can be either off representing a zero, or on (one). And a processor can do only one function — add the contents of another array of gates (called a register) to itself. In other words, it can only “accumulate.”

In writing this last sentence, I have already started a process of abstraction. I wrote “contents,” thinking of the register as a container holding numbers. It is the power of multiple levels of abstraction, each of which is simple and obvious, but building on whatever comes before it, that makes a computer enormously powerful.

We can see abstractions, followed by the modularization of the abstracted concept, in every aspect of computing, both hardware and software. Groups of transistors become arrays of gates, and then processors, registers, cache or memory. Accumulations (additions) become all arithmetic operations, string manipulations, user interfaces, image and video editing and so on.

Another feature of computing that aids in the seemingly endless march of the Moore’s Law (which states that computers will double in their power every 18 months) is that each advance seems to fuel further advances, generating an explosive growth. The first compiler, for instance, was written in the primitive assembler level language. The second one was written using the first one and so on. Even in hardware development, one generation of computers become the tools in designing the next generation, stoking a seemingly inexorable cycle of development.

While this positive feedback in hardware and software is a good thing, the explosive nature of growth may take us in wrong directions, much like the strong grown in the credit market led to the banking collapses of 2008. Many computing experts now wonder whether the object oriented technology has been overplayed.

Sections

Zeros and Ones

Computers are notorious for their infuriatingly literal obedience. I am sure anyone who has ever worked with a computer has come across the lack of empathy on its part — it follows our instructions to the dot, yet ends up accomplishing something altogether different from what we intend. We have all been bitten in the rear end by this literal adherence to logic at the expense of commonsense. We can attribute at least some of the blame to our lack of understanding (yes, literal and complete understanding) of the paradigms used in computing.

Rich in paradigms, the field of computing has a strong influence in the way we think and view the world. If you don’t believe me, just look at the way we learn things these days. Do we learn anything now, or do we merely learn how to access information through browsing and searching? Even our arithmetic abilities have eroded along with the advent of calculators and spreadsheets. I remember the legends of great minds like Enrico Fermi, who estimated the power output of the first nuclear blast by floating a few pieces of scrap paper, and like Richard Feynman, who beat an abacus expert by doing binomial expansion. I wonder if the Fermis and Feynmans of our age would be able to pull those stunts without pulling out their pocket calculators.

Procedural programming, through its unwarranted reuse of mathematical symbols and patterns, has shaped the way we interact with our computers. The paradigm that has evolved is distinctly unmathematical. Functional programming represents a counter attack, a campaign to win our minds back from the damaging influences of the mathematical monstrosities of procedural languages. The success of this battle may depend more on might and momentum rather than truth and beauty. In our neck of the woods, this statement translates to a simple question: Can we find enough developers who can do functional programming? Or is it cheaper and more efficient to stick to procedural and object oriented methodologies?

Sections

Change the Facts

There is beauty in truth, and truth in beauty. Where does this link between truth and beauty come from? Of course, beauty is subjective, and truth is objective — or so we are told. It may be that we have evolved in accordance with the beautiful Darwinian principles to see perfection in absolute truth.

The beauty and perfection I’m thinking about are of a different kind — those of ideas and concepts. At times, you may get an idea so perfect and beautiful that you know it has to be true. This conviction of truth arising from beauty may be what made Einstein declare:

But this conviction about the veracity of a theory based on its perfection is hardly enough. Einstein’s genius really is in his philosophical tenacity, his willingness to push the idea beyond what is considered logical.

Let’s take an example. Let’s say you are in a cruising airplane. If you close the windows and somehow block out the engine noise, it will be impossible for you to tell whether you are moving or not. This inability, when translated to physics jargon, becomes a principle stating, “Physical laws are independent of the state of motion of the experimental system.”

The physical laws Einstein chose to look at were Maxwell’s equations of electromagnetism, which had the speed of light appearing in them. For them to be independent of (or covariant with, to be more precise) motion, Einstein postulated that the speed of light had to be a constant regardless of whether you were going toward it or away from it.

Now, I don’t know if you find that postulate particularly beautiful. But Einstein did, and decided to push it through all its illogical consequences. For it to be true, space has to contract and time had to dilate, and nothing could go faster than light. Einstein said, well, so be it. That is the philosophical conviction and tenacity that I wanted to talk about — the kind that gave us Special Relativity about a one hundred years ago.

Want to get to General Relativity from here? Simple, just find another beautiful truth. Here is one… If you have gone to Magic Mountain, you would know that you are weightless during a free fall (best tried on an empty stomach). Free fall is acceleration at 9.8 m/s/s (or 32 ft/s/s), and it nullifies gravity. So gravity is the same as acceleration — voila, another beautiful principle.

World line of airplanesIn order to make use of this principle, Einstein perhaps thought of it in pictures. What does acceleration mean? It is how fast the speed of something is changing. And what is speed? Think of something moving in a straight line — our cruising airplane, for instance, and call the line of flight the X-axis. We can visualize its speed by thinking of a time T-axis at right angles with the X-axis so that at time = 0, the airplane is at x = 0. At time t, it is at a point x = v.t, if it is moving with a speed v. So a line in the X-T plane (called the world line) represents the motion of the airplane. A faster airplane would have a shallower world line. An accelerating airplane, therefore, will have a curved world line, running from the slow world line to the fast one.

So acceleration is curvature in space-time. And so is gravity, being nothing but acceleration. (I can see my physicist friends cringe a bit, but it is essentially true — just that you straighten the world-line calling it a geodesic and attribute the curvature to space-time instead.)

The exact nature of the curvature and how to compute it, though beautiful in their own right, are mere details, as Einstein himself would have put it. After all, he wanted to know God’s thoughts, not the details.

Of Dreams and Memories

I recently watched The Diving Bell and the Butterfly (Le scaphandre et le papillon), which describes the tragic plight of the French journalist Jean-Dominique Bauby, who suffered a severe stroke and became “locked-in.” During my research days, I had worked a bit on rehabilitation systems for such locked-in patients, who have normal or near-normal cognitive activities but no motor control. In other words, their fully functional minds are locked in a useless body that affords them no means of communication with the external world. It is the solitary confinement of the highest order.

Locked-in condition is one of my secret fears; not so much for myself, but that someone close to me might have to go through it. My father suffered a stroke and was comatose for a month before he passed away, and I will always wonder whether he was locked-in. Did he feel pain and fear? So I Googled a bit to find out if stroke patients were conscious inside. I couldn’t find anything definitive. Then it occurred to me that perhaps these stroke patients were conscious, but didn’t remember it later on.

That thought brought me to one of my philosophical musings. What does it mean to say that something happened if you cannot remember it? Let’s say you had to go through a lot of pain for whatever reason. But you don’t remember it later. Did you really suffer? It is like a dream that you cannot remember. Did you really dream it?

Memory is an essential ingredient of reality, and of existence — which is probably why they can sell so many digital cameras and camcorders. When memories of good times fade in our busy minds, perhaps we feel bits of our existence melting away. So we take thousands of pictures and videos that we are too busy to look at later on.

But I wonder. When I die, my memories will die with me. Sure, those who are close to me will remember me for a while, but the memories that I hold on to right now, the things I have seen and experienced, will all disappear — like an uncertain dream that someone (perhaps a butterfly) dreamt and forgot. So what does it mean to say that I exist? Isn’t it all a dream?

Stinker Emails — A Primer

Email has revolutionized corporate communication in the last decade. Most of its impact has been positive. An email from the big boss to all@yourcompany, for instance, is a fair substitute for a general communication meeting. In smaller teams, email often saves meetings and increases productivity.

When compared to other modes of communication (telephone, voice mail etc.), email has a number of characteristics that make it particularly suited for corporate communication. It gives the sender the right amount of distance from the recipient to feel safe behind the keyboard. The sender gets enough time to polish the language and presentation. He has the option of sending the email multiple recipients at once. The net effect of these characteristics is that a normally timid soul may become a formidable email persona.

A normally aggressive soul, on the other hand, may become an obnoxious sender of what are known as stinkers. Stinkers are emails that are meant to inflict humiliation.

Given the importance of email communication these days, you may find yourself seduced by the dark allure of stinkers. If you do, here are the first steps in mastering the art of crafting a stinker. The trick is to develop a holier-than-thou attitude and assume a moral high ground. For instance, suppose you are upset with a team for their shoddy work, and want to highlight the fact to them (and to a few key persons in the organization, of course). A novice may be tempted to write something like, “You and your team don’t know squat.” Resist that temptation, and hold that rookie email. Far more satisfying is to compose it as, “I will be happy to sit down with you and your team and share our expertise.” This craftier composition also subtly shows off your superior knowledge.

Emails can be even more subtle. For instance, you can sweetly counsel your boss regarding some issue as, “No point in rushing in where angels fear to tread,” and have the secret pleasure that you managed to call him a fool to his face!

Counter stinkers are doubly sweet. While engaging in an email duel, your best hope is to discover a factual inaccuracy in the stinker. Although you are honor-bound to respond to a stinker, silence also can be an effective response. It sends a signal that you either found the stinker too unimportant to respond to, or, worse, you accidentally deleted it without reading it.

Beware of stinker traps. You may get an email inviting you to work on a problem with a generous offer to help. Say you take the bait and request help. The next email (copied to practically everybody on earth) may read something like, “If you bothered to read the previous message,” (referring to an email sent ten days ago to 17 others and two email groups) “you would know that…” Note how easy it is to imply that you don’t know what you are supposed to, and that you are in the habit of ignoring important messages.

We have no sure defense against stinker traps other than knowing the sender. If a sender is known for his stinker-happy disposition, treat all his sweet overtures with suspicion. It is unlikely that he has had a change of heart and decided to treat you civilly. Much more likely is that he is setting you up for something that he will enjoy rather more than you!

At the end of the day, don’t worry too much about stinkers if you do find yourself at the receiving end. Keep a smile on your face and recognize the stinkers for what they are — ego trips.

If you enjoyed this post, I’m sure you will also like:

  1. An Office Survival Guide
  2. La Sophistication

How to save a string to a local file in PHP?

This post is the second one in my geek series.

While programming my Theme Tweaker, I came across this problem. I had a string on my server in my php program (the tweaked stylesheet, in fact), and I wanted to give the user the option of saving it to a file his computer. I would’ve thought this was a common problem, and all common problems can be solved by Googling. But, lo and behold, I just couldn’t find a satisfactory solution. I found my own, and thought I would share it here, for the benefit of all the future Googlers yet to come and go.

Before we go into the solution, let’s understand what the problem is. The problem is in the division of labor between two computers — one is the server, where your WordPress and PHP are running; the other is the client’s computer where the viewing is taking place. The string we are talking about is on the server. We want to save it in a file on the client’s computer. The only way to do it is by serving the string as an html reply.

At first glance, this doesn’t look like a major problem. After all, servers regularly send strings and data to clients — that’s how we see anything on the the browser, including what you are reading. If it was just any PHP program that wants to save the string, it wouldn’t be a problem. You could just dump the string into a file on the server and serve the file.

But what do you do if you don’t want to give the whole world a way of dumping strings to files on your server? Well, you could do something like this:

<?php
header('Content-Disposition: attachment; filename="style.css"');
header("Content-Transfer-Encoding: ascii");
header('Expires: 0');
header('Pragma: no-cache');
print $stylestr ;
?>

So, just put this code in your foo.php that computes the string $stylestr and you are done. But our trouble is that we are working in the WordPress plugin framework, and cannot use the header() calls. When you try to do that, you will get the error message saying that header is already done dude. For this problem, I found the ingenious solution in one of the plugins that I use. Forgot which one, but I guess it is a common technique. The solution is to define an empty iFrame and set its source to what the PHP function would write. Since iFrame expects a full HTML source, you are allowed (in fact, obliged) to give the header() directives. The code snippet looks something like:

<iframe id="saveCSS" src="about:blank" style="visibility:hidden;border:none;height:1em;width:1px;"></iframe>
<script type="text/javascript">
var fram = document.getElementById("saveCSS");
<?php echo 'fram.src = "' . $styleurl .'"' ;
?>

Now the question is, what should the source be? In other words, what is $styleurl? Clearly, it is not going to be a static file on your server. And the purpose of this post is to show that it doesn’t have to be a file on the server at all. It is a two-part answer. You have to remember that you are working within the WordPress framework, and you cannot make standalone php files. The only thing you can do is to add arguments to the existing php files, or the plugins you have created. So you first make a submit button as follows:

<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]?>">
<div class="submit">
<input type="submit" name="saveCSS" title="Download the tweaked stylesheet to your computer" value="Download Stylesheet" />
</div>

Note that the name attribute of the button is “saveCSS.” Now, in the part of the code that handles submits, you do something like:

<?php
if (isset($_POST['saveCSS']))
$styleurl = get_option('siteurl') . '/' . "/wp-admin/themes.php?page=theme-tweaker.php&save" ;

?>

This is the $styleurl that you would give as the source of your iFrame, fram. Note that it is the same as your pluging page URL, except that you managed to add “?save” at the end of it. The next trick is to capture that argument and handle it. For that, you use the WordPress API function, add_action as:

<?php
if (isset($_GET['save'] ))
add_action('init', array(&$thmTwk, 'saveCSS'));
else
remove_action('init', array(&$thmTwk, 'saveCSS'));
?>

This adds a function saveCSS to the init part of your plugin. Now you have to define this function:

<?php
function saveCSS() {
header('Content-Disposition: attachment; filename="style.css"');
header("Content-Transfer-Encoding: ascii");
header('Expires: 0');
header('Pragma: no-cache');
$stylestr = "Whatever string you want to save";
ob_start() ;
print $stylestr ;
ob_end_flush() ;
die() ;
}
?>

Now we are almost home free. The only thing to understand is that you do need the die(). If your function doesn’t die, it will spew out the rest of the WordPress generated stuff into your save file, appending it to your string $stylestr.

It may look complicated. Well, I guess it is a bit complicated, but once you implement it and get it running, you can (and do) forget about it. At least, I do. That’s why I posted it here, so that the next time I need to do it, I can look it up.

Humboldt’s Gift by Saul Bellow

I first found this modern-day classic in my father’s collection some thirty years ago, which meant that he bought it right around the time it was published. Looking back at it now, and after having read the book, as usual, many times over, I am surprised that he had actually read it. May be I am underestimating him in my colossal and unwarranted arrogance, but I just cannot see how he could have followed the book. Even after having lived in the USA for half a dozen years, and read more philosophy than is good for me, I cannot keep up with the cultural references and the pace of Charlie Citrine’s mind through its intellectual twists and turns. Did my father actually read it? I wish I could ask him.

Perhaps that is the point of this book, as it is with most classics — the irreversibility and finality of death. Or may be it is my jaundiced vision painting everything yellow. But Bellow does rage against this finality of death (just like most religions do); he comically postulates that it is our metaphysical denial that hides the immortal souls watching over us. Perhaps he is right; it certainly is comforting to believe it.

There is always an element of parternality in every mentor-protégé relationship. (Forgive me, I know it is a sexist view — why not maternality?) But I probably started this post with the memories of my father because of this perceived element in the Von Humboldt Fleischer – Charlie Citrine relationship, complete with the associated feelings of guilt and remorse on the choices that had to be made.

As a book, Humboldt’s Gift is a veritable tour de force. It is a blinding blitz of erudition and wisdom, coming at you at a pace and intensity that is hard to stand up to. It talks about the painted veil, Maya, the many colored glasses staining the white radiance of eternity, and Hegel’s phenomenology as though they are like coffee and cheerios. To me, this dazzling display of intellectual fireworks is unsettling. I get a glimpse of the enormity of what is left to know, and the paucity of time left to learn it, and I worry. It is the ultimate Catch-22 — by the time you figure it all out, it is time to go, and the knowledge is useless. Perhaps knowledge has always been useless in that sense, but it is still a lot of fun to figure things out.

The book is a commentary on American materialism and the futility of idealism in our modern times. It is also about the small things where a heart finds fulfillment. Here is the setting of the story in a nutshell. Charlie Citrine, a protégé to Von Humboldt Fleischer, makes it big in his literary career. Fleischer himself, full of grandiose schemes for a cultural renaissance in America, dies a failure. Charlie’s success comes at its usual price. In an ugly divorce, his vulturous ex-wife, Denise, tries to milk him for every penny he’s worth. His mercenary mistress and a woman-and-a-half, Renata, targets his riches from other angles. Then there is the boisterous Cantabile who is ultimately harmless, and the affable and classy Thaxter who is much more damaging. The rest of the story follows some predictable, and some surprising twists. Storylines are something I stay away from in my reviews, for I don’t want to be posting spoilers.

I am sure there is a name for this style of narration that jumps back and forth in time with no regard to chronology. I first noticed it in Catch-22 and recently in Arundhati Roy’s God of Small Things. It always fills me with a kind of awe because the writer has the whole story in mind, and is revealing aspects of it at will. It is like showing different projections of a complex object. This style is particularly suited for Humboldt’s Gift, because it is a complex object like a huge diamond, and the different projections show brilliant flashes of insights. Staining the white radiance of eternity, of course.

To say that Humboldt’s Gift is a masterpiece is like saying that sugar is sweet. It goes without saying. I will read this book many more times in the future because of its educational values (and because I love the reader in my audiobook edition). I would not necessarily recommend the book to others though. I think it takes a peculiar mind, one that finds sanity only in insane gibberish, and sees unreality in all the painted veils of reality, to appreciate this book.

In short, you have to be a bit cuckoo to like it. But, by the same convoluted logic, this negative recommendation is perhaps the strongest endorsement of all. So here goes… Don’t read it. I forbid it!

Bushisms

Bush has just left the building. Perhaps the world will be a kinder, gentler place now. But it will certainly be a less funny place. For life is stranger than fiction, and Bush was funnier than any stand-up comedian. Jon Stewart is going to miss him. So will I.

Self Image

“They misunderestimated me.”
Bentonville, Arkansas, 6 November, 2000

“I know what I believe. I will continue to articulate what I believe and what I believe – I believe what I believe is right.”
Rome, 22 July, 2001

“There’s an old saying in Tennessee – I know it’s in Texas, probably in Tennessee – that says, fool me once, shame on… shame on you. Fool me – you can’t get fooled again.”
Nashville, Tennessee, 17 September, 2002

“There’s no question that the minute I got elected, the storm clouds on the horizon were getting nearly directly overhead.”
Washington DC, 11 May, 2001

“I want to thank my friend, Senator Bill Frist, for joining us today. He married a Texas girl, I want you to know. Karyn is with us. A West Texas girl, just like me.”
Nashville, Tennessee, 27 May, 2004

Statemanship

“For a century and a half now, America and Japan have formed one of the great and enduring alliances of modern times.”
Tokyo, 18 February, 2002

“The war on terror involves Saddam Hussein because of the nature of Saddam Hussein, the history of Saddam Hussein, and his willingness to terrorise himself.”
Grand Rapids, Michigan, 29 January, 2003

“Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.”
Washington DC, 5 August, 2004

“I think war is a dangerous place.”
Washington DC, 7 May, 2003

“The ambassador and the general were briefing me on the – the vast majority of Iraqis want to live in a peaceful, free world. And we will find these people and we will bring them to justice.”
Washington DC, 27 October, 2003

“Free societies are hopeful societies. And free societies will be allies against these hateful few who have no conscience, who kill at the whim of a hat.”
Washington DC, 17 September, 2004

“You know, one of the hardest parts of my job is to connect Iraq to the war on terror.”
CBS News, Washington DC, 6 September, 2006

Education

“Rarely is the question asked: Is our children learning?”
Florence, South Carolina, 11 January, 2000

“Reading is the basics for all learning.”
Reston, Virginia, 28 March, 2000

“As governor of Texas, I have set high standards for our public schools, and I have met those standards.”
CNN, 30 August, 2000

“You teach a child to read, and he or her will be able to pass a literacy test.”
Townsend, Tennessee, 21 February, 2001

Economics

“I understand small business growth. I was one.”
New York Daily News, 19 February, 2000

“It’s clearly a budget. It’s got a lot of numbers in it.”
Reuters, 5 May, 2000

“I do remain confident in Linda. She’ll make a fine Labour Secretary. From what I’ve read in the press accounts, she’s perfectly qualified.”
Austin, Texas, 8 January, 2001

“First, let me make it very clear, poor people aren’t necessarily killers. Just because you happen to be not rich doesn’t mean you’re willing to kill.”
Washington DC, 19 May, 2003

Health

“I don’t think we need to be subliminable about the differences between our views on prescription drugs.”
Orlando, Florida, 12 September, 2000

“Too many good docs are getting out of the business. Too many OB/GYN’s aren’t able to practice their love with women all across the country.”
Poplar Bluff, Missouri, 6 September, 2004

Internet

“Will the highways on the internet become more few?”
Concord, New Hampshire, 29 January, 2000

“It would be a mistake for the United States Senate to allow any kind of human cloning to come out of that chamber.”
Washington DC, 10 April, 2002

“Information is moving. You know, nightly news is one way, of course, but it’s also moving through the blogosphere and through the Internets.”
Washington DC, 2 May, 2007

What the…?

“I know the human being and fish can coexist peacefully.”
Saginaw, Michigan, 29 September, 2000

“Families is where our nation finds hope, where wings take dream.”
LaCrosse, Wisconsin, 18 October, 2000

“Those who enter the country illegally violate the law.”
Tucson, Arizona, 28 November, 2005

“That’s George Washington, the first president, of course. The interesting thing about him is that I read three – three or four books about him last year. Isn’t that interesting?”
Speaking to reporter Kai Diekmann, Washington DC, 5 May, 2006

Leadership

“I have a different vision of leadership. A leadership is someone who brings people together.”
Bartlett, Tennessee, 18 August, 2000

“I’m the decider, and I decide what is best.”
Washington DC, 18 April, 2006

“And truth of the matter is, a lot of reports in Washington are never read by anybody. To show you how important this one is, I read it, and [Tony Blair] read it.”
On the publication of the Baker-Hamilton Report, Washington DC, 7 December, 2006

“All I can tell you is when the governor calls, I answer his phone.”
San Diego, California, 25 October, 2007

Famous Last Words

“I’ll be long gone before some smart person ever figures out what happened inside this Oval Office.”
Washington DC, 12 May, 2008