Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Monday, February 21, 2011

On Dysons and other expensive vacuum cleaners

Thought this was interesting: expensive vacuum cleaners (like Dysons) are becoming a kind of status symbol.

"View of vacuum cleaners as status symbols is picking up"

I must confess to being tempted to get a Dyson – I guess the subtle hype was getting to me.

I ended up not getting a Dyson but getting a replacement hose for our old vacuum.

Monday, February 14, 2011

Proof of Fermat's Last Theorem

It's cool to look over Andrew Wiles' 100-page proof of Fermat's Last Theorem (i.e., prove that no three positive integers a, b, and c can satisfy the equation a^n + b^n = c^n for any integer value of n greater than two).

For mere mortals like myself, the Wikipedia article is cool as well. Obviously, the map between R and T is an isomorphism if and only if two abelian groups occurring in the theory are finite and have the same cardinality.

Wednesday, February 09, 2011

Music that doesn't give me headaches

Usually when I listen to music while reading or doing something requiring concentration, I get a bit of a headache. However, I have found 2 CDs that do not  give me a headache when I am doing something else.

One of them is the transcriptions of Bach organ pieces for piano I mentioned earlier.

The other is a 2-CD set called Glorious Pipes, which is basically a bunch of famous organ pieces. It's good to turn up the volume when listening to this one.

It's all good stuff, but I find that I particularly enjoy the last two pieces, written by Olivier Messiaen, who was a major composer of the 20C. He found birdsong fascinating and incorporated it into his works. I hadn't heard of him before.

Sunday, February 06, 2011

Kindle Text-to-Speech

My new favorite feature of the Kindle is its text-to-speech. I took the bus/ferry to Vancouver yesterday and listening to a book on the Kindle was a great way to pass the time – especially on the hour-long bus/train rides, on which reading can give one a headache.

Another thing I like about the Kindle is that if you want to see the dictionary definition of a word, you just move the cursor beside the word and a definition pops up.

Thursday, February 03, 2011

An Ultracompact Abridgement of "Programming Pearls"

Below is an extreme abridgment of Jon Bentley's popular algorithms book, Programming Pearls. A sentence has been selected from each of its 15 chapters. Interested readers are referred to Bentley's original 173-page work.

Programming folklore and theory abound with time-space tradeoffs; it has been my experience more frequently, though, that reducing a program's space requirements also reduces its run time. Binary search in a sorted table is remarkably efficient and can be used in main memory or on disk; its only drawback is that the entire table must be known and sorted in advance. Let the data structure the program: data can structure a program by replacing complicated code with an appropriate data structure. Deciding which assertions to include in real software is an art that comes only with practice. And write automated tests: the tests would have been dreadfully boring (and therefore error prone) by hand, but they use an insignificant amount of computer time.

When performance problems can't be sidestepped, thinking about design levels can help focus a programmer's effort. And the following reminders can be helpful in making back-of-the-envelope calculations: two answers are better than one; do quick checks; use rules of thumb. Important algorithm design techniques include saving state to avoid recomputation, preprocessing information into data structures, and divide-and-conquer. Code tuning locates the expensive parts of an existing program and then makes little changes to improve its speed; for example, exploiting common cases, exploiting an algebraic identity, and collapsing a procedure hierarchy. We then survey a few important techniques for reducing space: recomputing, sparse structures, information theory, and allocation policies.

The C library qsort is easy and relatively fast; it is slower than handmade Quicksorts only because its general and flexible interface uses a function call for each comparison. Explore the design space: knowledge of the literature is invaluable at this stage of the design process. The importance of space: finely tuned linked lists do half the work of arrays but take twice the time. Why? Arrays use half as much memory per element, and access memory sequentially. Heaps are a data structure that we use for sorting and priority queues. Finally, we examine important data structures used for representing strings: hashing, balanced trees, and suffix arrays.

Wednesday, February 02, 2011

An Ultracompact Abridgement of "Aristotle: The Desire to Understand"

Below is an extreme abridgment of Jonathan Lear's engaging book on Aristotle's thought: Aristotle: The Desire to Understand. A sentence has been selected from each of its 29 sections. Interested readers are referred to Lear's lucid 352-page work.

The aim of this book is to come to a deeper understanding of Aristotle's claim that all men by their nature desire to know. Nature is a principle or cause of change or rest in that to which it primarily belongs. We do not think we understand something, Aristotle says, until we have grasped the why of it. He thinks there are four ways in which we cite the cause of a thing: the matter, the form, the primary source of the change, and the end or that for the sake of which something is done. Aristotle believes that the organization and development of animals manifests a certain rationality (though of course he does not understand the basis for this rationality).

For change to be possible, there must be something which exists before the change which has the potentiality to become what emerges in the change. If one needs to specify a distinct cause of a change, as Aristotle does, one must specify a thing, a substance, and not an event. Aristotle argues that if we are to understand space, time, and matter, we must understand the infinite. Aristotle develops his theory of the inifinite in order to account for three apparently distinct phenomena: the infinite divisibility of magnitudes, the infinity of numbers, and the infinity of time. It is worth seeing how the developed theory copes with one of the great challenges to the possibility of change: Zeno's paradox of the arrow.

Aristotle thinks he can give an adequate account of soul and its relation to body by relying on his distinction between form and matter. Aristotle's strategy is to shed light on the form of living organisms by a study of their characteristic activities, most notably perception and movement: for a sense faculty to take on the sensible form is for it to become like the perceptible object with respect to sensible form. He argues that there must be a special faculty of mind which is able to grasp essences. Active Mind is the prior actuality needed to explain how thinking occurs in the individual; ultimately, another way to describe this active thinking is to call it ‘God.’ Aristotle's theory of deliberation (bouleusis) is a theory of the transmission of desire.

The point of the Nicomachean Ethics is not to persuade us to be good or to show us how to behave well in the various circumstances in life: it is to give people who are already leading a happy, virtuous life insight into the nature of their own souls. Only in the peculiar activities of human life will we discover the peculiarly human ability to be happy. The organization of desire which enables man to live a truly happy life Aristotle calls virtue. One form of failure particularly fascinated him: that in which a man decides that a certain course of action  would be best for him, and then acts against his own judgement – in other words, incontinence. One of the high-water marks of ethical activity is a particular exercise of human freedom: that in which a person who has absorbed ethical values consciously acknowledges and endorses his own character. The reason the Politics follows almost inevitably from the Ethics is that man is not an animal for whom the good life comes easily; laws are needed.

Man is not only a political animal; he also has within his breast the desire to understand. One of Aristotle's greatest intellectual achievements, and one for which he is rightly famous, is the discovery of formal logic. And Aristotle suggests that what is needed for mathematics to be both true and knowable is for there to be a bridge between the physical world and the (fictitious) world of mathematical objects.

Rather than focussing solely on particular aspects of reality – say, the heavens or living organisms, as the sciences of astronomy and biology do – man can also abstract from all the particular properties which make things they are and consider them merely as existing things (being as being). The most certain principle of being is that a property cannot both belong and not belong to a subject at the same time and in the same respect – this principle is commonly known as the principle of non-contradiction.

Metaphysics VII represents Aristotle's mature thoughts on substance, yet understanding what he says there is extraordinarily difficult.  His task is to find a candidate for substance which will satisfy both these beliefs: that the world is ultimately intelligible, and that reality forms a hierarchy. Aristotle's world needs a mind that is actively thinking primary substance: God does not intervene in the world, but the world can be conceived as an expression of desire for God. Man is a creature who bridges the gap between the divine and the natural world, and Aristotle commends the contemplative life above all others.