Sunday, December 13, 2009

Doing what you love

The wife recently linked to an essay by Paul Graham titled How to Do What You Love.

He's an awesome writer and reading his writing is almost always inspiring, and definitely always thought provoking. Here are some of my favorite quotes from it:


Unproductive pleasures pall eventually. After a while you get tired of lying on the beach. If you want to stay happy, you have to do something.



All parents tend to be more conservative for their kids than they would for themselves, simply because, as parents, they share risks more than rewards. If your eight year old son decides to climb a tall tree, or your teenage daughter decides to date the local bad boy, you won't get a share in the excitement, but if your son falls, or your daughter gets pregnant, you'll have to deal with the consequences.



"Always produce" is also a heuristic for finding the work you love. If you subject yourself to that constraint, it will automatically push you away from things you think you're supposed to work on, toward things you actually like. "Always produce" will discover your life's work the way water, with the aid of gravity, finds the hole in your roof.


and finally:


Finding work you love is very difficult.


BUT - he misses an important point. I don't think that Finding Work You Love should be a life goal in and of itself. How absurd to constrain your happiness in such a limited way!

The only point of Finding Work That You Love is to experience it and, from it, learn how to love doing everything - from the most mundane to the "extraordinary".

I'm pretty sure I love programming. But I have a strong hunch that it's not the programming I love, but just that it happens to make it easy for me to express creativity, make something beautiful, and work towards perfection.

Now if only I could transfer that sense of craftsmanship into doing my taxes...

Wednesday, July 29, 2009

Simulating the act of Movie Watching

So as you know, we've been experimenting with a slightly different form of expression.

With the latest post - "away we go" - we were trying to convey the fact that we had a conversation about a movie. Yeah I could link to the movie, but how cool would it me to make it look like we were actually watching the movie!?

I had some vague images in the back of my mind of the effect I was thinking of which, someone later pointed out, came from Mystery Science Theatre 3000. The idea being to let people watch the movie (or movie trailer in this case), but still retain the feel of the rest of the blog.

Basic Idea



So it's done using 3 pieces:

  1. A background image on a div:

  2. A youtube embed with a fixed size

  3. A transparent png:


    (i added in a red background to make the transparency obvious)


Process



  • I started, as always, by painting the image on a business card and scanning it in.

  • I used a free drawing program - Pixen - to draw a black rectangle of the exact dimensions of the youtube embed (480x295 in my case), and then resized the drawing slightly so that it framed the rectangle. This got me to
  • I then copied the bottom half of the image, and erased all of the stuff around the seats and heads so that it was transparent

  • I played around with some html in an editor, and came up with something that looked like:

    div style="background-image:url( '...' ); padding:;" // the background
    object embed // the 'movie'
    div style="z-index:999;position:relative;..." // the silhouettes
    /div

  • Finally, wordpress.com doesn't like object-embed tags, so you have to use [youtube=url] link instead


and that's it. obviously it doesn't quite look like an MST3K episode, and there's definitely some improvements that could be made (the head shapes got a little messed up when trying to make the transparent png).

But overall, I'm pretty happy with the end result.

As my buddy mentioned, you could take this a few steps further and do all sorts of effects using simple HTML and a bit of javascript.

Thursday, July 09, 2009

A comic take on life

I got a little sick of writing on this thing, so I'm trying a new technique. Check out This Comic Life.

Saturday, February 28, 2009

work, geeking out, meditation, fun, housing, blogging

on Work


I've been really busy the past month, working hard to bring credit card payments to social games. And we just did a limited launch last week. It's been an amazing experience.

Payments sounds kind of dry at first, but it's a great mix of business-logic and performance.Enough business-logic-complexity to make it a challenge to design clean code; but not enough to make me rip my hair out. Enough performance considerations that I get to work on fun little performance improvements, but not enough that I lose sight of the larger business goal. And I'm learning a whole new domain and lingo.

on Geeking Out


I've been working on a few small projects on the side. The first is a really simple-but-surprisingly-addictive application that I call The Decider. Go check it out, and let me know what you think.

The second is a little piece of open-source goodness to help rails websites load faster for the customer. Edge-caching has traditionally been the purview of larger organizations with multi-media-intensive content. It just didn't make sense for the "little guy" to even think about it. But then Amazon released Cloudfront - a pay-as-you-use edge caching webservice and, once again, changed the game. I don't know how many people realize what a game changer this is. I suppose most people look at Cloudfront and think "Ah - when my site gets big enough I'll think about edge caching". That's what I thought when I heard about the release.

