Archive for the ‘Computers’ Category

Electronic referees

July 22, 2006

Judging a paper’s quality may be hard for human referees, and people are looking for alternatives. For instance, this recent PhysicsWeb news gives an overview of P. Chen et al. article Finding Scientific Gems with Google, where the authors take advantage of Google’s page rating algorithm to assess the relative importance of all publications in the Physical Review family of journals from 1893 to 2003. Since the rating algorithm weights pages by number of referrers [0], there’s in principle no value added to traditional citation indexes: both popularity measures are linearly correlated. The catch is that there are exceptions: papers that are not widely cited but that, judging for the number of web pages linking to them, seem to be much more influential than one would think (the article mentions quite a few, Feynman, Murray and Gell-Mann’s one on Fermi interactions being an example). Amusing; although i must confess that this kind of democratic assessments of our scientific endeavours remind me somewhat of a well-known Planck dixit:

Max PlanckA new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it.

Max Planck, 1858–1947

(I remember i jotted down this same quotation some twenty years ago, together with a note showing my skepticism… nowadays i think i’m much more of a planckian than i used to be.)

Returning to our electronic referees, over at PhysOrg there’s a story about how computer science may help us in detecting bogus papers, where by bogus i mean automatically generated ones (looks like our human referees do sometimes find their task really hard!). Probably the most popular case of such a prank was the article accepted at WMSCI 2005 whose author came out to be SCIgen, an automatic paper generator created by the guy in portrait on the right. And our field is not immune to similar problems, as exemplified by the amusing Bogdanoff Affair (besides, as you’ll see, most probably no computer program would be of much help in this case).

[0] Of course, i’m oversimplifying: see here for the complete history behind Google’s PageRank.

Update: Andrew Jaffe, in his excellent blog (recommended, but you probably already knew it), has some interesting thoughts about peer review, and a recent initiative by Nature to open a debate on the issue and looking for ways of improvement.

Parenthetical geometry

June 25, 2006

sicmIf i were asked for my preferred field in physics, i’d have a really hard time choosing just one, but it would surely relate in one way or the other to differential geometry. Picking up a programming language, on the other hand, would be far easier, for i feel at home among Scheme’s lots of infuriating, silly parenthesis. Jack Wisdom and Gerry Sussman have managed to bring together the best of both worlds in their book Structure and Interpretation of Classical Mechanics, freely available on-line. The book, aptly dedicated to the Principle of Least Action, is an amazing journey through modern classical mechanics, using two apparently different languages: differential geometry and scheme. There you’ll find all the expected topics: Lagrangian and Hamiltonian formulations, the rigid body, phase space structure, canonical transformations and a very complete treatment of perturbation theory in non-linear systems. What makes this book different (and extremely fun) is what one may call its computational stance: in the authors’ words,

Computational algorithms are used to communicate precisely some of the methods used in the analysis of dynamical phenomena. Expressing the methods of variational mechanics in a computer language forces them to be unambiguous and computationally effective. Computation requires us to be precise about the representation of mechanical and geometric notions as computational objects and permits us to represent explicitly the algorithms for manipulating these objects. Also, once formalized as a procedure, a mathematical idea becomes a tool that can be used directly to compute results.[…]
Our requirement that our mathematical notations be explicit and precise enough that they can be interpreted automatically, as by a computer, is very effective in uncovering puns and flaws in reasoning.

As i mentioned, the computer language chosen is Scheme, for pretty good reasons (besides the obvious one of Sussman being one of the language’s inventors). To begin with, Scheme’s syntax is so simple that one can learn it on the go, although that simplicity does not preclude in any way powerful abstraction means and natural expression of symbolic computations. As a matter of fact, it favours it, as testified by the book’s accompanying library, scmutils. Thanks to it,
expressing mathematical equations in a way understandable by a computer is often a natural exercise. On the other hand, Scheme is an interpreted language, which means that you have at your disposal an interactive environment to play with. The convenience of it for exploratory purposes is hard to overstate.

Wisdom and Sussman have been using SICM for teaching classical mechanics at MIT during several years, and you can find additional material in the course’s website. But the fun does not end there. The 2005 booklet Functional Differential Geometry is an unconventional introduction to differential geometry using SICM’s schemy approach, which is also being followed and extended to Lie Groups by Will Farr, who has started an effort to port (part of) scmutils to PowerPC architectures [1]. Finally, there’s a SICM reading group in sore need of contributions and discussion (hint, hint), but with some potentially useful tips.

Happy hacking!

[1] Those of you who enjoyed my swimming post will probably be interested in this article by Wisdom that i found in Will’s blog,

New physics, old computing

April 21, 2006

