Thursday, October 08, 2009

Tech interview preparation

This is adapted from an e-mail I wrote in January 2007 (when I was a junior in college--after I'd gotten internship offers with Google and Microsoft but before I knew anything about life). Though my Google full-time conversion interviews were more of the same (of the technical stuff--the interviews were longer, so the questions were a little deeper), this is probably mostly relevant for applying to internships.

For Harvard people: At the Office of Career Services they have (or had?) a nice small booklet on how to prepare for the interview. It gives some pretty good advice about how long you should spend preparing (the number of hours in proportion to how long your interview is) and it has you do a self-evaluation.

Here are some websites with puzzles:
http://www.techinterview.org/
http://halcyon.usc.edu/~kiran/msqs.html
The programming questions on this one are good as well.

This website is good for the nontechnical aspects of the interivew:
http://www.wetfeet.com/

So some non-technical questions I've gotten are:
  • Tell me about yourself.
  • What was your favorite computer science class and why. (You will often be given questions based on what you say your favorite class is.)
  • Tell me about a time you solved a problem creatively.
  • Have you been in a situation where a project you've been doing has gotten off schedule and you couldn't make the deadline? What did you do?
  • Have you ever been in a situation in which someone has pushed you to do something that you didn't want to do? How did you respond?
Some technical questions I've gotten are:
  • How would you represent friendship networks on Facebook? (Say you have a list of people and their friends.) I was asked on what data structure I would use, running time for searching through it, space complexity, etc.
  • Given a vector of numbers, how would you find the median? Second part: say we chose a number and then put everything less than it on one side and everything greater than it on the other side. Assume we could throw away half the list each time. What would the running time be?
  • How could you get unbiased flips out of a biased coin? (Say you had a 2-side coin of unknown probability p of landing on heads--if you wanted to make an unbiased decision between 2 choices using the coins, how would you do it?)
  • Write a hex to decimal function.
  • Write an insert function for a circular linked list. If we are inserting into an empty list, how can we make it circular?
  • Write an insert before function for a singly linked list if you're only given the pointer to the node you want to insert before. (Hint: How can you turn this into an insert after function?)
Some good advice I've gotten has been:
  • The most important thing is to talk through how you are getting the answer. Even if you don't get the answer, talking through it to show how you think is very important.
  • If you get something wrong and they tell you the answer, don't argue with them unless you are sure your answer is right. (Think through it first, and discuss rather than argue!)

Wednesday, October 07, 2009

Mothers and daughters

Upon my college roommate Marianne's recommendation, I read psychotherapist Nancy Friday's My Mother My Self. Originally published in 1977, this was the first work to explore the mother-daughter interaction. It addresses how mothers serve as a role model for daughters' self-esteem, attitudes words men, and attitudes towards sexuality.

While I found this book somewhat dated (for instance, in its casting of the mother as the homemaker with frustrated ambitions) and somewhat unscientific in some its wishful "just-so" descriptions (Friday makes a weak connection between repressed anger and cancer), it helped me to examine and to better understand 1) my relationship with my mother and 2) how I derived some of my views on life.

In particular, Friday makes the following thought-provoking points:
  • Mothers often start out (and often continue) to see daughters as narcissistic extensions of themselves. Friday says this explains the degree to which mothers fuss over their daughters' appearance, reputation, etc. and why mothers are often so critical of thier daughters.
  • Society* tells women they are not complete without a man, without their children, etc. As a result, mothers often cling to their husbands and to their children, especially to their daughters. As a result, daughters are not "let go" in the same way that sons are. For this reason, many women have symbiotic relationships with their mothers. (Friday points out that it is not necessarily bad to have these symbiotic relationships, but it is important to recognize them for what they are.)
  • Often as a result of not being "let go" by their mothers, many women go from having a symbiotic relationship with their mother to having a symbiotic relationship with their husbands. Friday points out that it is good for women to live on their own and have independent lives after separating from their mothers; this helps them realize that they can be on their own and not die.
  • It is not usually acceptible to acknowledge the competition (general and sexual) that almost always exists between mothers and their adolescent daughters. This competition often causes many problems between mother and daughter; it helps to understand the competition as the root of the problem.
  • Women often (consciously or subconsciously) adopt their mothers as a model for how they behave domestically. Many women will have fabulous and independent single lives in their 20's and then become quite similar to their (homemaking*) mothers after they marry. Friday's explanation for this is that these women can invent their own models of how to live while they are single, but they default to patterns they learned from their mothers once those apply. Recognizing this is step towards breaking out of the patterns.
  • Our attitudes about our bodies and towards sexuality have to do with our mothers' attitudes and things she taught us when we were very young. It is helpful and h to reflect on our mother's attitudes.
