Friday, July 22, 2005
Okay, I'll shut up now.I finally finished Harry Potter and the Half Blood Prince, so I can calm down and return to normal once more. Thankfully, I finished it before anybody gave anything away. Phew! I look forward to reading it again at a much more leisurely pace in the future.All in all, I thought it was excellent. I can't believe she left us hanging like she did, without any indication when the next book will be out, but that just shows how engaging I found the story to be.
Wednesday, July 20, 2005
How'd I get so old? (Part II)Today, my youngest sibling, who is going by Lulu these days, turns seven. She just lost the first of her two front teeth the other day in rather an ironic fashion. You see, one of her front teeth has been loose for at least a week now. She inadvertently hit herself in the face with a remote control and knocked out the other tooth -- the one that wasn't even loose, as far as we know. Soon, she'll have that adorable gaping smile that kids have when they're seven or eight.This past weekend, I was in Chico visiting my dad's side of the family*. It was wonderful to see everyone -- they're a quirky group that cannot resist terrible puns. I love them.
It is a little strange, however, to see my brother and sister (ages nine and seven) playing with my nephew and neice (ages four and two). They sure are a cute bunch of kids.
*Apologies to everyone in Chico I didn't get to see while in town. I only had time to visit with a few friends, as most of my time was spent with my family, cowering indoors where there was air conditioning.
Tuesday, July 19, 2005
How'd I get so old?My little brother, Luke, turned 16 yesterday. At the risk of sounding like those crazy old people, it really does seem like just a few years ago that he was jumping around the living room, using the remote control as a makeshift sword as he reenacted scenes from Teenage Mutant Ninja Turtles. But now he's taller than I am, his voice is deeper, and he no longer insists on being called Raphael.He also hung up on me last night -- I thought it was because I was singing Happy Birthday and my voice is terrible, but it turns out I sound a lot like some girl called Courtney and he thought I was her. I'm thinking my brother could use some work on the social skills. Maybe I'll get him a Miss Manners book for Christmas.
Thursday, July 14, 2005
DateTime mayhemIn every scripting or programming language I've used, beginning with JavaScript, moving on to Java, VBScript, and C#, there's been one beastly thing that stands out: formatting dates.You'd think it would be easy -- and some languages make it easier than others -- but overall it generally tends to suck. Sometimes you get lucky and find packages where people have put together a whole bunch of methods for you to use for date formatting, but I tend to get kind of snobby about wanting to understand what I'm doing, so I usually try to find the solution myself.
And so it was that I found myself looking online for what ought to be the simplest thing in the world: taking a date from a MySQL database and using PHP to convert it to the string you now see over this text. Something like "Thursday, July 14, 2005." Easy as pie, right?
Well, it turns out it IS as easy as pie, but somehow I had a terrible time finding a code sample. So, for any of you who have run into this same problem, I present to you the sample of code (which is probably so easy that nobody else had to look it up using Google):
$dtm = mysql_result($rs, $i, 3);
$time = strtotime($dtm);
$output = date("l, F d, Y", $time);It can also all be written in one line:
$dtm = date("l, F d, Y", strtotime(mysql_result($rs, $i, 3)));Note: assumes that you're working with a recordset called mysql_results.
It was the strtotime() function I was missing initially. See, the date value comes out of the database as a string, and apparently you can't just go from string to date, unless I'm missing something. So you convert that to a time value and then you're allowed to format it using the PHP date() function. I don't know why I didn't figure that out before.
Tuesday, July 12, 2005
Much ado about travelThe tickets have been purchased and I'm ready to go. Now. Alas, I must wait until September.I'm definitely going to Barcelona. Erin and I are landing at Gatwick Airport at the exact same time, and will be flying to Girona, Spain that same day. I'm so excited that she gets to go, too! I expect we'll stay in Girona for a night or two, as we'll be quite travel-weary. Then on to Barcelona. Erin leaves on the 15th, at which point I'll go... somewhere.
I won't know until I get there where I want to go. RyanAir had some plane tickets to Milan that were just silly cheap (€0.99 +tax), but I didn't buy them because I might not want to go to Milan this time around. I've been reading a lot about Spain, so I think I'll maybe head to the south, or to Toledo or wherever strikes my fancy. I'll probably try to spend some time in France, and then two or three nights in London before I return. Mostly, I don't want to go running all over the continent, but would rather spend good quality time in a few different places.
I like it that I have a plan now, and that the plan has huge open gaps in it, ready for me to fill in when I get there. I like that I can just show up at a train station on September 15 and hop on whatever train leaves next, if that's what I feel like doing. Or I could rent a car. Or a bike. Or just go take a nap somewhere.
I'm also excited about the opportunity to practice my Spanish -- I took four years in high school and college and have forgotten quite a bit. Still, hopefully I'll be competent enough in the basics to get rooms and food and whatnot.
I might not get in that much practice in Barcelona, as they primarly speak Catalonian (which is described as a mixture of French and Spanish). The Catalán region is known for being very proud of their independence, both culturally and politically. I just read a travel account of someone who was at a restaurant in Catalonia trying to order in Spanish, and the waiter wouldn't speak Spanish, but switched instead to English.
So much to do before I go! I've got lots of culture and customs to learn about, Spanish to practice, my passport to locate, bags to pack, my wife to murder, and Guilder to frame for it*. I'm swamped.
*I'm not acutally murdering anybody -- it's a reference to The Princess Bride.
Thursday, July 07, 2005
Needs work, but fine for nowOkay, so this is obviously going to need more work, like formatting the date and time. But for now, it's better than updating via Blogger and having to hand-edit the layout every time (for that matter, it's better than updating by hand).In other news, I'm taking September off. One nice thing about working for a small company is that if they don't give you raises, you can suggest that they at least let you take off a month at a time. I'll miss one paycheck (I'm taking two weeks paid, and two weeks unpaid), but I've been saving up, so it should be okay. And if I end up in debt, it will be worth it.
So, I finally bought my plane tickets the other day. I'm flying into Newark on September 3 to stay with my dad, and then on to NYC for a few days, which I'll spend with my friends who live there. Then it's on to London, where I'll meet up with the fabulous Erin. From there, I think we're going to Barcelona, but we haven't yet decided. It's all very exciting. I fly back to Newark on September 28, and will stay with my dad until it's time to fly back to Portland on September 30.
Speaking of London, I'd like to have something profound to say about the bombs that went off there today. Unfortunately, it's all beyond my comprehension, and it just makes me very sad and confused.
Thursday, July 07, 2005
Blog madnessSo, this will take some time to get working just right, but I'm pissed off at Blogger, so I'm not going to use it anymore. Take that, Blogger. Now if my layout is messed up or I can't add a post or anything else goes wrong, it's my fault and mine alone (or my host's fault, but that's a risk we all take anyhow).Hopefully, just having everything in the database will work out, but if the pages load too slowly, I may do what Blogger does and have it automatically generate the HTML files so you are just loading static content. Then again, if you're still reading this thing regularly, you'll probably be okay with an extra second or two of load time. We shall see.