The experience of learning vim commands

There seem to be two different compartments in my brain for clusters of vim commands. One is verbal. I learned ddp to reverse two lines and xp to reverse two characters. When I did so I learned them first as “words”, and that’s how they remain in my head. I can access them fast as words, almost by reflex.

The other compartment is accretionary. I never thought of ggVG (for selecting the whole contents of a file) as a command cluster until I saw it in print, but when I did I recognized it at once as something I type all the time.

It seems most effective to let my highly verbal tendencies consolidate what I have gradually learned through accretion.

Tales from Calculus III

Twenty-five years after I took Calculus II, I am enrolled in Calculus III at City College. I’ve heard from many students that the instructor is one of the best in the program — he is leading one of ten sections this semester and I drew him by chance. Below are some observations recently sent to a few correspondents.

The instructor has said firmly:

The more problems you do, the more shortcuts you will figure out for yourself. The only way you can do this is to do a ridiculous number of problems. You must work almost every day on this stuff, for a couple of hours a day.

Homework is not graded, but we are supposed to keep a special notebook in which “assignments”, meaning hard problems apart from the homework proper, are to be done — and those he will examine on occasion. If we’ve done them. On Thursday morning we were supposed to visit his office before class to show him that we do, indeed, possess such a notebook. The point was to encourage students to make the effort to identify a notebook for those problems early in the term. I was the only one who came, though, and I’m going to be using LaTeX, with his blessing.

The assignment sheet for the semester went up just before class on Tuesday and he announced it in class and told us to do the first three sections, 23 problems in all, mostly vectors, which are not well handled in LaTeX. I spent six hours doing the first assignment and got through 19 of the 23; the last four remain undone several days later, despite my good intentions. On the day they were official due, several of the students were still asking him when he would post the problem sets.

This instructor says he is going at solving problems but his memory is terrible, so he has never learned LaTeX. Instead, he uses MathType, which provides a GUI. It’s a pity, because a math course is really the ideal place to introduce LaTeX and guide students in elementary use of it.

The instructor made a pitch to interest me in abstract algebra. I must admit, what he showed me seemed quite interesting and intuitively clear. I have yet to understand what the place of math will ultimately be in my life — I only know I am not yet done with this question.

I am the only student in the class of around 30 who is taking notes on a computer. Some students do open up a computer briefly, but it seems to have something to do with messaging. I ran into a little trouble today with LaTeX because I had anticipated that we was going to introduce determinants, which I haven’t learned how to handle yet (actually it’s not hard, I now see — the amsmath package has everything I’m likely to need).


A correspondent, seeing the comment about doing “a ridiculous number of problems,” replied:

That sounds reasonable to me. The “problem” is that the advent of software like Wolfram|Alpha removes any real usefulness from this kind of skill … it is now a purely aesthetic amusement.

But I disagree. Skill brings understanding, and understanding leads to insight into other things whose existence you can predict but whose content and requirements you can’t easily anticipate. Much of the mathematical and theoretical component of the computer science education at City College consists of exposure to proofs, or to things like proofs such as building a linked list in C++, and so on. It is not as though we will ever need to build our own linked lists or derive Chebyshev’s inequality. But struggling to produce them myself helps me to understand and retain them, and there is considerable value in that.

QuickTime Pro easily concatenates .m4v video files

The only form of strenuous indoor exercise I really like is using an elliptical machine, which is ghastly boring compared to Gotham Breakneck outdoors. I can watch a movie or TV show on Netflix, but the kind I prefer for entertainment — at a thoughtful speed, usually — lose my interest when I’m exercising. Only dramas filled with action or, better still, fast-moving deceit and intrigue can hold my attention. And there are only so many of those that are good enough to watch.

So I’ve been watching math videos, some of which are really wonderful. I find they stimulate me to considerable exertion on the machine. The problem is that they’re rarely as long as my 40-60 minute elliptical sessions. Some are as short as 10 minutes.

Using QuickTime Pro, I can combine any number of .m4v files into one and save the result with no loss of quality. This has completely solved the problem.