My Mother My Self was helpful to me because it provided another world-view in which to frame issues I often think about regarding mother-daughter relationships, gender roles, etc. I would recommend reading this book with a healthy level of skepticism. (I have found the phenomena that Friday describes to be true; I am more suspicious of the reasons she provides for their occurence.) If nothing else, it is interesting.

* This is one of the places where (I hope) the book does not age well.

Tuesday, October 06, 2009

Some more things I learned about saving money

I would like to thank everyone who gave me financial advice!

My friend Jie recommended the following blogs:
From these blogs I learned that there are many online coupons.

I also came up with some more ideas for saving money*:
  • Subsist mainly on free food, such as that broadcast over MIT's vultures mailing list for free leftovers in Stata. (I have friends who actually do this.)
  • Befriend the admins in your building so that they text you about free food before they send out the free food announcements.
  • To fill in other gaps, join as many research groups as possible. Many of these are likely to provide a free lunch or snack. Tangentially collaborating with research groups in other departments will keep the level of suspicion low.
  • To fill in the rest of the gaps, meet a succession of older people with jobs to date on sites like OKCupid* and go on 1+ dates with each of them. Act very poor but charming during the whole dinner; if you are lucky they will pay. (This assumes that these sites contain a large number of people willing to take me to dinner, and that these people do not communicate with each other.)
  • Invest in a sewing kit and a set of patterns. Attend corporate talks and get as many free t-shirts as possible. Stay after the talks to get the leftover XL's that nobody wanted to collect fabric for making pants, dresses, handbags, etc.
  • Hang out in each T stop and befriend the T operators so that you can get free public transportation. ("Sorry, X--I can meet you in Porter Square, but I'll have to leave there between 9 and 12. If you want to stay later, we can meet at Government Center.")
  • Sell your furniture and move out of your apartment. During the week, sleep on a cot in your office. On the weekends, spend the night with hard-partying friends who think you're staying over just because the T stopped running. If this is unsatisfying and you would like a bed to sleep on, date a couple of people at once and spend your time between their apartments. (Befriending some empty nesters with spare rooms/beds should also work.) Either that, or convince your advisor to buy a group bed for one of the offices.
  • Become friends with freegans.
The conclusion is that living in the Stata Center cannot fail you, since it will also let you save on heat, hot water, and electric bills. :P

* Most of these are untested.
** Thanks to Eugene's peer pressure and my own curiosity I had an OKCupid account for 2-3 days (not for this reason!!), during which time I met some colorful people and decided it was best to leave the site.

Sunday, October 04, 2009

My attempts at money management

I recently discovered that I have been bleeding money out of my ears every day. I have taken the following measures to stanch the flow of money/blood:
  • Gotten an account at Mint.com, a website that syncs up with your bank and credit card accounts and shows you how you are doing with respect to your budgets. Thanks, Joe Near, for showing me this site!
  • Started following the advice of the Tight Fist (thanks, Eugene), a great tongue-in-cheek blog about how to save money. (I have been thinking quite seriously about their advice about how using too much soap just makes you need other things more, like moisturizer... If you give a mouse a cookie...)
  • Stopped shopping at Whole Foods/Harvest and started shopping at Star Market. This, combined with a reduction of variety in my diet to the staples of tofu sausage, eggs, noodles, vegetables, and fruits, saves me multiple 10's of dollars on groceries per week now.
  • Stopped buying random things I don't use full price from the internet. The next step will be finding deals when I need them... (I am currently operating under the assumption that I will not require anything new--this is not sustainable.)
Next on my list: using the library instead of buying 10,000 books / year.

