Friday, January 13, 2006

New year, new research, same problems

The research ground of my PhD is now behind, summed up in the thesis. It may come up again in the future, I may have to offer some presentation on or help code real applications that make use of those ideas and results, but that's something for some more or less distant future.

This new year I'll be coping with a new research topic, whose iceberg tip is given by systems of linear interval equations. Too bad I have to (quickly) rack up a lot of background topics before I can fully understand the implications and difficulties of the research: coming from a fully theoretical math past means I have no knowledge of finite elements, matrix manipulation or interval analysis. These are three distinct topics I have to prepare myself with, knowing I will face totally different challenges when they'll come together.

It's time like this that I wish more material was available online. It's easy to find course notes on very classical subjects. It's also not too hard to find very recent research material (be it with generic search engines like Google or more specific sites like Citeseer), but don't keep your hopes on finding in-depth texts on modern math subjects: if your university library doesn't carry the relative textbooks, tough (and expensive) luck.

My immediate needs involve getting enough background on the topics and the recent advancements to see if things like affine arithmetic would help in the process. Of course, I need to get steeled enough in the matter to present it. Luckily, online material to (affirmatively) answer the question can be found. Now it's just a matter of studying the subject more in depth, rather than just relying on some trivial example.

It's hard but nice to have some serious work to do.

Friday, September 30, 2005

Automata, ConTeXt and Ruby

A substantial of my thesis wil be (actually, already is) a display of the results of the approximations methods I analyzed on a sensible set of test cases. The display will have to come in two forms, tables and graphs.

I had to tackle the problem of setting up the correct the layout and inserting all the data automatically sooner than I had expected, for two reasons.

The first, and most obvious, one was that without an extensive test suite it would have not be possible to verify the theory and check the code for bugs. However, proper layout of the data was enforced by tight scheduling of an article containing the core point of the thesis.

The scientific world has been dominated for a long time by TeX, a typesetting system that works pretty much like a compiler. TeX itself is almost never used raw, but with appropriate formats built upon it, the most common of which is LaTeX. A less common one, but still the one I now use for most of my stuff, is ConTeXt, aimed more at liberal arts content but still flexible enough to be used for scientific purposes.

Although the use of LaTeX and other TeX systems has been progressively losing ground to the more common word processing software provided by office suites, the article I needed to write, and my PhD thesis, showed brilliantly how a command processor like TeX is the tool best suited for these kind of things.

Indeed, when data changed with the new test runs (because errors were fixed, curves were added, or more data was presented) it would have been a pain to update all the tables in a common word processor with the new information: hand-editing over 50 tables would have been an extremely boring and error-prone process. Instead, since the input to TeX is plain text files, inserting the tables and figures, and moving them to the appropriate place, became a process that could be automated by a script.
Similarly, the companion MetaPost tool enormously eased the process of updating the pictures as needed, by automation.

Enter Ruby, my next best friend. Ruby is a scripting language built from the ground up with object-oriented design in mind; yet, it follows the principle of least surprise: whenever it makes sense, the object oriented approach can also be accessed wrapped in a syntax that is very familiar to those who have experience in imperative programming. This means, among other things, that coders experienced in other programming or scripting languages, like Perl or Python, will find themselves at ease in their initial approach to Ruby.

However, its the very dynamic, fully thought-trough object oriented model that gives Ruby its power and flexibility. For examples, the ability to extend built-in objects and standard methods without jumping through hoops like subclassing has allowed me to straightforwardly design new ways to output floating-point values as needed to give proper input to TeX and MetaPost for the creationg and layout of tables figures.

It's things like this that show the power of the GUI-less Unix approach —dedicated, automatable tools, each suited for a specific task and with the ability to exchange data with other tools via simple textual input and output— for large-scale projects.

Some things may be more comfortable to tackle by clicking around, but it's automation that computers were built for. Let's have them work for us, whenever possible.

Friday, September 09, 2005

Reprise

