Being RESTful ain’t that easy

This is a more technical post, and so if you aren’t interested in some nuances of browsers and Internet architecture, then you should pass on this one. It’s okay, you won’t hurt my feelings.

Man, we ran into a doozy today. We had one report from a user that people weren’t able to enter their moderated video chats. We weren’t sure that made any sense, and we couldn’t find any records of failure to enter the video chat in our error logs. It turns out we made two mistakes. First, we didn’t gather enough information. Second, we didn’t understand the errors we were getting back. Both, thankfully, are now fixed, but the journey was an interesting one.

First, let me give a little bit of background on our new architecture. We’ve just released our new call moderation stack at TokBox, and, to do so, we really sat down and thought through how to build this functionality in an Internet architecture appropriate approach. We came up with a really solid, RESTful API. The basic premise here is that all actions have a URI, and are a very specific contract between two endpoints (one being the user making the call, the second being our server). It was all very well tested on a Mac in both FireFox and Safari.

Here’s where the real journey begins. In RESTful fashion, we are defining the user’s role in a moderated chat by transitioning them from an “ASK” state where they are essentially knocking to get in, into a “PARTICIPANT” state where they have joined the call. The modify action uses the POST verb (though technically it should use the PUT verb, we weren’t confident in the Flex framework’s HTTPService class to handle this properly, and have instead limited ourselves to POST and GET), and then redirects to the user info action which returns the updated role, as well as any profile information about the user that might be pertinent to the video chat.

Now here is the gotcha. We use an HTTP 302 redirect to move between the actions. In all browsers not IE, it looks as if the 302 happens by first doing the verb of your choosing (in our case a POST), and then a GET to the redirected site. According to the spec as we read it, this is probably wrong. In fact, the redirect needs to ask the browser which verb to use in the HTTP/1.1 spec. Seems as if the HTTP/1.1 spec is either being misinterpreted, or the HTTP/1.0 spec is being maintained to enable backwards compatibility with how sites acted. Why did this cause us a problem? Because in IE7 & IE8, the 302 redirect does a POST (essentially repeats the original verb action). Our user info action was scoped as only accepting GET requests. The result… guest users couldn’t enter a moderated video chat from the IE family of browsers because the redirect fell into an error state, and didn’t return the proper response.

It took watching the TCPDump coming across the server across multiple browsers and API calls to figure this one out, but in the end we learned a very valuable lesson about how redirects work, making RESTful APIs work cross browser, and making sure we test across all combination of browsers and scenarios.

Posted in Technology | Tagged , , , | Leave a comment

Good bye old friend

My best friend Matt D. and I have a tradition to which we’ve held since the summer of 2006. Whenever we go out to eat, to complain, to laugh, to cry, we always end up at Outback Steakhouse. There was one down the road from where we stayed during our IBM internship, and from there a tradition was born.

Since that summer the standard plate has been:

  • Outback Special ( size dependant on hunger )
  • Side of mashed potatoes
  • Bloomin’ Onion ( of which 90% is always finished )
  • Salad ( dressing is consumer dependant )
  • Coke to drink ( they never had sweet tea )

We went, and ordered the exact same thing, for the whole of the Summer of 2006. I came back out a few times for interviews or just to visit Matt, and we always went. I moved out to the Bay Area, and at our footsteps were all of the shops and restaurants of downtown Palo Alto and Mountain View, but we never broke. You can take a hick out of the country, but you can’t take the country out of a hick ( or so the saying goes ).

Alas, all good things must come to an end. And so it is for the Outback tradition. Tonight was the end of something truly special to us both. Yeah, it was just a restaurant, and not a great one at that, but we really grew up together in those oversized booths eating greasy fried onion strips, and mixing our mashed potatoes with steak. We escaped into our own world. Jobs, dreams, and heartbreaks were all up for discussion between courses. We genuinely fulfilled the Jimmy V legacy of laughing, crying, and spending time together thinking about how we were going to save the world.

So, what changed? It wasn’t the steak or the Bloomin’ Onion that’s for sure. It was us. In front of us is a brave new world filled with adventures and turns we’ve never imagined. And as we embark into this brave new world we bid our past good bye with the anticipation of building new, better and a bit healthier traditions. But at the same time we do so with a small tear in our eye.

I’m really optimistic about the future, having now looked back on where we came from. To this day, I’ve kept an e-mail I got from Matt in the Fall of 2006 after our paper was presented to a packed audience by our mentor, and friend, Eishay Smith. It’s a one liner:

Subject: Us
Body: Yeah, we kick ass!

