December 27, 2007

know your tools

Filed under: Uncategorized — aturley @ 1:07 am

I spent some time today trying to write a script to mark all of the spam comments that I’ve gotten over the last few months as spam. I tried to use curl to log in to the blog and delete them, but I kept having trouble hanging on to my session. It seems like if you don’t follow the right sequence of pages, you have to re-validate your session. And the, when you finally have the right sequence figured out, you have to visit more pages than you should. Finally, I realized that I could just edit the messages in bulk, and mark them all as spam. Sure, it took twenty pages of marking, but I finally got it finished.

So the point is, you should always look for an easy way to do things before committing yourself to the hard way.

But hey, if you’re interested, here’s what I was working with:


curl --cookie-jar /tmp/cj 'http://pillowsopher.com/blog/wp-login.php'

curl -L --cookie-jar /tmp/cj 'http://pillowsopher.com/blog/wp-login.php' --data 'log=aturley' --data "pwd=$PASSWORD" --data 'rememberme=forever'

curl -L --cookie /tmp/cj --cookie-jar /tmp/cj 'http://www.pillowsopher.com/blog/wp-admin/index.php' --data 'log=aturley' --data "pwd=$PASSWORD"

curl --cookie /tmp/cj --cookie-jar /tmp/cj 'http://www.pillowsopher.com/blog/wp-admin/edit-comments.php' --data 'log=aturley' --data "pwd=$PASSWORD"

Some of the –data arguments are unnecessary, but I’m tried right now, so I don’t feel like figuring out which ones.

May 5, 2007

oligopoly

Filed under: Uncategorized — aturley @ 7:36 am

I like boardgames. I’m probably not what you would consider a board game geek, but the statement “KIRK I TRADE WHEAT FOR SHEEP” makes me laugh. I like to think that I can enjoy any reasonably good game.

Except Monopoly.

When I was but a we lad I had a friend who loved to play Monopoly. I would spend the night at his house on weekends, and I always knew that before we built forts or watched movies or played video games or rode bikes, that we would first play a game of Monopoly. And by “play”, I mean that I would be dragged through a game of Monopoly. It would take hours. It seemed interminable. After the third hour I would begin to beg him to take all my properties at a deep discount and let me simply remove myself from the game. Only occasionally would he take pity on me.

So it was with great interest that I read this article about Monopoly. In it, the author claimed that the reason most people hate Monopoly is because most people play it with house rules that cause the game to go on forever. He flat out says, “Monopoly does not take substantially longer to play than most other board games.” He lays out his thesis rather well.

Being a self-professed fan of games, and priding myself on a willingness to admit that I was wrong (sometimes), I though it might be fun to have another go at Monopoly. After all, some people do seem to like the game, so there must be something to it.

I mentioned this to my boss, who is also a big gamer. A few days later he told me that he told me that he had found  a copy of Star Wars Monopoly in the bottom of the trunk of his car. We decided to get a game together soon.

“Soon” came last night. My boss, his wife, my girlfriend, a coworker, and me. We went to my boss’ place and got going. At first, things looked like they were going pretty quickly. Money was changing hands, but we weren’t flooding the game with cash. Property was being bought up left and right. I was impressed. My coworker went out first. I followed him a short time later. Monopolies had been established. When I went out, I left a massive pile of property and some cash in my boss’ hands. I had been mortgaged to the hilt, and couldn’t pull it off. Oh well. A few more trips around the board and my boss’ wife went out. He also got her property. Now it was down to my boss and my girlfriend. My girlfriend had one monopoly (the orange ones, just before Free Parking) and two other properties. My boss held most of the other property on the board, but almost all of was mortgaged, except for the three yellow properties just before Go To Jail. And that’s where the death march began. My girlfriend was able to elude my boss’ property often enough to no go broke. He was unable to get enough money to get his properties out of mortgage. Around and around they went. It was funny at first. After 15 minutes it was amusing. After 30 minutes it became tiring. After about 45 minutes of this I was quite alarmed. What happened to the short game I had been promised? What was going on here?

I have no answers. The combatants were finally persuaded to call a draw (no small task considering that both of them take their games very seriously) and everybody went home. I had hoped to have a fresh start with Monopoly. I had dreams of adding another game to my usual rotation. Those dreams evaporated last night, melting away like fog in the morning light.

Monopoly sucks.

April 22, 2007

hey crackhead

Filed under: Uncategorized — aturley @ 8:29 am

