Archive for July 2008

New search engine Cuil

Updated: 29 Jul 2008 05:37 am by Ron
Filed: Geek Stuff
Tagged:

Saw a post this morning about a new search engine called “Cuil” — that’s apparently an Irish word for knowledge and pronounced kind of like “cool”. Started by some ex-Googlers and taking on the search giant. Been playing with it for a bit and it’s fairly impressive in both its coverage and the results it returns. They also have some interesting takes on the ways to present results and provide additional information (tabs, drilldowns). They claim that relevance is the key to their results and is more important than popularity.

Worth looking at if for no other reasons than seeing if it works and because that has to be a phenomenally difficult market to break into at this point. Plus, I’ll typically root for the underdog if they’ve got a good product and are taking on an established giant.

Captioning in WordPress 2.6

Updated: 23 Jul 2008 10:09 pm by Ron
Filed: Geek Stuff
Tagged:

One of the changes made with WordPress 2.6 is support for captions on images within posts. Having recently upgraded this blog to the current version of WordPress, I was curious to see how big a deal it would be to provide appropriate styling for those captions in the resulting markup for a captioned image. What I found: it was simple.

WordPress now wraps the inserted image with a DIV with a couple of classes (wp-caption and a class specifying the alignment), and follows the image’s IMG tag with a paragraph classed with wp-caption-text. The image’s IMG tag is also classed, but the purposes of this discussion, that won’t matter. The alignment classes on the wrapping DIV are alignright, alignleft, and aligncenter; these are the same classes that have been used to specify image alignment in the past, so we’ll want to make sure we don’t clobber any style attributes already applied to those classes lest we goof up the appearance of posts authored under previous verions of WordPress.

In previous versions, WordPress used those same classes (alignright, alignleft, aligncenter) to specify the alignment for the images; the difference now is that those classes are applied to the enclosing DIV elements rather than the image itself. In my existing stylesheet, I have already defined the following CSS to float the images to the appropriate side:

.alignright { float: right; }
.alignleft { float: left; }

By leaving those generic, images in posts authored with the earlier WordPress versions will still be positioned appropriately and the enclosing DIV will be positioned appropriately, while allowing the text of the post to flow around the image and the accompanying caption, in posts from the new version. (Centered images aren’t floated, but are “centered” based on the margins applied to the DIV, as shown below; note the use of the auto left and right margins.)

The other item to note in looking at the markup applied when we insert an image is that both the image’s IMG tag and the wrapping DIV have widths specified (the IMG via the width attribute, and the DIV via an inline style attribute). The DIV’s width is set to be 10 pixels larger than the image’s width.

In my theme, I’ve provided a subtle border and a bit of whitespace around images, and I wanted to retain that same basic appearance with the new layout. I also wanted the caption text to now appear inside that border and for the caption text to be a slightly smaller size than the page’s body text.

Enough, already! Let’s see both the necessary entries in the CSS and the results…

