Eduardo Valle’s Blog

Technology, Science, Teaching

Archive for the ‘technology’ Category

The Quest for Scholarly Tech: Virtualisation

Posted by eduardovalle on Friday, March 27, 2009

As a computer scientist, I find OS monogamy an impossible commitment: I want to use my desktop applications (Microsoft Office, Adobe CS) in Windows but the staple of my experimental work has to be done in some flavour of Unix.

To handle both systems, I have tried all sorts of solutions:

  • a single dual-boot machine;
  • two complete boxes side by side on my desk;
  • two boxes and a single head (one monitor, keyboard and mouse) with a hardware “interface switch” to alternate between the systems;
  • a headless Linux box connected to the Windows system with a SSH shell prompt (giving up Linux’s GUI);
  • a headless Linux box connected to the Windows system using a free version of VNC (prompting the ire of the sysadmin guy — apparently I’ve unwittingly opened some ports I shouldn’t, but he eventually got it figured out).

The dual-boot configuration was, of course, the worst. Using two complete boxes was, surprisingly, the second to worst solution, not only because of that confusing alternation of keyboards and mice, but also because of the impossibility to do “copy and paste” between the systems. With the “interface switch”, there was no keyboard juggling, but no “copy and paste” either. Worse, the switch was quite unreliable, causing video quality issues and an irritating “keyboard-sudden-death-syndrome”  treatable only by reboot.

The “Linux client in Windows” solution was not a bad choice. Actually, I’ve been using it for years, but… there is still the problem of having to use two machines. As soon as I take my laptop from its docking station and quit the building, I am cut off from my Linux half.

Enters virtualisation, a not-so-recent technology (the term was coined in the 1960’s) that has recently gained the status of buzzword because of its potential benefits on grid computing applications. As the name implies, virtualisation is the creation of a virtual machine on the top of which a system is executed. This allows a guest system to run on top of a host system in a controlled, isolated environment — and what is best: the guest and host systems don’t have to be the same!

The possibilities are many:

  • I can run Linux on my Windows box and have my Linux machine just an “alt+tab” away;
  • I can have several Unixes (FreeBSD, Ubuntu, openSUSE, Mandriva, Debian…) to run as I fancy;
  • I can make a copy of the virtual machine’s files before doing potentially disrupting stuff (like installing suspicious software). If something goes wrong, I can easily and completely rollback the machine to its pristine state;
  • I can even run Windows on Windows for the same purpose. I can for example, keep a virtual machine exclusively to open suspicious mail attachments.

Now, for the drawbacks:

Each virtual machine implementation has its quirks. Microsoft Virtual PC does not officially support Linux, Sun’s VirtualBox demands a lot of tweaking to get things running, and VMware Player (my favourite) has no support to create the virtual machines, just to execute them. By the way, all three solutions are free-as-in-beer, but only VirtualBox is (mostly) open source.

As I said, you can’t create virtual machines with VMware Player. To do that, you have to buy another VMware product, VMware Workstation, for about 190 bucks. Or (like me) you can be cheap and look for prêt-à-porter machines on VMware Application Marketplace — I’ve found neatly installed images of most Linux distros.

If you need something more exotic, customised, or… proprietary, there is EasyVMX, an useful website, which creates, for free, an empty virtual machine where you can install the OS of your choice.

VMware does not come with VMware Tools, an optional (but absolutely essential) package which, among other things, enables copy & paste between the host and guest OSs. But this is not deal breaker, as this website has a workaround, and this thread in VMware community says it is legal, but use it at your own risk, or better yet, check it with your favourite lawyer.*

Speaking of lawyers, I’ve found that software licensing for Virtual Machines is prone to hazards. I’ve discovered for example, that my OEM Windows XP license does not allow me to put it in a virtual machine. If you, like me, can’t live without proprietary software, brace yourself for some entertaining EULA deciphering and a few interesting phone chats with the juridical department.

* EDIT 30/03: I’ve found out that VMware has put the vmtools on open source, so this this is one less concern. The package is bundled in some distros (like openSUSE), and it is available at SourceForge.

Posted in technology | Tagged: , , , , , , , , , , | Leave a Comment »

The Quest for Scholarly Tech: Ubuntu