Well, the final nail in the coffin of last week was not bike-related, it was car-related. Some crackhead got into our garage, busted out my driver’s-side window, and took my iPod. They also took the charger/FM tuner that I used to listen to the iPod, and an old Sony Discman and tape adapter that I had the glovebox. Not a very good haul when you consider the following:

  • The iPod was engraved with “To Andrew Turley, from your friends.” Something tells me that’s going to drop the resale value.
  • The iPod was pretty beat up. There’s this obsession that people have with keeping  iPods in pristine condition. If the buttons work and I can read the display, I’m happy.
  • You can buy a NEW portable CD player for something like $20. Who the hell is going to give you any money for a used one?

I spent 30 minutes cleaning out the glass from the interior and the parking space, 2.5 hours and $190 getting the window replaced, and I’m out about $350 if I want a new iPod and tuner. Mr. Crackhead is probably up $60 at most. Doing the math, that leaves us (the crackhead and me) with a net loss of (190+350)-60=$480. Looking at numbers like that, I’m ready to just start hand out $20 bills to the neighborhood crackheads and begging them to not break into my car. Actually, what I should do is try to start helping out at CATS (Community Awareness and Treatment Services), just a few blocks from my house. They probably need volunteers and donations. I have to imagine that would be more productive than revenge fantasies.

April 19, 2007

ah, now i see

Filed under: Uncategorized — aturley @ 8:12 am

I wondered what the bike gods had in mind. Now I see their diabolical plan. Rain.

Let me start by saying that I don’t mind riding in the rain on the proper bike. In my case, the proper bike is my fixed gear. What makes it the proper bike? Fenders. Fenders are the difference between riding along enjoying the sigh of a wet world, and riding along with dirty water pouring down your legs and into your shoes. Unfortunately, my fixed gear is at home with a flat tire. Today I’m on my touring bike, which lacks fenders. (And yes, I know, any respectable touring bike has fenders. Mistakes were made.)

So, do I tough it out and hope the rain isn’t too bad? Do I go over to Mike’s at lunch and pick up some fenders and put them on before I ride home? Do I completely chicken out and take the Caltrain all the way to San Francisco? There just aren’t a lot of good options. Oh yeah, and it’s supposed to continue to rain tomorrow, so I also need to figure out what I’m going to do about that.

i’ve angered the bike gods

Filed under: Uncategorized — aturley @ 5:26 am

I’ve done something to make the bike gods very angry.

  • Monday: I biked to work from San Francisco down to Palo Alto. About seven miles from work I tried to clip in to my pedal after a stop light, and my cleat wouldn’t catch. I rode for about a block and a half trying to get it in, and finally pulled over. It turns out the spring holds the blades of the pedal in place had broken. I rode the rest of the way with a more or less useless pedal.
  • Tuesday: I took the fixed gear to work. Riding home on Market Street I notice a low rumble and some bumpiness and a wobble in the bike. I pull over and sure enough I have a flat tire. I was only a few blocks from home, so I just walked. It was windy and cold, and it sucked. I still haven’t figured out what happened, but the tires are pretty old, and when I looked at them without any air in them it became pretty obvious that they need to be replaced.
  • Wednesday: I replaced the pedal on the Trek thinking, “It’s a good thing I have a backup bike.” At work, just after lunch, I looked at my bike and noticed that I HAD ANOTHER FLAT. It turned out to be a big staple through the tire. It didn’t take too long to fix, but it was annoying.

Let’s see what today has in store.

March 20, 2007

John Backus, RIP

Filed under: Uncategorized — aturley @ 7:25 am

John Backus, the man who headed the team that created Fortran, has died.

Fortran helped usher in the modern computer era. It gave us a way of separating software from hardware by giving us a language that could (in theory) run on any platform for which there was a compiler. Fortran is still with us today in places like high-performance math libraries.

This is my 21 gun salute to a man who changed the world.

      program MAIN
      integer i, n, sum

      n = 21

      do 10 i = 1, n
         write(*, *) 'bang'
  10  continue
      END

March 19, 2007

behold the future — NOW!!!

Filed under: Uncategorized — aturley @ 9:18 pm

As a proof-of-concept, I decided to see if I could watch a movie on my new cell phone, the Samsung A707 (Sync). I figured there had to be a way to do it.

Materials

  • A Bluetooth-enabled Mac
  • A registered version of QuickTime Pro for converting movie file formats.
  • HandBrake for ripping DVDs.
  • A DVD of some sort (I chose Ghost Dog because it happened to be sitting there).

The steps are pretty simple.

  1. Use HandBrake to generate a DVD file from one or more chapters of the DVD. I just did one chapter, because I didn’t feel like waiting too long for my results. Make sure to change the image size so that it will fit on your screen (which is 240×320 pixels). If you want to make the file smaller you can do things like reducing the picture or audio quality. This article gives some details for using HandBrake.
  2. Open the mp4 file in QuickTime Pro and export it as a 3gp file. You need QuickTime Pro, not just the free version of QuickTime.
  3. Use the Bluetooth File Exchange program (located in /Applications/Utilities on your Mac) to transfer the new 3gp file to your phone. This assumes that you have already set up your phone and your computer so that they know how to connect to each other via Bluetooth. If you haven’t already done this, start here.