I have v. 7.7, which I am using on Mac OS 10.5.8, an installation two operating-system versions old but totally adequate to my needs.

Finally making progress with Vim

Now that the semester is over, I am finally in the mood to risk using the text editor Vim for various tasks that are important to me, and so to have a chance to learn the thing for real.

Vim enthusiasts often mention the lack of hand movement as one of the attractions of this tool. I am not attracted by that, though. I prefer a certain amount of bodily entropy when studying, and the arm movements of typing are part of that. And I value the kind of memory that comes from involving my body in thinking. That is why I use standing desks (various home-made ones — I’m unwilling to pay the exorbitant prices demanded in the marketplace). That is why I still use paper books, whose physical shape serves as a guide to my recollection of what I’ve read. The minimal hand- and arm-movements needed for Vim are helpful to touch-typing, but I don’t place great store by them in themselves.

What I am really enjoying about Vim today is the need to think, even to calculate a little before doing anything other than actually typing text. It reminds me of learning to use a scythe when I was about 14. Naturally, my inclination was just to slash at the grass. But an adult watching me, one Pierce Skinner, came over and suggested that I pause for half a second before each swing of the scythe, to consider what I was about to do. My scything improved enormously and the act of fore-thinking felt very good. I am experiencing something similar right now with Vim and enjoying it.


I see Pierce Skinner is now a practicing clinical psychologist in New Jersey.

Leibniz’s theodicy, dynamic programming, and strategies for learning

Leibniz, in his Essais de Théodicée (1710, I), says:

Il demeure toujours vrai … qu’il y a une infinité de Mondes possibles, dont il faut que Dieu ait choisi le meilleur; puisqu’il ne fait rien sans agir suivant la suprême Raison.

[It always remains true ... that there are an infinity of possible Worlds, from which it must be that God would have chosen the best, since he does nothing without acting in accordance with supreme Reason.]

Leibniz has been roundly ridiculed for this sentiment. Apparently he rejects the desirability of finding optimal subproblems, in the logical sense, within moral philosophy. Coming from the coiner of the term differential and what remains (300 years on) its modern symbol, this seems inconsistent. Then again, maybe it is Leibniz’s detractors who fail to see the possibility of optimal subproblems in the order of the universe, because they are distracted by the immediacy of human suffering. Perhaps Leibniz thinks that all this really does even out algorithmically.

The question of efficiency strategies is much on my mind these days, as I have been trying to master the units on dynamic programming and greedy algorithms before tomorrow’s final exam in Algorithms. There has been ample time, but somehow I never use time as effectively as I might, and I wonder if the subject itself does not contain lessons for me, going forward.

In the past year, calendar 2011, I have made headway clearing my desk of obligations from my past academic life. My mind is clearer, too. Though not as clear as I wish, since it has been cluttered with the new learning I have taken in during two semesters of Data Structures and Algorithms this year, the heart of the mathematical poetry that underlies computer science. It has been a good year and I think it will remain a memorable one for me, if perhaps not the best of all possible years.

I use the word “cluttered” advisedly above, since it seems to me that while I am perhaps able to study with preplanned efficiency, my mind does not learn that way itself. In particular, my mind seems to require a distinctly inefficient period of “shaking down” what I have learned before it displays any comfort with new learning, to say nothing of mastery. A really efficient learning strategy would include provision for that process.

Neuro-plasticity and strategies for improving cognitive functioning: “The Brain Fitness Program” (2007)

The PBS documentary “The Brain Fitness Program”, from the year 2007, describes conclusions from the past several decades about neuro-plasticity — the ability of the brain to reorganize itself and improve its functioning and efficiency. The main researcher whose research is highlighted is the psychologist Donald O. Hebb (1904–85), and there is also material about the rehabilitation clinic of Dr. Edward Taub. The documentary consists in large part of interview snippets with the neuroscientists William Jagust, Arthur Toga, Michael Merzenich, Jason Karlawish, and the authors Sharon Begley, Shannon Moffett, and Norman Doige, interspersed with animations and other illustrations.

