Archive for the ‘Mathematics’ Category

Books that Changed My Life

1. The study game: How to play and win with “Statement-PIE”, by Laia Hanau
The book that taught me how to study and take useful notes. I so wish I ran into it before my Junior year of college.

2. The Selfish Gene - Richard Dawkins
This shook up my thinking about more than just evolution, but how the world operates, and the deep mathematical foundations of growth, competition, and distributed problem-solving.

3. How to Solve It: A New Aspect of Mathematical Method - George Polya
Another book I wish I had read earlier in my academic career

4. How to Win Friends & Influence People - Dale Carnegie
Not at all what you might think. I read it because a professional magician recommended it in the strongest possible terms as an aid to performance, and darned if he wasn’t right. If I had to boil it down I’d say it makes the case for sincere empathy with the points of view of everyone you interact with, understanding your role as a bit-player in the story of their lives and getting what you want only through helping them get what they want (what ethicists might call treating people as ends and not means).

5. A Student’s Introduction to English Grammar - Huddleston & Pullum
In which I learned that nearly everything I’d been taught in English class about grammar was either wrong, or worse, nonsense.

6. Miss Manners’ Guide to Excruciatingly Correct Behavior, Freshly Updated - Judith Martin
In which I learned the central importance of politeness and etiquette in civilization. The book is highly entertaining, but fairly discursive since large portions consist of letters and answers, for a more concise statement of the central thesis, see her essay The World’s Oldest Virtue.

7. Historian As Detective - Robin Winks
The book which changed my college career and convinced me I wanted to be a historian.

8. The High Frontier: Human Colonies in Space - Gerard K O’Neill
The book which rescued me from wanting to be a historian, and probably prevented me from having a miserable existence as a History grad student at UC Berkeley, where I had been accepted into the PhD program, but where there was no funding available for the first year.

9. Descartes’ Error: Emotion, Reason, and the Human Brain - Antonio Damasio
The book which finally overthrew emotionless ratiocination as the top of my personal totem-pole of valuable mental qualities. It had been wobbling for a while. Hume certainly pushed it close to the edge, and Nietzche set it teetering, but it took Damasio’s to fully demonstrate through case studies how man cannot live by reason alone, and the model of reason being the core self while the visceral emotions and passions are intruding influences is empirically false. (Don’t worry Reason, I still love you, but you have to play nice with the other parts that go into making up my self, k?)

10. Free to Choose: A Personal Statement - Milton and Rose Friedman
The book that opened my eyes to the moral beauty of Capitalism. Given my origins and predilections, this was as big a brain-quake in its own way as The Selfish Gene.

11. The Substance of Style - Virginia Postrel
This helped me get over my reverse-snobbery in regard to style and design, as well as demolishing the place that Maslow’s hierarchy of needs occupied in my mental landscape.

Tuesday, December 18th, 2007

More Nerd Pr0n

SAGE: Open Source Mathematics Software

General and Advanced Pure and Applied Mathematics
Use SAGE for studying a huge range of mathematics, including algebra, calculus, elementary to very advanced number theory, cryptography, numerical computation, commutative algebra, group theory, combinatorics, graph theory, and exact linear algebra.

Recently I’ve found myself having to do real mathematics for the first time in many years. Surprisingly, despite being a programmer of actuarial math calculations, there’s not a lot of call for solving equations; the algorithms seldom change. This year, though, we’ve been rushing to implement changes for the Pension Protection Act which have made things very much more complicated and changed the way we calculate benefits in a big way. And what I’ve found is that I’d forgotten a lot of what I once knew.

So I decided to refresh my memory of a lot of the math I once studied as an undergrad, and, being a nerd one of the first things I did (after buying a couple of books) is to go fishing around for some software to play with. I was particularly interested in stuff that would let me model and graph equations, to try to regain some intuitive sense of their behavior, and I wanted something fairly easy to program. While it’s possible to write spreadsheets to validate the actuarial calculations I’ve been working on (and I have), it’s a bitch-and-a-half to read them again later or debug them. And if possible I wanted it to be open-source.

SAGE is what I found, and to my delight it’s yet another application that makes heavy use of Python. And, no, I didn’t go looking on a Python site to find these. Straight Google searches turned up both SAGE and the NLTK. It’s no coincidence that applications looking for a way to provide straight-forward but powerful programming tend to be built on or with Python, but it wasn’t one of my search criteria.

Again I installed it on both my Windows and Mac boxen, and again the Windows installation was a bit more straightforward, though this time not by much. In the case of Windows, you have to first install a VMWare player (free, but not open source) so that SAGE can run in its own virtual machine, and then you have to configure your firewall (I use ZoneAlarm) so that you can hit the web-server that SAGE runs (if you’re going to use the graphical interface, which is built as a web application). In the case of Mac, stuffit repeatedly had problems opening the .tar.gz file and I ended up just downloading and unzipping and untarring it from the command-line; after that running the setup.py script was straightforward.

Once you have it set up, it’s a breeze to use. You can run it from a command prompt (in fact, you have to start it that way), but the most convenient way to use it is to run a “notebook” sub-application that sets up a web server; surf to that server on your localhost and you get a graphical interface (web-page) that lets you create and manage “notebook” pages–basically persistable interactive sessions. You can even upload these sessions to public instances of SAGE running on the internet (for instance at the University of Washington math department); in fact a great way to explore SAGE is to surf there, create an account and start playing around.

Like most really powerful pieces of software, there is a learning curve to using SAGE, and it’s a steeper curve if you don’t know any Python, but a lot of the most basic stuff (assigning variables, solving simple equations) is pretty much exactly what you expect. Tip: Enter what you evaluate into the box on the screen (the boxes are for code). Shift+Enter to cause SAGE to evaluate what you’ve entered in the box and create a new empty box below, use your mouse to put the cursor in a box you’ve evaluated to edit it, and hover your mouse above the top border of a box until you see a bluish-purple line across the page then click to insert a new empty box prior to an existing box.

I’d also recommend starting with the SAGE Programming for Newbies link from the SAGE Documentation, even though it’s incomplete, rather than the SAGE Tutorial. The Tutorial jumps right into operator precedence, “rings” and other such minutiae without even stopping to explain what’s facing you at the prompt once you’ve completed the install. The SAGE Programming for Newbies is a much gentler introduction (and you can skip the parts that are too gentle, like “what is a computer”).

SAGE is also built to interface with other standard mathematics software packages, like Maple, Mathematica, MATLAB, and so forth, if that floats your boat. I don’t have access to them, but I can see how that would be useful.

What can I say? I find this kind of thing really, really cool.

Wednesday, November 7th, 2007