Thursday, 20 September 2012

About Interview

I went for three interviews these two days. Tuesday morning with Microsoft, midnight with Google for the first round, and Wednesday midnight with Google for the second round. Though the intention for applying those internships is not to get the offers but simply to gain some experience for technical interviews, I still prepare hard for the interviews, hoping to learn as much as possible.

The first round Microsoft interview was conducted in NUS where one HR and one technician flew over to Singapore to give the interview. I had 30 mins with both the HR and the technician. The questions with the HR is the standard interview questions like project experiences+ some brain teasers. The questions are not really that challenging. In case you are interested, I attached the questions in appendix1.

For the technical interview, the technician monitored you to write codes on the spot. The technician this year is a tester from Austin-Taxes working 10 years in MS. I did three questions during this interview, first one with pointers, second one with arrays and third one with bit-manipulations. The first question is to reverse a string in a way that translate"abc def ghi" ->" bca fed ihg". He expected the candidates to be familiar with pointers. One of my friends who also got a string reverse question even though he said that his primary language was Python. That was wired. I forgot quite a number of C++ syntax and also didn't do well in this question. Thankfully I mentioned the test cases to him and that made things slightly better.The second question is to find the number of pairs of integers in a given array that their sum is a given number.arr[]={1,3,4,5,6,7} sum=9->num=2 I wrote the O(n^2) algorithm out and told him how to improve the algorithm and make it faster( sort first, using hashmap,etc). The third question is to count the number of 1s in a binary integer using the bit manipulation & operator. That was easy and I wrote it out in a very short time.

After the interview, I realize that I'll need to review C++ more. C++ is very important. If someone is damn good at C++, he/she should be able to cope with interviews of any big software companies. The result for this interview will be released in 3 weeks and I'll be writing a whole day's codes in Microsoft Singapore office if successfully get passed for the first round. That's gonna be challenging and also a very good way to further improve the programming skills.

After the interview, I reviewed the Cracking the Code ebook again. This book is very useful for preparing big company tech interviews. Thanks to it, my C++ skills get improved within one week.

At the mid-night, I did the interview with Google. I thought it was going to be extremely challenging. However, it doesn't turn out to be that difficult. The interview was conducted in Google docs and we communicated on phones. The first question is to compute the longest length of consecutive elements in an array.  {1,1,1, 3,3,3,3,2,2,4,1,1}=>4. That was easy. I got one issue with the overflow of the last element and then fixed immediately. The second question is to print out the indexes of chars in a string S1 which appears in S1 but not in its sub-sequence string S2. For instance, S1={abcedf}S2={bcd} print out "0 3 5". Firstly, I wrote the codes considering that S2 is a sub string of S1, but later the interviewer pointed out that it's sub-sequence not necessary sub-string. Then I changed the codes into a O(n) complexity algorithm. That was OK. I felt quite confident after taking that interview as it was not really as hard as what I expected.

However, on Wednesday mid-night, I toke another interview from Google and the interviewer changed to be a hardware engineer. I didn't expect the questions to be hardware related. But The first question turned to be "what's the difference between process and thread". I tried to recall the Operating System course but I can only list some points which may not be correct.That made me very uncomfortable.
http://www.differencebetween.net/miscellaneous/difference-between-thread-and-process/.The second question is to design a function to output the best option for text input using a UP-Down-Left-Right-Enter controller. For instance, a screen keyboard contains 26 chars('a','b'...'z'), and the chars will be separated into rows given the width of each row(column size). The user can only navigate using the control bar to go Up/Down/Left/Right, if he/she finds the char, he/she press enter, then continue. e.g., the input text is"xy" and the width of the screen is 5, then the 26 chars will be arranged in this way:
a b c d e
f g h i j
k l m n o
p q r s t
u v w x y
z
The it takes the users to go DDDDRRR and then Enter to input the x and then R+enter to input the y. I implemented it using pointers, but it is different from the interviewer's expectation. There are some bugs in my codes as well.
The third question is unexpectedly to be " You video and audio play nicely in a DVD, but when you play it in a tape, the video and the sound cannot synchronize by all means. What caused the problem? how can you fix that?" I'm totally lost on that. I thought it was the problem with processing the input analog data.Cannot get through further. I found this post now, but it doesn't seem to explain it correctly,either. http://forum.videohelp.com/threads/297810-Video-and-audio-gradually-go-out-of-sync

Never mind, a good experience. Work harder.

