Thursday, February 25, 2010

It's the Darkness That Keeps Chasing Me

It's the darkness that keeps chasing me.
That leaves me shivering and cold upon my knees.

It's the despair that I loath.
The feeling that nothing I do can stop this ship from it's course.

It's this feeling, like someone is stalking me.
And no matter how fast I run she's always catching up.

It's like I'm in a dream.
And when I try to scream nothing escapes my throat but a horse whisper.

I gag on the fetid stench that is my life without you.

Wednesday, February 24, 2010

Regret

I regret that I let you go.

I regret I didn't try sooner to get you back.

I regret that I don't know what to do now. That I don't know if it's salvageable or if I should attempt to move on like I already attempted and failed.

I regret that I can't make up my mind whether you're good for me or bad for me.

I regret being in this limbo.

I regret hurting you.

I regret me.

Thursday, September 04, 2008

What I'm not Good at

You know what I'm not goot at?

...just about everything :-)

Tuesday, August 12, 2008

Addicted

I believe I am slowly becoming addicted to sin.

Wednesday, December 05, 2007

Why Web Services have failed me.

So I have an assignment where I am to explore the possibility of creating a web service that can report its progress of a task back to the client.

I can see you web developers rolling your eyes now. I understand. The assignment came from a non-web programmer, so he didn't see the immediate problem: web services are state-less. What that means is that each request from the client is complete. The server doesn't need to know what was requested 10 requests ago. The server doesn't even need to know what the client is doing right now. The client says, "Server, do this." The server does it and sends the response. Then the server quickly forgets that the client ever existed, or what it even did for the client.

Now ASP.NET tries to get around a lot of this with a Session object (Session isn't specific to ASP.NET, but that's the language I am working with). When you have Session enabled on your web application, the server gives each client a GUID (Global Unique Identifier). As long as the client supports sessions also (normally by supporting cookies), the client will send that GUID with every request it makes to the server.

Now there are a whole host of reasons why you would not want to enable session in a web service, but people do it, and you are just going to have to decide for yourself whether the pros out weigh the cons. In this case (since it was just a prototype) I decided I needed to know if it was possible, not if it worked well.

So I created a web service that enabled session. I then created two methods, one called DoSomethingForALongTime(), and another called GetProgress(). They looked like this:


int DoSomeThingForALongTime()
{
  for (int i = 1; i <= 4; i++)
  {
    Session["Progress"] = i*25; // Update the progress (25%, 50%, 75%, 100%).
    System.Threading.Thread.Sleep(6000); // Sleep for 6 seconds.
  }

  return(0); // Finished.
}

int GetProgress()
{
  return(Convert.ToInt32(Session["Progress"]));
}



So, my theory was that I could call DoSomethingForALongTime() asynchronously, and while that was executing call GetProgress() every two seconds and see what the progress was.

Well, it didn't work. Calling the methods worked fine, the issue was that the Session variable wasn't getting updated correctly. So after a couple of hours verifying the session variable updating was the issue, I went on Google and read up on Sessions in .Net.

It would seem that the great minds at Microsoft have elected to make the Session object thread-safe (kudos to ya!). That is actually a really great thing to do. So what ends up happening is that when my for loop writes the value to the Session["Progress"] variable, it doesn't actually write the value to Session yet. That value isn't written until DoSomethingForALongTime() exits. The assumption is that while one method is updating the Session object, you don't want to be able to read the new value from the Session object until the method that is updating it is completely done.

So I'm at a loss on how to fix this. The experiment was great because it forced me to learn a good deal about the intricacies of the Session object, but I would still really like a solution to my problem. I can see others getting the progress of the transmission of the response from the server, but I really need a way for the server to tell the client that the task is still executing, and how far along it is in completing the task.

Wednesday, February 07, 2007

Goodness

I don't really know how to explain how I feel right now. I was informed of a situation, and I know HOW I feel about it, I just don't know how to explain it in any way that would make sense.

Why must people kick others when they're already down? Why can't you just KNOW that you're better off than someone else rather than trying to prove it all the time. Why don't people understand that being polite extends beyond the other person's field of vision. Just because someone isn't there to hear you laugh about them doesn't mean that others don't see you do it.

Why must I be disappointed in people that I respect?

Sunday, November 05, 2006

Decisions

Soren Kierkegaard once said:
"Most men pursue pleasure with such breathless haste that they hurry past it."

I fear that I don't know whether I am hurrying past it, or not pursuing it at all.

I've been job interviewing for the past month and have a very tempting offer in Norfolk, VA. There are lots of reasons that this offer is tempting. The first is the money, the second is the environment, the third is the security clearance. But I know that I won't ever get rich at that company. I know that I'll be very well off. But I'll still be working for the next 40 years saving up for my retirement.

On the other hand I could stay with my current company. This company has recently fell on bad times and they really can't afford to pay me much more than they are now. Even what they are paying me now is so demeaning for my work it's nothing (and the boss has told me this). But I believe in the product that I work on. I believe that it will make it and some pretty big deals will come through with it. I believe that if I can hang in there, there is a big chance something big will happen. But there is also a chance nothing will.

So what do I do? Do I take the large salary now? I could probably pay off my student loans in a matter of a couple years and after that invest my extra money in whatever I want (real estate, stocks, retirement, etc...)

Do I stay where I'm at now? And hope?

And of course all through this is a girl. An amazing girl.

If dreams worked for Joseph, will God give them to me? I hope He will.