03 November 2009

pager in wallet program

I recently got an email from someone who has been using the password wallet program. The reader asked about the possibility of using a different pager when viewing the password file (the "less" pager is hard-coded into the program).

I thought this was a good idea, so I've changed the wallet program to allow the user to specify the pager using the WALLET_PAGER environment variable (which defaults to "less"). You can also put this in the .walletrc file. The reader wants to use w3m, so this should now work in .walletrc:

WALLET_PAGER="w3m -o bg_color=blue"

I've updated the program in the google code repository.

24 October 2009

Zendcon 2009

Got home last night from Zendcon 2009. Good conference.

Here are a few of the main things I'm taking away from it:

  • I'm a fool not to be using APC (and maybe memcache)
  • Zendconners really like twitter (I got sucked in: @carl_welch)
  • I need to learn more about dependency injection and better OOP methods
  • I need to give git a try (had a good visit with the guy at the github booth)


Update (Monday 26 October): I took some pictures, and I've posted them to flickr.

civic center (nighttime)

palm trees

16 May 2009

Barnswallows' return

The barnswallows are back. Considering the placement of the nest, I assume that it has to be the same ones as last year. I've been taking a few pictures.

26 April 2009

belated Earth Day

Here are a few interesting articles I found this past week:

29 March 2009

bad news for iron fertilization

I follow a few environmental blogs, and for a while I was occasionally seeing posts about the possibility of using iron fertilization for carbon sequestration. The idea (as I understand it) is that scientists would dissolve a bunch of iron near the ocean surface, phytoplankton would consume the iron (causing the phytoplankton to flourish), the phytoplankton would inhale a bunch of carbon dioxide, and the phytoplankton would sink to the bottom of the ocean, taking the CO2 with it, forever.

So they tried it.

They dumped a bunch of iron in the ocean, and the phytoplankton dutifully multiplied (and presumably inhaled a lot of CO2). But before the phytoplankton could sink, it ended up at the bottom of the food chain of a series of increasingly large sea creatures that live near the surface.

Nice try.

25 March 2009

Batman logos

There's a post on /Film highlighting a youtube video showing various incarnations of the Batman logo. The video includes logos from various comic book titles, TV series, and films. It's not exhaustive, but it's a cool presentation of a good sampling.

18 March 2009

saving space in firefox

I found a cool Firefox extension a day or two ago. It's called Menu Mod, and it's good for saving some space on the Firefox window (particularly if you have a small screen, like on a netbook). It can collapse all the standard menu items into a single menu item (after installing/restarting, do Tools->Add-ons, click Menu Mod, click Preferences, select "Place all menus inside another"). This isn't all that helpful on its own, but try also doing the following:
  1. do Menus->View->Toolbars->Customize
  2. drag all the stuff from the navigation bar (Back/Forward/Refresh/Stop/Home buttons, address bar, etc.) up next to the newly-collapsed menu
  3. get rid of the search field by dragging it to the "Customize Toolbar" window
  4. do Menus->View->Toolbars and uncheck the Navigation toolbar
If you do this and start to miss the search toolbar, try this:
  1. go to www.google.com (or whatever your favorite search engine is)
  2. right-click in the search field and select "Add a keyword for this search..."
  3. add something descriptive for the Name field (like "search" or "google")
  4. add something short for the Keyword field (I used "g")
  5. next time you want to do a search, open a new tab (Ctrl-T is as easy as Ctrl-K), then type the keyword ("g" for me) followed by a space and your search term(s)
If you use the Web Developer extension, do Menus->View->Toolbars->Customize and drag the "Web Developer" item so that it's to the left of the URL bar. Clicking this new item is a quick way to hide/display the Web Developer Toolbar.

17 March 2009

xampp