Posted by eduardovalle on Thursday, March 19, 2009

Since the last year of the thesis, I have been in such a hurry, that I haven’t been able to keep up with technology. But now, I have a few spare days and I’m using them to evaluate some new (?) services and software, in my eternal quest for better tools for academic work.

Linux is by no means new software, and I have been using it on and off for more than ten years. During my undergrads, I had already noticed a cult following of the penguin, and nothing was deemed more uncool than proprietary OSs. But having anything Linux-related (including the OS itself) meant downloading the sources and compiling them, which was enough to keep me at bay (I made an exception when I took the subject of Operating Systems, one of the rare occasions when one should be expected to compile an OS kernel). Besides, those were the years of religious wars, the simple mention of the words “Windows” and “Linux” in the same room was enough to spark hours of heated debate, with very low signal-to-noise ratio — not the ideal environment for gathering useful information. At those troubled times, I used to ask my friends, provocatively: “what do you think will happen first: Windows getting stable or Linux getting usable?”

Ironically, I think both (sort of) happened by now. We have been graced with some good Windows crops, like 2000 and XP, which have reached a nice point of stability. And some Linux distributions are almost user-friendly. I don’t think that the old mantra of “Linux (or Unix) on the server, Windows (or MacOS) on the desktop” is completely overthrown, but we are getting there, in both ways.

Specifically, I’ve been evaluating Ubuntu, the famous “Linux for human beings” distribution, which has been around since 2004. I’ve downloaded and installed it last November, and my first impression was extremely positive: installation was a breeze, the interface is pretty, there are lots of GUI-accessible tweaks, and the package management system actually works.

Installation and hardware compatibility has always been the Achilles’ heel of Linux distributions, but it also has been one of the aspects which has most improved. Not all equipment guarantees an equally worry-free process, but the list of supported hardware has also grown dramatically. In my case, the installation, on a 3-year old Dell Latitude D620 laptop, went uneventful. My guess is that if a system is both popular and old enough, people will have their drivers figured out.

The first thing that strikes on Ubuntu is how cute it is. From startup and shutdown screens to configuration applets, everything is design to shield users from the Unix innards. Ubuntu is the first distro I’ve ever seen which has an usable “Start Menu” (instead of the usual everything-but-the-kitchen-sink approach). The system feels easy, inviting exploration and discovery.

Ubuntu's "Start Menu" and Quick launch bar

Ubuntu's "Start Menu" and Quick launch bar

In the best tradition of Linux systems, (almost) everything is customisable, but breaking with tradition, the system is (almost) comfortable to use fresh out of box. That didn’t prevent me from trying-on a bit of everything, tweaking themes, font rendering, keyboard layouts, shortcuts, and everything which was at the reach of a mouse click. At some point I had played so much with the shortcuts, that the system got practically unusable. What to do now? Well, in Ubuntu (courtesy of GNOME) customisation is done by adding files to the user folder, not by modifying existing ones, so, deleting those files (located in the ~/.gconf folder) reverts the system to its pristine virgin state.

Tweaking Ubuntu's GUI

Tweaking Ubuntu's GUI

I was also quite pleased with the package manager, Debian-based distros are the ones which got it right. Or so I’ve heard — and based on the nightmarish experiences I’ve had with Mandriva’s URPMI it is probably true.

Now, for the downsides.

