Archive for July, 2007

GPMethods now available

I just posted the first release build for a command utility I wrote called GPMethods. It used for rapidly generating mutators and accessors for Objective-C. Instead of writing dozens of lines of setters, getters, and dealloc statements, GPMethods takes a list of property names and types, and then depending on the flag you give it, will produce the necessary code that you can paste right into your favorite text-editor.GPMethods is also really smart, and automatically tailors the generated output based upon the types you give it. For example, it will automatically release and retain properties that its thinks are objects, using the correct methodology whether it is a Cocoa, CoreFoundation, or even CoreGraphics object.Download the build at the GPMethods page.

Jason’s Wedding

Two posts in one day.So I just got back this morning from my cousin Jason’s wedding. Jason is a few years older than me, actually he is the same age as my brother Jon, and he wed Cassie Nestleberger. The wedding was held outdoors at a country club, and it couldn’t have been a prettier day for it. The ceremony was very well done, and it was very cool to see the expressions on Jason and Cassie’s faces as the ceremony progressed. They are so good for each other, and they truly love each other.The reception was held at the country club as well, and consisted of the traditional toasts, dinner, cake cutting, and of course, dancing. I must say that our family knows how to have a good time.Besides the wedding, the trip just consisted of seeing family and seeing Leslie, which of course is a very wonderful thing. As a family, we ate meals together, watched a movie together, and just enjoyed each other’s company. When not with my family, Leslie and I took a watch, ate Thai food, played the card game Flinch, and read The Chronicles of Narnia aloud to each other.I really appreciate and love my family, and I feel truly blessed to have them. And Jason and Cassie, congratulations!

British Soccer

Finally a new post! So last Saturday (I know, it was over a week ago, sorry), I was privileged to accompany the George family to a British soccer game at Stanford University in Palo Alto. British soccer in California, you say? The British club Chelsea is currently touring the globe playing friendly matches as part of a preseason promo. So, in their endeavors in the United States, they decided to play the Mexican Club America de México. Now to make matters even more internationally mixed, Chelsea is owned by a Russian billionaire, and lots of the players are Russian. A British team with Russian players playing a team from Mexico in the United States.The game, I must admit, was quite amusing. So the actually game itself was good, yes, but the really amusing part was the fans for the Mexican team. They were out of control! First of all they had banners and streamers that covered the majority of their part of the stadium, and then they had people banging drums, playing trumpets and trombones, throwing toilet paper off their level, dumping hundreds of pounds of confetti on everyone below them, jumping up and down, shooting off fireworks, and going crazy the entire game. And I am totally serious when I say that they were going crazy the entire game. The police were trying to control them, but they eventually just gave up. The British fans, on the other hand, were much more mellow, and their cheering consisted of shouting and singing. Certainly more in control than the other side.In the first three minutes of the game, the Mexicans scored off of a deflection. They had a shot right at the goalie, but a defender tried to block it, and it wound up just sliding in the left side of the goal, much to the dismay of the goalie and the rest of the team. The next 72 minutes were scoreless, and it was a constant battle between the two teams. In the first half, both teams put out their best players. However, come the next half, they put in all the reserves, so it was basically a different team playing. Now Chelsea is really good, and Club America is mediocre, so the Georges said that Chelsea played “like rubbish” in the first half. But in the second, they redeemed themselves and played brilliantly. With 15 minutes to go, Chelsea got their first goal. And just 5 minutes later, one of the star defenders put in the game-winning header off of a corner kick. The rest of the game was pretty mellow, and the match ended on a friendly note.Moral of the story: British soccer is so much fun to watch, especially when you watch it with a family who knows soccer. If you ever get the chance to watch some good European soccer, don’t pass it up.

Movie Review: Ratatouille