I am still not to good at this thing, so please give me tips! :)

Monday, September 28, 2009

Mitzenmacher's advice to graduate students

I came across this blog post last year and found it to contain very helpful advice.

Balance ball chair

I recently acquired a balance ball chair, which seems to be very nice for making me sit with good posture. The chair is highly adjustable, since you can just deflate it to make it the right height. I had to deflate my 52cm ball quite a bit; I am not sure if I am getting fewer benefits because of this.

Wednesday, September 09, 2009

Rachel Simmons has a new book

Rachel Simmons, who wrote Odd Girl Out about hidden female bullying, has a new book, The Curse of the Good Girl, about how expectations of girls today are unrealistic and harmful. From the review:

...Simmons shows that pressure from parents, teachers, coaches, media, and peers erects a psychological glass ceiling that begins to enforce its confines in girlhood and extends across the female lifespan. The curse erodes girls’ ability to know, express, and manage a complete range of feelings. It expects girls to be selfless, limiting the expression of their needs... It diminishes assertive body language, quiets voices and weakens handshakes. It... follows many into adulthood, limiting their personal and professional potential.

I haven't read this book yet but I will read it as soon as I acquire it*.

* I have a birthday coming up... Hint, hint...

Monday, September 07, 2009

Practicing tourism in San Francisco

This past weekend I was in San Francisco visiting my college roommates Aliza and Marianne (and their respective boyfriends, Jesse and David), both of whom spent the past year doing Teach for America (Aliza in Oakland; Marianne in New Orleans) and both of whom have much more grown-up lifestyles than I do. Every time I go to California I become quite envious of the good climate and food. Here are some activities I did this time around:
  • Went stand-up paddle surfing at the beach behind Aliza's house. Aliza's boyfriend Jesse works at a wind surfing shop where they have all sorts of equipment for doing fun water sports. This made me regret never surfing while I lived in Santa Monica! (Although doing these water sports in the bay is much less treacherous than doing them in the actual ocean.)
  • Hung out at Zeitgeist, a cool bar in the mission that had a secret (huge!) outdoor component.
  • Got a burrito in the mission. (This is apparently what you are supposed to do.)
  • Browsed the antique fair, where there are miles of all kinds of antiques: furniture, china, jewelry, books, etc.
  • Got a seitan Philly cheese steak at Triple Rock, a very good burger place. (My friends said it is a great burger place; I was happy to find that there were also some good selections for non-red-meat-eaters.) According to Jesse the beer aficionado, they also have a good beer selection.
  • Enjoyed some refreshment at Heinold's First and Last Chance, a historical bar where Jack London used to drink. (There are many other cool facts: the floor is slanted from the earthquake, etc.) This is in Jack London Square, where half of Jack London's Alaska cabin was transported (and the other half rebuilt). (The other half is in Dawson City, Yukon Territory as a result of disputes over who gets the cabin.)
  • Got ice cream at Fenton's, a very satisfying ice cream place (which was featured at the end of the movie Up).
Thanks to Aliza, Jesse, Marianne, and David for facilitating my practice of tourism! ;)

On matriarchy and matrilineal societies

Friedrich Engel's treatise The Origin of the Family, Private Property, and the State answers some of my questions about the inevitability of the modern patriarchal social structure*. You may read the relevant English-translated text here.

Engels describes patrilineage and patriarchy emerging as a result of the pairing family: in early communistic societies where men did not have pairing relationships with women, property belonged to the matriarchal gens (group of families). The notion of private property developed after the domestication of animals. Since it was the man's part to obtain food and the instruments of labor for obtaining food, the man owned the tools, the cattle, and the slaves. The children, however, belonged to the mother's gens, so they could not inherit from their father. This caused mother-right to be overthrown and replaced with patrilineage and patriarchy. The monogamous family**, which develops out of pairing family, is based on the supremacy of man because its "express goal" is to "produce children of undisputed paternity."

While this is clearly part of a greater argument against private wealth***, Engels addresses some interesting issues about the origin and role of male dominance. This piece confirms many of my hypotheses about the subject; I would be interested in reading more sources.

