Using OpenOffice.org Charts in LaTeX

Finding out how to get my charts into LaTeX took way longer than it should have. First, I tried pasting it into a Writer document and then using Save As Picture, but its EPS output resulted in 0-byte files, SVG output was broken, and raster images came out at screen resolution. (I couldn’t find a way to export higher-resolution charts in Excel either!) So here’s how I finally did it:

  1. Copy and paste the chart from OpenOffice.org Calc into OpenOffice.org Draw.
  2. Export the drawing as PDF.
  3. Use pdfcrop <image.pdf> (provided in the texlive-extra-utils package on Ubuntu 8.10) to crop out the whitespace
  4. Now just use the image with includegraphics{image-crop.pdf}.

The results are crisp and clean. Amazing!

Cryptic errors from mod_fcgid and Perl

For future reference, the cryptic error from mod_fcgid:

[Thu Feb 12 22:10:27 2009] [warn] (104)Connection reset by peer:
    mod_fcgid: read data from fastcgi server error.
[Thu Feb 12 22:10:27 2009] [error] [client X.X.X.X] Premature end of
    script headers: dispatch.fcgi

means that dispatch.fcgi failed to start. Possible reasons are:

  1. Missing Perl modules. Unfortunately, I don’t know where the stderr output ends up. Try running the script directly; e.g. perl dispatch.fcgi.
  2. Missing Perl modules that you installed locally (e.g. local::lib) but Apache doesn’t have it in $PERL5LIB.

Remember that the folder must not be group-writable, and that any executable must be run from the directory root that suEXEC was compiled for! These will fail with a more useful error though, complaining of “suexec policy violation: see suexec log for more details” (the log is at /var/log/httpd/suexec.log for CentOS systems).

Adventures in Atlanta – Intel ISEF 2008

Intel ISEF 2008

Yesterday I returned from the Intel International Science and Engineering Fair in Atlanta, GA. This was an amazingly fun trip; not only was it an opportunity to present my work to many researchers and professionals in my field, but I also made so many new friends from traveling with a great group of people. See the photos of my trip.

Lobby of Hyatt Regency Atlanta

We arrived on Saturday night, and we walked into the grandiose lobby of the Hyatt Regency. The open-air lobby was 22 stories high with glass elevators.

Stocking up on snacks

Sunday: We went touring near Marietta, Georgia, and visited museums and parks in the area. We went grocery shopping to get candy, chips, soda. That evening we returned to trade pins with people from all over the world. I got some very interesting pins, like a frog from Puerto Rico, a panda from China, and a leaf from Costa Rica.

International Shout-Out at opening ceremonies.

On Monday, we set up our projects. In our free time, we hung out at the E-Lounge, surfed the web, and watched The Italian Job in the home theater setup there. At the opening ceremony, we were treated to an amazing drum performance and an “International Shout-Out”, in which students representing 51 countries carried posters onto the stage.

Lost in Atlanta

That night we also ended up getting lost because we needed to take a detour around construction work. During our journey back to the hotel, we experienced city traffic, at its best: we encountered dead ends, accidentally went the wrong way on a one-way street, and almost got hit by someone speeding through a red light.

Left to right: Justin, me, Manali, Jeanni

Tuesday night we visited the Georgia Aquarium and the World of Coca-Cola, as a welcome by the host committee. The World of Coca-Cola had free soda tasting stations, with hundreds of different Coke flavors and brands from the world. After getting back, we practiced our presentations and went to bed early in anticipation of judging day—Wednesday.

Looking down the row in the exhibit hall

The morning of judging was tense. This was it: the big day, the culmination of a year’s worth of work. The opportunity to present and impress. After putting on formal clothes and buying a Danish pastry from the hotel cafe, I walked to the convention center. I talked to many, many judges who came to my display, and it was a great experience to discuss my project with them. I felt much more confident after having learned many tips on presenting.

My project display

They were impressed by my demo, and I got many positive comments about the monitor built into my display board. Though it lasted from 8:30 in the morning until 6, the hours went by so quickly. After the final announcement of the day, a wave of applause rushed through the exhibit hall, increasing in intensity until the room was filled with cheering. It was satisfying to know that it was finally over—we could relax!

Climbing to the roof of the hotel

