Monday, January 19, 2009

Engineering Everywhere, including my living room

This month, I started taking a computer science class online, along with my friend from high school, Corey. Neither of us have any technical experience, but we're taking the computer science class at Stanford for freshmen with no prior background. It's a blast. I won't be able to understand what the Google engineers are talking about anytime soon (hmmm, or ever), but it's fun to tackle the puzzles that come up when you're trying to solve a CS problem.

Take this first assignment for example. We have a robot (named Karel-- he's Czech :) ) who lives in a quadrangle of 3 arches and 4 columns. If you look at the first frame of the video, you can see that the columns have some stones missing. What's the best way to make Karel replace the stones? 



There are four basic commands you can work with:

-move forward
-turn left
-put down a stone
-pick up a stone (we don't use the last command in this particular problem)

[[From the basic commands, you can extend out to "turn around" 180 degrees by commanding two left turns. Also, assume Karel has an infinate number of stones he carries with him.]]

There are three challenges to tackling computer programming. First is simply nailing the syntax; those characters and brackets that the software demands in order to read properly. The second challenge is a more sophisticated logic problem; after you get the syntax right, there are a dozen ways you can get the robot to fix the quad like you see in the video. The trick is how you can define your commands to make your program as universal as possible.

It's easy enough to move Karel to where the gaps are and make him put down stones. We actually want to make Karel think for himself, so that we can relocate him (with the same programming) to a different quad.  So for example, the stones are missing from arbitrary spots; can we make a program that works if the gaps are in different spots? There are four columns of five stones each, but can we program Karel to fix this quad OR a quad of different size and shape?

The third challenge, which is emphasized very eloquently by the prof, is writing programs that humans can understand. You should write so that computers can understand your commands, but it's more important that people can interpret your program too. Here's why.

Programs break. If a new engineer needs to go in to your program and fix it, or if he needs to alter your program to do something slightly different, your program needs to be clear enough for a stranger to make adjustments. Otherwise, he's better off scrapping your work completely.

This last requirement of practicing proper form reminds me of the summer I worked on a boat. There are such particular ways of coiling a rope or tying down the pulleys that raise a sail. I had thought that these rules were extraordinarily nit-picky, but you want standard rules so that in an emergency, any sailor can pick up a line you tied down and adjust it without having to figure out your particular knot. Same goes for a code you've written-- you want it to be as clear as possible.

Taking the class has been fun, as evidenced by the delighted and geeky messages between Corey and me. I encourage other people to have a look:

Lecture 2 | Programming Methodology (Stanford)


Monday, January 5, 2009

Cyberlaw, and Journalism At The Crossroads

Last night, I listened to a great interview of Lawrence Lessig with Terry Gross. Most of what he said were extremely clear and persuasive versions of ideas already on my mind from past articles and programs-- not surprising because Lessig and the center he founded (Stanford's Center for Internet and Society) originated many of our culture's ideas on 21st-century IP law. Overall, he wants the law be flexible and encourage the creativity that content-sharing on the Net allows, from researching academic journals to remixing music samples.

In one great section, Terry asked about the revenue declines that newspapers have been suffering as we increasingly get our news online. Lessig agreed this is a problem, and his greatest concern is that investigative journalism is endangered. Yes we have blogs and Twitter, but newspapers used to assign reporters to a story for months at a time to uncover corruption or expose readers to a faraway war-- an important service for our democracy. Now even major papers can't afford to pay for a long-term assignment.

Lessig said that papers have suffered a lot from Craigslist, which, though a useful tool, has wiped out classifieds. This led me to two questions:

1) Where do newspapers typically make their money? (% subscriptions, % advertising, % classifieds....I would have guessed classifieds are minor.)
2) Do we have a Seymour Hersh (who exposed the My Lai massacre in Vietnam for the St. Louis Post-Dispatch) or Woodward and Bernstein (who broke the story of the Watergate scandal in the Washington Post)? Who are the great investigative journalists of our generation? The two that come to mind are from TV: Christiane Amanpour and Mike Wallace (the latter of which was, incidentally, the great investigative journalist of the last generation).

You can listen to the full interview on the NPR site.

Sunday, January 4, 2009

Improve your life today! Join a book club.

US News and World Report said that joining a book club is one of the top ways to improve your life. Does this surprise you? When my friend Moses shared this report with me and the rest of our book club, it came as no surprise at all. As the book "Bowling Alone" observes, Americans are much less likely to join gardening clubs or rec sports leagues than they were a generation ago. Instead, we're much more likely to watch TV and be disengaged from our communities, and as a result, our social fabric has become much more thin. Book club brings people together for a gathering that is not completely social, not completely work- or task-driven, but a little bit of both.

Here are the details of my group. It was created by my Google co-worker and his friend who, in her day job, does research with an institute at the U of M business school. Our mission is to focus on books that discuss business and social responsibility. You may think that, with such a narrow focus, our book options are limited, but in fact after one year we still have more books we're eager to read than we have time for! Our picks have ranged from the relatively academic (Travels of a T-Shirt in the Global Economy, which traces the life-cycle of a China-manufactured shirt), to The Omnivore's Dilemma, which has become very popular in the media and in "eco-gastronomic" circles.

Our club meets every month at a different house every time. Members are relaxed enough that the decision of where to host and what to read next gets determined at the end of each meeting, and what doesn't get settled is discussed online via our Google Groups forum. (You may have heard of book clubs feuding over book choices like in the article "Fought Over Any Good Books Lately?", but our club is completely drama-free.) We also use our core discussi
on group as a launching pad for other activities. For example after reading The Omnivore's Dilemma, we toured a local farm and did a bit of weeding, and after reading a book on new urbanism, we invited a business-school professor to discuss local real estate and urban development trends with us.

Ever since graduating from college, I've looked for ways to keep exploring with my mind and get connected with people outside my usual circles. I've done this by listening to lots of NPR (and watching the great TED Talks videos online), volunteering, and pursuing exciting projects at work, but the greatest of all these is my book club.

Wednesday, December 5, 2007

Two cool things: The Peter C. Alderman Foundation and Google SPC

Earlier this year, the NewsHour featured a remarkable non-profit called the Peter C. Alderman Foundation. Its mission is to provide psychiatric treatment to victims of terrorism, war and genocide.

I hadn't thought to consider the mental needs of conflict victims in addition to their immediate physical safety until I read this book: "A Long Way Gone," by Ishmael Beah. It is the memoir of a young man from Sierra Leone who now lives in the United States. Ishmael was kidnapped by the government army at age twelve and made a child soldier. In the book, you read about him being forced to kill until killing became normal and he could laugh at his victims. Ishmael was eventually removed from the conflict and rehabilitated by UNICEF, re-learning how to interact with other people without violence.

If you believe, as Ishmael does, that all humans are "capable of true evil and equally capable of regaining our humanity," then you understand the urgency of psychological healing.

The Alderman Foundation is associated with the Harvard Program for Refugee Trauma, but what I like most about it is that, instead of sending American physicians abroad, it gives trauma rehabilitation training to local psychiatrists. Counselors practice in their own home countries, sometimes in clinics funded by the foundation.

Being an economics major, I'm impressed with efficiency above all else, and I understand that using native counselors gives the foundation the best bang for it's buck, as one of the founders likes to say. Besides having lower fees and travel costs than Americans would, native psychiatrists minister with an understanding of the country's history and culture that an outsider can't replicate.

You can read the transcript from the NewsHour feature here:
http://www.pbs.org/newshour/bb/social_issues/july-dec07/alderman_09-11.html

I plan on giving a small percentage of my income to the Alderman Foundation, but most of my contribution will be from the second cool thing I'm writing about: Google Self-Powered Commuting (SPC) dollars. I live ten minutes away from the Ann Arbor office, and every day that I walk (or bike) to work, my company donates $5 to the charity of my choice. There's no cap on donations, and we track donations by logging in clicking a button (honor system).

It's great Google gives me the chance to support a charity, but the way I see it, I'm saving Google money too. The office pays for our parking in a public garage, so each day I don't drive represents money that Google doesn't have to spend there. Furthermore, this garage in downtown Ann Arbor gets nearly full every morning, and if many Googlers walk or bike to work, Google A2 won't have to find more parking space, and our resources can be better spent elsewhere.

From the cold room in the Big Yellow House in the lovely town,
Your friend Renee

Sunday, August 19, 2007

Live from Bombay

Arriving at Mumbai yesterday at midnight, I had more than 6 hours to kill before boarding my domestic flight to Bangalore, where my friend Poornima's wedding will be. I tried sleeping in the lobby, but was disrupted three times by the airport staff. Tired of being taken for a hobo, and feeling none too sleepy since my internal clock thought it was 6:30 PM (not 4:00 AM), I abandoned the nap and opened my laptop.

Using a computer without internet connection is sadly limited. I started out by playing songs in iTunes, which amused me little. My desktop also shows a continuous slide show of photos from the Flickr and Sartorialist blogs. (You can add this photostream feature as part of Google Desktop). Still bored, I thought to read web pages stored in my cache.

Each time you visit a website, your computer stores an impression of that page as what is called a cache. These impressions aren’t of what the web address would take you to in real time; instead you see a less-fancy version of what your screen had shown in the past. A cache doesn’t show graphics or pictures; I don’t actually know why, but I think my roommate Arnab might, since his research and internship are about data storage.

I accessed cached pages using Google Desktop; this tool lets you search your computer the way Google.com lets you search the internet. Old e-mails, Word documents, and cached pages all are there (at least until you manually clear your cache). This tool let me access Poornima’s phone number and address, as she had emailed the info to me but I left the notebook it was written in at my friend apartment in New York. It also let me read web pages from the New York Times and the Freakonomics blog; pages that I had previously skimmed and now read all the way through in my bored state. Because I wasn’t online, though, clicking on notable links that the writers had added couldn’t take me to new pages that I was interested in.

As a last note: I eventually thought to check the wireless connection to see if I could pick up any signals from the airport. I was thrilled to find I could! (Although I shouldn’t have been suprised; conversations with Indian friends the last two years have told me that India is absolutely a wired country.) There were two providers; Airtel and Tata. The Airtel welcome page said it provided wireless internet for free, but you had to receive a login name and password by phone. When I entered my American mobile number, I never got a message. Perhaps you must have an Indian number. The second provider, Tata, charges for wireless access and would have let me buy a day for 52 rupees. I tried to make order, entering my phone number and address as required, but again, my American number wasn’t recognized as valid.

In economics (and economic history at LSE), we frequently discuss the consequences of transportation and communication barriers—especially in the context of those barriers falling. For example, when roads and train tracks were built across Europe, countries were able to specialize in the goods that they were best at, and import most everything else. Thomas Friedman and company currently observe how fast communication barriers are falling. Part of my job at Google is to chat with AdWords users who have problems or questions, and when I log in to the chat program, I see a long queue of chats completed overnight by people with Indian names. (We have a twin office in Hyderabad). Country-wide cell service let me call my parents in Seattle from an airplane grounded in New Jersey to let them know that had I made it on board, never worrying about which area code I was in. Still, communication costs are not so fluid that I could connect to the Internet freely using my American cell phone and chat with my (awake) friends back at home. Or, um, review the slides of Google training sessions that I will miss while on vacation.

(Addendum: as the airport lobby filled after 5:00 AM, I looked around and saw more men with laptops surfing the net than I saw women in saris. I did not, however, see women in saris surfing the net.)

Saturday, July 14, 2007

Something Cool: BillMonk

When I was in high school, my friends almost completely consisted of a tight-knit, super-functional band of self-proclaimed nerds known as the Mock Trial team. We prepared hard for competitions over most evenings and weekends of junior and senior year, and acted in many ways like a family. Whenever someone bought stuff for the group, or spotted for a short-changed teammate when we bought coffee, we didn't much fuss over the financial details. "The way I figure, we spend so much time together that it evens out in the end," is what Corey said.

Given that we were too young to go out for drinks, and anyways too poor for that or any other big-ticket diversion, Corey's reasoning held true. However, living in a house with three other college graduates brings in many more shared payments to keep track of. Rent, utilities, fun stuff-- suddenly "it evens out eventually" can no longer apply.

To keep track of loans and shared payments within the house, my roommates have been using an online product called BillMonk. Having recently joined their house, I've added myself to their account. Within, you can enter payments that one member made and keep track of who owes money. For example, Dan pays the ComCast bill with his card every month. Whenever he gets charged, he logs in his account that the cable was shared by all household members, and that he was the one who paid. Soon afterwards I'll get an email notification of the payment and can see my debt to Dan when I review my account.

Earlier this hour, I logged my first payment, which was for the Harry Potter movie tickets from last Thursday. (We had been running late for the 10:15 showing, so I weilded the credit card.) I hadn't had a BillMonk introduction, but the website is absolutely intuitive to the average computer user.

In my account, I first selected the "New Shared Payment" button. Next, I was prompted to enter the description, date, and amount of the transaction. Lastly, I was directed to two drop-down menus. The first asked, Who Paid? I selected myself. The next asked, Who Participated? I selected my roommates and myself. And that was it; BillMonk divides the payment among all us moviegoers, and now we have a record of the debts. And the neat thing is that the program keeps track of all debts within the house, so when I review my own debts, I see that my ComCast debt to Dan has been lowered by the amount of the movie ticket.

Wondering whether the folks that run BillMonk are connected to Google, I read their "About" page. It looks as if the two co-founders used to work at Amazon and are in fact based in Seattle. BillMonk has been acquired by a mobile money-transfer company called Obopay; now the product has a feature that allows people to enter payments from their cell phones. Quite neat! Google isn't involved, although the Mountain View campus did have the founders over for a Tech Talk.

Sunday, July 1, 2007

Introducing AdWords

My primary job at Google will be to help companies that advertise on Google manage their accounts and improve advertising results. Those results may mean: a) raising the number of times their ad shows up on Google, b) improving traffic to their website, or c) increasing actions like purchases or sign-ups that viewers make on the site). AdWords, as this advertising product is called, is designed to make clients self-sufficient; the campaign summary displays the performance metrics mentioned above, and clients can register or cancel their account online. Seeing as clients have their own websites and were able to set up an AdWords account, I'd assume that they are more web-savvy than average. Still, when they need help with their accounts or advice on improving performance, they contact Google. That's where I come in-- or will, after my training is done.
This morning, I've been "studying" for work by looking through the AdWords page as if I were a client. Google gave new Account Associates (as my position is called) an AdWords account to learn and play with. It's referred to as our Sandbox Account :) I've linked mine to my friends' website, Recipe Tango. Chris Doyle and Sutee Dee, graduates of Olin College, are working on a site to teach people how to cook and have fun in the kitchen. It's an awesome business-- more on them later.
So I set up the account and used keywords like "cooking supplies" and "learn to cook" and "pad thai recipe." Keywords are the terms that people will have searched for when they see the ad. Apparently, my ad has shown up four times! Twice under "learn cooking," once under "learn to cook," and once under "lasagna recipe." It's, like, eighth on the list of sponsored links, which is pretty awful since people tend to pick the top ads if they click at all. Hmm. Good thing I have twelve weeks of training ahead of me. So now I'm reading up on how to improve my ad position. Meanwhile, one of my roommates is meditating in his room and another is making blueberry muffins. It looks like this is going to be a good Sunday.

From the dining room table at the Yellow House,
Renee