Appendix1:
When are you graduating? Are you applying for an internship or full time job?
What's your favorite Microsoft product?
What's your favorite programming language?
What's good coding?(This is a good question)
What's your favorite course?
Which project are you most proud of?
9 balls with one of which light weighted, think about ways to find out that ball using one balance.
Design an alarm for the blind people.(I mistakenly designed for the deaf people,need to hear it more carefully)
Any more questions?
...

Sunday, 9 September 2012

Machine Learning

Machine learning seems to be a big trend for either today's research or the IT industry. There are quite a number of business ideas hanging around my head, most of which require machine learning for a good outcome.

First idea is a products-comparison application which help consumers to better compare similar products from different online retailers. This is going to solve the pains for the consumers who would like to buy certain products from all the possible overseas retailers and ship to their homes. The consumers need to spend a lot of time comparing different solutions(including the price of the product and the price of the shipment) and the solutions are mostly not optimal. The idea is not new. But with the evolving development of mobile clients, this idea has a very big market. As is shown in one survey, 70% of the smartphone users use their smart phones to compare different products. The comparison service itself can generate a fairly good revenue from ads, even we only focus on one specific market, e.g.,electronics devices or cosmetics. If it works well, the application can make its own online-retailing service later, or even enter the logistics market in a more ambitious stage.  Machine learning and information retrieval would be two powerful tools to make it work.

Another idea is to make a lyrics-melody match application. When a lyrics writer writes a piece of lyrics, he/she would love to find a piece of melody which fit the lyrics the best. The same for a melody writer. It is a fairly rare case that an amateur can write a complete song with nice lyrics and melody fitting each other. Machine learning and information retrieval come into play again.

That's not easy. Everything is not easy if we want make it work nicely. It's good that I am taking the machine learning course in coursera.org which makes me really interested. Hope some of the ideas can work someday.

Yesterday, I visited a Start-up company in NTU incubator center. This company was formed a year ago by three undergraduates from China. Unlike many recent start-ups which mainly develop mobile apps, they provide enterprise solutions for multimedia companies. One of their products is to make interactive painting gallery display using LCDs and Microsoft Kinect.  Another product is to provide car-dealers with interactive display using Kinect. The company is able to maintain its daily operations with no pays to its team members. The core team consists of one very good programmer, one charismatic business guy, one OK programmer with good strategic planning and one designer+business women. That's a fairly good distribution.There are even some team mates who are willing to work for the team for free. That's really passionate.
I talked with the CTO and he shared quite a number of interesting ideas. Regarding machine learning:
1. How apple's wifi determines the location of a user? It's not via the computation of the nearest wifi transmitters, but via the location data from other IOS devices which appear in that region.
2. Google abstracts some ambiguous characters from scanned books and make them into reCAPTCHA. The unknown words are then recognized by the probability of the human inputs. The recognized words are then reusable again in Google's ebook projects.
3. How Google knows the traffic conditions of a certain place? In some places where location data are not allowed to be collected from Android, they simply count the number of Android devices in that region and infer the traffic condition.
Regarding the start-up environment here in Singapore. Singapore is very suitable for creating start-ups. The situation here in Singapore is opposite with that of China. In China, there are a lot of very good programmers but not many kinds of funding. But in Singapore, there are various kinds of funding, however, not so many good projects and good programmers.

Once again, I get to know that great products are coming from simple ideas but very good executions. Another time, you need to know some business stuffs, pure programmers are cheap.

Something good worth mentioning for this week:
1.I swam 4 times this week. Body fitness is so important.
2.I wrote the lyrics for my first pop song out. It happened to be about "faith", like a religious song.

"黑暗笼罩着世界,恐惧无限制蔓延。一望无际的地平线,无声无息冰冷的夜
  空气夹杂着硝烟,信心早已经熄灭。战争是生命的总结,死亡是苦痛的终点
 有一个声音在哽咽--
 只要有信念,冰川便能溶解,苦难还能幸免,奇迹总会出现。
 只要有信念,烈火便能凝结,灵魂还有时间,真爱永不陨灭"

Something bad worth mentioning:
1. I slept very late on Friday(3am) to watch the Voice of China TV show, which makes me sleepy for the whole weekends. Shall have a more regular schedule.
2. Last week passed so quickly, can be more efficient.







Saturday, 1 September 2012

what kind of role would you like to play in the company

I did the second round NOC interview this afternoon. It went well, but a bit overtime. One question made me think further, that is "what kind of role would you like to play in the company".