Just for fun we decided to explore the hotel, and climbed the stairways. We were surprised when the “alarm” door to the roof was open. The roof was covered with skylights, and we could see the executive penthouse on the top. We were a little nervous about standing on the non-concrete rubbery white tiles, but we were surrounded by a magnificent view of the city, no guardrails, and nothing separating us from the air.

Thursday and Friday, we had the special awards, and then the grand awards ceremonies. This has been the most successful year for me yet; I received a total of $9,500 in awards:

  • Third Place Grand Award of $1,000 in Computer Science
  • Association for the Advancement of Artificial Intelligence – Second Place Award of $500
  • Office of Naval Research on behalf of the United States Navy and Marine Corps – Tuition Scholarship Award of $8,000

On the flight back Friday night, we watched the sun set in slow motion as the plane flew west against the Earth’s rotation. It was an incredible experience, and I could only wish to stay longer. I’m looking forward to participating again next year!

How to Present – Notes from ISEF 2008

At the Intel International Science and Engineering Fair this year, I’ve learned a lot about presentation techniques. Thanks to Patrick for giving me some great suggestions, such as:

  • Posture: stand with feet pointed toward judge, lean forward slightly
  • Hands: use generous hand gestures, in front of chest, not lower
  • Use visual bullets when making lists. Hold up fingers for each item.
  • Intonation: Use emphasis on key phrases, and be sure to pause between clauses and sentences. Give the listener time to absorb information, and possibly ask questions.
  • Don’t use filler words like “uh”, simply pause and glance back at board if you forget what to say.

Here are some other notes about the judging process at ISEF experience:

  • Some judges are not interested in hearing a presentation, and will instead like to ask you questions about the board. They have all already read the board. This can be difficult if there is background information that needs to be explained as part of your presentation.
  • Other judges may want a 2-minute summary of your work. This means you should state the key points: the purpose, hypothesis, conclusion. In my case, I also showed my demonstration.
  • Judges are assigned based on your sub-category selection, so choose carefully.
  • Recognize types of judges:
    • Grand awards judges have blue ribbons, and a second ribbon corresponding to their category. Computer Science judges had yellow ribbons. These judges are written on the red card that is placed at your project. They have strict 15 minute periods for each project, and there is a warning bell when there are a couple minutes left.
    • Special awards judges have red ribbons. Their organization is written on their badge. Special awards judges will not always have time to hear the full presentation.

Question and Answer: Questions about the technical details of your project are easy to answer, because you have already researched the field for many months. The trickier questions are more general, and they apply to almost all projects. For example:

  • What were some of the biggest challenges in your project, and how did you overcome them?
  • What was something surprising that you learned, that you weren’t expecting to?
  • What is the significance of your results?
  • How did you learn about this?
  • Why did you want to do this project? How did you come up with this idea?
  • How does your work compare to existing research?
  • What makes this project better than the other projects here?
  • What would you do differently if you did this again?
  • What else would you like to explore in this project?

Catalyst on Windows with Strawberry Perl

The Catalyst Framework is an elegant Model-View-Controller based web framework for Perl, with similarities to Ruby on Rails. It is a popular choice for Web 2.0 applications based on Perl, speeding up and simplifying development.

Catalyst is very nice to use, but has a reputation of being hard to use, particularly on Windows. Windows has historically been regarded as the “outcast” of Perl development environments—the lack of proper build tools had made installing most modules (including Catalyst) difficult, to say the least. ActiveState’s binary PPM packages are hard to find and often outdated. The effect has been that the complex dependencies of Catalyst were nearly impossible for the average mortal to manage on Windows.

I recently discovered Strawberry Perl, which has made building modules on Windows easier than ever. It includes a bundled MinGW toolchain for compiling and pure-Perl equivalents for other necessary tools. Now, it is no longer necessary to install Visual Studio or Dev-C++ just to build Perl modules. Using the CPAN installer from the command line Just Works.

If you have tried to install Catalyst on Windows before, you’ll know that hunting for PPMs and building the missing modules takes hours and leaves you with an installation that isn’t up-to-date. With Strawberry Perl, I was able to install the newest Catalyst fresh from CPAN in about 10 minutes.

Read on for easy instructions in 5 steps.