Well, Ubuntu is not Windows, and I have to retrain my “muscle-memory” to new ways of doing things. So far, what I’ve found most difficult to surmount is the difference between the two system’s “US International” keyboard layouts. While Linux’s targets all Latin script languages, Windows’ layout is optimised for Western European ones (which is great for me, who write in English, French and Portuguese). This makes for unexpected results: in Windows if you want to write “do’s” (as in “the do’s and don’ts of laying out keyboards”) you just type [d] [o] ['] [s] and the system, recognising that “s” is not accented in any Western European language, interprets the ['] as an apostrophe. In Ubuntu, you have to type [d] [o] ['] [space] [s], otherwise you’ll get “doś”. Worse, if you want to write “don’t” you still have to type the space after the apostrophe, even if there is no accented “t” in Latin script, otherwise you just get an ugly beep. So far I’ve been unable to circumvent this annoying behaviour — editing the keyboard layout files seems to be useless, it has to do with how the system deals with dead keys.

I’ve got quite a few bugs also. Small ones (no keyboard tweaks involving the Caps Lock key would work properly) and big ones (trying to record sound would freeze the system, no connection to wireless networks). Ubuntu comes with periodic updates, so the big ones have already disappeared, but some of the small ones are still around.

I had to tweak quite a bit with the installed packages in order for the system to work properly. Initially it had both GNOME and KDE installed, but KDE started to conflict with GNOME configuration daemon. Since I don’t use (so far) anything KDE based, I’ve just removed the KDE packages and the problem disappeared. It was much more difficult to figure out that the problems I was experiencing with Eclipse 2.4 and RSSOwl 2.0 were due to an exotic version of the Java Virtual Machine (based on GNU’s GCJ) which came installed on the system. When I removed everything GCJ and kept only Sun’s Java, my life became much easier.

Incidentally, I was somewhat disappointed when I realised that the Eclipse version available via package manager was 2.2 (almost 2 year old by now!), and to install the version 2.4 I would have to go the “Linux way” (download a tar.gz, create a folder, install the icons myself, etc., etc.).

Ubuntu has some small but irritating limitations. One example: the system has no consistent way to tell an application to run minimised (which comes handy when you want something to run on system start up): either the application has its own non-standard option, either it is impossible. Another annoying example is an ugly, loud beep you get every time the system is unhappy with you. This beep is emitted by the legacy “PC speaker” device, not by the modern sound system, so you have no control over volume or muting. Apparently, the only reliable way to disable this is to put the PC speaker on the “black list” of kernel devices, so it won’t be loaded. Not much user friendly.

Those small nuisances are part of the Linux experience, and though surprising on the proprietary software mind-frame, they are a foreseeable result of that Cathedral and Bazaar philosophy. Obviously, a system assembled from so many articulated parts, each the fruit of a different mind, is due to have some small inconsistencies.

In summary I would say that, for a Linux desktop system, Ubuntu offers a nice experience. I don’t think it is already smooth enough for technically unsavvy users, but it is perfect for midbrow amateurs, who know their 0′s and 1′s but are not inclined to spend hours editing text-based configuration files.

Posted in technology | Tagged: , , , , , | Leave a Comment »

From Research to Product… and More Research

Posted by eduardovalle on Saturday, January 17, 2009

The LIP6 (one of my host labs in France) received Alisson Sol, from Microsoft Research, who gave us the talk “AutoCollage: From Paper to Product”. Alisson and I had the same supervisor for our M.Sc. in Computer Sciences at UFMG, Prof. Arnaldo Araújo, who was also present at the talk (we were four Brazilians in the audience!).

It was a very interesting talk, where Alisson explained his ideas on how developers can work in cooperation with researchers in order to bring their concepts to market, and how Microsoft is working to streamline this process, and to maximise the number of innovative ideas which get to see the light of day, without plaguing existing products with feature creep.

It was also a good glimpse at the radical new way Microsoft is thinking their user interfaces. The trend, which is clear in Microsoft Office 2007, reaches a pinnacle in AutoCollage: minimal, unobtrusive interfaces, and less features (or at least, less immediately visible features; following the principle that screen space is a valuable resource).

The product is available at Microsoft Store (at the moment only for the US and the EU).

* * *

Two bonuses from Alisson’s visit:

First, he showed me Windows Live Sync and Microsoft Live Mesh, which add a lot of interest to the “Live Services” platform, and might be an alternative to Microsoft Groove in an environment were people use both Windows and MacOS. As you might remember, I am shopping around for e-cooperation solutions for our research team, and especially, for our Franco-Brazilian partnership.

Second, he’s sent me the announcement for the Forum 2009 of the Microsoft Research-INRIA Joint Centre. In the detailed program, I’ve found this abstract:

Mathematical Components
Georges Gonthier, Microsoft Research Cambridge
Formalized mathematical theories can, like modern software, be built out of components. By components we mean modules that comprise both the static (objects and facts) and dynamic (proof and computation methods) contents of theories. We develop a general platform for mathematical components, based on the Coq “ssreflect” extension that was used to carry out the formalization of the Four Colour Theorem. We would validate the platform on two significant developments: a theory of efficient arithmetic, and the proof of the Odd Order theorem.”

Intriguing, isn’t it?  Hilbert’s program two dot oh?

Posted in science, technology | Tagged: , , , , , , , , , | Leave a Comment »

Language Mishaps: Looking for Perfection

Posted by eduardovalle on Tuesday, January 13, 2009

I moved through the thesis using a mixture of 90% Java, 7% Python, 2% BASH scripting and 1% C programming (not C++, but to my defence, I’ve always used the C99 standard – so I am not that old-fashioned).

When I’ve first mentioned that I intended to do all the thesis prototyping in Java, reactions were overwhelmingly negative, with gloomy cautionary tales of insufferable slowness, and unbearable memory footprint. I’ve kept those criticisms in mind, but imbued of scientific scepticism, I started prudently to perform some of the experiments in Java.

Python from XKCD, by Randall MunroeSoon I noticed that my prototypes were slower indeed, but not that slower (certainly less than 10× slower, usually less than 2× slower) and that the memory footprint was higher indeed, but not so high that experiments would become unfeasible. But mainly I’ve noticed that my prototypes were much more reliable than the ones written by the C/C++ programmers (everyone else), thus having less tendency to dump the core in front of the Ph.D. supervisor at the meetings. (It’s not that I program better than my colleagues, it’s just the wonders of having a garbage collector).

I was happy with my choice, and I’ve even gently mocked my colleagues when they defended that real programmers do pointer arithmetic and manual memory deallocation (but they know that I was kidding when I said that C++ is a language whose only purpose is to print at random one of the messages “Hello, world !” and “Segmentation Fault: Core Dumped”).

* * *

But despite the success of that “scientific prototyping experience”, Java has never conquered my heart. All languages have their small annoyances, but my gripe with Java comes from quite an essential design choice: the separation between primitive and reference types. This is one of those essential character flaws, and would only be forgivable if Java provided both autoboxing and a very clever optimising compiler. So far, only half of the solution is available: you can pretend at design time that your Integers are ints (and vice-versa), but try doing it in a critical inner loop, and at runtime you’ll become the laughing stock of all C++ programmers of the lab.

I’ve recently flirted with C# (which apparently handles this problem in a better way), but the lack of a general multiplatform implementation has made me shy of adopting it. One of the wonderful things of Java is that I can develop in Windows, my desktop system, and then run in whatever system is available at the University infrastructure: Windows, Linux, Sun’s UNIX – the integration is absolutely seamless.

I have also considered taking the “XKCD Approach” and do everything in Python, but though I really like Python for scripting, I shudder at the idea of relying exclusively on dynamic typing for anything larger than 500 lines of code.

* * *

In a way, this quest for perfection is all the fault of Bertrand Meyer, and of having read his books in my young naïve years. I am still waiting for The Definitive Programming Language. The one with a static type system which make theoreticians drool, and yet is uncannily intuitive to use. The one with a huge Standard Library, yet with a gentle learning curve. The one whose spoonfuls of syntactic sugar helps the medicinal exception handling code go down in a most elegant way.

I suspect I shall be waiting for a good while.

Posted in technology | Tagged: , , , , , , , , | Leave a Comment »

Fully Operational

Posted by eduardovalle on Friday, December 19, 2008

Finally my personal website has reached a state that I can call “fully operational”: all links seem to be working, and there is enough content to make it useful to its purposes. I must confess that working it up to this state was much more laborious than I had anticipated. Perhaps some “prêt-à-porter” content-management solution (like Plone, or some wiki-like structure) would had made my life easier — but finally I’ve decided that the learning curve would not pay the benefits on such a simple website, at least for now.

But I am using Plone for the EROS 3D project (which I am helping to “wrap up”) website , and I find it interesting as a solution. I know that several French labs use it to manage the contents of their institutional webpages, including my host lab.

Anyway this was about my non-Plone, non-Wiki, but ready to shine homepage. I have tested most links, and also the scripts and redirections in recent versions of both Firefox and IE. Should you experience any glitches, I would be thankful if you’d let me know.

Posted in technology | Tagged: , , , , | Leave a Comment »

What is worthy and what is puffy ?

Posted by eduardovalle on Saturday, November 29, 2008

The only other scientist in the family is my cousin Laila, and as I try to navigate my way around this “web two dot oh of science”, I can hear in my mind her thoughtful advice: “before you dive into something, you should check how deep the water is”. Wise words: after all, people experience many times the metaphorical broken neck after investing energy into “the next big thing”, which later reveals to be a shallow pond.

Of course, it’s often impossible to know precisely the depth of the waters, especially in the cases that much will depend on the contributions of the user community. What I ask myself is when can we start to foresee the tendency of success or failure of a new technology, for a given purpose?

Take Google’s Orkut, for example. When I’ve first heard about it, my colleagues were talking about a professional network, something like what LinkedIn is today, but quickly it became clear that it would not work for this purpose, and at least from this point of view, it failed. But as a social “for fun” network (like MySpace) it became a major success in Brazil.

For the last few months I’ve been trying a lot of stuff (web 2.0, web 1.0 or not web at all) which I think could be useful for my research team:

Google Tools

I’ve recently consolidated all my mailboxes into a single Gmail account and I am finding the service incredibly convenient. The Calendar is also fantastic, though I can’t believe they’ve left out such an essential item as the Task List. As for Google Docs, I find that they are much too rudimentary, even for lowbrow daily use.

Microsoft Groove

I liked the concept of Groove very much (and the little video demo is really really seductive), but I quickly bumped into the harsh reality that in the academic world, few people like to use Microsoft Office. What’s the use of using a communication platform and then having no one to communicate to?

I’ve considered starting a major evangelising campaign (helped by the fact that MS Office is very cheap for students nowadays) but when I realised that Groove wasn’t available for Mac (trying to evangelise someone into MS Office is hard but possible, but trying to evangelising someone out of a Mac is just a waste of time) and after two or three “sorry, the service is experiencing some problems”, I’ve given up. When evangelising people into a new product, it’s crucial that it works perfectly.

ThinkFree

I’ve been really captivated by ThinkFree. Feature-wise, it is much behind Office 2007 (or LaTeX, for that matter). But it’s way beyond Google Docs, and, since it offers a decent (but by no means perfect) conversion to and from MS Office, and very good web integration, it really deserves a second look. The fact that it is available for three major platforms (Windows, Mac and Linux), helping to avoid religious wars in the lab, is also a major selling point. I’ll be trying it for the next weeks and keep you updated.

CiteULike

I had great expectations for CiteULike, and I still find it is a neat idea: putting your citation database online, sharing it with other researchers, and even creating groups of interest to share and discuss about the papers. However, it seems that most users just use it as a online reference manager, and it there is not much “two dot oh” synergy (discussion, active sharing, blogging, feedback…) happening on the groups I’ve visited so far. But I’ll keep my eye on it.

Zotero

My (silly) prejudice against applications implemented in the form of Firefox extensions has been greatly dismissed by Zotero, a fantastic reference manager. Migrating the medium sized database (about 160 entries) I’ve created in Endnote for my thesis was somewhat tricky, because of my extensive use of custom fields, but after half an hour of adapting Endnote’s Export Output Styles, everything went well. Now, I want to see how well Zotero will work in cooperation with word processors like MS Word, LyX and ThinkFree Write. I also want to see if Zotero + CiteULike can work along well.

LinkedIn

This one seems to be all the rage in the States. After creating my profile on LinkedIn, I was surprised to see that all my past classmates at UFMG, Brazil were already there. But I am still a little sceptical about the usefulness of the concept. I recognise the importance of “networking” but I am more doubtful about putting it online. I suppose that networking is a zero-sum game. If everyone is connected to everyone, the global effect is levelling the game.

The “get introduced to” feature seems interesting, but do people use it?

Academia.edu

Like its own advertisement says this one is “a Facebook for academics”. The idea is not bad, but the current implementation is dreadful: the Flash interface is slow, everything is organised in a rigid hierarchical way (what happens to labs shared by two Universities?) and an information model which favours painstaking “tree-like” browsing instead of direct search. After some hassle I was able to put my profile in Academia.edu, and the site seems to be gaining momentum. Maybe we can hope for a major UI improvement?

Posted in technology | Tagged: , , , , , , | 1 Comment »