But then I got thinking - the apps I work on at Jambool (where I work now) aren't media rich, but it's important for our widgets to load blindingly fast for our customers. And, as I was looking into tweaking our load-times, I realized that edge caching simple things like javascript and css would make things even faster. Anyways, the xlr8 ('accelerate', for the slow) is the product about 6-8 hours of work. It works, but is still an early incarnation.

on Meditation


I went to the dentist a few weeks ago and she tried to sell me about $1,000 worth of dentistry. I'm trying to see if I can put some of the work off until my next India trip (where the total cost will be less than my co-pay here). But she also tried to get me to buy a mouth-guard to prevent me clenching my jaw. I don't grind my teeth at night, but I do clench my jaw, mainly because I've been pretty stressed out for the past year. I decided that, rather than shell out the $250 to mitigate the symptom, I'm going to try to address the cause.

Two years ago I attended a 10 day Vipassana retreat. It was among the most difficult, but most rewarding experiences of my life. And left me with one more tool in my toolbox-for-life. They recommended 2 hours of meditation per day, which I faithfully followed - for about 3 days. So for the past month or so, I've been trying to revive my practice but manage to sit for no more than 20 minutes at a time.

And then a friend of mine suggested that we go to a weekly sit in Berkeley. He got sick and had to bail, but I ended up going last Thursday. It was fantastic, I was able to sit for 45 minutes with relative ease, and felt the afterglow for the next 24 hours. I won't go as far as to say that I'm going to go every week, but I do hope to be a bit more regular.

on Fun


Two weekends ago, about 21 people (mostly Indian friends of mine from college, along with other friends, significant others, etc) got together in Taos, NM for our annual ski trip. It was, as usual, lots of fun. We normally do a Friday- Monday trip but a few of us flew in on Wednesday night so we had more time to acclimatize to the altitude, to relax and chat (and geek out) with friends and, of course, ski.

The wife and I stayed at the Ojo Caliente Hot Springs on Monday night as well - and that finished off the trip just right.

This morning I went surfing in Pacifica. It was still a little cold and the waves weren't that great.

Next week, the wife and I are heading up to Mount Baker, WA for a company ski trip.

I love the West coast.

on Housing



We've been idly thinking about the possibility of buying a place to live, instead of continuing to pour money down the rent-drain. Any suggestions on neighborhoods that I might like in the SF Bay Area? I'd love to stay in SF, but it's out of our budget. I think I'd want something that's

  • 5-10 minute walk to a major bus/train route to downtown

  • < 45 minute public transport commute to downtown

  • 10-15 minute walk to a light-commercial area (coffeeshops, bars, restaurants, neighborhood grocery store)

I don't think we're going to find anything affordable in the Bay Area, and I'm not sure which one of the above I'll have to compromise on. We might have to look up in Seattle instead? Who knows.

on Blogging


