Sunday, July 20, 2008

Design Patterns... BAH!

I started reading "Head First Design Patterns" last week, and taking advantage of my new-found knowledge I tried to refactor Missing's http client stack. Its taken me about eight hours and it works again. Its as ugly as it was before, maybe even more so.

The kookiness of the design stems from the fact that I want the ability to respond to an HTTP response, possibly from a different thread. Android has a cool thread/message-queuing class called a Handler, that allows you to post a Runnable to the handler and it will get executed on the thread in which the handler was instantiated.

Because I wanted to keep my http stack android-agnostic (not that I had a good reason for it, in fact I didn't even think of doing it at first.) I removed the knowledge of the Handler from the .http package.

Instead I created a decorator for the HttpResponseRunnable that does know about Android's handlers. For the sake of re-use on another project, I put it in the .http package... DOH!

On the positive side, I did manage to implement a design that allows me to dynamically create http requests and responses without having to subclass all the time. I don't know if in the long run that will be better.

Things I need to think about:
  1. What is the best way to chain http operations where each request depends on data from the previous request?
  2. How would I design the HttpService from the ground up? Where can I look at code that has similar features to the ones I'm coding up to see what design they used.
  3. Why am I constantly re-writing this stack?
  4. If I am going to have a large number of http callbacks, if there are many types of end points, do I want keep the ability to define them quickly, or do I go with something more verbose and more abstract?

Do you know Java? Want to discuss some of this with me? I'm a newb and could use insight from someone with more experience than I.

Wednesday, July 16, 2008

Tuesday, July 15, 2008

Alkaline Trio breaks my heart

When I started listening to Alkaline Trio (almost) seven years ago, I never expected them to have as great an impact on my life as it has. I fell in love with "From Here to Infirmary," and quickly back-filled my collection, scouring Napster for b-sides which I finally heard many of on the "Remains" release last year. I've been to many shows, the best shows I've been to with my friends Josh and Chris. If you look closely, you might see me in the Halloween show DVD. Chris is right there. He can point us out. I can clearly remember the day we were driving around the suburbs and Chris and I had a great debate about "Cringe" lyrics -- Chris was correct but there aren't many bands where you'll argue about the lyrics of a song and feel bad when you mis-understood them. Its a good indicator when you take the time to find exactly what it is your band is singing about. When that band can provide such powerful emotion that you can nearly lose consciousness at a show. When a band can take you into and out of a year long depression. These things mean something. Well, they mean something close to me.

I have had the unfortunate experience of listening to the new album, "Agony and Irony" all the way through. I can't help but wonder if the band really just said "Fuck it," and felt obligated to put out a new album after three years of re-releases and re-masters. "blah, blah, blah" indeed. Save your spirit, don't listen to the new album.

I don't know what it is, but I can't get over this failure. I am angry. Mostly just angry. Not kick them in the face angry, more angry at everything having changed enough that the music just doesn't fit me anymore. They grew up -- A band can only sing about drunken heartache for so long before it becomes dull and I can only live in my angsty early-twenties for very little time. Never-the-less, I am angry that the band that I love wrote me a very bad break-up notice. I am not cool with that. Its one thing to say "Thats it! We're over!" Its a whole different story when the relationship dawdles on for too long. I will always have the Halloween show, six great albums and many other pretty-good/mostly-good shows to love.

Disclaimer: I am writing this alone in my bedroom, drinking Whiskey and reminicing about the old days.

Alkaline Trio makes more money.

"This and this on the same thing, it makes my life." Matt Skiba in reference to a new Nike/Alkaline Trio shoe. Just, what the fuck.

Al capone chicago style (thick crust)...

Google cafe, Dublin

Friday, July 11, 2008

Tweets for Today

  • 03:26 Wondering when Android is coming out. #
Automatically shipped by LoudTwitter

Thursday, July 10, 2008

Mmmmmm


Delicous Fish and Chips at 1am after six Guninesses.

Thursday, July 3, 2008

Tweets for Today

  • 06:53 My last day in New York! #
Automatically shipped by LoudTwitter

New York Day 10

This is going to be a short entry -- Its my last day here in NYC and for lunch I took the team I was working with to Katz' Deli. I had a delicous (but expensive) pastrami sandwich, pickles (dill and sour), matza ball soup, fries, root beer and cream soda. I did not finish any of those items. See previous posts for pictures.

My ten days in NYC were fantastic and I can't wait to come back here again. I am still amazed that Amy and Josh came to visit and I can't wait to meet up with friends for travel in the future!

I'm in the taxi back to JFK right now and because my plane was delayed I won't even be able to meet up with people tonight in SF. Thats too bad.

Young's double chocolate stout.

At burp's Castle

Katz

Katz DELI!

Wednesday, July 2, 2008

New York Day 7,8,9

Oops. Forgot to update.

On Monday I went to bed almost as soon as I got home. Even though I was sleepy I did go out for Ramen at "Ramen Setagaya" after work. It was very salty but still enjoyable. I thought the Gyoza was delicious!

Yesterday I worked till 6pm then went out with some folks from work to not-so-good Thai. We went to Burp Castle afterwards and I had a couple pints of Young's Double Chocolate Stout. Then we went somewhere else for a drink. Around midnight I took a taxi home. I stopped at Chelsea Papaya for a cheeseburger and fries. It was fantastic fast food. I'd go again.

Tonight I worked late (I got in late too) and got a burger at some fancy looking place "Chelsea Porter" because it was on the way. I wish I had gone to Chelsea Papaya again. I watched a cool documentary on a kid who is blind but uses echolocation to get around. Its inspiring.


PS. I've updated the map: Where I've been in New York


View Larger Map

Tuesday, July 1, 2008