08.31.07

Silicon Valley interview questions?

Posted in Programming at by chenty

This is not the first time I read news articles about tough questions interviewees were asked during an interview for top companies such as Google. My favorite one is “why are the sewer lids round in shape instead of square”?

I have always questioned about the effectiveness of those questions, especially from my “bad” experience. I once attended an interview from Microsoft, and the interview went very well at the beginning. Suddenly, I was asked if I were the product manager, how could I design a remote control for senior people.

My answer was: if I were the manager I would like to conduct a full survey of seniors first, and ask for what difficulties they have when they use a remote control. The manager was very disappointed with my answer, and he started lecturing me about what suggestions I should have give. He named a long list of features he think it would be “cool” for seniors. I did not want to argue during the interview, but all I had in my mind was: if I were the manager, I need to make sure the product addressing the need not just to be “cool”. The real question is: will seniors really spend hard earned dollars for a universal remote control? I believe simplicity is over functionality in this perticular case. Apparently my performance didn’t impress the manager and he cut short with my interview immediately. When I got home, I googled the interviewer’s name and surprisingly learned that he was actually the team lead for Outlook 97 and Outlook 2002. Any thoughts of that? :-)

Nonetheless, I still like to read and solve these interesting interview questions as brain teasers, but I deeply doubt the usefulness in an interview since if you cannot press the “hot button” you will be judged unfairly. On one hand it helps to pick up smart thinkers, on the other hand it filtered out deep thinker.

The question I read today is “how much money will you make if you clean all windows in Seattle”? The author has suggested the following answer:

assume 10000 buildings in Seattle; 600 windows per building; 5 mins per window; $20 per hour wage; the income will be $10 million

I think this answer is kinda boring, so I tried some other approaches:

(1) If I were granted a contract to clean all windows in Seattle, I would become a monopoly. So I can charge whatever price and maximize the economic rent as long as consumers can afford, which means I can make way more than $10 mil! More importantly, if I could subcontracted the work, I could make money sooner.

(2) Think about time value of money! Sure, you can finish all windows and make $10 mil. However, to finish all windows it took more than 57 years if I did it non-stop, 24X7. If I worked as normal, I could not even finish the work in my life. Therefore, this income stream becomes a “perpetuity”. Assume I worked 8 hours a day, $20 hours per hour, 200 days per year, my annual income would be $36,000 and assume my expected rate of return is 5%, the present value of my total income would be $36000/0.05 = $720,000, which is way less than $10 mil.

Things can get even more complicated if you combine the idea (1) and idea (2). Happy brain teasing! :-)

08.20.07

Text file splitter by number of lines

Posted in Programming at by chenty

I have not updated my blog for almost seven months. The main reason is that I am making some big move! I am getting into finance! I have been preparing my Charted Financial Analyst exams for months.

Anyway, I need to write about CFA in another post, so I’d better talk about text file splitter. I have a very simple need, split a big text file that is over 1GB into small pieces so I can only them with text editors. My first take is to download some freeware, but I was out of luck, and people charge $10-$30 USD for such a simple task! Jeez. I have found some free chinese file splitter, but they all crash upon opening the file. The reason they crush because they all load the whole text file for preview first, which does not make any sense imho.

I have found some source code online but most of them advertised as “untested”, so I decided not to read them. After spending hours of researching and having tried more than 20 software, I decided to write my own.

You can download the app here (no need to install, just run it as long as your computer has .NET 2.0 installed):
Text File Splitter By Number of Lines (binary)

You can download my C# source code (VS2005 sln) at:
Text File Splitter By Number of Lines (source code)
(I was in a rush, so I mistakenly named my app as “text splitters”. Please forgive my grammatic mistake.) :)

I have not implemented a good checking mechanism such as using “try…catch…” because I only have one file to split. The speed is not bad: I have splitted a large text file (250MB) into 302 files (each has 10,000 lines) in just one minute.

My code is absolutely free (well, it only takes me less than an hour to create this, so I don’t think I deserve $10). :)

If this app works for you, please link to my app on your blog so more people can use it without paying (saddly, those who charge for this have very good google ranking) .