Last night, I spend $11.25 to go see the new Pixar movie Ratatouille with some of the other Development Technologies engineers on my floor.Pixar has always had just incredible feature films, and going into Ratatouille, I had really high expectations. But, after 90 minutes, not only was I not disappointed, but I was amazed. To say the least, the film was absolutely incredible. It was hilarious. The story was really well written. And of course, the animation was superb. The plot follows a rat named Remy who really knows how to cook, and how he helps an unfortunate human who does not. It was brilliant and witty, and had me just doubled over in laughter.I don’t really know how else I can compliment the movie. I have no complaints, no critique, nothing I would change. All I know is that when movie is available on iTunes, I’m adding it to my collection.Kevin’s movie rating:

Absolutely incredible

Movie Rating Key:

  1. Best movie I have ever seen
  2. Absolutely incredible
  3. Pretty darn good
  4. I would watch it again
  5. Good, but only time I am seeing it
  6. Disappointing
  7. Not very good
  8. Horrendous
  9. Shouldn’t have been made

Ratatouille

Castle Rock State Park

On Sunday, my roommate Matt Ronge and I decided to do some hiking in Castle Rock State Park. The is about 30-40 minutes away atop the hills (mountains to us midwesterners) between Cupertino and the ocean. It was beautiful! Parks out here are totally different. First of all, the trees are like 200 feet or more, and probably 3 and half to 4 feet in diameter. The fauna is just totally different. The air is also extremely clean.The park is known for its rock formations. Scattered throughout the park are these little sets of rocks. Now by rocks I mean boulders, and by boulders I mean rocks the size of houses. The wind, however, has carved the rocks so they have holes, and sometimes the wind has created caves in the rocks as well. Because of the rocks and cliffs, a popular sport in the park is rock climbing. There were some people climbing 20 foot rocks, some climbing 40 foot cliffs, and others climbing 200 foot cliffs. It was pretty cool.There is not much else to say, but check out the pictures to see more of Castle Rock State Park.

Cabin Pictures

Hello all, pictures from the cabin trip are now available!Sunset on Lake Whitaker

Nerd Post: Why do different Cocoa objects have the same address?

I ran across what to me was not a seemingly obvious Cocoa artifact today. Let’s suppose that you create some strings much in the way I do below:NSString *myString1 = @"Kevin";NSString *myString2 = [[myString1 copy] autorelease];NSString *myString3 = [[[NSString alloc] initWithString:myString2] autorelease];NSLog(@"%p, %p, %p", myString1, myString2, myString3);Strangely, my log prints the following:0×6060, 0×6060, 0×6060meaning that all the objects are in the same address space! I didn’t quite understand how this could be considering the fact that I used three different methods to create a string. I tried the same thing with NSArray, NSIndexPath, and some others. Strange…After asking around, I finally got my response from Michael, a Cocoa veteran down the hall. He said, “try the same thing, but with mutable strings.”NSMutableString *myString1 = @"Kevin";NSMutableString *myString2 = [[myString1 copy] autorelease];NSMutableString *myString3 = [NSMutableString stringWithString:myString2];NSLog(@"%p, %p, %p", myString1, myString2, myString3);And sure enough:0xae60dd, 0xae60f7, 0xae60fd: different objects!So what’s the deal behind this? In Cocoa, when you allocated a new immutable string using any method, it checks to see if that string already exists in memory. If so, instead of actually allocating a new string, it just increments its retain count. You can imagine how handy that when you create 60,000 of the same string, and Cocoa just creates one with a retain count of 60,000.With mutable objects, however, we do not just bump the retain count because of the fact that if two sources create the mutable string “Kevin”, for example, and then one of the sources changes it to “Keeven”, they change in both places. Not a good thing. So mutable objects are actually allocated each time you create one.So watch out when you are doing pointer checking with immutable objects. You might not be getting exactly what you thought!

Movie Review: Live Free or Die Hard