And watch out because we’re going to do it again

Posted in Extreme Blue Internship, just thinking out loud, New Year Resolutions | Tagged , , | 1 Comment

Freedom for $3 per gallon

My only sources of peace lately have come from two sources. The first is the feeling of a late night crawl into my side of a warm bed after a late night hacking session. The second is driving in a car along the Pacific Ocean.

I hate driving long distances, or at least I hated driving long distances. No further than Myrtle Beach was my general limit, self-imposed of course. I think the cross country road trip that I did summer of 2007 cured me of that antsiness and boredom. I really only fell in love with this country after I saw it from the the road. And now the road is my major source of peace…

Case in point. I drove down fo Monterey this past Wednesday, and experienced an entirely calm and relaxed day. In fact, we went to the CVS around midnight to get some bottled water, and I went by the pharmacy to check out my blood pressure. The reading was 117/67 with a heart beat of 65 bpm. In San Francisco, I’m a borderline hypertensive on my way to pill boxes with the days labeled to make sure I don’t miss my meds. After a day on the road I’m healthy, relaxed and, ultimately, at peace.

I’m really worried about this inability to find peace outside of the road. I can’t find a way to wind down, and it’s really leading to a situation where I’m fighting against everything just to get some breathing room. It doesn’t help that I live with someone with whom I work, but that would be an excuse, and entirely unfair to Micky. I had this problem when I lived alone, but was only two blocks away from work as well, and discovered that turning those two blocks into ten went a long way towards getting me straightened out this past spring.

Something about the mindlessness of getting home is what I’m missing now. I hypothesize that being more of a regular at the gym early in the mornings will help with this. The goal there is finding a better outlet for whatever angst I’m experiencing. So far, I think, so good. If that doesn’t help, I’ll need to find something else to replace the peace which is an open highway and the Pacific off to the side crashing against the cliffs and beaches of California’s awkward coast line.

Until then though I’ll keep getting my freedom for $3 per gallon over one windy stretch of CA-1 after another.

Posted in just thinking out loud | Tagged , | Leave a comment

Leaving the bubble behind

It has taken me almost six months to write this post. It’s been floating in my head for a long time. Since she left really. But I had to really know what I wanted to say. This isn’t a breakup post with a person or a closing of a chapter.

This is an end.

I feel like the straw that broke the camels back came from realizing that I was better away from everything that once made me whole. It was better for me to cut the cord on my past. All an individual builds on top of is what has happened to them. My foundation crumbled. I picked up the pieces that I wanted (or needed) to salvage. At first I tried to build a shelter from the pieces. That didn’t work. Instead I found myself forced to start over.

When I first moved out to San Francisco, I didn’t find myself investing in being here for long. One foot was already out of the door on my way back home to what I knew and to where I was king of my own domain. To say the least, that plan exploded in my face. Looking back now, I think it may be the best thing to have happened to me in an utterly perverse and masochistic way. I scratched and crawled to keep things as they were. I failed.

What I didn’t realize was how this was really an ending, and not a turn in the road. The turn had happened almost ten years previously. I had finally found the dead end that I had chased for a decade.

I honestly don’t know what I did next. There’s this emotional and mental block for a big stretch of the past spring and summer. I think what really happened was that someone else, or some group of someone elses, just kept me going. They were very much guardian angels without wings.

It was only after the last family vacation that we will ever have that I found myself both relieved of, and in some regards forgiven for, my past. Whatever the gorilla was, and I never really figured out what it was, it was gone.

In coming home from that trip I found that I was a borne again believer in myself. I never really realized how little confidence in myself I had left.

Since that trip, and the month of fasting that came immediately after it, I think that I have finally focused on what matters the most. I’ve refilled my confidence tank. My health, my personal development, my friends, my family, my love were all second class citizens. Now they are first on my mind, and first in my heart. It took me a long time to find that too.

It took me six months to write this post because in many ways I was mourning the death of who I was. That kid was really amazing in so many ways. The kind of guy you root for in the movies. I think that he got lost in himself somewhere, and the rest as they say is history. I can’t say that I will miss him, but I can say there is a hole where he once was. Instead of looking back, I can look ahead and declare…

This is now a beginning.

Posted in just thinking out loud | Tagged , | 2 Comments

10 Resolutions for 2010

Much has been made of moving through the first decade of this century (and of course this millennium) with all of the “Best of” and “Top 10 of” lists written by newspapers, magazines, blogs and the rest. It’s hard work to look back and try to understand the best of what has happened. Do we focus on the positives? Graduating high school and college. Getting my first job. Finding Micky. It’s not really worth reliving the negatives. They are better off left in the past.