At times I've wanted to try doing some development work on my eeepc, but the default distribution doesn't come with a LAMP stack (and so far I've been too chicken to try installing something else).

Today I tried installing xampp, and that seems to work pretty well. So far my only complaint is that it doesn't seem to come with any version control tools (like svn), and I don't see an easy way to add/compile them (the eeepc doesn't have gcc).

16 March 2009

ESC key alternative in vim

I've been using vim for a couple of years now, and I really like it. But one thing that's always been a nuisance to me is reaching for the escape key. I often hit the wrong key (like the tilde or F1), and/or I have to glance at the keyboard to find it.

A recent post by Matthew Weier O'Phinney suggested binding the 'jj' sequence to <ESC>. I've been trying that for the last day or so, and I'm finding that to be a pretty good trick. Here's what I added to ~/.vimrc to make it work:

:map! jj <ESC>

01 February 2009

19 December 2008

Belize: Day Off, Return

(This is part 6 of a 6-part description of a trip I took to Belize with friends just after Thanksgiving 2008. I put my pictures a flickr.)

We didn't plan anything for Thursday, so we slept in. After a leisurely breakfast, we headed north into the shopping areas of San Pedro. We visited several shops looking for souvenirs and gifts. I found that most of the offerings seemed to be overpriced tourist junk, but I did splurge on a couple of Belikin Beer T-shirts. This shopping trip was also a pub crawl: we hit four or five bars, having lunch in one of them. There are lots of dogs in San Pedro. One would adopt us for a while as we walked along, and another would pick us up as we left a shop or bar. We finished out our last full day of the trip with a delicious dinner at the restaurant of a nearby coastal resort.

We took it easy again Friday morning. I partook of some wireless Internet by the Xanadu pool (my friends were impressed that I'd held out for nearly a week), L and KL swam a bit, and H and K did a little more shopping. Then we packed up and took a cab back to the San Pedro airport. Another Tropic Air flight with more breathtaking views of the Caribbean took us directly to the Belize City International Airport. Other than K having a bit of trouble with immigration/customs in Houston, we had an uneventful trip home. The temperature change was pretty startling: from somewhere around 85F to 33F. Ouch. Back to reality. *shrug*

Caye Caulker

It was a fabulous trip. I'd do it again.

18 December 2008

Belize: Caye Caulker and Snorkling

(This is part 5 of a 6-part description of a trip I took to Belize with friends just after Thanksgiving 2008. I put my pictures a flickr.)

Wednesday morning started with another speedboat pickup from Searious Tours. They took us and several other tourists back to the Searious pier where we piled onto a catamaran. There were ten of us on the tour with two crewmembers. We headed out toward a popular snorkling spot just inside the barrier reef. I'd never been snorkling before, so I didn't know what to expect, but this turned out to be my favorite part of the whole trip. The water was only twenty or thirty feet deep, and it was teeming with fish. We even saw a few stingrays and a couple of moray eels. The fish would swim almost right up to me: I guess they get lots of practice sharing the water with snorklers. We probably got to spend the better part of an hour in the water at this spot.

After another short run on the catamaran, we found ourselves at what the crew called "Shark Ray Alley." As the name suggests, it's an area frequented by predators. One of the crew (Daniel) jumped in and caught a nurse shark. Daniel said that the animals are used to him, and they just swim right up to him. The shark was about four feet long, and it just sat patiently in Daniel's arms while we touched it. Its skin was courser than I would have guessed. After we'd all checked out the shark, Daniel released it and grabbed a stingray, which had a much smoother skin. Anyway, the underwater petting zoo was pretty cool.

Back on the catamaran, we sailed south to the island of Caye Caulker, with plenty of Bob Marley, Belikin, and rum punch along the way. The crewmembers jokingly described Caye Caulker as a drinking village with a fishing problem. We had a delicious lunch of ceviche and fish burritos, followed by a little shopping.

The return trip was straight into the wind (and seemed to narrowly avoid some bad weather), so the crew had to rely on the two outboard motors. Back at Xanadu, we made sandwiches for dinner and again fell into bed pretty early, most of us nursing sunburns.

Caribbean waters

17 December 2008

Belize: Altun Ha

(This is part 4 of a 6-part description of a trip I took to Belize with friends just after Thanksgiving 2008. I put my pictures a flickr.)

We got up early Tuesday morning and were picked up from the Xanadu pier by a speedboat from Searious Tours. There were already several other tourists on board (along with the three crewmembers), and we picked up a few more at other resorts along the coast. Then we headed out over the open waters toward the mainland.

The fellow from Searious who drove the boat (a two-engine job, about 40 feet long) and served as our tour guide as we left San Pedro was named Willie. He was very knowledgeable about the local flora and fauna, and he was fun to listen to: his speech was sort of a toned-down version of the frequently-overblown Caribbean stereotype (I'm thinking Predator 2 here). On the way to the mainland, we got to see a couple of bottle-nosed dolphins break the surface pretty close to the boat.

Once we reached the coast, we went up the Belize River a bit. We saw an iguana lounging about in one of the trees. We stopped at a dock and transferred to a van which took us to Altun Ha. The ruins there are pretty spectacular--I'll let the photos speak for themselves. We stayed for an hour or so. We got to climb to the top of one of the structures, and that was a real kick. There were no guardrails or anything to prevent a careless tourist from falling over the side--one of the many differences with tourist attractions in the litigation-happy US.

Belize River

iguana

Temple of the Green Tomb

After Altun Ha we spent a couple of hours at the Maruba Spa. They apparently offer massages, mud treatments, and several other odd things. We enjoyed a nice lunch and some time by the pool. Then we rode back to the dock (with one of the tour guides acting as bartender in the back of the van: Belikin and rum punch) and took the boat back to Ambergris Caye (the ride back offered a pretty spectacular sunset). That evening we walked up the beach to the Blue Water grill for some fantastic seafood (I had some snapper), and then we headed back to Xanadu and fell into bed.

Maruba Resort pool

Caribbean sunset

16 December 2008

Belize: San Pedro

(This is part 3 of a 6-part description of a trip I took to Belize with friends just after Thanksgiving 2008. I put my pictures a flickr.)

We had pretty luxurious accommodations in San Pedro, which is on the island of Ambergris Caye. We were in a three-level dome-topped structure, and we had the top two levels. Our downstairs had a well-equipped kitchen, a dining area, a common area (TV and couches), and a bedroom (L and KL took that one). There were two more bedrooms upstairs: I took one, and H and K took the other. Each bedroom had its own bathroom. There was a wonderful wooden deck/balcony off of our downstairs, and it looked out over the water. It was really quite fancy.

view from Xanadu balcony

The beach wasn't quite what I expected, because I hadn't read about the barrier reef. Ocean waves strike the reef, rather than the coast, which is a big part of why the water here is so clear. But that means that we didn't see or hear waves, which is one of my favorite ocean things. So that was a very minor disappointment, but it was still very cool being by the water. The reef is not that far out, so we could see waves breaking out on the reef just below the horizon, and that was pretty awesome to watch. The beach itself is very clean white sand, and it was fun walking around.

Caribbean barrier reef

San Pedro coast

That first afternoon in San Pedro we didn't do much more than have a good meal and settle in to Xanadu. We turned in early, because we knew we had an early start the next morning: the Mayan ruins at Altun Ha.

15 December 2008

Belize: Pook's Hill

(This is part 2 of a 6-part description of a trip I took to Belize with friends just after Thanksgiving 2008. I put my pictures a flickr.)

David introduced us to his co-manager (and wife) Kat and the owner (Ray) and took our bags to our cabanas (I'd never seen a thatched roof up close before). We took it easy that afternoon, and it got dark around 6PM. After the amazing sunsets, we mostly hung out at the main cabana, which has hammocks, chairs, a well-stocked bar, and a few sugar-water dispensers that were very popular with the local hummingbirds. This gave us an opportunity to get acquainted with some of the other guests: at one point I got to have a fun visit with a self-described "petrol head" from Britain, and we talked about Steve McQueen movies. After a few drinks, dinner was served downstairs, and we were treated to a delicious buffet-style meal. After some after-dinner coffee and tea (and maybe a few more cocktails), we retired to our cabanas for the night. I found that I really enjoyed falling asleep to the sounds of the jungle.

Pook's Hill sunset

American oil palm

main cabana

The next morning (Saturday), my companions went on the Actun Tunichil Muknal (ATM) adventure tour. I picked up a charming sinus infection around the time we began this trip, so I stayed at Pook's. My friends said that it was a great experience, in which they hiked, explored some caverns, and visited Mayan ruins. The hike to the ATM cave requires four river crossings each way, and there are no bridges: you swim across. So, although they said it was lots of fun, my friends told me that I'd made a good decision to skip it. So I had a quiet morning at Pook's, and by afternoon I felt perked up enough to do part of one of the hiking trails. By the time I got back to the lodge, my friends had returned from the ATM trip, and we enjoyed another evening at the main cabana.

Americal oil palm

Sunday morning we finished out the hiking trail I'd started the previous afternoon. That route took us across a large meadow and along several well-kept jungle trails. That afternoon we had a real treat: we went inner-tubing down the Roaring River. It was surprisingly fun and relaxing. The water was cool but not cold, and it was amazingly clear. There was a great swimming hole in a bend of the river, and we had a high time hanging around there for about an hour. We saw some sleeping bats hanging from a tree, some fresh footprints (probably a tapir) on the riverbank, and we got a kick out of watching the smaller fish nibbling at the skin of our feet (that tickled a bit).

canopy entry

River Trail bush

looking across the Roaring River

standing in the Roaring River

Sunday evening's pre-dinner drinking was on the roof of the owner's house, which is up at the top of the hill and afforded a breathtaking view of the valley. We saw several egret flocks fly to their nighttime nesting areas, and we were up high enough to see the hills.

flight of egrets

Monday morning we spent a little time on one of the other hiking trails near Pook's, this one through the jungle above the owner's house. At one point we all heard something moving around to our left, but we never saw what it was. And then we took the monstrously-bumpy road back to Teakettle Village, the Western Highway back to Belize City and its municipal airport, and a Tropic Air prop to San Pedro on Ambergris Caye. That was a really cool flight out over the water. It offered a great view of the clear waters of the Carribean and the barrier reef. A short cab ride got us to our home for the next four days: Xanadu Resort.

Caribbean

14 December 2008

Belize: Arrival

(This is part 1 of a 6-part description of a trip I took to Belize with friends just after Thanksgiving 2008. I put my pictures a flickr.)

Two friends of mine (L and KL) and I flew to Houston on Thanksgiving where we were met by two other friends (K and H). We spent the night there and then got up the next morning and took a Continental jet to the Belize City International Airport. After going through immigration and customs, we stepped outside and were met by David, one of the managers at Pook's Hill Lodge. Pook's is a great place in the jungle of the Cayo District, far away from any population centers.

David packed us and our stuff into a van, and we headed westward on the Western Highway. After about an hour, we stopped at a restaurant called Amigos and had a delicious lunch of stewed chicken, rice and beans, and Belikin beer. Due to import restrictions, Belikin is about the only beer you can get in Belize--fortunately it's very good.

After lunch we went to the Belize Zoo, which features howler monkeys, spider monkeys, owls, tapirs (which were quite a bit bigger than I expected), otters, coatis, a puma (also larger than I expected), a pair of HUGE crocodiles, a couple of jaguars, and some really foul-smelling wild pigs called peccaries. I didn't get many good pictures, but I got a short movie of one of the jaguars (he came right up to the fence).

crocodile

Another hour on the Western Highway brought us to Teakettle Village. We took a monstrously bumpy dirt road for about a half an hour, and then we arrived at Pook's Hill Lodge, where we spent the next three days.

18 September 2008

Thursday at ZendCon

Today is the final day of ZendCon, and it's a half day. It started with sessions, rather than a keynote (the keynote is at the end). I was having trouble figuring out which session to attend, but then I looked at the presenter names, and that made it easy to pick "Scaling Mozilla's websites with PHP" with Laura Thomson. I've heard her speak at OSCON, and she always gives a good talk. She didn't disappoint today, as she told us about how she helped Mozilla get ready for the Firefox 3 "Download Day" (or, as she called it, D-Day). It was a fascinating case study of query/code optimizations, caching solutions, MySQL replication tricks, and other goodness. A couple of fun facts are that mozilla.com uses drupal, and D-Day saw saw 14Gb/s of downloads and 2Gb/s of web traffic.

Next Stefan Priebsch gave a good discussion and demonstration of Selenium. Several people have talked about Selenium at this conference, and it really looks like a great resource.

The closing keynote is by David J. Neff from the American Cancer Society. He told us about sharinghope.tv, a site with user-generated content from people affected by cancer. Pretty cool.

Here's a picture from the closing keynote. That's Cal Evans (ZendCon program chair) on the stage, and the (backs of the) heads of Laura Thomson and Paul Reinheimer. Sebastian Bergmann was also milling about (which would have put my three favorite speakers in the shot), but he wouldn't hold still long enough.

Cal on stage

17 September 2008

Wednesday at ZendCon

ZendCon started with a really interesting keynote today (I'm usually not big on keynotes). The first speaker was a Zend Framework developer named Wil Sinclair, and he talked about how PHP applications have evolved over time. He introduced the CEO and CTO of Varien, and then talked about their company's development of Magento. Magento looks really cool. It's an open-source e-commerce built on Zend Framework. It appears to be as full-featured as big commercial e-commerce sites like amazon.com. They apparently wrote the whole thing in a matter of months. Impressive. I'll definitely try it if I ever need to make an online store.

Then I checked out "Architecting for PHP5..." with Elizabeth Smith. She covered some of the features new to PHP5 and again encouraged us to use extensions whenever possible ("C is faster than PHP"). Looks like I need to read more about the SPL and the filter extension.

Stefan Esser gave a really good talk called "Lesser Known Security Problems in PHP Applications." Some of it was kind of scary. We even got to hear him announce a 0-day vulnerability with the ZipArchive extension (along with a more obscure problem with HTTP response splitting affecting users of older Netscape proxies).

After lunch was another keynote: "The State of AJAX" with Ben Galbraith. Not a lot of technical information, so not too interesting to me. It was mostly a survey of lots of shiny-looking, bleeding-edge stuff (which may or may not be around in six months). He speculated that HTML5 and (google) gears will be important to the future of AJAX. I was hoping he'd tell me which AJAX framework to use, and he did address this point. He said that it's sort of a toss-up between Dojo, Prototype/script.aculo.us, and jQuery, because they're all small, powerful, extensible (with community support) frameworks. So pick one. *sigh* Thanks.

In his "Phar Scape" talk, Marcus Boerger showed us some neat tricks to do with phar, a deployment tool modeled after Java's JAR.

I went to another talk by Sebastian Bergmann, this one called "phpUnderControl: A Quick Start to Continuous Integration." I'm pretty much the only PHP programmer where I work, so I don't really have to integrate my work with a team. But phpUnderControl looks cool enough that I'd like to try it. Besides, it makes nice pictures that could distract managers. (And Sebastian says that he likes doxygen more than phpDocumentor, so I'll give that a try, too.)

I finished out the day with an UnCon session called "Subversion Tips and Tricks" with Lorna Mitchell and Matthew Weier O'Phinney. It turned out to be mostly introductory in nature, but I still picked up a few things. It was very informal, and it was fun.

ScribeFire

I've been playing with ScribeFire (a Firefox extension) today, and I'm finding it to be a pretty good HTML editor. It runs right in the browser (one of the configuration items lets you run it in its own tab, which is cool). It'll save drafts locally, which is good for offline writing. And if I put a URL in the copy-and-paste buffer, when I highlight some text in ScribeFire and click the URL button, the URL in the buffer automagically appears in the URL dialog box.

16 September 2008

Tuesday at ZendCon

Kind of a slow morning at ZendCon (to me, anyway). Started off with the keynote by Harold Goldberg, Zend Technologies CEO. Mostly business-speak, so not too exciting (I'm a nuts-and-bolts sort, I guess).

Then I went to "Of Haystacks and Needles" by Derrick Rethans. This looked interesting to me because of my php|arch article. One of the people who wrote about my article seemed to advocate storing records as documents, like maybe XML documents. I think that's a pretty interesting idea, because storing it like that sidesteps the whole issue of different records having different sets of fields. And I could just store the XML string in a text column or something. But I didn't know how I'd do searches--if I want to find a record submitted by someone whose last_name is Smith, it seems like I'd have to run a DB query to get the XML string for every record, pull it out of the DB and into application memory, parse each XML string, and look for any that match. So I was hoping that this would give me some ideas of how to do this (although lately I've been thinking about stored procedures). Anyway, the talk gave me several things to look at more closely later:


Lunch was a catered affair again, but no celebrities this time (not that I realized, anyway).

Things picked up after lunch, starting with "PECL Picks..." with Elizabeth Smith. This was a whirlwind survey of some PECL projects that Elizabeth deems "cool." Here are some of the ones that look interesting to me:


Next was "Knight Rider Methodology to Software Develoment" in which Eli White covered a lot of development tools and techniques. The theme was how Michael Knight got lots done on (the 80s TV show) "Knight Rider" by using the tools at his disposal (well, tool: the car, KITT). The talk was punctuated by clips from the show (one of my favorites as a kid, and it's far cheesier than I remembered--wow). Here are some fun quotes from Eli's talk:

  • "hardware is cheaper than people"

  • "use someone else's time as your own" (use libraries rather than re-inventing the wheel)

  • "nothing is right the first time: even 'hello, world!' needs internationalization" (debuggers)


After his talk, I'm looking forward to trying out some subversion GUIs like subcommander and rapidsvn.

Paul Reinheimer gave a great talk about how Web 2.0 breaks the browser's Back button, and he talked about a really interesting solution using the yahoo user interface (YUI). He also talked about how to deal with AJAX responses coming back in an order different from that in which they were sent. I think that'll take a few reads for it to sink in for me, but I'm looking forward to trying it out. Paul does PHP training, and he's a really good speaker.

Finally, Eddo Rotman gave a good presentation about PHP errors and exceptions. His talk has inspired me to write a cron job which knows a list of PHP application error logs and emails me the entries made in the last 24 hours: maybe it'll append a marker to each log file and email the entries written since the previous marker.