* I have been wondering about matrilineal and matriarchial societies; I would be grateful for any sources on matriarchal societies!
** Monogamy strengthens the pairing tie with the expectation that it will not be dissolved.
*** I make no claim to agree or disagree with his argument against private wealth. One should, however, always be suspicious of learning history from treatises!

Thursday, September 03, 2009

The skinny on (Asian) noodles

The most notable thing about my (temporary summer) kitchen cabinet right now is that despite the depth of my inventory, I have quite a breadth of noodle and hot sauce varieties. I thought I'd write about some different kinds of Asian noodles and what they are good for, along with some notes about how to have my noodle lifestyle*. (You may e-mail me for questions about non-Asian noodles various hot sauces; I am very into them.)

Basic kitchen ingredients:
  • Garlic (good for non-broth noodle preparations).
  • Scallions (these don't keep as well as garlic, but they are good for topping a dish).
  • Sesame oil and soy sauce.
  • Hot sauces: I try to have a chili garlic sauce for flavoring, a black bean sauce for flavoring, and Lao Gan Ma chili sauce in oil for spiciness.
  • Having dry Sichuan peppers around is also good for flavoring broths and stir-fries. (Since they are dry, you are responsible for spreading the flavor.)

Basic preparations:
  • Broth. You can make a vegan broth by quartering an onion, cutting a carrot into small pieces, and boiling with water for 20-30 minutes. It is very easy to make a chicken broth by putting pieces of chicken (frozen or fresh) into the broth in the beginning. The broth is pretty robust to overcooking; cook until everything looks done and the soup tastes flavored. Adding salt is a good idea; I also like to add some dry Sichuan chili peppers. You could cook the noodles in the broth, but keep in mind that noodles may absorb a lot of water, so it is usually best to cook the noodles separately. A cool thing you can do to flavor broth is to stir-fry some shallots and put them in the top/bottom of the bowl.
  • "Dry." I usually just throw together a basic noodle sauce using sesame oil and some hot sauces. I usually use a combination of chili garlic sauce and chillies in oil. It is sometimes also fun to grind up some dry peppers to make the sauce spicier. You may also use soy sauce for flavoring. With the right repertoire of hot sauces and some experimentation, it becomes very easy to get the flavor to suit your mood very quickly.
  • Stir-fried. I'm not a pro at this, but you can get pan-friable noodles and stir-fry them with a little bit of water in the pan. One idea for topping the noodles is with scallions and chicken or seitan; you should cook the noodles separate from the other stuff.

Noodle varieties:
  • Wheat (udon) noodles are medium thickness and good for either the broth or dry preparations.
  • Buckwheat (soba) noodles can be served cold/dry or hot in broth. They are quite good with some sesame oil/miso, but since I am Chinese (Hunanese) and not Japanese I opine that everything can be improved by hot sauce. :)
  • Mung bean starch noodles come in various thicknesses. They are okay for broth, but I find they serve the best purpose for "holding" flavor since they themselves don't have too interesting of a flavor. These are a good substrate for a spicy chili/oil sauce.
  • Somen are very thin wheat noodles that can be served cold with some sort of sauce or hot in broth. I love somen in broth; somen has a good enough flavor that it is good with some hot sauce, but it is always fairly clear to me that it was not meant to be eaten that way.
  • Egg noodles come in either thick or thin varieties. Both kinds are great in soup; thin egg noodles often come in a pan-friable variety--but you have to read the label to make sure.
  • Fresh Shanghai noodles are thicker and absolutely great for making dan dan noodles or variations thereof. It is fairly easy to make some approximation of dan dan noodles with some dan dan sauce (or combination of chili garlic/chili oil/black bean sauce) and garlic.
  • Rice noodles in Chinese cuisine usually come in thick and thicker and are great both in soups, as a substrate for spice, and in stir fry. (For the thicker variety, look for fresh noodles.)

Some notes on cooking noodles:
  • Noodles will often overcook if you let them stay hot for too long; if you are concerned about this you should drain them and rinse them with cool water before proceeding to the post-cooking step.
  • Noodle varieties have very high variance in how long they take to cook and how much they tend to expand. Once you get the hang of things, it tends to be pretty consistent.