Nothing too difficult here.

On my phone, the video was saved in my “Videos” folder. My phone has a “Landscape” option when playing back videos. This flips the video so that you can watch it with the phone held sideways. When held this way, the screen size is close to the proportions of a movie image, so you can watch your video at the highest possible resolution without distortion.

My clip was small enough that it fit on the phone. For a full-length movie, I would have needed to store it on a micro-SD card, which the phone supports. I would recommend this, as the low image quality used to produce the clip made it almost unwatchable.

I told some friends about this, and they asked how this could possibly be useful, since nobody really wants to watch a movie on a phone. I told them that I could see sticking an episode of a TV show on it and watching it on the train in a pinch. Sure, it wouldn’t be ideal, but I ride my bike to the train station and I don’t like to carry my laptop in my bike bag, so the phone seems like a good alternative. And it just feels neat to say, “Yeah, I watched a movie on my phone.” The Jetsons told us that we would be making phone calls on our TVs. I guess they just got things switched around.

Cingular really seems to be pushing this phone so that they can sell customers a more expensive calling plan that includes unlimited data. The idea is that you’ll want to download lots of movies and songs over their network. But that just seems silly when you can download or create content on your computer and then move it to the phone for free using Bluetooth. I’m curious to see how this plan works out for them.

March 7, 2007

things that happened while I was on vaction

Filed under: Uncategorized — aturley @ 9:34 pm

I think there was also some stuff about Anna Nicole Smith, but I didn’t pay too much attention.

March 5, 2007

more hawaii!!

Filed under: Uncategorized — aturley @ 10:04 pm

I’m back. We got in last night. I had meant to try to post some more while I was in Hawaii, but honestly, who wants to sit around writing on a computer when there are mountains to climb and reefs to explore and drinks to drink. Not I.

Monday

Kauai is the San Francisco of the Hawaiian islands. The place is full of hikers and backpackers and divers and surfers. We had a good time. The first day we drove around the eastern and northern sides of the island, from the Lihu’e Airport to Ha’ena, stopping along the way to check out the beaches. At one point we decided to randomly pull off the road and see where we would end up. We ended up in Anahola. Anahola is designated as Hawaiian Homelands, “meaning it is available to persons of Hawaiian descent,” according to the blue book. The place looked pleasant, and we saw our first chickens. We stopped at the beach. There were some locals hanging out in the parking lot in their trucks. I had been warned repeatedly that locals sometimes don’t take kindly to tourists, so I left my camera in the car and Heidi and I walked on the beach for a little while. I was probably being paranoid, I doubt they cared at all that we were there. The beach was nice enough, although there was quite a bit of trash strewn about. There was some sort of shrine set up under some trees near the parking lot, but I didn’t see anything that indicated who or what was being honored.

We continued up and stopped at the Kilauea Lighthouse. The area around the lighthouse is beautiful, with cliffs going down to the sea. There are lots of birds on the cliffs, and near the lighthouse we saw some Nenes. It is worth seeing, but the lighthouse parking lot is small, and there’s a guard at the upper parking lot who controls who goes in, so you may have to wait for a while to get in. Oh, and it’s “too steep” to walk down to the lighthouse from the other parking lot, according to the guard, so don’t even try. Whatever. I’m sure it’s a liability issue for them to have people walking in the road where other people might be distracted by the beauty around them.

After that we stopped at a few more beaches and had lunch at The Polynesian Cafe (“Gourmet food – paper plates”) in Hanalei Bay. I was pleasantly surprised to find that most places in Kauai had a fairly large number of vegetarian options on the menu. I ended up getting tofu in a sweet sauce. Shanghai tofu, maybe? We walked over to the beach, which took a little while because there are long blocks of houses separating the beach from the road, so you have to know where to go to find one of the roads that cuts through. The walk is nice, though, because you have beautiful green mountains on one side of you and the promise of beach on the other.

We continued on to Ha’ena Beach Park. The beach wasn’t all that great. There’s a cave across the street that you can walk around it. It’s kind of neat because the opening is surprisingly wide, but there’s not much to do but walk it, say, “Wow, it sure is dark in here,” and walk out. Didn’t Sartre mention the desire to fill holes?

We finally drove to the end of the road and got to Ke’e Beach and the beginning of the Na Pali Coast. The road quite literally ends there. From that point on, the only way to continue around the island on land is by foot. Twelve miles of roadless coast. We sat on the beach and relaxed for a while, watching the people and the chickens.