div.wp-caption { border: 2px solid #e4e4e4; padding: 0; background: #f0f0f0; }
div.wp-caption img { margin: 5px; }
p.wp-caption-text { font-size: 0.9em; margin: 0 5px 5px 5px; }
div.alignleft { margin: 0 0.8em 0.5em 0; }
div.alignright { margin: 0 0 0.5em 0.8em; }
div.aligncenter { margin: 0 auto 0.5em auto; }
Li enjoying a juice-break on her first camping trip (July 2008)

Li enjoying a juice-break on her first camping trip (July 2008)

And here’s the result. We’ll add some filler text and an image with a caption as an illustration. Integer id massa non purus pretium consectetuer. Donec volutpat mollis tortor. Maecenas orci turpis, venenatis nec, dignissim in, cursus eget, nulla. Nam condimentum, orci ac fermentum iaculis, justo nunc consequat pede, adipiscing hendrerit lacus orci vulputate nisl. Etiam consectetuer justo quis pede. Duis arcu nisi, fringilla sit amet, dignissim ut, vulputate quis, velit. Morbi metus. Donec diam justo, porttitor vitae, ultrices ut, auctor nec, sem. Fusce fermentum risus vitae justo. Cras feugiat justo non turpis ultrices pellentesque. Nam diam justo, convallis ac, euismod quis, ultricies rutrum, quam. In quis ipsum. Quisque imperdiet. Curabitur et orci in urna lacinia placerat. Aliquam erat volutpat. Sed lobortis. Mauris quis est a lorem tincidunt mollis. Duis pellentesque accumsan nulla. Nam tempus.

Comments? Got a better way? See a problem? Let me know.

A couple blog-related updates

Updated: 20 Jul 2008 07:55 am by Ron
Filed: Geek Stuff
Tagged:

The WordPress crew released an update to the blogging engine this past week, so I’ve updated to their latest version as of this morning. I’d run through the update on my development box at home ahead of actually updating the real blog, so the upgrade itself went flawlessly and took less than 5 minutes. The major changes that appear to be of interest to me are post revisioning, captioning on images, and some significant improvements in its handling of images. Most of the changes are on the administrative side, but a couple of those should make it easier for me to get back to work on getting some of our China pix posted. I’ve also updated to the latest jQuery library under the hood, as well, primarily for the speed improvements and bugfixes incorporated since I first began using it here.

For the curious, you can find more on the update here and here.

Blog traffic stats for June: 124 unique visitors, 329 page views, 227 visits.

A couple more firsts

Updated: 15 Jul 2008 05:53 am by Ron
Filed: AdoptionFoodLife in General
Tagged:

A couple more firsts — not necessarily momentous like steps or words — but firsts, nonetheless. We went to Salt Lake City over the weekend to see Real Salt Lake play the Columbus Crew, so Li saw her first MLS match. While there, Li had her first experience with Indian food when we had dinner at Star of India in downtown SLC. She actually didn’t like as much of it as I might have thought, given her preference for flavorful and spicy food, but there were a couple of things she really enjoyed (mango kulfi, for one, but that wasn’t a surprise!). We spent a couple hours at the Tracy Aviary there, too, and she was fascinated with some of the birds.

Li is talking a bit more, too, which is a bit more momentous. Her vocabulary includes “up” with a sort of soft “p” on the end that is really cute, along with “duck”, “doggie”, “kitty” (hmmm, a theme here?). She loves to make animal sounds and does a hilarious “meh” for a goat complete with the appropriate little waver in there, and she’s working “moo”, “woof”, “oink”, “quack”, and we even heard a soft “cock-a-doodle-doo” once. She’s also got “ba-ba”, “this”, and an occasional “ma-ma”. We haven’t heard “een” (for Ian) for awhile, but it is there, too. We’ve also taught her a few signs to help (she has “juice”, “hungry”, “change”, “bath”, “book”, “more”) and she definitely has “yes” and “no”, although we see the “no” much more frequently.

And, last for this post but not least, Ian finished Driver’s Ed last night. Consider yourself warned.

Li’s First Camping Trip

Updated: 15 Jul 2008 05:38 am by Ron
Filed: AdoptionFoodLife in General
Tagged:

Deb and Li walking near campLi’s mosquito bites are fading, but our memories of her first camping trip certainly aren’t! We spent three days over the long July 4th weekend in the Sawtooths in central Idaho and she thoroughly enjoyed it…

She saw her first deer, snakes (all garter snakes or something similar thankfully, given that the largest one was a couple of feet long and about as big around as my thumb), hummingbirds, squirrels, ground squirrels, and chipmunks; experienced the warmth of a campfire on a cool morning; learned a little about Dutch ovens and the delights that come forth from them; had her first cheeseburger, fries, and malt from the Wrangler in Fairfield on the way in to camp; had acres of dirt, sticks, and pine needles to play in; and experienced the feeling of dropping your feet into a cold river on a hot day in the mountains…

We had three great days of warm (OK, closer to hot, I’ll concede) weather. The bugs weren’t bad except in the early morning and late evening, when the mosquitoes came out. We decided these mosquitoes had never had Chinese food before, because they made more than a meal out of Li, despite bug repellent. Usually they go for Deb, but that didn’t seem to be the case this time. We also had a bit of a fireworks show on the first evening as a big thunderstorm came over the ridge around 10pm and treated us to a couple hours of thunder, lightning, an occasional big gust of wind to shake the tent, and just a sprinkle or two of rain.

Dutch oven fajita chicken with vegetablesWe did pizza in the Dutch oven the first night, and fajita chicken and potatoes the second; both turned out pretty well. The fajita chicken was one of those things where we didn’t have a recipe but just sort of started down the “What if we…” path an this where we ended up.

Sleeping in our tent with a toddler was definitely a mixed bag, but we knew that we had no idea what to expect (having been down this same road with Ian years ago). The first night went well, as Li slept very soundly (exhaustion, perhaps?) and woke up happy the next morning. Let’s just say the second night and next morning didn’t go nearly as well and by the time the night was over, both Deb and I decided that 2 adults, a toddler, and a stuffed monkey are just too many for a pair of zipped-together mummy-style sleeping bags. It’s safe to assume that we’ll probably try something different next time out.

Li and Grandma Stewart cooling their feet in the riverMy parents came up on Friday morning, and Li was delighted to get to spend a good part of the next couple days with Grandma and Grandpa. We spent some time that afternoon down on the rocks at the edge of the river playing in and around the water, watching bugs and snakes and splashing water on each other.

All in all, a great outing, and very encouraging in terms of getting Li out camping. In Deb’s words, it was less grueling than she expected (truth be told, I think I was more excited about going than Deb was ahead of the trip).

Next Page »