I was fully intending to post yesterday, but by the time I finished my web apps project I was too tired to do more than pass out incoherently. I did get it done, though, and it was a surprisingly useful exercise.
Of course it would have been done far earlier if someone hadn’t called me up after work and said “I know you’re having a bad day, let’s hang out”. And then forced me to eat steak and shrimp and go to the bookstore to mock back-cover copy. So if you want to blame someone for this being late, you know who to aim your ire at. (Thanks, by the way.)
I haven’t worked enough with PHP to know if it handles session attributes the same was JSP does, but I know that the way that JSP handles them is pretty dang infuriating. For those who don’t do this sort of stuff, the “session” object is a piece of information you use in web-programming that tracks data from a user across multiple pages of the same server. It’s sort of like a set of cookies that expire when you close the window and don’t actually get stored on your machine (actually, and importantly, session data is stored on the server, so it can’t be tampered with or hacked). One nice thing about the way JSP handles sessions is that it attributes you set are objects, which allows for nicely complex (or simple) data-forms. The thing that I spent all night really upset about was that I couldn’t store a dang primitive type. Or, rather, I couldn’t retrieve it because the command to get attributes returns object types and primitive types are too simple. This meant that instead of having a simple “is the user logged in?” flag in the session history, I had to revalidate from strings every time. There’s a workaround to this, but I didn’t have time to delve into package generation for a simple state-tracking object.
Anyway, long story short (too late), this was frustrating.
What wasn’t frustrating, beyond dinner and bookstore, was just how awesome the internet is. My mom gave me a call last night and I realized that most people don’t know that they, despite living on the other side of the world, have a United States phone number. Because Vonage only cares about you having an IP address and some bandwidth. They’ll plug you into the phone network wherever you dang want in the US. This means that for my parents, calling numbers in the US is already paid-for with their Vonage subscription. And it means that for the growing number of people with unlimited long distance, calling back is just as paid-for. Ten years ago, when we were there the first time, it was hard and expensive to do international calling. Now you just pick up the phone.