After that we headed back to around the island and went to our bed and breakfast. At this point, let me give a shout out to Ruth and Sandy at the Hale Lani Bed and Breakfast. Our room was very pleasant and clean, the food was tasty, and each room gets its own hot tub on the side of the house. Oh, and they have snorkels and flippes and boogie boards that you can borrow. And the rates are very low. What’s not to love? I can’t imagine staying in a better place for less.

Tuesday

We headed back to Ke’e and hiked the first few miles of the Na Pali Coast trail. We hiked for about two miles to a little beach and a stream. The beach is isolated and beautiful, but also deadly. The trail leading up to it has several signs warning you to not go into the water, including one that has a running tally of the number of people who have died on the beach. The waves are were very frequent and broke quite close to the beach. As far as I’m concerned, the signs were not exaggerating. There were two feral cats waiting for us on the beach. We were trying to figure out what they ate, but it soon became obvious that the hikers along the way were more than happy to share lunch with them. I did my best bird call and got the attention of the younger cat, but the older one completely ignored me. I pointed this out to Heidi. “Lunch wears hiking boots,” she said. Brilliant. Coming back on the trail we ran into groups in various states of preparedness. An older couple had muddy shoes, and the wife asked us if it was worth going on. We told her yes, but mostly because they were only about 15 minutes from the beach, and it would have taken them at least 45 minutes to walk back. She looked miserable, and I’m sure her husband was getting an earful. We were patting ourselves on the back for wearing boots when two girls came the other way completely barefoot and tramping along like they were walking on the smoothest carpet. I would recommend the hiking boots. Also, make sure you have water, and bring rain gear even if it looks sunny, because you can get dumped on by a sudden shower and the breeze is a little chilly. The hike isn’t too strenuous, but it takes some work.

After the hike we ate lunch on the beach and then spent the rest of the afternoon alternating between snorkeling and sunbathing. The snorkeling is great there because there is a coral reef off the beach that creates a nice protected area that is fairly large. There weren’t a whole lot of fish, but there were enough to keep us entertained. And because the water is so calm, it is also very clear, so you can see the fish even if they aren’t close. When you are on the beach, your entertainment options are limited to watching tourists and watching the chickens who parade about.

That night we ate dinner at the Blossoming Lotus, a vegan restaurant in Ka’apa. The food was excellent. The restaurant was a little more upscale than we had expected, but not in a bad way. You can wear shorts and flipflops, but leave the dirty hiking boots at home.

Wednesday

On Wednesday we went out to see the Weimea Canyon. They call it the Grand Canyon of Hawaii. That may be a bit of a stretch, but there are some beautiful views, and as one of our guidebooks pointed out, it is rather surprising to see such a big canyon in such a small island. There are lookout points all over the place, so you can get some pretty pictures. Keep an eye out for the waterfalls.

We got to the end of the road at the Kalalua Lookout and then hiked to the Pu’u o Kila Lookout. Great views, although the “hike” was actually just a walk on a road that was closed for repair. After some lunch, we decided to test our luck with the Awa’awapuhi Trail. I say “test our luck” because it was already 2:00 PM and the hike takes you three miles out and 1200 feet down. We weren’t sure how rough the trail would be, but we knew that there was a slight chance that we could be out past sunset if we took too long looking at the view. We end up making good time, getting to the end of the trail in about a hour and getting back in just under two hours. The trail is long and not particularly scenic, but we did get to see wild goats and wild boars. Those, combined with the chickens who were waiting for us and the end of the trail, prompted Heidi to call it our barnyard hike. The views at the end were great. You look down into a little valley that leads off to the ocean, and you’re surrounded by mountains. While we were there we saw a few helicopters flying around, but I think we enjoyed the view more having earned it. The hike back up was challenging. We’re both in reasonably good shape, and by the end of it we were dragging our feet. Don’t even think about trying it without lots of water. I went through a liter bottle, plus some water out of the Camelback that Heidi was wearing. There are mile-markers every quarter mile along the trail. I think that helped to keep us from getting too discouraged as we walked up.

That night we ate at a little hippie spot called Coco Cafe. The food was pretty good, and the whole thing is outside, which is quite pleasant except for the occasional mosquito. They don’t serve alcohol, so if you want a drink you should bring your own, but after the hiking all I really wanted was some water.

OK, I’ll try to finish up my trip report tomorrow or Wednesday.

February 27, 2007

Filed under: Uncategorized — aturley @ 9:55 am

In an earlier post I called TV news a joke. I’m pretty sure that’s not a radical opinion. But if anybody needs an example, behold this coverage of “whistle tips”. It has everything. Loud cars. Crazy stereotypes. The best Supra driving I’ve ever seen.

« Previous PageNext Page »

Powered by WordPress

On this site: