...is that everything is your fault. Everything. It's not the user's fault, because you should be validating that input. It's not the computer's fault, because they are only capable of logical following of instructions. You're the one telling it to make the error, whether you think so or not.
There is this difficult to kill bug coming up in Avari. I have three lines of code. Looks something like this:
printToLog("User says: " + phrase);
otherFrame.location = "avari.php?userphrase="+phrase;
printToLog("Question recognized: " + phrase);
So the first line does what it's supposed to, but the third line never executes. Obviously there's something wrong with that middle PHP file. But even if there is, Javascript should continue executing. It's not waiting on PHP to return for it to do anything. That third line should still happen.
And worst of all, this only happens sometimes. I can't replicate this. It happens when people come up and try to talk to Avari but never when we're sitting there testing it with all our debugging statements in place. How does that even happen?!?
It frustrates me. A lot of times when there are deep errors like this the answer comes to me in some kind of insight while I'm sleeping or something. Not this time. I have no ideas. I've checked everything as well as I possibly can. There has to be something else interfering with the process.
The best I can think of is a workaround. Call a function to wait for 3 seconds, then call the PHP function. If the character isn't speaking after those 3 seconds are up, something is wrong; refresh the entire page and hope that that fixes it. I hate hacks like that, but it's the only thing I can think of. I'm not sure that PHP and Javascript were meant to handle such complexities.
In other news, there are two weeks left now and things are even crazier. The kind of crazy that leaves clothes and coffee cups littered all over the apartment and a box of Frosted Flakes by my desk that I eat straight out of. It'll be okay, though. Things are almost over. There's much to be done, but I'm fairly confident that I can handle it from this point.
Victoria & I went to West Virginia this weekend to check out what she'll be doing this summer at Global Outreach, a missions organization that my friends Kevin & Emily are at. It was pretty exciting. I have a lot of pictures and stories. Ask me sometime. But as for now, I must study for this 11:00 physics test, get dressed, prepare for the ACM meeting, and get my things together for research...
Wednesday, April 16, 2008
Tuesday, April 15, 2008
42
Apparently it's the answer to life, the universe, and everything. Of course, we find this absurd, and don't even know what question it's really answering. We know that whatever question it is answering, however, can't mean much, because life is far more complex than any number could solve.
And yet we still find ourselves defined by numbers.
Resolution: to no longer let my complexities be reduced down to an amalgam of digits. I'm more than 65, 3.78, 135, 1400, 4.0, 20, 10000, 6, and 1434 on some strange scales.
And yet we still find ourselves defined by numbers.
Resolution: to no longer let my complexities be reduced down to an amalgam of digits. I'm more than 65, 3.78, 135, 1400, 4.0, 20, 10000, 6, and 1434 on some strange scales.
Thursday, April 3, 2008
four weeks? seriously?
Four weeks left in school and I have way more than four weeks of stuff to learn and do this semester...
So it's looking like I will be at Virginia Tech doing research this summer in storyboarding type stuff with Dr. Scott McCrickard. I'm looking forward to it. It's completely different than anything I've ever done, and it's fun to get a complete social restart somewhere. You can be anyone you want to when no one knows you. Not that I plan on changing much, it's just nice to have no history preceding you.
I was also accepted into a REU at Ithaca College. It was longer, farther away, and similar to my previous work, so (with the advice of my mentor, Dr. Hodges) I decided against it. My opportunity was then given to Toni, a computer science student here and one of my very good friends. She hasn't decided whether to accept or reject it yet.
It's a really happy time. All my friends are getting to do research where they want to--CIA, UNC-Charlotte, Department of Defense, Harvey Mudd College, Naval Research Lab, Harvard...we'll come back in the fall with all kinds of experiences and knowledge to share.
Things have been crazy stressful lately because so much has been due, but overall good. I've had good and bad days. Lack of sleep and high pressure situations make me an unhappy person, but I think the worst of it is over now and things should be returning to an approximation of normal.
Okay, so, for the interesting part that you might actually care about.
I was debugging in the lab the other day with some younger CS students. One of them had a problem with their code that took us a half hour to track down. His code looked like this:
string temp; //\
temp = array[i]; // \
array[i] = array[j];// swap
array[j] = temp; // /
temp = ""; ///
Logically it's correct. I spent a very long time putting in cout statements figuring out what was going on. Turns out nothing was ever being assigned to temp and things were going wrong from there. Why? This guy:
//\
Even though it is commented out, the \ character is a newline symbol in C++ (thanks, Amy, for helping me figure this out!), so the comment carries over to the next line, nothing gets into temp, and things die from there.
Other recent accomplishments include:
-- learning to use pthreads in Linux, vaguely
-- realizing that PHP is a lot more powerful than I initially thought
-- finishing a paper and a presentation on computer vision
-- reading some of I, Robot
-- working through a Bach piece for juries
-- making my roommate procrastinate from doing work
I wrote a quick analysis program for Avari, my research project. After leaving her out in the hall for people to speak to for three days, she's held 80 conversations that were over 10 seconds long. We'll do more detailed analysis soon. It should be interesting to see how this turns out.
Okay, enough of this for tonight. More coming later.
So it's looking like I will be at Virginia Tech doing research this summer in storyboarding type stuff with Dr. Scott McCrickard. I'm looking forward to it. It's completely different than anything I've ever done, and it's fun to get a complete social restart somewhere. You can be anyone you want to when no one knows you. Not that I plan on changing much, it's just nice to have no history preceding you.
I was also accepted into a REU at Ithaca College. It was longer, farther away, and similar to my previous work, so (with the advice of my mentor, Dr. Hodges) I decided against it. My opportunity was then given to Toni, a computer science student here and one of my very good friends. She hasn't decided whether to accept or reject it yet.
It's a really happy time. All my friends are getting to do research where they want to--CIA, UNC-Charlotte, Department of Defense, Harvey Mudd College, Naval Research Lab, Harvard...we'll come back in the fall with all kinds of experiences and knowledge to share.
Things have been crazy stressful lately because so much has been due, but overall good. I've had good and bad days. Lack of sleep and high pressure situations make me an unhappy person, but I think the worst of it is over now and things should be returning to an approximation of normal.
Okay, so, for the interesting part that you might actually care about.
I was debugging in the lab the other day with some younger CS students. One of them had a problem with their code that took us a half hour to track down. His code looked like this:
string temp; //\
temp = array[i]; // \
array[i] = array[j];// swap
array[j] = temp; // /
temp = ""; ///
Logically it's correct. I spent a very long time putting in cout statements figuring out what was going on. Turns out nothing was ever being assigned to temp and things were going wrong from there. Why? This guy:
//\
Even though it is commented out, the \ character is a newline symbol in C++ (thanks, Amy, for helping me figure this out!), so the comment carries over to the next line, nothing gets into temp, and things die from there.
Other recent accomplishments include:
-- learning to use pthreads in Linux, vaguely
-- realizing that PHP is a lot more powerful than I initially thought
-- finishing a paper and a presentation on computer vision
-- reading some of I, Robot
-- working through a Bach piece for juries
-- making my roommate procrastinate from doing work
I wrote a quick analysis program for Avari, my research project. After leaving her out in the hall for people to speak to for three days, she's held 80 conversations that were over 10 seconds long. We'll do more detailed analysis soon. It should be interesting to see how this turns out.
Okay, enough of this for tonight. More coming later.
Subscribe to:
Comments (Atom)