Most folks who use computers a lot are aware of the difference between word processors and text editors. Text editors represent the data as pure characters — no formatting, no margins, no bold or italic.  The better text editors (Notepad++ is my current favorite) have lots of useful features, and typically can handle Unicode and Asian fonts, but when you save a document, what you’re really saving is a long list of binary numbers, each representing one character, and that’s all.  Word processors are different: in addition to the encoded characters, there are codes to indicate formatting, rendering of non-text elements like images or equations, and lots of other things that you usually can’t decipher because saved documents are compressed using proprietary algorithms. Open a MS Word doc as text, you get gibberish.

It’s often useful to be able to write programs that manipulate text. Python is ideal for applications that only need to read a text file, process it, and write it back out. But if the user needs to be able to interact with the program, it’s usually desirable to have a graphical interface, so Visual Basic.NET is the environment of choice. Among the available GUI controls, VB.NET does provide text boxes, which are adequate for displaying and editing pure text, but what if you need to be able to display more than just plain text? For example, what if you want to be able to highlight words found in a search? There is a solution: VB.NET also provides  a RichTextBox control that displays rtf format, which supports most common formatting and allows images. The downside: the RichTextBox control is  very finicky and hard to use. So I finally wrote a kind of wrapper for it which implements a lot of the functionality that you would think they would have built into RichTextBox but didn’t. I have posted the code on github here, together with a Windows installer for a simple word processing app based on it. In a future post I will describe a useful note-taking app that I built on top of it. More »

I recently discovered an interview series by a remarkably good interviewer, Nikola Danaylov, who seems quite skilled at doing something that one hardly ever sees in media interactions with scientists: challenging the interviewee’s assumptions. Danaylov manages it without ever breaking decorum or giving offense (a skill that a good many non-science journalists could stand to learn). In this post I want to mention two interviews, partly because both are interesting and worth watching, and partly because both related to another issue that I have been thinking about. The first interview is with Dr. Stuart Hameroff, a University of Arizona professor who, in collaboration with Oxford professor Roger Penrose, is the originator of a hypothesis that (to oversimplify) consciousness arises from quantum computation taking place in the microtubules of neurons. The second interview is with Prof. Frank Tipler, a physicist and mathematician and the author of two very controversial books, The Physics of Immortality and The Physics of Christianity, expounding his “omega point cosmology” and projecting the ultimate fate of the universe.

I don’t mean to compare Hameroff’s Orch-OR theory with Tipler’s omega point theory, in terms of either subject matter or credibility. Hameroff tends to annoy some mainstream neuroscience folks — as well as many in the AI field — by rejecting the idea that ordinary Hodgkin-Huxley-type neural activity is sufficient to explain consciousness. Some may also be put off by his tendency to draw parallels with the ideas of various eastern philosophies (I recall attending a seminar of his at ASU a few years ago, presented jointly with a Tibetan Buddhist Rinpoche, which was different), but no one could credibly dismiss him as a crank — he is a professor of medicine, an anesthesiologist with decades of experience, and the driving force behind a well-regarded international conference on the study of consciousness, now in its 21st year — and his collaborator is Roger Penrose, perhaps the greatest living mathematical physicist. The weight of critical opinion tends to be considerably less kind to Tipler; he is a full professor of physics and mathematics at a major university (Tulane) and studied under no less a luminary than John Wheeler, but mixing physics and theology tends to set mainstream science’s teeth on edge. Of course, as I have carried on about elsewhere, personally I enjoy iconoclasts.

The point that I wanted to make has to do with the question of how we decide when we understand something. More »