* Most of what I say is calibrated for cooking for one to two people. With noodles I'll usually make a vegetable and then have either a couple of poached eggs, some chicken or tofu sausage, some seitan, or some chicken (which I prepare with black bean sauce, sesame oil, and chili sauce).

An awesome snack

I just concocted the best snack ever: I diced a nectarine, added brown sugar and Life cereal, microwaved this for one minute, and added three tablespoons of plain lowfat yogurt. This was the healthiest and quickest way to approximate a peach cobbler a la mode with the ingredients in my kitchen! :)

Also awesome:
  • Strawberries dipped in plain 2% Greek yogurt and brown sugar.
  • Blueberries and any plain yogurt and brown sugar.
  • Raspberries and any plain yogurt and brown sugar.
  • Plain yogurt with jam.
Yogurt recommendations: for Greek, I prefer Fage 2%; for regular, I like the Whole Foods brand 2% or Nancy's Organic Yogurt 2%. Greek yogurt is thicker than "regular" yogurt and is good for dipping fruits.

Jam recommendations: Bonne Maman has a pretty good flavor/texture--it is best to get something that is not too gelatinous.)

If you are into yogurt you may also want to try kefir, another fermented milk product that is more liquid and has different properties from yogurt.

Sunday, August 30, 2009

Seattle Underground Tour

Putting in a plug for the Seattle Underground Tour, which gives you a great hour-long introduction to Seattle's history. Started in the 1970's by Bill Speidel to fund a grass-roots preservation campaign, the tour gives you a brief overview of Seattle's early history and takes you through Seattle's underground tunnels, which were the city's sidewalks until they raised the streets. Take the tour to learn more*! ;)

* This is quite an interesting story; if you are not in Seattle I recommend reading about this on the internet.

Tuesday, August 25, 2009

Bat pose

Recently at yoga I have been introduced to bat pose, which involves hanging upside-down from a looped strap attached to the wall with the strap on your sacrum (so your back forms the bottom edge of an isosceles triangle), your legs along the outsides of the strap, and your feet on the inside of the strap. It is very fun and relaxing; it has been quite helpful for reducing back tension.

Sunday, August 23, 2009

Internet is ruining slang

I recommend reading this fun NY Times article on how the internet has affected the spread of slang. Since the point of using slang is to separate from the actually cool people from the wannabes and the internet makes knowledge of slang available to all wannabes, fairly quickly do slang words cease to be slang and enter the greater cultural vernacular*. The article discusses the spread of slang, the role of slang in social identification, inter-group slang transfer, and the evolution of slang with respect to internet technologies. As a total slang goon, I found this article to be hella rad.

* This might actually be why I create my own slang and abuse the polymorphic term "goon." Only my real friends will pick up the appropriate ways to use my slang. ;)

Bike polo

Today I came upon some pick-up bike polo matches occurring at the tennis court across the street from where I was getting ice cream. It is kind of like roller hockey on bikes: players have sticks with which they handle the ball*. It looks like a technically interesting (and potentially dangerous) sport. I would compare it more to fencing than to something like ice hockey: it seems like technique is much more important than level of physical fitness. It was the first time I had ever seen or heard of such a thing!

According to the US Bicycle Polo Association, the sport is thought to have originated in India, where British troops used bikes to work on their equestrian polo skills. It is also apparently growing in popularity throughout the US and world. :) The NY Times also has a 2007 article about bike polo.

* According to internet sources the stick is supposed to be a mallet, but the players I saw had lightweight metal sticks with thin hollow cylinders at one end. (A really interesting thing was they shuffled teams by putting all n sticks in the middle of the court and randomly throwing n/2 to each goal.)

Thursday, August 20, 2009

The fine line between self-expression and cyberbullying

Model Liskula Cohen won a court case against Google to reveal the identity of an anonymous blogger who maligned her* on the Skanks of NYC blog. Apparently Google initially refused but the Manhattan supreme court ruled that Google, who owned the blog, needed to provide the information. Perhaps I do not understand the gravity of the situation, but I am disappointed that one person's offended vanity sets such a precedence for revealing (conditionally) private information**. It is a slippery slope when people start being punished for saying "mean" things.

