I just spent a day and a half trying to figure something out.
I think I'm going to buy the late Richard Steven's book, Unix Network Programming: Sockets API because of this. I think if I had that book I could have saved myself some time.
Point is, my problem is that I was trying to set up a dynamically created TCP port, using getsockname() to figure out what that port number was. The trouble was that I kept getting 0 back as the port number, even though I was still able to connect to the host. Any port lower than 1024 (I think it's 1024) is reserved for the Operating System, so I was baffled why it was still working when it shouldn't have.
Solution: call getsockname() AFTER you connect to the host. Then you get the right port #.
I feel like such an idiot. I wish the man pages could give some clue about the right order to call this stuff in. (My fork() calls were so much easier to figure out!)
Sunday, June 29, 2008
Saturday, June 21, 2008
Powerbar For Dinner
It's not really a powerbar. It's a Kashi GoLean! Protein and Fiber bar.
I went hiking in Tustin this morning. I saw the derelict hangers where my dad used to maintain helicopters (2nd link). They really should renovate those structures and turn them into an Air and Space museum or something. It was way too hot to be out hiking and myself and my two companions complained a lot.
Afterwards we went to Denny's and had breakfast. Then I went home and showered, slept for 7 hours.
I was hungry when I woke up and after I put my laundry in the washer I had my protein bar for dinner. I really wanted to make pasta or something but it's way too hot to touch the stove.
I went hiking in Tustin this morning. I saw the derelict hangers where my dad used to maintain helicopters (2nd link). They really should renovate those structures and turn them into an Air and Space museum or something. It was way too hot to be out hiking and myself and my two companions complained a lot.
Afterwards we went to Denny's and had breakfast. Then I went home and showered, slept for 7 hours.
I was hungry when I woke up and after I put my laundry in the washer I had my protein bar for dinner. I really wanted to make pasta or something but it's way too hot to touch the stove.
Friday, June 20, 2008
Home Alone
I feel like such a loser.
Here I am on a Friday night, and what am I doing?
Watching class, doing homework, and otherwise not spending time with people or doing anything really relaxing or fun. Absolutely no one on either of my contact lists is online.
What's wrong with me?
Here I am on a Friday night, and what am I doing?
Watching class, doing homework, and otherwise not spending time with people or doing anything really relaxing or fun. Absolutely no one on either of my contact lists is online.
What's wrong with me?
Tuesday, June 17, 2008
Change of Course
I'm continually impressed with the bits of Life Wisdom I find in "The Penguin" articles. I don't subscribe to Runner's World anymore, but I visit the site every once in a while to see if there's anything new that I feel compelled to read.
Change of Course
From the article:
"When that day doesn't turn out as we expected, we often allow ourselves to be devastated. I've seen runners on the brink of a breakdown because they missed their self-imposed standard of performance. But a day is just a day. A race is just a race. It is our selfishness, our self-centeredness that creates the disappointments that we too often let define us."
I know of a couple things I could apply this to. My love life, my social life, my general life aspirations.
Now, the how of applying this is what I need to learn.
Change of Course
From the article:
"When that day doesn't turn out as we expected, we often allow ourselves to be devastated. I've seen runners on the brink of a breakdown because they missed their self-imposed standard of performance. But a day is just a day. A race is just a race. It is our selfishness, our self-centeredness that creates the disappointments that we too often let define us."
I know of a couple things I could apply this to. My love life, my social life, my general life aspirations.
Now, the how of applying this is what I need to learn.
What Am I Doing?
I'm awake, way too late on a week night, wondering what I'm doing with my life in general.
I'm not a computer science whiz kid, never have been. I like the concepts, and I like execution of concepts and coding in general, but not necessarily at the speed required by professors. Computer security fascinates me in general and cryptanalysis specifically.
I'm taking a class that would put me on track to start on a Master's of Science. Why? I don't really know anymore. It seems like the right thing to do. If I do this I'll be giving up most of my free time for the next four years.
That is, if I still have my job for the next four years. With this economy who knows what will happen?
By the way, the reason why I'm up so late is because I took a nap earlier today so I could do the homework that's due on Wednesday (really tomorrow) for class. I already feel like a hermit with no friends and no life. Am I going to wake up in 4 years, just a few months shy of 30, and feel the same way? I've always felt somewhat of an outcast, but this isn't really where I saw myself.
I want a great love, and I want a career where I feel I'm not prostituting myself for the cash or the benefits. To love the work for the sake of it. I want the time and energy to put into the hobbies I enjoy. Somewhere along the line I feel like I must have wandered someplace extremely wrong, because I have none of those things. And sadder still, I have no idea how I'm going to get those things.
I'm in dire fear of becoming just ordinary.
I'm not a computer science whiz kid, never have been. I like the concepts, and I like execution of concepts and coding in general, but not necessarily at the speed required by professors. Computer security fascinates me in general and cryptanalysis specifically.
I'm taking a class that would put me on track to start on a Master's of Science. Why? I don't really know anymore. It seems like the right thing to do. If I do this I'll be giving up most of my free time for the next four years.
That is, if I still have my job for the next four years. With this economy who knows what will happen?
By the way, the reason why I'm up so late is because I took a nap earlier today so I could do the homework that's due on Wednesday (really tomorrow) for class. I already feel like a hermit with no friends and no life. Am I going to wake up in 4 years, just a few months shy of 30, and feel the same way? I've always felt somewhat of an outcast, but this isn't really where I saw myself.
I want a great love, and I want a career where I feel I'm not prostituting myself for the cash or the benefits. To love the work for the sake of it. I want the time and energy to put into the hobbies I enjoy. Somewhere along the line I feel like I must have wandered someplace extremely wrong, because I have none of those things. And sadder still, I have no idea how I'm going to get those things.
I'm in dire fear of becoming just ordinary.
Friday, June 13, 2008
Isn't This The Truth?
I saw this in the breakroom at work today.
"Life's Journey is Long. Better Bring Snacks."
"Life's Journey is Long. Better Bring Snacks."
Thursday, June 12, 2008
To Sleep, Perchance to Dream
One never quite faces mortality quite like when someone one knows passes away.
I went to high school with this kid and his twin brother. I think the Spectrum link will expire in a couple weeks, so here's another link. He wasn't even 25.
I didn't know him or his brother very well, but we rode the same bus and probably had a class or two together.
I found out when I was snooping on another high school alum's blog. I've been reading a lot of blogs by people who I went to high school with lately. You find one blog from one person and that blog has links to ten other blogs of other people I barely know. They all share fairly public information and you can find out the names of their kids (with pictures) and some of the things they are up to these days. I don't know if I would feel comfortable putting that much information about myself in a public place like that. Maybe it doesn't really matter since anyone could find anything about you they wanted or needed on the internet, with a little ingenuity.
I wonder what would have happened to me if I took a different path in life. There were a couple people I could have gotten married to and maybe I'd be married with kids by now. What an odd thought! The idea that I could have kids at 25. That just seems so young to me.
I went to high school with this kid and his twin brother. I think the Spectrum link will expire in a couple weeks, so here's another link. He wasn't even 25.
I didn't know him or his brother very well, but we rode the same bus and probably had a class or two together.
I found out when I was snooping on another high school alum's blog. I've been reading a lot of blogs by people who I went to high school with lately. You find one blog from one person and that blog has links to ten other blogs of other people I barely know. They all share fairly public information and you can find out the names of their kids (with pictures) and some of the things they are up to these days. I don't know if I would feel comfortable putting that much information about myself in a public place like that. Maybe it doesn't really matter since anyone could find anything about you they wanted or needed on the internet, with a little ingenuity.
I wonder what would have happened to me if I took a different path in life. There were a couple people I could have gotten married to and maybe I'd be married with kids by now. What an odd thought! The idea that I could have kids at 25. That just seems so young to me.
Thursday, June 05, 2008
Why Abortion Needs To Stay Legal
New York Times Essay
Some of the stuff you read is just appalling. No matter how dark and twisted fiction is, reality is always stranger, and infinitely sadder.
Some of the stuff you read is just appalling. No matter how dark and twisted fiction is, reality is always stranger, and infinitely sadder.
Wednesday, June 04, 2008
Slow Brain-To-Mouth Time
I received my GRE scores the other day. I scored a 5.0 on the analytical writing part, which is to say, pretty good. I'm only in the 73rd percentile, but since the other two scores are 5.5 and 6.0, I don't mind being a "slightly above average among grad school hopefuls" analytical writer.
My favorite C.S. professor once lamented to me that C.S. students "just can't write". I have to admit I bailed out on a paper or two in my computer science classes. That was when I just didn't care anymore and had enough drive to do "just enough" to get through.
---Side Musing---
I'm not sure what did it. It's a trend I've noticed in my life - I get highly devoted to a cause, a purpose, until the veneer wears off and I realize that it wasn't worth my devotion to. And it's just a slippery slope from there. Or maybe I never discover what the purpose was to begin with and I'm just not motivated to put forth the effort for something if I don't know what it leads to. I don't like to be led around blind. If you can reason to me that something is important, and why it is important, then I can be easily led into the depths of despair and back without a complaint.
---End Side Musing---
As well as I can claim my writing skills are, I'm terrible at vocally expressing my thoughts on-the-fly. You might as well throw my vocabulary and reasoning skills out when emotion is involved, especially anger.
I'd really like to learn how to debate my points as clearly and concisely vocally as I do on paper. Even though paper (or word document) is so much easier. I can easily outline my argument, write some points, fill those points in with supporting arguments or examples, add an introduction and a conclusion, and Bam! Instant good paper.
Vocally, I'm a bit of a mess. My thoughts are far from organized and I jump from argument to argument with zero cohesiveness. I was definitely not called to lead a life in politics.
I'd like to become better at expressing myself vocally, but I'm not sure how to go about doing that. It becomes a serious problem (like, say, in the heat of an argument in a relationship) and I don't know how to defend my position in a way that other people can understand.
I could wax poetic on my theories of how arguments in relationships are supposed to work, but I'll save that for another time. Meanwhile, if you have any tips on "taking a stand" vocally or thought organization *before* it hits the airwaves, please share them with me!
My favorite C.S. professor once lamented to me that C.S. students "just can't write". I have to admit I bailed out on a paper or two in my computer science classes. That was when I just didn't care anymore and had enough drive to do "just enough" to get through.
---Side Musing---
I'm not sure what did it. It's a trend I've noticed in my life - I get highly devoted to a cause, a purpose, until the veneer wears off and I realize that it wasn't worth my devotion to. And it's just a slippery slope from there. Or maybe I never discover what the purpose was to begin with and I'm just not motivated to put forth the effort for something if I don't know what it leads to. I don't like to be led around blind. If you can reason to me that something is important, and why it is important, then I can be easily led into the depths of despair and back without a complaint.
---End Side Musing---
As well as I can claim my writing skills are, I'm terrible at vocally expressing my thoughts on-the-fly. You might as well throw my vocabulary and reasoning skills out when emotion is involved, especially anger.
I'd really like to learn how to debate my points as clearly and concisely vocally as I do on paper. Even though paper (or word document) is so much easier. I can easily outline my argument, write some points, fill those points in with supporting arguments or examples, add an introduction and a conclusion, and Bam! Instant good paper.
Vocally, I'm a bit of a mess. My thoughts are far from organized and I jump from argument to argument with zero cohesiveness. I was definitely not called to lead a life in politics.
I'd like to become better at expressing myself vocally, but I'm not sure how to go about doing that. It becomes a serious problem (like, say, in the heat of an argument in a relationship) and I don't know how to defend my position in a way that other people can understand.
I could wax poetic on my theories of how arguments in relationships are supposed to work, but I'll save that for another time. Meanwhile, if you have any tips on "taking a stand" vocally or thought organization *before* it hits the airwaves, please share them with me!
Tuesday, June 03, 2008
I Guess You'll Do
I recently had a conversation with my mom over the phone regarding the college class I'm taking online. . . .
Mom: "Oh, that's great! School will be such a great place for you to meet new people!"
Me: "Well, I don't think I'm going to be meeting many people. The class is online. I watch the professor give the lecture in a classroom and I'm at home."
Mom: "Oh. But you still have to go to campus, don't you?"
Me: "Yeah, but only for the midterm and finals."
Mom: "Well, maybe you'll meet someone on campus then."
Me: "Well, maybe, but everyone is going to be focused on taking their tests and they won't be trying to meet someone new."
Mom: "Oh well that's no good. You should take class on campus."
I Guess You'll Do
A while ago I had another phone conversation with my mom. It started with her saying something about how she was getting older and she still wanted to be around and spry enough to enjoy having grandchildren.
Me: "Well Mom, I guess I can just find any guy to get married and have kids with. Who cares if he's a drug dealer and beats me!"
Mom: "Oh no, you have to find a good one!"
I think I would find all of this really funny if it wasn't so sad.
Mom: "Oh, that's great! School will be such a great place for you to meet new people!"
Me: "Well, I don't think I'm going to be meeting many people. The class is online. I watch the professor give the lecture in a classroom and I'm at home."
Mom: "Oh. But you still have to go to campus, don't you?"
Me: "Yeah, but only for the midterm and finals."
Mom: "Well, maybe you'll meet someone on campus then."
Me: "Well, maybe, but everyone is going to be focused on taking their tests and they won't be trying to meet someone new."
Mom: "Oh well that's no good. You should take class on campus."
I Guess You'll Do
A while ago I had another phone conversation with my mom. It started with her saying something about how she was getting older and she still wanted to be around and spry enough to enjoy having grandchildren.
Me: "Well Mom, I guess I can just find any guy to get married and have kids with. Who cares if he's a drug dealer and beats me!"
Mom: "Oh no, you have to find a good one!"
I think I would find all of this really funny if it wasn't so sad.
Subscribe to:
Posts (Atom)