I was reading about the recent black hole mergers simulations performed by the people at Goddard, more thoroughly described here and in this forthcoming article. These are, undoubtedly, beautiful results, and a testament to the complexity of Einstein’s equations when it comes to obtain realistic results: according to the reports above, thousands of lines of code (plus an impressive array of supercomputers) were needed to obtain them. An impressive achievement, but still there’s something in it that makes me uneasy: if i’ve read it right, those thousands of lines of code are actually lines of Fortran (or, in the best case, C) code (more concretely, they’re using a library called Paramesh, written in Fortran 90). Now, if you ask anyone with a solid background in computer science, she will probably tell you that nobody (except physicists, that is) programs these days in Fortran. We know better languages, and have developed far better ways of writing computer programs in the 50 years since Fortran was invented. That is, we physicists are using obsolete technologies. Those newer languages (Scheme, Haskell, OCaml, and so on and so forth) are better in many ways, but specially in one that i am sure is close to any physicist’s heart: they provide far, far better means of abstraction. That is, you can write much shorter programs in a language that is conceptually closer to the problem at hand. And shorter may well mean something like a ten fold reduction in the number of lines of code; not to mention the benefits on clarity, maintanability and extensibility that greater abstraction entails. To use a metaphor, it’s like we were using Levi-Civita’s books and notation as our standard way of calculating in General Relativity, instead of modern differential geometry.

Of course, there’re perfectly understandable reasons for our using antics like Fortran, legacy code being probably the most prominent one; and physicists not having the needed expertise might well an important one too (but let me rush to say that efficiency of the code is not a good excuse these days). But i’m convinced that numerical physics would be vastly improved if we imported some expertise from the professional computing world. I’m told by friends in the field that some of the most ‘advanced’ guys are trying things like C++ and Java (instead of Fortran) these days: i’m sorry, but these languages were current some 20 years ago, and we’ve learnt since then how to avoid many of the pitfalls and unnecessary complexities they carry on. Much more interesting is to use interactive languages like Python (to be on the conservative side) or, if you ask me, functional languages like Scheme or Haskell. To give you a glimpse of what i’m talking about, here is how you’d write quicksort in Fortran 95; in Haskell, it’s a two-liner:

qsort []     = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs)

Fortunately, not every one sticks to Fortran these days: Michele Vallisneri’s Synthetic LISA is a beautiful example of a step in the right direction, and i’m glad to see that numerical libraries like PETSC do in fact provide Python bindings. But, as i said, i think (after nine years or so of earning a living writing computer programs) that there are even better ways. As a matter of fact, i’m seriously considering the possibility of writing some LISA simulation code using Scheme. What deters me, besides lack of time, is the enormous weight of tradition: almost everybody out there in the physics community is using those C and Fortran libraries, and that means millions of lines of well-tested code and wondrous results like those black hole mergers. The easiest thing to do is to go with the flow, but still…

(By the way, these comments are by no means intended as a critique of Baker et al. work, which is impressive as it stands. Besides, for what i know, they may well be using far more sophisticated techniques than plain Fortran or C. My rants are more geared towards many other cases i’ve seen of physics programmers which were anything but sophisticated.)

Technorati Tags: , , , , , ,

You’re never too old

April 5, 2006

Once upon a time, i completed a thesis on gravitational wave detectors, and got a Ph.D. that culminated more than twelve years of my life devoted to physics. Normally, that would have been just the beginning of a researcher’s career, but sometimes life intervenes and, as was my case, the doctorate marks instead what seems its end. I shifted gears and began a professional career as a programmer, not an unheard of story. During more than eight years, i’ve had lots of fun discovering a new world, full of interesting people, with its own myths, heroes and battles. I’ve tried hard to learn and even give something back, and, until a few months ago i was pretty happy with the idea of going on that way for the foreseeable future.

But then a little miracle happened. Despite not being a pro anymore, i had tried to read every now and then about physics (many books, and things like Scientific American or Physics Today, you know the drill) and to keep current (at a not too technical level) in latest advancements in the field. Thus, when last year somebody told me that he was going to a popular physics lecture (by some unknown guy) at my hometown’s science museum, i gladly joined the expedition. Two surprises were awaiting my arrival to the lecture room.

First, the lecturer was no other than Noble Laureate Frank Wilczek, who gave a nice talk about Dirac’s equation, including reminiscences about the man himself (since he was Wilczek professor during some time). Not bad for an unknown lecturer. The second surprise also involved an unexpected encounter, this time with my Ph.D. advisor. I hadn’t seen him for more than seven years and, naturally, there were lots of news and gossip to exchange after the lecture. To make a long history short, as a result of that talk i joined the Catalan Institute for Space Studies, where Alberto leads the Spanish contribution to ESA’s Lisa Pathfinder project, a forerunner of the planned LISA gravitational wave detector.

Until this fall, my work at IEEC is centered on software development. But once our application enters the testing and validation phases, i’ll have time to work on physics again. The Institute being a primarily a scientific institution, the plan is to get involved in LISA at a scientific level. Let me say that again: i’ll work on physics again. Who said dreams never come true? At first, a nagging doubt clouded my mind every now and then, a little devil whispering “you’re too old, you missed that train,” but i remembered a quote by one of my favourite authors:

It is never too late to be what you might have been.

So i will try again. I’ll work hard to relearn what i once knew, and then more. To trod the old paths, only a little bit wiser. In the old times, the web was in its infancy (i remember using Mosaic, and drooling over Netscape 1.0), but now i have at my disposal an amazing amount of on-line information, and a way to share my forthcoming toils and discoveries. I know i would have loved this when i started learning physics. So this blog’s intent is to share the joy of discovering physics, and physics, instead of boring autobiographical notes, will be the theme of the forthcoming entries in this space.

Technorati Tags: ,