Archive for July, 2008

dude… use python

Thursday, July 31st, 2008

So haven’t written a techy/nerdy post in awhile and I presume that’s because my life outside of work hasn’t been that nerdy during the summer. But I thought it’s time to return to my normal self and so… lets talk about python.

This article is titled the way it is because I’ve heard that phrase uttered so many times in the past year or two that it’s insanse. So I spent a little bit of time last summer learning python and the interns and I worked on a project in python, but it wasn’t too involved and I promptly forgot a lot of it in the months to come. I still used php or perl for a lot of my scripting purposes because I was familiar with them and my friends would continuously nag me to make the move over to python, but I never really got around to it.

So this summer, I was initially given the option to write in whatever language I wanted and thought that it would be a good time to learn python, especially because it’s used in a class I’m taking next semester anyway. I took about a week in the beginning of my internship to learn about python and ported some of my old code over to python. I already knew that python was pretty cool, but it seriously makes programming much much faster. And even though I ended up using perl for my intern project, I’m pretty happy that I learned python and I think I’ll be using it more in the years to come.

Ok so why is python so cool. First there are the reasons that everyone says, it’s like writing pseudo-code, but then it actually works. That’s pretty cool because programmers learn to think in pseudo-code but then have to translate that to whatever language. The closer the language is to pseudo-code the better.

It’s interpreted, which has pros and cons. Interpreted languages are generally slower than compiled languages, and yes I think python is slower than C, but for internal scripts where performance isn’t that critical, python being interpreted is pretty helpful.

Python is a lot like scheme/lisp with lambda expressions and functions as first-class data. I was disappointed that you can only have 1 line lambdas, but they’re still pretty useful. And passing functions around is amazing and extremely useful. Also has built in functions like map() and filter() which just make list manipulation so much easier.

Consider this, lets say I have a list of numbers and I want to make a sorted list of all the even numbers. In python…
sorted ( filter (lambda x: return x % 2 == 0, myList))
In most other languages (except lisp)… I’m pretty sure it would be a lot less concise. And yes the same sort of thing can be done in scheme, but I like scheme a lot too.

I like the way that python allows me to include my test cases of a module within that actual module. The if __name__='__main__': feature is pretty cool. You can’t really do that in perl and it’s annoying because I need to have a testModule.pl script for every Module.pm. With python I pretty much reduce the number of files I have to worry about by a factor of 2.

Also python is pretty easy to read and that makes your programs easier to maintain. I’ve been experiencing this problem where perl isn’t that easy to read (especially if you use a lot of the uncommon features) and now that I have to go back and make changes to my code it’s pretty hard to figure out where I’m supposed to look and how I’m supposed to make the change. And not that I’ve done this, but I think it’d be a lot easier if I wrote in python.

Anyway, I’m not really an expert on python or programming languages in general. In fact I haven’t even used python for a substantial project or anything, but I have been reading about it and playing with it so I found some things that I like. And I think I’ll be using python more in the future so I’ll become more and more familiar with it and probably find more things I like and also some things that I can’t stand.

Disclaimer: If my facts are wrong here please feel free to correct me because these were the impressions that I got and it would be good if I got them corrected.

What’s wrong with the world?

Wednesday, July 30th, 2008

So I’ve been reading The Economist a bit recently and they have a lot of international news. Unfortunately most of it isn’t good. Reading it this morning kinda got me depressed. Here’s what I read:

  1. Brazil: Teenagers in Brazil, specifically Rio de Janeiro, are walking around with machine guns selling cocaine and marijuana in open-air markets. Policemen, officials and ordinary people are pretty much turning the other cheek. Pretty scary, but I guess the good news is that the mayor is supposedly trying to clean things up, but he hasn’t gotten very far. Read about it here.
  2. The rest of the Americas: Venezuela has a reported murder rate of 48 in 100,000. That’s the second highest in the world, second only to El Salvador (another central american country). Pretty much I don’t want to go to South America. I don’t understand how people can live and be productive if they’re constantly fearing for their lives. Oh by the way, that’s just the reported rate, it doesn’t count most police-related deaths, prison deaths, and others. Read this article, it’s really scary.
  3. India: The Ganges is ridiculously polluted, and so is a lot of India for that matter. So my question is… the Ganges is supposedly holy right? then why is it so polluted? Shouldn’t it be something that Indians are proud to take care of? Maybe I’m just being naive here but I really don’t get it. The problem is that, since the Ganges is holy, people continue to bathe and drink the water, and then they get sick. But again there’s some good news in that there are environmentalists that are working to clean it up, but so far they haven’t been very successful. Read about this here.
  4. China: Olympic athletes are refusing to compete in endurance events because they’re worried that the pollution will affect their performance in the future. This just makes me really sad. Pretty soon people won’t want to go outside because there’s too much air pollution. Kind of reminds me of Wall-E…

