Thumbing

By the way, the travel log still lacks pictures, but that will change soon.

Update: Travel log entries with photos now have inline pictures.

I’ve spent the past two nights learning how to dynamically resize images in PHP, and image functions are harder than they look at first glance. You would think that it would be as simple as passing a filename string to a “resize()” function in a PHP file and linking to that file as an image. Oh no, you need to create a container object and copy an image into it and resample and specify about a dozen different arguments and return “image/jpeg” Content-type headers before you can even think of resizing a JPEG nicely without getting sickly green tones over it. If you’re lucky. More often you just get a black square.

After much hunting, downloading, trial, and error, this code snippet set me on the right path. It needed tweaking — imagecopyresize() kept pixelating until I replaced it with imagecopyresampled(), and the colors were completely whack till I discovered imagecreatetruecolor() — but I think I’ve managed to make a decent dynamic JPEG thumbnailer which will take just about any local image and resize it to a given percentage, all specified in $_GET. It’s what’s running the webcam shot in the sidebar right now.

I should have a code snippets repository around here, perhaps.

Migratory Shame

Fitting, I guess, that I finally re-uploaded the travel logs (still incomplete) last Saturday, March 13th: second year anniversary of The Jump. That means I’ve lived in the USA as an American for two years.

I get twinges of guilt about it sometimes, reading news from back home. The PDI is quite contentious in labeling as sellouts those young graduates who leave the Philippines’ troubled shores for higher salaries in foreign currency. Having contributed to the brain drain, I probably fall under that category myself. While I did depart with the stated purpose of earning my Master’s degree, it would be dishonest to say that my decision was not also affected by the same despair which drives the exodus.

Mark has thoughts on the “sellout” label, mounts a defense of overseas workers, and issues a challenge to those in power: give Filipinos a reason to stay.

Mike has an excellent admonition for those who characterize the flight from the country as a fight for survival: seeking greener pastures is not the same as fleeing for safety. The Philippines may be in bad shape, but certainly it is not a second Somalia. Yes, poverty, street crime, and dirty politics are present, and life in Manila is hard and rough, but it’s still much better than “merely survivable.” In 1998 I left home, rented a little room in Parañaque and lived in relative squalor for three years, and even that life of subsistence was nothing compared to the lives led by the seaweed farmers of Katakian Island, the farmers of Ilocos Norte, or bangkeros from Batangas or Palawan. (All of whom I have lived among for a short time, and even then sheltered from their harsh routine by the elitist veneer of Filipino social stratification.)

Rowie is growing a list of initiatives. Scroll down a bit also for further reflections on this “Avian Migration” issue.

From Ganns, an open letter to FPJ. Though I doubt FPJ would be able to even understand it if he received it, Ganns is staying on.

As for me, shameful as it is to admit to my friends back in the Philippines, my plans are set to stay here for the long-term. I’ve grown roots here in the Eastern seaboard, both in this city and in the girl that I love. What I wonder is, does this now exclude me from criticism of Filipino affairs, owing to the image of the deserter sellout sniping at his roots from afar?

House Call

The phone rings. Being the only one in the office this morning, I pick it up and look at the handset to read the Caller ID: “U.S. Capitol.”

“Hello, this is Paulo.”

“Hello? Oops, sorry, I have the wrong number.”

“Oh, okay.” Click.

Have I mentioned how much I love living in DC?

Catching Up on Space News

This journal has been somewhat behind on the latest space news, so in a nutshell, it pleases me to inform you that:

How Now?

If you are reading this, then the transplant was a success.

I apologize for my long internet absence. It was not my intention to leave you comfortless for such an extended interval, but I was loath to release an incomplete site, and could not bear to emerge from the dust of rebuilding until everything was… just… so.

Major changes follow.

  • The “hownow” subdomain, in addition to reinforcing the “brownpau” brand, is also part of an effort to organize and modularize hosted projects and site content, with the “hownow” section devoted to personal text, pictures, and weblog material. More projects are in the pipeline, struggling amongst themselves to rush out of a narrow time-and-focus bottleneck.
  • Weblog archives now publish as single entries. The decision to switch to individual posts was a long and conflicted one. My preference for monthly archives was rooted in the desire to show posts within a temporal, narrative context; but a monthly listing is long, slow, tedious, and bandwidth-intensive, and anchored permalinks — textual or numeric — proved unreliable and confusing. Additionally, trackback pings sent out for date-based archives carried nonstandard numeric anchors, a default which could not be changed to the dirified title anchors that I preferred. Individual entry links fix this problem, giving each entry its own easily identifiable page, with comments and trackbacks all integrated. Monthly archives remain, but only as entry excerpts linking to full entries. With enough coding, you too can have future-proof and cruft-free MT archive URLs.
  • New CSS on inside pages. Initial inspiration for the design came from the introductory header box at the top of Andy Budd’s blog. A fixed-width layout was settled on, for simplicity’s sake, and the header-nested vertical nav menu came soon after.
  • I was startled to realize that one can easily link to PHP scripts as CSS files with dynamically generated content, using header to declare a crafty “Content-Type: text/css.” This bodes well for the return of randomizing blog layouts.
  • As has been stated elsewhere: Georgia. It’s the new Verdana.
  • More coming soon. It’s been a busy interval.

Lions, Saints, Rainbows, Oh My

Stitched panoramic view of E Street side of the White House from the Zero Mile Marker, tourists and all. Amy to right.

One of Canova’s lion sculptures, guarding the Corcoran Museum.

From the Corcoran collection, stained glass windows showing scenes from the lives of Saints Crispin and Crispian, patron saints of shoemakers and cobblers.

Shortly after a powerful thunderstorm, a rainbow appeared over Downtown DC.

Photos taken with a Palm Zire 71.

Revenge

Seen on a messenger bag: “Revenge” of the Jedi? And why’s Yoda there when he was barely in the movie? Confusing, this is.

Photo taken with a Palm Zire 71.