I paused a little bit and told them that I would like to work as a software engineer and further train my programming skills and hopefully learn some business along the way. However, the NOC interviewers think that my technical skills are good enough and what I really need is to train the business skills. I thought for a while and then responded,"I believe the importance of the distribution of different competences/abilities in the team. It's no good to have someone to know a bit tech and a bit business but not good at either of these two. I envision myself to be a CTO in the future but my programming skills are not good enough. So I hope to further train my programming skills. Of course, it would be good to know some business stuff so that I can better communicate with my partner in the future decisions ".  One NOC alumni seemed to be unsatisfied with the answer. She said," I just couldn't understand why you are already very good at programming but still want to further improve the programming skills rather than something essential as an entrepreneur like business skills."

I asked back,"If I choose to work as a business guy, will the company in Israel accept me?"Another interviewer said, "Yes, it depends on you and the company. You can talk to the company saying that you would like to do 30%business and 70%programming." Another NOC alumni even suggested that I can consider doing a 100% business internship there. He shared the role of a growth hacker, who uses creative ways to help companies to grow. He also shared a lot of information regarding the benefits of knowing both tech and biz.I thanked them, but still couldn't decide. After thinking twice, I knocked the table and said,"OK, if that's the case, I'll go for it". One of the reason I want to explore Israel is to know the process of how the R&D products become real marketing products. However, the question is hard to answer. I ended up saying that maybe Prof.Ben knew me better. They may refer to Prof.Ben's testimonial. They said Prof.Ben haven't submitted the testimonial yet. I bet Prof.Ben is viewing this blog. Prof.Ben, can you help submit the testimonial ASAP, thanks.

After the interview, I went back to COM1. I happened to see Wang Sha who went to Israel last SEM. I asked her the question whether I shall work as a tech guy or a biz guy. She said of course tech guy coz "The fact is that you are working for the company. They would like you to work something out for them. If you are not good at biz, you can hardly meet their needs. " She also shared that some entrepreneurs told her that business is the hardest thing and they don't worry about programmers at all, as programmers are "cheap". She guessed that might be the reason why the NOC interviewers would like me to think more about the the business side. I also gradually realize why some of my previous contacts don't respect programmers enough when I personally still believe that programmers are among the greatest people on earth.

[ appendix: I had dinner this Wednesday with one of my friends who just came back from CITI bank Hong Kong. He is an investment banker graduating from SMU this semester and he will be working in CITI Hong Kong the next year.

His thoughts seemed to be beyond the age. He seemed to be very clear about his future, working hard in the bank in his young age and then retire early to enjoy life with his family. But I feel very uncomfortable accepting many of his thoughts. Firstly, he seemed to be very unsupportive about my plan of becoming an entrepreneur. He laughed at me and argued that my thoughts are just too naive. It is like getting a million dollars lucky draw, the chances for making a killing app and then making a lot of money are just too rare. I said it's a good timing for the software developers,even a kid can make a top-selling app. He again said that's just too rare. Either you are the next Bill Gates, or you just get too lucky, but he himself never believe in such things called luck. Then I said, it took a lot of failures to become successful. I'll keep on moving even I fail for 99 times. The CEO of the drawsomething app CEO 20+times before getting succeed. Then he argued that I will never be able to afford 99 times' failures. He even calculated for me the money I will be earning from work and the money I will be lo sing when fail for once/twice/etc. It will make the life of my family miserable when fail for  twice or even more. Those who follow you will suffer a lot. Being an entrepreneur is very risky already, why are you making it even more risky. You should get prepared and then make the right move. Why don't you make one right move and never fail. The mindset of failing a lot of times then succeed is just not right. I didn't argue back as he was just too demanding. 

He also argued that my career as a software developer would be shot. There would be plenty of smarter juniors competing for the job when the brain gets less powerful in say 5 years. You get fired, but will you do then? I replied immediately," start my own business". He then laughed, "You have no experience, no contacts, no money, etc. Why shall people work for you? " I replied with a weak word," trust".  He laughed again and continued, "There are just too many talented software developers, why should they choose you? " I replied with another weak word,"luck". He waved his head, "So disappointed, you should first think of your competence". Then I said," I didn't quite a number of software projects". He said there're a pretty of people who has done so too. Then I said," I've been to many countries and worked with different people". Not many people has done the combination of both two. He said there are lots of such people. You should think of your competitive advantages. What's the difference between you and these people? You should be developing skills, like business skills that distinguish you between those people.  
Yes, I get challenged. I guess he wouldn't be the last guy to ask these questions. Many people will doubt . ]