It hasn't been easy getting back to work on PhD thesis, after the long leave I had taken. (Where 'long', or rather 'too long', could actually be referred to any amount of time, given the approaching deadlines, and 'leave' doesn't refer to a discussion but to time dedicated to studying other subjects, getting ready for the post-doc.)

The hard part has been, as always, getting started. Opening up the source files containing the code for the library I've been working on. Once they were opened the first time, and despite the long wait, it was almost immediate to spot a bug and to add the new features I needed for my tests.

Well, immediate ... even here, we're talking about three days. Not because the actual coding was slow, but because I only set up to work between midnight and 2am ... not the best time to get some work done, one would think, but anyway, to day it seemd to have worked ok.

The aim of my PhD thesis is to analyse known and new methods to transform fonts from the model used in METAFONT to the one used in PostScript Type1. Both models describe fonts mathematically, taking advantage of the flexibility of Bézier cubics, but whereas METAFONT uses these curves to describe paths stroked by pens (of circular or other convex shape), Type1 fonts use Bézier cubics to describe the outline of the glyphs.

Therefore, mathematically the problem to tackle is one of using Bézier cubics to describe the envelope of a set of circles centered on given Bézier cubic. Since this is not possible to achieve in general, the problem is actually one of finding the best approximation.

The advantage of dealing with Bézier cubics is that it's possible to split and splice them preserving graphical continuity, so when any approximation sought isn't good enough one can split the initial curve, approximate the parts (likely to give better results, since splitting curves tends to straight lines) and the splice the approximations.

How to avoid splitting, where to split, and other relevant questions are the topic of discussion in my thesis.

Which I'll have to write, sooner or later ...

Tuesday, September 06, 2005

Prelude

I am a geek.

This is one of the very few things in life for which there can be very, very little doubt; like death or taxes.

One of my most noticeable personal traits is curiosity. I love to know things. One of my dreams is to be like an encyclopedia, and know everything about everything. But when I think about myself more thoroughly, I realize that it's not the knowledge in itself; or rather, not just the knowledge. What I love is to learn. More, I love to be taught. It is much easier for me to learn something if a real person is out there to explain it to me.

I read (or maybe, sadly, used to read) a lot of books, and learn a lot of things from them, but I'm not able to retain information acquired from dead sources as well as I do when I listen to, and am able to see, people explaining things.

Another personal trait, and sometimes my pet peeve, is that I'm rarely surprised. I don't know if this, and my curiosity, are related by affinity or contradiction, but it's something undeniable. I have some sort of inborn (I assume; can't think about how I could have learnt it ...) a lack of expectations, or prejudice. An ingenuity of sorts, such that rarely, when learning anything about anything or anybody, I get the startled feeling of surprise.

Mind it, this doesn't mean I have no enthusiasm or passion. On the contrary, I'm very passionate (sometimes to the point of irrational absurdity): music, languages, tango, math, IT, ...

One thing that I like to discover (by myself or because somebody shows it to me), and that gives me a high feeling that could be (pleasant) surprise are connections, (unexpected) relations.

It's probably from this that comes my passion for math: the way each component is self-sufficient yet tightly intertwined with the other components, the beauty of its elegance in the formalized, crystalized parts, and the savage unexploredness of the new fields.

This is the reason why I've always been geared towards it. And why I always considered it my way of life, what I could use as my main survival business.

My other principal interest, IT, always felt more like an hobby, something I would do in my spare time and nothing more.

On the other hand, as time progressed, informatics and related fields of knowledge have absorbed a great deal of my time. And I suddenly found an unpleasant fracture between my academic training in pure math, and my progressive drift towards less mathematical aims.

Looking back, and out to others' experience, it might have been a better choice to take IT as my main course of study, and keep the math at the extracurricular interest level, but this is a feeling that not always convinces me.

Overall, nothing can be done now to change the past, but bridging the drift, or completing the switch, is something which ought to be done, sooner or later. And the sooner the better.