Writing standalone GUI applications with Visual Basic.NET is easy. What isn’t so easy is using a VB.NET application to modify the behavior of some other running application. If the other application happens to be MS Word, MS Excel, or MS Access, you can use Visual Basic for Applications (VBA). Otherwise, unless the other application exposes it’s own API, you’re typically stuck trying to use so-called “hooks“, which will quickly get you under the hood of the Windows OS to a depth where, trust me, you don’t want to go unless you’re prepared to spend a lot of time poring over Microsoft’s incomprehensible documentation trying to figure out how to build something that won’t ever work quite right no matter what you do, and will have a high likelihood of not working at all after the next Windows update. More »

The America Invents Act (“AIA”) was (in my opinion) essentially a total capitulation by Congress to the fantasies of the megacorporations that are by far the biggest customers of the U.S. Patent Office (IBM alone accounts for about 2 percent of all patents issued each year). It is therefore ironic that Big Pharma is finding itself dodging a hail of bullets from the procedural assault weapons that the AIA legislated into existence. More »

If you use a computer to take notes a lot (I do), and those notes often involve math expressions (mine do), you become quickly aware that word processing apps are really not designed for this. Inserting any symbol that isn’t on a standard qwerty keyboard requires extended mouse acrobatics and searches through long lists of obscure symbols (MS Office — pages and pages of variants of Arabic script? Seriously? Who uses this stuff?).

symbols

Today’s post, though, is about a different “pain point”: subscripts and superscripts, which are used constantly with math symbols, and require ridiculous contortions to type.  In MS Office products, you have to first select the affected character(s) (requiring either mouse highlighting or shift + arrow keys), then press control and = simultaneously to make it a subscript, or control and shift and = simultaneously for superscript. And at least half the time (I admit I may be unusually uncoordinated), shortly thereafter I will discover that I was still stuck in subscript or superscript mode when I continued typing, so I have to go back and correct whatever I typed before I noticed that it did that.

One useful weapon against these annoyances is: Autohotkey. More »

Clients of mine know that one of my mantras is: ‘pendency is your friend’. There’s no such thing as “a” patent application – not if you care about staking out meaningful IP rights on technologically demanding subject matter. The minimum “unit” of practicable IP protection is not a patent, it’s an application chain that is kept pending. If you get a patent issued, that’s great, especially if it has strong claims. But whatever the claims, if a patent is worth paying maintenance fees on, it’s worth the (relatively) minor cost to keep the application chain pending.

In this post I’ll explain why. (I’ll leave the details of “how” for another time, except to say that you simply make sure to file a continuation or continuation-in-part application before the current application gets issued as a patent.) More »

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 »

My friend Tom put me onto another very enjoyable book, In Love With Flying, by Kenneth W. Ford. (Tom also wrote very thoughtful Amazon reviews of this and Dr. Ford’s latest book, Building the H Bomb: A Personal History, which you can find here and here.)

450px-Erco_F-1_Ercoupe_CF-NLX_02

Ercoupe (wikipedia photo)

Dr. Ford, a physicist who circulated in the very uppermost strata of the profession with luminaries like Wheeler, Fermi, von Neumann, and Bethe, was also a highly skilled pilot, particularly of gliders, and his amateur flying career spanned the golden years of aviation. In Love With Flying resonated with me quite a lot. Dr. Ford began his flight training in an Ercoupe, a small, early-50’s era airplane whose main distinction at the time was having an aluminum skin instead of fabric, and having no rudder pedals. The omission of rudder pedals was supposed to make the craft impossible to spin, which it didn’t, quite, but it did make it pretty impossible to land in a strong crosswind, so quite a few owners modifed them to add rudder pedals. My own father was a very enthusiastic amateur pilot, and one of my earliest flying memories was of riding with him in a rented Ercoupe at age 10 or so.

More »

I just finished reading Farewell to Reality by Jim Baggott, a well written and accessible contribution to the emerging genre of books debating whether untestable theories can be considered science. Thanks in large part to the work of Karl Popper, it has come to be widely accepted that a defining characteristic of science is the making of falsifiable predictions. But there has emerged lately a cadre of (mostly) theoretical physicists advocating that the Popperian standard should be relaxed. See, for example, the recent Edge essay by Sean Carroll, in which he argues that we should instead ask whether a theory is “definite” and “empirical”.

It seems to me that “is it science?” is the wrong question. This is one of those debates that serves mainly as misdirection from the real issue, which is: given that nearly all science today is publicly funded, how and on what shall the limited funds available be spent? That isn’t a scientific question, or even a philosophical one, it’s a political question. In theoretical physics, the string theorists currently have the upper hand, because there are a great many of them and they dominate the grant committees, the peer review process, and the training of the next generation of theoretical physicists. But make no mistake, the issue here is not really “how shall we define science”, it’s “how shall we allocate limited funds.”

More »

My son sent me a link to this Wired article about how Disney World has eliminated the long lines and engineered a frictionless, glitch-free user experience, by meticulous scheduling and execution via some 100 linked computer systems that communicate with electronic wristbands worn by the customers.

[T]he MagicBand replaces all of the details and hassles of paper once you touch-down in Orlando. Express users can board a park-bound shuttle, and check into the hotel. They don’t have to mind their luggage, because each piece gets tagged at your home airport, so that it can follow you to your hotel, then your room. Once you arrive at the park, there are no tickets to hand over. Just tap your MagicBand at the gate and swipe onto the rides you’ve already reserved. If you’ve opted in on the web, the MagicBand is the only thing you need. It’s amazing how much friction Disney has engineered away: There’s no need to rent a car or waste time at the baggage carousel. You don’t need to carry cash, because the MagicBand is linked to your credit card. You don’t need to wait in long lines.

Disney manages to achieve this level of customer service, and make a profit doing it, in a massive park with thousands of sugar-intoxicated kids running around.

I can’t help contrasting that with the health care system, on which we lavish 18 percent or so of the national income, and where even getting a prescription refilled seems to require many hours spent navigating automated phone systems, filling out the same incomprehensible paperwork over and over, and sitting around in waiting rooms. Maybe the Obamacare folks ought to get in touch with the Disney folks. Just a thought.

Some time ago I posted some observations about the game of Go, in which I compared the complexity of Go to that of chess. I said:

Go is combinatorially many orders of magnitude larger — the number of possible chess positions (the so-called “Shannon number”, since it was first estimated by Claude Shannon in a1950 paper on computer chess) is “only” about 10 to the 43rd power, which pales in comparison to Go, which has about 8 times 10 to the 100th power possible board positions.

Turns out that estimate of 8 x 10100 was way low. Some folks whose level of determination is truly impressive to behold have managed to calculate, after “9 months of computation and 4 petabyte of disk IO on a Dell PowerEdge R280 server” the exact  number of legal Go board positions on an 18 x 18 board (one row/column shy of the 19 x 19 standard board). The answer, explained here, (which I have to split into three lines, but it’s just one number) is:

6697231142888292128927401888417065435099377806401787328
1031833769694562442854721810521432601277437139718484889
0970111836283470468812827907149926502347633

or approximately 6.7 x 10153. Based on that, the estimate of the number of positions on the 19 x 19 board is about 2.1 x 10170. Plans are apparently underway to nail down the exact number for the 19 x 19 board once the required computing resources (10 to 13 servers for 5 to 9 months) can be found.