* They called her a "skank" and labelled photos of her with similarly derogatory words.
** While I understand cyberbullying to be a serious issue, it seems like Google's lawyers could have made a convincing case that this level of bullying does not pose a physical threat. Perhaps the issue is that people don't know what to do about cyberbullying? It does not seem like the court would have been so harsh had this whole thing happened in print media.

Wednesday, August 19, 2009

Airline pricing

Anyone interested in economics likely finds airline companies interesting: one of the few things I remember from my introductory economics class was the story of how some airline company realized they could make more money by not filling planes; it is also interesting how budget airlines like Ryanair can offer astoundingly low prices by cutting frills. Airline pricing is also interesting because finding the lowest fare for a given route is NP hard; companies like ITA software have sprung up to solve such problems.

Company business models aside, I find airline pricing to be incredibly interesting because it is one of the few things relevant to my life where supply and demand have such an immediate effect on price. According to Wikipedia, airline reservation systems sometimes have perfect discrimination when it comes to filling each seat of a plane at the highest price a customer would pay without driving the customer away. This is in line with the advice I've gotten over the years about purchasing plane tickets: tickets to leave Friday and return Saturday are expensive because there is high demand from corporate travellers, who don't care what they pay; ticket prices tend to drop after midnight (I hypothesize because reserved seats open up again); waiting for fare wars is a good way to plan semi-spontaneous trips. Plane tickets are cool because you can really improve your quality of life by having a good strategy and having a good strategy is fairly low-cost.

Recently I've been spending a bit of time on Bing travel (formerly Farecast), which compares prices over different dates and offers a prediction of whether to buy or wait with an estimate of the price variability. (A cool thing is that it will also let you set fare trackers that e-mail you the daily price--at some fixed time of day--for some trip.) It shows you graphs of the historical lows and the daily low price, both of which are interesting because they can vary a surprising amount (over $200 for tickets that can be in the low $100's) over the course of a few days (sometimes with seemingly random highs/lows). You can also see longer-term trends: an obvious trend is that ticket prices increase the closer you get to the flight date. I've also discovered fairly high variability (difference sometimes in the hundreds) of tickets over the course of a day; ticket prices do seem to increase quite a bit during the course of a day. (The price difference of flying to different locations is also interesting, since it depends not only on distance but also on demand for flying to that city, whether it is a hub, etc. etc. etc.)

I recommend playing around with Bing travel/Farecast if you are interested in this kind of thing. It is also a great resource for planning trips. ;)

Brain stuck in a rut

This popular NY Times article talks about how stress can cause your brain to go on autopilot, making you do the same (bad) things over and over again when you are stressed for too long.

Tuesday, August 18, 2009

Bed Buddy: another ergonomic secret

Another item people have seen me using and commented on what a good idea it was is my Bed Buddy, which is this rice pillow you can put in the microwave and then on your neck/shoulders/back. I use it every day; it generates moist heat (as opposed to the dry heat you get with the self-heating pads) that is quite effective for relieving muscle soreness/tension.

Trackpad keyboard for mousing-related problems

After mousing aggravated some of my shoulder problems, I switched to using keyboards with mice in them. I've tried a few, but the Adesso Tru Pro has been the best so far. I received it today: it has the slight elevation/separation between two hands, soft keys, and a nice track pad. It is a little big, but I kind of like that.

Previously I was using the Keytronic trackball keyboard, which was okay but not very ergonomic. The trackball also often got stuck, which was annoying. The keys are also pretty loud. I have also used the Lenovo Ultranav, which is basically the Lenovo laptop keyboard with both a touchpad and a ball mouse. I got the version without the number pad on the side so the mouse is in the middle. I found it to be okay but not sufficiently substantial: my hands get kind of funny after typing on it for a while; it might be because it's a mini keyboard.

If you are having shoulder problems with your mousing shoulder, you might want to try switching to a keyboard with a built-in mouse. I also type with my keyboard in my lap, elevated by a Lapinator so that my elbows can be at 90 degrees.

Worried about switching keyboards because you already have a fancy schmancy one you don't want to give up? My friend who was having mousing problems got this touch pad to use with his Kinesis.

Life lessons: computers are pretty bad for you, but the internet is so cool.