Posted on Leave a comment

Today’s Programming Challenge

I am working on a PHP application that is mysteriously losing the value of a particular session variable. There is only one place in all the code that the variable is set. All comparisons have been confirmed as comparison operators == instead of assignment =. In debugging a vardump shows the variable as:
[“foo”]=> &string(2) “35”
and a second later it becomes
[“foo”]=> ∫(35).

Does the ∫ symbol mean undefined? And if so, why does it still show the value? echo “***”.$_SESSION[‘foo’].”***” shows ****** in the later instance and ***35*** in the previous.

Ah ha! It’s the integral symbol. I just didn’t expect to see that in debugging. Why is my string suddenly an integral?

Update: From the notes on vardump "Now ∫ translates into an integral sign, and since the browser may be inclined to overlook the missing semicolon, you may be seeing integrals where you were expecting &int"

Update: Solved. A locally scoped variable of the same name was being set to null. I’m still unclear on why the session variable would assume the value of the locally scoped variable.

Posted on 2 Comments

What you say and how you act will affect someone’s day

I woke this morning later than intended, 6am instead of 4am, but I did not let that bother me. Today is to be a good day! I wanted Amy to make her bus today so that I could begin programming 45 minutes earlier than days I have to drive her to school. She moved slowly and I drove her to school but I did not let that bother me. Today is to be a good day! After sending Amy off and having a cheery exchange with a friend working the carpool line, I started home. Today is to be a good day! I have more or less quit drinking coffee. Instead I drink hot tea or an occasional hot chocolate but today I brought my mug so I could stop by Weigel’s and have a Kona coffee. If I purchase coffee at the grocery, far cheaper, I drink too much. It is 75 cents I don’t need to be spending, but I did not let that bother me. Today is to be a good day! I waited in the line behind an employee who brought his sons in with him. I commented to myself how much they looked like him then I went onto thinking random thoughts of coding and cutting down trees. After handing my three quarters to my favorite, and familiar, cashier, I started to the door as she spoke, "Don’t look so disgusted. They’re moving as quick as they can." Today is to be a good day! But I did let that bother me. What?! I paused as I could not let this pass, "M, were you saying that to me?" She replied, "Yes, you rolled your eyes like they weren’t going fast enough. I’m only one person and moved them along as fast as I could." But that did bother me. Is today going to be a good day? "I didn’t roll my eyes. You know I’m never in a rush." I left with a darkness hanging over me. The coffee suddenly tasted bitter. But I did let that bother me. How could today be a good day? I replayed the encounter in my mind and realized that as I waited in line, I was trying to palm the three quarters. Since my slight of hand is beyond out of practice, I was probably concentrating too hard and it probably showed in my face. And that concentration was misinterpreted as impatience when I was merely playing. But still I am bothered. I am not sure today can be a good day.

Posted on 2 Comments

Election Night Drinking Games

Shouldn’t we be drinking tonight? Say, every time one of the news guys says that a state has gone to the other guy take a drink. Every time the news guys point out that they are making judgments on very low percentages of returns, take a drink. Every time a state flips, take a drink. Every time CNN puts up that "holograph," take a drink. (Actually its pretty cool in the way that Star Wars knocked our socks off in 1977 but makes us cry today). Every time Wolf Blitzer makes it evident that he wants McCain to win, take a drink.

Posted on 3 Comments

Vote and get free stuff

After you vote, run over to Starbucks for a free cup of coffee. Take your coffee over to Krispy Kreme for a free doughnut. Grab some Chick-fil-a for an early dinner.Unconfirmed Then have a free ice cream at Ben & Jerry’s for desert (5-8pm). Then for 2nd deserts head over to Baskin Robbins from 5pm-8pm for another free scoop.Unconfirmed…I think the person who told me this one was confusing it with Ben & Jerry’s. (I am trying to get links for confirmations but my machine isn’t cooperating. I can personally confirm that Starbucks is giving away free coffee.)

Update: You can also get a free sex toy if you live in New York City or Seattle. And just in case you aren’t reading what you are clicking, that link isn’t safe for work.