This post is about looking into the future. It’s vast, it’s scary, and it’s full of opportunity. To really jump into the next year with both feet, I’ve decided to set ten resolutions for myself. In picking my resolutions, I had a couple of metrics in mind. First, the resolutions should be easy to measure. It should be put into the public eye, which I think gives a higher incentive to get the resolution accomplished. It should also somehow improve my ability to accomplish my longer term goals, which I’m going to document in another post this month. All of that said, the final list is:

  1. Lose 25 pounds by June 1st
  2. Play a round of golf in the 80s
  3. Increase my personal savings by one-third
  4. Finish the initial BFBP product
  5. Blog five times per month
  6. Visit one new country, and three new places
  7. Run a half-marathon
  8. Learn to Tango
  9. Support Micky in helping her stop biting her nails
  10. Support Micky in helping her finish her sailing qualifications

I really do think that I’ve got a list here that’s going to set me up to be both happier today, and a better me in the future. I’ll be keeping track of my progress on this blog (which will help with item #5). What are your resolutions? What are you doing to make sure that you accomplish them?

Welcome 2010, and let the fun begin!

Posted in New Year Resolutions | Tagged | 1 Comment

The Final Score

I think I’ve just lived the best week of my life.

From Phoenix, where I saw Andy, Arielle and my brother play soccer, to my birthday, which was made amazing by great friends and just an absolutely amazing Micky, to being in North Carolina over Thanksgiving, where I just had an amazing time, I was enveloped in a genuine sense of love and compassion that I don’t think I’ve felt for a really long time.

It was in every way imaginable a reminder of how lucky I am. It’s the eternal cliche to not appreciate how lucky you are until you no longer have the opportunity. I didn’t fall into that trap in this instance. Instead I yearned so much for what I had lived for in a past life that I dreaded going back home because I thought it would never live up to the memories. Over the course of the last year, I would say that I’ve learned to put my memories in the right context, but that doesn’t mean that being in the moment wouldn’t be overwhelming. Somehow, someway, it was even better than I remembered. I think a lot of it is that I have amazing friends both in San Francisco and Raleigh who have created a wonderful network of nerds, geeks, jocks, and the occasional Saar (who of course gets his own category).

I also was successful in my 33″ by 25 campaign. On my birthday I measured in at a lean 32 7/8, and hopefully this Thanksgiving hasn’t been too harsh on that conquest! I just want to thank everyone who committed to giving to a charity. I know how lucky I am, but I’m also really excited that someone else will somehow benefit from how great my friends are.

Pictures are coming, and I’m sure I’ll be telling stories about all of the fun that I had to anyone who will listen, but before I crashed tonight (after writing some superb code I might add) I just had to share with the world that right now I’m genuinely the happiest person. It’s wonderful. Thank you.

Posted in just thinking out loud | Leave a comment

Announcing 33″ by 25

While most of you may know me as a rather good looking fellow with boyish charm, I have in fact become a bit of a slob over the years. When I started at TokBox in June 2008, I was probably approaching a 40″ waist line. Nothing like the 30″ waistline that I came into college with. Clearly those “Freshman 15″ hit me a bit harder than I would have liked.

When I first measured in February of 2009, I had a 38″ waist. I did so because I gave up fast food for Lent, and I wanted to see what the difference would be. It was huge. I lost 2″ over the 40 days of Lent with no fast food. I’ve since gotten it down to somewhere between 34.5″ to 35.5″ depending on the day. Now my goal is to reach a 33″ waist by my 25th birthday which is on November 20th. I have just over 2 weeks to do it, and I want you to help.

You probably weren’t going to get me anything for my birthday anyway, and that’s okay! I didn’t get you anything for your birthday either. But, I am going to be a bit selfish, and ask that you help motivate me by “sponsoring” my drive to 33″. For each inch lost (today I measured, and I was 35″), I ask that you pledge an amount to donate to charity. I don’t have a favorite charity, and so I’ll be taking suggestions for that as well. I say make it a bit fun too. As an example, pledge $10 for a 34″ waist, but $25 for a 33″ waist. Give me that extra bit of push!

All said, I need 2 things from you, my friends.

  • A charity to which I should donate my proceeds (most popular two or three will get the proceeds)
  • A birthday gift of pledging some amount to donate for each inch lost

Worse comes to worse, we’ll have fun and laugh over that time when I thought I could be good looking again! Please do post to my blog your ideas and pledges because these links tend to get lost on Facebook/Twitter/etc. after a few days.

Posted in just thinking out loud | 9 Comments

Frankly my dear, no one gives a damn

That’s how I feel right now about my need to make excuses for myself of late. No one gives a damn, and nor should they. I don’t have any good ones… there rarely is a good one. I need a good reason to move forward, and I think that I’ve finally found it. It’s over. 24 is over, and it’s time to take control again, and understand how in so many ways I control the destiny of the most important thing in my life right now… me.

So here’s a game plan for me:

  1. Get Organized
  2. I’m working on a good calendar & to-do list for myself. I’m not quite sure what I need or what I want. I now that iCal isn’t it, and I also know that Google Calendar isn’t it. Would love to get suggestions from people to see what they use. I also might just build my own. I’ll start with a to-do system, and work my way up. I’m really trying to figure out what I would need in it. I would need SMS access; I would want some level of control for others to see when necessary and not see when not necessary. Anyway, just thinking out loud here, but this is definitely number one for me.

  3. Set Goals
  4. It’s really hard to have any idea of being successful unless you have some metric against which to measure. I didn’t think this was true. I always assumed that the end goal was to just reach a new milestone, regardless of what it may be. That’s a never ending road to nowhere as it were. When I went to TIP camp during the summer of 2000 (which was probably the best summer of my life, btw), we had a session on the difference between nowhere and now here and how incrementally different these two words are in the English language visually, and yet how large the chasm between the two is philosophically. Setting goals is effectively my exploration of how to jump that chasm from nowhere to understanding what now here means.

  5. Have Fun Again
  6. I saved the best for last. I think the thing that I’ve really lost is just the idea that I need to have fun. There just isn’t enough life not to have fun all the time. I need to find my smile. I enjoyed my soccer match this week just for the folks that I got to play with. Yeah, they drive me crazy, but that’s why I love them. I actually have a huge crush on one of the co-eds… but don’t tell anyone! I laughed a lot today with the “Costume Gang”. We made a big mistake leaving when we did. We lost too much of our day, and essentially lost a day at work, but for my morale it was good. It’s what actually led me to force myself to re-focus, write this, and make the commitment to gain control again.

I am committing here to making this next year of my life huge. I don’t know today how that’s going to play out. I don’t know if it’s a good or bad thing. What I do know though is that looking back on the year in 365 days will be much like an architect returning to the keystone in an archway knowing that it takes all of the stones to build the archway, but this one stone to bind the rest together.

Posted in just thinking out loud | Leave a comment

Update on Me

I’ve been doing a whirlwind tour of my life over the last month or so. Some physical, some mental… a lot in the here, but also a lot in the tomorrow (I’m so good at living in my past, that I’ve ignored that bit). It’s been a very riveting personal roller coaster. I’m taking some time to get off of the roller coaster, and just write down what I’ve figured out. The goal isn’t to offend, but to enlighten.

And so it goes.

I’m good at what I do. Sometimes I need to stop and just say that because I get too focused on all of the things that I can’t do. I enjoy learning from the people who I work with, and I hope that I bring something into their lives as well. It’s a really great family that I have at the Box. And I think I add to it in some small way.

I’m learning an immense amount about what I want to be, who I want to replicate, and, very surprisingly, what I don’t want to be. I think that last point is the one that really strikes me as being the least obvious thing to learn. And yet, you run into personalities and individuals where you can clearly see how they make people less well off. They are the quintessential elephant in the room. It’s become very clear to me that I need to understand what makes those people so unlikeable to me. Otherwise, I’m going to make those same mistakes.

I’m an imitator, a mockingbird, in that I find things in people, and then try them out in myself. Is this how all people are? I don’t really know, as I’ve never been anyone else that I remember. But I’m finding that I’m incredibly good at taking what I like in other people and emulating it in myself; engraining it as my own. The things that I really like, I then make a concerted effort to preach downstream.

I love to dream. I dream big dreams, and don’t understand those who have to be grounded in reality. Life, for me, is meant to be lived flying towards the moon. I love that about myself… If I ever lose this, then I don’t think I’ll recognize myself.

I need to take better care of my body. Not just in terms of exercise, which I’m much better about lately, but also in terms of what I eat, sleep, time outdoors. I’m bad at this. I need to work on it. I will improve upon this.

There’s a lot more, but I made this a ten-minute exercise tonight. I’ll get back to the grind of the hourly exercise tomorrow. Very excited about what the last month of 24 has to offer me. It will hopefully be a launching pad into 25 that I could never have imagined.

Posted in just thinking out loud | Leave a comment