My blogging dropped off initially because I lost my main audience and subject-matter (when we moved back to India, I was trying to keep in touch with friends in Seattle. When we moved back, I didn't have the need to blog as much). Then I started doing a lot of information-sharing using Faves. And then I started trying out twitter and facebook status updates as a way to 'micro-blog' my thoughts.

But, like the Kindle vs news-on-the-iphone, or reading an rss-feed - I feel like there's a place for a slightly longer form of reading/writing, which blogs seem to be be good for.

That said, we'll see if I can be a little better about writing medium-sized semi-regular blog entries.

Tuesday, November 18, 2008

raw food

Yesterday morning, I went to breakfast at Cafe Gratitude. We'd seen Gratitude before in Berkeley, but the wife's rationale was always "if I'm going to pay to eat out, I want hot, cooked food". After climbing at the gym though, we figured we'd drop in for a quick snack and give it a try.

Here's their menu. We had two juices ("I am Rejuvenated", and "I am Charismatic") and shared an enchilada ("I am Elated"). The juices were fantastic. And the enchilada was much tastier than I had imagined. The best part was that both of us left there feeling like we were bouncing off the walls - just really energetic. We'd just worked out, and had some great food.

It didn't hit me until lunch time - when I was at work and got a sandwich from Quizno's. The difference in how I felt after the two meals couldn't have been more stark. Whereas I really felt enlivened after breakfast, the lunch food made me feel dull, tired, and sleepy.

I've read a little about Raw Foodism in passing, but haven't really dug deeper. Anyone have experiences they want to share?

The wife and I decided that we're going to try eating at Gratitude again in the next few weeks. If we feel the same way, I'm going to try to learn more about that style of food and see if we can add some more raw foods to our diet.

Friday, November 07, 2008

Credit

I've been sitting on this post for a long time - mainly because I'm not a finance-world native (or inhabitant). But too little has been said about the importance of credit rating agencies.

A few months ago, a very left-leaning journalist friend of mine asked me to listen to a This American Life show entitled The Giant Pool of Money. It's a great show that tries to get at some of the characters in this drama - from a borrower, to a lender and reseller, and so on up the chain. As always - they portrayed some great characters.

But whereas Ben listened to that show and felt nothing but contempt for the bankers who made their millions (and were now worried about living their lifestyle on less that $20K per month), I came away with a slightly different take. Yes - that banker was a douche with his I-chill-with-B-list-celebrities lifestyle, but really, everyone in the chain was just making the best of their situation.

That chain of people existed all over the world. The borrower was smart for recognizing that he/she could get a massive loan with no money down - a risk-free proposition that was too good to be true. The lender realized that he could make great commissions, and sell even the sketchiest of loans. The people 'securitizing' large portfolios of loans also knew that they could get away with what they were doing, and kept purchasing below-par loans, and getting them rated highly. And the credit-rating agencies were getting paid lots of money to give these portfolios good ratings, so they kept at it.

So what am I saying? Is no one to 'blame'?

What annoys me that people still make references to the credit worthiness of certain companies, bonds, or whatever - based on those same credit ratings. Remember - those credit ratings that were given under such a conflict of interest.

The credit-rating agencies were the ones that provided lubricant for the entire rest of the chain. If it weren't for their excellent ratings, investors worldwide would never have put their pension funds in securities which consisted of underperforming loans bought from a knowing and incredulous lender who loaned a boatload of money to any warm body that wanted it.

There are many reasons why I'm unhappy about the bailout. But relevant to the discussion above is the fact that investors who wrongly trusted the credit ratings never got burnt. And so they, and we the public, continue to put our trust in them. As if Moody's improving or dropping the rating of a particular bond should hold any water. The bailout short-circuited the natural feedback mechanism that would have resulted in investors deciding that credit-rating agencies needed more transparency if they were to be trusted, and that investors would need to do a significant amount of their own due diligence before making an investment (and not just relying on a 3 letter rating).

What else was bad about the bailout? No one really gave a thorough explanation of what would happen if there was no bailout. The so called experts just shook their heads, wagged their fingers and said that things would be "so bad, that it was beyond comprehension".

Really? Isn't it interesting that these 'experts' were the ones who stood to gain the most from a bailout (the community of bankers, not necessarily specific people)? And isn't it interesting that these great proponents of free markets suddenly decided that free markets would not be able to solve this situation?

I'm not arguing against a bailout. I honestly don't know enough to know that it wasn't required. But I do know for sure that the public was hoodwinked yet again. There was a crisis, a rhetoric of fear, a waving of hands, and presto - the enormous financial risk that should have been borne proportionally by the people who made investments was suddenly spread thinly across the American people.

And so, we continue to fight for low interest rates, which can only be sustained by the enormous amounts of cash that the American public has put up. We taxpayers are effectively lending money at well below the fair cost of capital. What do I mean by that?

If there was no bailout, it's not possible that money would not be available. Money would be available. It would just be available at ridiculously high interest rates. There are enough people in this country who are sitting on several hundreds of millions of dollars; who'd be willing to lend it out for 20 - 30 - 40% interest. And maybe that reflects the true risk of lending money in today's environment. So why are taxpayers shoring up the money to lend to banks at rates significantly lower than that? It doesn't make sense.

It's just unfortunate that the wool has been pulled over our eyes yet again. Once when this country rushed to fight a war in a country that had nothing to do with the terrorist threats that it was supposedly reacting to. And again this year, when we mortgaged our futures so that the financial world could try to maintain its status quo.

Tuesday, October 28, 2008

Smoother cloud deployment

Jambool is growing fast and we'll soon need a much smoother way to manage our deployments.

As preparation for some of our code and deployment cleanup, I wrote a little plugin - capistrano-sdb that allows you to store your capistrano configuration in Amazon's SimpleDB.

Capistrano is a deployment automation tool that greatly simplifies the task of deploying code (especially ruby on rails code) to a bunch of servers. SimpleDB is, well, a simple db in the cloud.

My plugin allows you to use simpledb in one of two modes - either as a fallback for capistrano's config system, or as an override to it. Why would you ever want to do that?

Dynamic configuration can sometimes get out of hand - because it's hard to debug. However, dynamic configuration for deployment-related variables is a great idea. In today's world of cheap, throw-away hardware, servers are constantly being replaced. We're also iterating constantly on new services in our services-oriented-architecture, and information on where those services run needs to be up-to-date.

Using simpledb for deployment configuration is one building block towards an autonomic server environment. Stay tuned for more.

Labels: , , , ,