not sure what I'm doing here
Archive for December, 2010
Robbing the Homeless
Dec 28th
There’s an intersection a few blocks from my house where the beggars assemble. You’d probably recognize it (even if you haven’t been here) because it’s a common suburban scene:
It’s a busy intersection just off the freeway. Every beggar stakes out their own corner. If there are newcomers and no corners are free, they’ll have to beg down the street a little, or maybe on the median. Definitely not on someone else’s corner. The procedure is simple. When the light turns red and the cars start backing up near a particular beggar’s corner, he or she walks around with a cardboard sign saying how homeless or hungry or pregnant he or she is. When the light turns green, the beggar can go relax leaning against a pole or sitting on the curb.
Sometimes it’s awkward when you see a familiar beggar, especially if you’ve interacted with them before. Being a beggar is a surprisingly public position. Of course the great thing about recognizing familiar beggars is seeing their signs change day by day, especially if they have a sense of humor. Everyone loves a clever cardboard sign.
One beggar stands out to me from the intersection by our house, and it’s not because of his clever signs. It’s because of his cell phone.
He’s always out on the same corner. He does the normal routine, showing his sign during the red lights, but when the light turns green and the cars pull away, he goes and sits on a chair that he has stashed in the bushes. And I’ve seen him sitting there talking on his cell phone multiple times.
Now I know what I’m about to say is very hypocritical considering my last post, but I’m going to say it anyway. I don’t buy it. I know that cell phone bills are less money than rent, and I know that someone could have some kind of prepaid phone without having an address or a job or a credit score. It just seems to me that a person with enough sense to own and operate a cell phone would have the sense to cancel his service before things got so tough that he would need to go out begging on the street.
The truth is that I don’t know anything about this particular man or what his story is. I don’t know if he’s capable of working and has found that panhandling pays better, or if he really is in need of help and can’t help himself. I don’t know if he has a cell phone so he can call his wife at home and chat while he’s out collecting change, or if someone gave it to him so that he can try to find a job. I don’t know if he’s talking to buddies or potential employers when I see him talking on it. So I realize that it’s wrong of me to be so skeptical of him, but I’d be dishonest if I only told the stories of the homeless people that I felt sympathy for and didn’t acknowledge the other side of this issue being on my mind so much.
One day after I’d driven past that man on the way home, I realized why the cell phone beggar bothers me so much (and subsequently vented my frustrations to Kelly). It’s not that he has a cell phone or a panhandling routine or a chair in the bushes. It’s not even my suspicions that he’s faking the need that he’s in. It’s what I can imagine it doing to the people that are in real need.
If someone (whether it’s really the case with this man or not) begs and seeks help when they don’t really need it, I think they’re robbing both aid and compassion from the truly needy. When kind people see him, they donate a few bucks that otherwise could have gone to someone in real need. When less-kind people see him, it just reinforces their belief that homelessness is a choice that deserves no sympathy.
I don’t know how to tell who is in real need and who isn’t, and maybe the right answer is that it’s not my place to judge their motives at all. But I do feel that if there are people who could help themselves and choose not to, that they are contributing to the greater problem and taking advantage of those that really do need help. And if that is the case, don’t I kind of have an obligation to make some kind of judgment call as to who really deserves my help?
Choices
Dec 26th
I remember waiting for the bus in Salt Lake one day while a bag lady with a shopping cart was making her way down the sidewalk. Her shopping cart was so full of cargo that things would fall out every few feet and she’d have to stop to pick them up.
I must have muttered something like “that sucks” out loud, because the man standing next to me at the bus stop answered me:
“Choices,” he said, as though correcting me.
At first I honestly thought that maybe he knew the lady or her story so that he could say something like that, but it only took a moment to realize that it was just his opinion of the homeless. I was bothered that he had said it, but I said nothing.
I still regret not going to help her put her things back in the cart.
Shelter
Dec 25th
It was just barely a year ago that Kelly and I moved out of our apartment in Salt Lake. We were using a POD to move so that we wouldn’t have to drive a U-Haul truck across the Cascade mountains in the middle of the winter (which ended up being a great choice: it was hard enough getting the little Honda over those mountains while they were covered in thick snow). We’d already fixed the schedule for the POD, so we had to scramble (and go without sleep) to get everything packed in time, but we made it (barely).
We spent our last night in our basement-sweet-basement the same way that we would spend our first nights in our apartment here in Seattle: on a blow up mattress in an otherwise empty apartment.
The next day we cleaned the apartment and packed up the car to go. We had some things that we weren’t taking with us, either extra boxes that we needed to recycle or things that we needed to donate. We had other errands to run before we drove out of town (both moving and Christmas preparations) so we split up to get it all done.
Among the things that we were donating was a pair of pillows. I don’t know if we thought that the DI wouldn’t take them or if we had some other reasons, but for some reason we thought that it would be better to give the pillows to the homeless instead. That was on my errand route, along with the recycling (which I would have been just as happy to throw away, but you know Kelly). So I hunted around for a recycle bin big enough to hold cardboard boxes, and then headed over to the homeless shelter. (I had contemplated offering the boxes to the homeless, too, but it just seemed a little too much like rubbing it in, so I stuck with the pillows.)
It was late by the time I got to the shelter, and the street was empty (unlike other times when I’d been running past there and the street was full of homeless people). At first I was a little confused about which building it was; for some reason I’d always thought that it was on the opposite side of the road. It didn’t help that the sign said something generic, like “community center”. There was another sign on the building, though, saying that I could drive around back with the donations, honk, and someone would come out to get them. But there were hours for the donation drop-off, and I was there too late. I felt stupid, and I almost turned around and drove away.
(Have you ever sat outside of a business and been indecisive about whether you should go inside or not? Maybe you’re thinking of getting some gift and you’re not sure if it’s right, or maybe you’re at some office building without an appointment and you’re afraid of being laughed to scorn for just walking in uninvited. Maybe it’s just me, but it’s a familiar feeling.)
As I was sitting there getting in and out of my car, a homeless man walked by. He had been looking in a garbage can down the street and was now moving on to another one. As he walked past, he asked me if I knew what time it was. I told him, and he walked on. There wasn’t anything more to the exchange than that, but for some reason that did it for me.
I walked up to the main doors with my pillows, still feeling stupid, convinced that they’d just tell me that I should have read the sign outside and known to come during donation hours. The doors were locked, but the lady at the front desk saw me and buzzed me in.
Inside the air smelled like urine. It wasn’t the sadly subtle kind of smell that a nursing home has. It reeked of it. It was almost over-powering.
“Front desk” might be the wrong word for where the lady that had let me in was sitting. It was just a folding table (like from a cultural hall event) with a clipboard where she had been letting people sign in. She asked what I was there for, and I sheepishly told her I had these pillows and thought someone might like them. She didn’t seem phased at all, and just sent me down the hall to (what I think was) the nurses’ station to give them the pillows.
When I got to the end of the hallway I saw the scene that makes me still think of this event. There were probably 40 people there, lying on the floor, fully clothed and covered in blankets. I don’t know what the rooms looked like, but I assume they were full if all of these people were out here on the hallway floor.
I gave the man at the nurses’ station the pillows. He offered a receipt for tax purposes, which obviously I didn’t need for my measly donation. And that was it. No further exchange. I left and drove away.
It was such a small moment in my life. The whole thing probably only lasted 10 minutes. It’s funny how sometimes small moments have big memories.
Trevor
Dec 11th
Once upon a time Jason was about to blog about Trevor, the pet fish. (I’m reluctant to call him Jason’s pet fish, because that would seem to take sides in Jason and Ronnie‘s perpetual argument about who loved Trevor more.) While Jason was writing his blog post, I whipped up a quick Flash animation of Trevor being playful/vicious. Jason graciously accepted my contribution and linked to the animation on his blog post.
(Back then I hadn’t learned to use the word “cute” except in mockery, but since my friend Ryan found out that it’s OK for married men to use the word, I’ve been trying to learn it. I’m still no expert, but by my unprofessional reckoning, Jason’s post is pretty cute. Any experts can confirm or deny that.)
In any case, back then Blogger didn’t let you upload things (and they might not still let you upload a Flash file), so I uploaded the animation to my own server so Jason could just link to it.
Many generations passed. Blogs died and other blogs took their places. Trevor himself went the way of all the duck pond in order to save Ronnie’s and my souls from Yahtzee (but that’s a story for another time).
Then, one day (as in this Wednesday), I decided to post an animation I made. Of course, this reminded me of my quickly, but lovingly, made animation of Trevor. But alas, the link no longer worked and the animation was not to be found in all of the Internets.
Until now!
Sorry, either Adobe flash is not installed or you do not have it enabled
(Yes, all of that long post was just to explain that I’m posting this animation again. And Jason’s link works again, too.)
Undead Pirate versus Ninja
Dec 8th
I should have either done more work on this, or posted it a long time ago.
It was more than a year ago when I got my laser eye surgery. For a few days afterwards my eyes were really sensitive, so I couldn’t really do anything that I would normally spend my time on. I couldn’t read, watch TV, use the computer, or go outside in daylight. So, down in our basement-sweet-basement, I used some Stikfa action figures that my brother Troy gave me and made my first stop-motion animation.
I had meant to touch up the timing or add sound effects on this, but I stopped working on it and never really started again. So it here it is, as done as it’s probably going to get:
I’m not really happy with the quality that YouTube shows it in. It seems more pixel-lated than how I had uploaded it. But I guess that’s the best you can expect for free, huh?
Graphing Benchmarks
Dec 5th
svYou know you might be a nerd if… you spend your free time writing a script to benchmark your Web site and graph the results. I’d like to say that I only spent my free time on this because Kelly and I have been sick and so we didn’t do anything this weekend but sit around, but honestly, I’ve been wanting to do it and I probably would have spent my time on it anyway.
So here’s what I did.
Your standard Web server has a tool called ab, which stands for Apache Bench(mark). What it does is simple: You give it a URL, and it will hit that Web page as many times as you tell it, and give you back all kinds of metrics about how well the page performs.
So I wrote a little script to call the benchmark tool and parse the results out into a CSV file that I could then use in Excel to generate a graph to compare how well different pages perform and how well they scale as traffic increases.
Writing and Using the Script
I originally wrote a Bash script that parsed all of the metrics into a single spreadsheet. It had some fun shell scripting, but ultimately I didn’t need all of the metrics, so I was just making my job in Excel harder. Instead, I reworked it to parse out only the average “Time per request” and throw only that measurement into the spreadsheet. Then graphing was easy.
The big problem I had was that I was limited by the shared hosting server where I rent Web space. The Bash script would crash once I got to about 400 concurrent page requests, but I wanted to test the performance with more users than that. As a solution I converted the script to a Ruby program that didn’t use any of the intermediate files and I was able to go a lot higher without problems. My server still can’t handle huge amounts of concurrent requests, so it would still fail sometimes, but I had the script handle the failures gracefully.
The end result is a Ruby script that will compare the average request time of multiple Web pages as traffic increases. It accepts a list of URLs on the command line, and increases the number of concurrent requests up to 1,000. It takes the average of 100 attempts at each concurrency level to try and get accurate readings. If a benchmark attempt fails at any of the concurrency levels, it will slowly decrease that sample size and try again, ultimately just letting Excel interpolate from the nearby data points if it fails with even a single sample. It also increases the concurrency at an increasing rate, so it doesn’t waste time on concurrency levels that aren’t significant. (Basically it increases by one user at a time until it gets to ten, and then increases by ten at a time until gets to 100, at which point it increases by 100 at a time. And so on and so on, if I were to let it run high enough.)
If you’re interested in using it to make your own awesome graphs, you’ll have to download the source code and save it into a .rb file to run it. Obviously you’ll need the Apache benchmark tool installed, also. Then you can type something like this to generate your spreadsheet:
ruby ab-time-chart.rb http://www.google.com http://www.bing.com > google-v-bing.csv
Just an idea.
Testing with a Simple Benchmark
I’ve got some ideas of how I’m going to use this, but I needed a simple test while I was running it a ton of times to make sure it worked. So, I thought I’d compare the performance of CGI to FastCGI. I know that’s a no-brainer (the answer is in their names), but this was more about testing my benchmark script than about the actual results.
What’s being tested here is the output of a simple Web page being generated in different ways. The contents of the page in each case is simply the current Unix timestamp. The version measured by the blue line is generated by a Ruby script running over CGI, the red line is the same Ruby code running over FastCGI, and the green line is a static HTML version that I threw in just for comparison.
The graph shows the time (in milliseconds) that it took to generate the page as traffic increased. The lower lines mean it’s faster.
No big surprises here. Obviously the static HTML version is fastest, followed by FastCGI, and CGI being the slowest. I was a little surprised by how constant the increase was, especially with FastCGI, but there’s no missing data points there. I did notice during my many (many) different runs as I was tweaking my script that a higher sample rate generally produced straighter lines. I think they probably scale pretty linearly, and any bumpiness is due to unrelated activity on my server.
So, there you have it. I’ve you’ve managed to read until the end of this post, I congratulate you on finishing my first blog post that really gives details about how big of a computer nerd I am. Sorry in advance, but it probably won’t be the last.