The documentary is suitable for general viewers although it seems to be directed especially at older people concerned about avoiding cognitive impairment. To speak harshly, I found it motivational at the expense of concrete documentation. But it was interesting and there were two summary lists at the end that were relatively useful:

“Tenets”:

  • Time 44:03. “Change can occur only when the brain is in the mood.” Paying attention and being alert and ready for action.
  • 45:03. “Change strengthens connection between neurons engaged at the same time.” Trying something repeatedly allows the brain to selectively remember the most effective combinations of small variables contributing to the more effective tries.
  • 46:02. “Neurons that fire together wire together.” Much of the brain’s functioning involves prediction, and the brain improves its ability to predict based on observation of things that reliably occur in series.
  • 47:45. “Initial changes are just temporary.” The possibility of changing the brain’s structure increases when activities are repeated over time.
  • 48:41. “Brain plasticity is a two-way street and we can either drive brain change positively or negatively.” Malleability can mean vulnerability, as well as the flexibility to change. Persistent bad habits and environmental interference are examples of negative effects.
  • 49:52. “Memory is crucial for learning.” The brain maintains a model in memory of what it is trying to do and evaluates the results of repeated attempts to meet that model.
  • 50:54. “Motivation is a key factor in brain plasticity.” Acquisition of new skills is the primary means for developing the adult brain.

“Tips for optimal plasticity”:

  • 55:30. “You need your heart to be decent shape.”
  • 55:40. “Training should be incremental.”
  • 55:45. “Training needs to be taxing and systematically improving.”
  • 55:57. “It should be interesting to engage the motivation circuits in your brain.”

(“The Brain Fitness Program”. Directed by Eli Brown; written and produced by Lennlee Keep. Santa Fé Productions, Inc., 2007. About 58 minutes; the DVD contains a number of interesting outtake scenes, as well.)

Code-switching between comfortable cognitive aptitudes and the main aptitudes used in math and coding

I continue to reflect on different kinds of thinking I rely on in my current activities.

My study of and research on Chinese involves a kind of technical thinking about abstract linguistic categories, but those categories and the evidence for them require doing long stretches of basically mechanical, clerical work — collation of field notes or minute philological details — the aptitude for which the people at the Johnson O’Connor foundation call “graphoria”. In this work one does relatively little interesting original thinking, except to the extent that one is aware of the higher-level problems to which the mechanical work and the minute details will contribute. And there is also something meditative and satisfying about paying close attention to minute details for a long stretch of time, so the work by no means simply mindless rote action. Working with Chinese words, spoken and written, in particular, seems to stir my musical and graphic-analytical proclivities, and I have the sensation that Chinese grammar moves a kind of structural thinking, as well. So the mechanical work is not without its interest and satisfactions, though those do not compare to the kind of thinking one can eventually do when one has the necessary data assembled for actually attacking a problem in a unified way. I often think that one of the things that makes formal linguistics so uninteresting is that its practitioners seem to spend a lot of time avoiding actually handling data at length.

In programming and mathematics, however, neither the graphoria nor any aspect of language or music aptitudes seem to be directly helpful. In fact, I often find that my motivation to turn my mind to non-linguistic quantitative thinking is hindered by whatever time I have recently spent on mechanical or linguistic work, because those are inevitably easier to pick up quickly than math or a complex programming task. I experience a wrenching “code-switching” moment when I have to do this. I have still to find a good way to get my mind into the mood for math quickly if I have been doing those “lower”-level tasks. The only effective way I have found so far is to put clerical tasks completely away from myself for weeks at a time, but in real life it is not possible to do that, and certainly not for the coming half year, until my last two or three book projects are done.

I get a little help from using a timer to force myself to to spend some period of time working concentratedly on one type of task before switching to another. But the code-switching remains jarring even with the pressure of the timer to aid the switch. I wonder daily if overcoming code-switching is after all simply a matter of patience and concentration.