And don’t even get my started on the middle east. That region is just a disaster.
And now to cheer you up…

Startup School

Tuesday, July 29th, 2008

Another post that should have been several months ago…

In April of this year, I headed down to Stanford for something called Startup School. I didn’t really know what to expect but it’s hosted by Y-combinator so I knew it would be pretty cool. It turned out to be a bunch of talks by successful entrepreneurs, lawyers, and venture capitalists and all in all I learned a lot over there. Also it was way for entrepreneurs from all over the place to gather and meet each other, look for teammates, competition and all that stuff.

Since I wasn’t currently working on anything, and since I was one of the younger people there (most of the attendees were out of college) I wasn’t that interested in meeting a lot of other people, except to find out what they were working on, which I always think is very interesting. I was there pretty much to hear the talks, and hopefully take something from them that I could use maybe later on when I do try my hand at a startup.

Of all the talks (I believe all of them are on justin.tv), the most interesting, and most entertaining on was by David Heinemeier Hansson. DHH is I think the head developer of ruby on rails (or something like that) and now he’s working for 37 signals, which is doing exactly what he recommends (which you’ll know about if you either watch his talk or read the rest of my post). Here is his talk. I definitely recommend that you watch it if only for entertainment purposes (he’s really funny). But of all the talks, I think I learned the most from his as well.

His main point was that rather than trying to provide your product for free, charge a little bit. Then you don’t have to struggle to make ends meet, you don’t have to work so hard to monetize (by ads or whatever) and you get to make money. And granted most ordinary people are no longer willing to pay for your service, but almost all companies are willing to pay you if you are providing them a valuable service and doing it really well. So the real trick is to find something that companies need, make it, and then charge them for it and you’ve got yourself a pretty good startup.

So that’s the underlying idea, but there are a couple of problems with that. When you’re charging for your product, you’re held to a much higher standard, so you’d arguably have to work harder. This is even more the case when you’re making something for companies. But arguably this may actually be a good thing. When you’re trying to get something out to users (even if it’s free), the only way you’re going to be successful is if you hold yourself to a high standard, but it’s a lot easier to let things slide when there is no external force here. For example, If your free website is of the highest quality, you’re not going to get any traffic, and you’re not going to get any revenue from ads or whatever monetizing scheme you’ve thought of, so you have to do this anyway. The fact that you’re selling your product means that there’s an external force (namely your customers) holding you to that high standard and they definitely won’t let you slip up. Charging your customers is just force that keeps you working well.

The other problem and solution is talked about here. I won’t go into much detail there, just read that.

So I’ve become a convert to this thinking, I’m now looking for things that I could sell to companies and hoping to form my startup around one of these ideas. But it’s definitely much harder to find pain points of companies than it is to find pain points of ordinary people, so I’ve been looking for awhile without much success. I’ll still look for more consumer facing ideas, but I find that they are much easier to shoot down quickly and so I’m not sure if I’ll be working on something like that in the near future.

And that was pretty much startup school. If you’re interested, watch the talks; most of them are pretty interesting and they offer a lot of different perspectives from pretty big shots (Jeff Bezos, Marc Andreesen, and others). Definitely will be going again next year.

Summer trip #1

Thursday, July 24th, 2008

This post is probably long overdue. Events took place in early June 2008…

After finishing my finals, I moved out of my house (someone is subletting my room) and pretty much immediately started working. In like my second week, I took Thursday and Friday off (no PTO) and my family and I headed out to Boston for my brother’s graduation (yes from college. I can barely believe it). The flight there was absolutely horrible… first of all we had a layover and that completely sucks and secondly our second flight got delayed because there was some storm somewhere I forget the details now. What’s even worse I don’t really like to be in really cramped spaces for long times. Not that I’m claustrophobic, I’m just really fidgety and move around a lot.