For my Fourth of July, I worked. Well, not the whole day. I spent 2 hours and $8 to go be entertained by the new Bruce Willis movie Live Free or Die Hard with my roommates Matt Ronge and Dax Norman.And I was certainly entertained. Actually, I quite liked the movie. The plot followed a computer heist that cripples the country, and leaves Bruce Willis and computer hacker Justin Long trying to save the world. The story was largely unbelievable, but it took place in the future so that is some what OK. Die Hard is all about Bruce Willis doing ridiculous stunts, shooting a machine gun, and yelling “Yippee Ki Yay.” Die Hard or Live Free certainly met all of those, and took the previous Die Hard series to the next level. In fact I would place it as the best of the Die Hards.I also enjoyed the movie because of the fact that I really like Justin Long. Yeah, it probably has to do a lot with his success in the Apple “I’m a Mac” commercials.Die Hard is a fast moving, action-packed, and extremely entertaining ode to the Die Hard series, computer nerds, machine guns, and good defeating evil once again.Yippee Ki Yay.Kevin’s movie rating:

I would watch it again

Movie Rating Key:

  1. Best movie I have ever seen
  2. Absolutely incredible
  3. Pretty darn good
  4. I would watch it again
  5. Good, but only time I am seeing it
  6. Disappointing
  7. Not very good
  8. Horrendous
  9. Shouldn’t have been made

The Cabin

For those of you who were wondering why my blog was not changing at all, it’s because I have been in California for the past week and a few days. I have a cabin in the Adirondack Mountains in upstate New York, on a little lake called Whitaker Lake. It is just an extremely peaceful place, and its origins are rooted in the grace of God, so the place is very special to our family.I spent the week+ with my entire family (Dad, Mom, Sarah, Jon, and Jennie) and Leslie. We had such a fun time, and did quite the variety of activities. Here is a highlight of some of the stuff we did:

  • Mountain Climbing: the Adirondacks are, well, mountains. They are steep mountains, and fun mountains to climb. One of the reason they are so fun to climb is because of the fact that there is no altitude like the Rockies. They compare in vertical ascent and steepness, but you don’t have to worry about how high you are. Nonetheless, we started with Chimney Mountain, which is a relatively short, but very steep, climb to a set of rocks overlooking the mountains. The rocks on top of the mountain create really cool caves, and are fun to explore. I really like Chimney. The next day, Les and I did Pillsbury Mountain. The view from the top was certainly not worth the climb, which is more grueling than Chimney, and there is nothing to do on top of Pillsbury. Les and I give it a very low rating. But we finished on the last day with my favorite mountain: Snowy. It is by far the most challenging of the mountains we did, but also the most rewarding. It has a fire tower on the summit, so you can look out over the miles and miles of mountains and forests surrounding you. Gorgeous.
  • Games: One of my favorite things about the cabin is playing games with the family when you are not doing active things. The game of this trip was Bags. Jon built a sweet set before we came out, so we spent a lot of time playing it. If you don’t know what it is, Google it. So we spent lots of time doing that. We also played Spoons, Scategories, Catch-Phrase, Yahtzee, Flinch, and others.
  • Canoeing: When you are on a lake, you have to canoe. But there comes a problem when you don’t know how. Leslie didn’t (past tense) know how to canoe, but we spent a lot of time on the lake, and eventually she was getting it down. We learned the 7 basic strokes: the bow stroke, the backwater, the draw stroke, the push-away, the sweep, the reverse-sweep, and the J-stroke. With those 7 strokes, you can certainly navigate a canoe like a champ. I was quite proud of Leslie by the end of our trip.
  • King of the Frosties: Absolutely no cabin trip is complete without King of the Frosties. King of the Frosties is a little ice cream place in the town about 6 miles from the cabin. The town is really really small, with a population not much over 100, maybe? But King of the Frosties makes the best ice cream ever, and the tradition twist with rainbow sprinkles is something to look forward to all year long.
  • Deerfoot: Deerfoot Lodge is a Christian camp for boys on the lake. It has been a part of our family for years and years and years. My grandpa served on the Board of Directors, and my uncle does now. Two of my uncles went there when they were kids, and my brother, my cousins, and myself have had many many summers there. The guys who go there and work there love the Lord, and have had quite the impact on me, and are responsible for a lot of who I am today. If you want to know more about Deerfoot, check out their website.

There are lots of others things I could include on this list, but I would probably bore you after awhile. Bottom line is that I love the cabin, and getting to spend 8 days there with my family was quite the treat.