I have hacked together some PHP5 code to get a thumbnail of a random picture from Picasa Web Albums for a given userid.
The code can be much better. Each time the page is requested two curl calls are made, one to fetch XML for the albums and one to fetch the XML of the pictures of the randomly selected album. But it does works and you get a random picture.
I can think of some ways to speed it up, but I am not sure how or even if I will implement this on the site in any way so I’m going to hold off on any optimization until it’s needed.
Many thanks to Philipp Lenssen for the post at Blogoscoped as he did the heavy lifting when it came to using an xpath query to get data from those Google XML feeds.
It takes an increasingly long amount of time to get out of the house. Seven years ago we could shower, dress, eat and be out of the door in half an hour but now it takes that long for this family of four just to have breakfast. The trees here in Charlotte have been changing to their fall hues since August, but most of that is attributable to lack of water and not the actual coming of fall. But now as autumn is setting in the trees here have been at least beginning their planned change. There are spectacular shades of red, some golden yellow and too much brown. There is still much green at this elevation.
Saturday, November 3, 2007 finds this family in the car aiming south on Interstate 85 towards the US 321 northbound exit. We’re going to run north on US321 for eighty or so miles with a final destination of Blowing Rock, North Carolina to take in our first real fall as a family. Living in South Florida for so long left us longing for a real autumn. This autumn’s trip to Blowing Rock has been a topic of discussion in decreasingly abstract terms since the day after Christmas last year when we found ourselves taking in the incredible view at the Canyon restaurant and saying “This would be a hell of a place to see the leaves change. ”.
I see the northbound traffic on the interstate nearly at a standstill because of construction. There are scattered traffic comes on our side of the road and we’re watching for any sign of a real slowdown, armed with detailed maps of the area and ready to reroute ourselves around any potential delays. Last year, shortly after our first trip to Blowing Rock, we found ourselves on this same stretch of the interstate and made a total of 20 miles in three hours. I tell you it was miserable with the screaming infant, the complaining five year old and the helpful suggestions from my adult passengers. I’m just not going to go through that again.
Here we are making seventy miles an hour on 321 which is known as Chester Street in Gastonia when you first get on it from I-85. This is to be a two lane high scattered with a few stop lights and passing right through the heart of furniture country in North Carolina. We’ve opted to take this possibly slower but more direct route (I77 north to I40 west to US321 is the other option) to take in more of the scenery and get to know the towns along the way.
Still on 321 and entering historic (according to the sign) Lincoln county, it seems the leaves have changed more here. Some patches of trees seemed to be laid out to enhance the color in fall. We just passed a stretch where the shorter trees were a fiery red and the taller trees provided a bright yellow backdrop. I wish I knew what type of trees these were.
Passing the Lincoln County Industrial Park and cresting a hill we can see the first mountains in the distance.
Entering the city limits of Maiden we have a good laugh about the amputated leg sold at auction in a smoker. People are so funny. The man whose body the leg was once attached to gets to keep it but he has to pay the man who bought it at auction five grand. That makes sense. I’m glad I have both of my legs.
Now eight miles outside of Hickory, there’s a man using a snow shovel to remove ran-over-many-times pieces of deer from the highway. No one slowed down for the deer remover but everyone cut their speed in recognition of the cop in the Dodge Charger.
We’ve made 62 miles in the first hour. There are no stoplights between the towns of Gastonia and Hickory. US 321 is the main road through Hickory. The McDonald’s here has the nicest bathroom I’ve ever seen in a McDonald’s. Granite counters, nice faucets, and crown molding. It’s top notch for a room to piss in.
Granite Falls, NC was incorporated in1898 and has a population of 4703 according to the sign coming into town. The sign is the highlight of the town. The big furniture stores of the area see to have mostly missed Granite Falls. The car store here with the sign saying: “Buy American. Apple Pie, Hot Dogs, Baseball” is closed. Mom’s Country Kitchen is full. Hardee’s wants us to try the new Country Burrito. I’m holding out for a burger at the Canyon.
In Hudson, NC the Bojangle’s is the local hang out apparently. They’ve got free wifi.
The intersection of Hickory Boulevard (US 321) and Wilkesboro Boulevard is a the biggest intersection that I’ve seen so far. There’s a whole host of fast food restaurants. I can see the hills north of here and the hills are not the explosion of autumn colors that I had hoped to see. We just passed the United Meth Church Road.
The color gets better close to the hills. I think another two or three weeks would do a lot to increase the variety and intensity of color on the hills.
Today is a perfect day for this trip. The crisp blue of the sky exists in stark contrast to the warm colors of the leaves.
We did make it to Blowing Rock, NC and enjoyed ourselves.
It was a dragon fly that caught my eye and brought me to the area; I was following him around trying to get a picture when I found the spiders. The dragon fly got away, and luckily the spiders aren’t as tricky to photograph.
I found three black-and-yellow argiopes. The things are apparently common in North and Central America, but this was my first encounter with one in 26 years.