Anyway we landed at like midnight in Boston and only checked into our hotel/went to bed by like 2 and we were supposed to get to the graduation the next day at 7. So my dad says we’re all waking up at 6 and yada yada yada I was really tired the next day (except not like in Seinfeld). So the next day was Friday, and it looked pretty cloudy and we were kinda worried because the graduation was outdoors. We ended up getting there at like 8 and then my dad tells me that graduation doesn’t start until 10 and I was kinda pissed because I didn’t want to be sitting there for two hours. And then the rain started… And it poured for a good 30 minutes or so. Fortunately MIT was prepared and they provided ponchos for everyone so no one got wet, but it was amazing. I haven’t seen that much rain in a really long time (El nino, 4th grade to be precise) and I realized that living anywhere else is incredibly different from California.

So the graduation came and went, it was really nice to see my brother graduate and all that and I met some of the guys I interned with last summer and some other people I knew from MIT which was good. My dad took some pictures maybe I’ll put them up here sometime. We ended up hanging out as a family for the afternoon (brother included) and got food walked around the Prudential Center (it was still looking kinda crappy outside) and then my brother and his friends had organized a dinner with all the families so we went to that. The dinner was actually really fun, I met a couple of my brothers friends and got to talk to a lot of people from completely different backgrounds and experiences than mine or my families. Plus we had a lot of really good food (Maggiano’s family style… awesome).

The next day we didn’t really have anything planned so we just wandered around Boston/Cambridge and I got to see a lot of places I’d never seen before (this was my third trip to Boston but the other two I didn’t see that much). We wandered around Newberry Street (which I thought was really amazing, kind of like a downtown Palo Alto but like better in so many ways). We looked at an apartment my brother was trying to live in next year, walked through campus so I could see all the cs buildings (I thought they have a way bigger cs building than we do, but now that I think of it Soda is a lot bigger than it looks. At any rate the building is really nice with a gym and a cafeteria). Went into some of the other buildings and for the most part I really liked what I saw. We ate dinner at some pizza place on Newberry street that made a pretty good slice and that pretty much made my day.

My parents and I left pretty early the next morning and were back in time for an eventful Sunday (I don’t remember what events but just that it was eventful) and that was that. But for some reason I had a really good time on this trip. Maybe it was that I was completely carefree and didn’t worry about anything work related. But something made me really like Boston and the trip made me want to live on the East Coast even more than I already wanted to before. Granted California is awesome and I love it, but I think I need to get out of here for a little while and go somewhere else and recently that somewhere else has become Boston. So now I just have to get into grad school there… unfortunately that’s pretty tough.

Going to new york at the end of my internship and I’m pretty excited for that trip too. I recently realized that I really like travelling!

Summer!

Sunday, July 20th, 2008

I guess this is the first day where I’m really going to experience summer in all it’s glory. We’re going to the beach! (and yes how sad is it that i live like 40 minutes from the beach and this will be my first trip this summer) It seems that now my friends and I are all so busy that we don’t ever hang out much during the day so we never get to enjoy these sort of one-day trips. But I’m really excited to go today.

Anyway that wasn’t really the point of the post. I wanted to talk about what I have been doing (not what I wish I’d been doing).

Summer has been ridiculously jam-packed but at the same time relaxing. I went on a trip to Boston to see my brother graduate which was really cool (and I’ll write about that later). Then I’ve been working pretty much full time at VMware which has so far been a really amazing experience. On top of that I’ve been exercising a lot (playing soccer, ultimate, running, and weight lifting) which has also been really fun because I’ve been doing it with my friends and co-workers.

But with all this going on, I haven’t really been just hanging out and relaxing with my friends like one is supposed to during summer. During the week I’m just too burnt out after each day and I pretty much come home and crash. And on the weekends I do hang out with my friends, but they’re all just as busy as I am, so it’s often hard to organize something like a beach trip.

And what’s more, I haven’t gotten around to a lot of school-related things that I also wanted to do. Like finishing up my research project from last semester, figuring out what classes I want to take (which I need to do because I sign up on Tuesday), or even just spending some time on a couple of programming projects that I’ve been meaning to do for awhile.

But don’t get me wrong, I’m not unhappy with the way the summer is going. It’s been one of the best and most rewarding summers that I’ve had (except for the summer after high school because that was completely unbeatable). I’ve accomplished a lot, learned a lot and still managed to keep it pretty relaxing. And had I not been doing everything that I’m doing I’m sure I would be incredibly bored.

So summer’s coming to an end I guess. I have a couple of more weeks of work and then I may be heading to new york on vacation and then it’s back to school. But I’m kind of looking forward to school because it’ll be a good change from the routine of working. And I guess that’s what summer is supposed to do to you: It’s suppose to get you excited to go back to school, either by making you really bored and dying for things to do, or by keeping you so busy that you think school will be relaxing in comparison.