Pages

Tuesday, September 23, 2014

Amazon Interview - A lesson about how to gracefully fail

Amazon had been bugging me since last year about getting an interview for an SDE role so, I finally said yes (this was 7 months ago). The recruiter scheduled a phone interview with a guy named Saral Jain. Of course, I Googled him and sure enough, his credentials were really impressive - he's got a pretty intimidating LinkedIn profile and the experiences that he's got in his resume sounded really cool (i.e. I have no idea what they are). Anyway, I was confident enough about my skills at that time that I really didn't spend too much time fretting about it so I just did some practice coding in my notebook in order to shake off some rust.

I had high expectations for myself, having gone through a decent interviews with Microsoft and some other tech companies and so I said to myself, "How bad can this be". Well, as it turns out, it was as bad as it can get. My phone rang at exactly 10:30 am and on the other line, it was Saral. He sounded really kind so that calmed my nerves a bit. He spent the next 10 minutes breaking the ice by asking questions about my current work. I was doing pretty well and he sounded impressed... but that was the end of it. The next question that he asked was:

"Okay Jim, given an unsorted array, find an efficient way to get the median".

So first, I don't know what a median is. And second, he wanted a really fast solution so making a crappy one won't cut it. So I asked him what a median is. And it turns out that in a sorted, odd-sized array, it's the one in the middle. And of course, I told him - "well, we can just sort the array and then get the middle which would yield at least n log n of complexity" but of course, it was not the answer that he was looking for. He wanted an algorithm faster than n log n and so the longest 40 minute interview of my life had begun.

Over the next minutes, I tried to solve it and he tried to guide me on how to do it by using a combination of quick sort and binary search but I just did not get what he was trying to tell. If there is one sorting function that I am not well versed, it's quick sort :) I really struggled to find a solution but I really liked how Saral kept pushing me to the right direction as if he really wanted me to succeed but there's only so much you can do if you are unable to grasp quick sort in the first place. Suffice to say, the interview did not end well.

I was pretty disappointed with myself during that time. After the interview, I tried to look for the solution but it was futile as I cannot understand any of it at all - and well, I felt really really bad. This however made me realize how much I suck at a lot of things. I started to realize how little I know about Computer Science and Math and that I have to do something about it if I want to become this cool nerd that I envision myself in the future. This reality hit me hard.. and it woke me up.

Over the next few months, I started to assess and list down the cool things that I want to do in the future. "Well, for now, I just want to be able to answer the kinds of questions that Amazon or Google asks during phone interviews - then once I can do that without breaking a sweat, then I'll start to dream a bigger dream" - I told myself. So I should be taking algorithms classes right? But wait, I don't even understand the math behind it. So then take pre-calculus.. but I have a very weak foundation of Algebra, Trig, and Geometry.. sigh.. In order for me to understand all those fancy algorithms, I need to learn about the basic stuff first - and so I went to Khan Academy and started working on Algebra 1. And well, it was fantastic and I was glad that I started down that path. Now, I am proud to say that I now know what a linear equation is :)

So fast-forward to the present, I have now been taking a bunch of math-related stuff at Khan Academy as well as some computing courses at Coursera in order to apply all of those math knowledge that I have been learning. I've also started to take some Android courses so that I can maybe build and share something cool out of these things that I have been learning. Although I know that I still have a long way to go to achieve my goal of being able to whip up a fast median finder algorithm without breaking a sweat, I am glad to say that I am really enjoying all of these detours - and I am really thankful for this failed interview - because without it, I would probably still be sleeping. The quote below says it all:

"You should enjoy the little detours. To the fullest. Because that's where you'll find the things more important than what you want."

Friday, March 28, 2014

EA Hackathon 2014

A month ago, me and a colleague of mine participated in EA's Code Wars (aka Hackathon). We were asked to build a mobile game in 11 hours. There were side quests along the way too where you have to solve a basic coding problem to win a prize. Unfortunately, we were low in man power to begin with so we completely ignored the side quests.

And well, we did not win. We made an Ant game where you were supposed to lay down tracks for the ant to follow (kind of like a Tetris / Side Scroller hybrid). Unfortunately, we were only able to make the ant move in a level. We did not have enough time to program the tracks and we ended up faking a lot of stuff just to have something that we can present to the judges. Yes, I was pretty disappointed with the result as I knew I could have done more if I only prepared ahead of time. But I did learn a lot of things by participating in the competition. And yes, if ever EA hosts another one next year, I'm pretty sure I'll do a better job in winning that thing!


Lessons learned:

  1. Scope. If it looks easy enough on paper, it's still complicated.
  2. Dev Environment. If you are given 11 hours to code, spending 1/4 of it learning about the dev environment will get you nowhere. Till the competition, I have never used AndEngine. I should have practiced at home.
  3. Fake it. If on a hackathon, it is okay to fake a lot of stuff. Don't do it on a real product though.

Today is my Last Day at Hookt!

Well, as the title says, today is my last day at Hookt. What is Hookt you say? Well, it's a start-up company that I joined about a year ago. Hookt is basically a private social network, unlike Facebook which is very public. The hypothesis is that, you don't need hundreds of friends - because most of them are probably not your real friends anyway. Instead, maybe you only need a quarter of a quarter of them as most likely, these are the real friends that you'd interact with often. In theory, it sounds all good. In practice, we found that building a small circle of network is a very tricky proposition. It's like asking somebody to enter a party room - except that party room is empty and you are the first person inside.

Anyway, back to the point - working at Hookt was very enjoyable experience for me. Why - you ask? Simple - I've made a lot of mistakes - and I learned a lot from them:

  1. S40's heap size is at most, 2MB. Some have 1MB. RMS storage (data store) is measured in kilobytes - at most - 512kb. These resources are not a lot to work with. Social network clients are image-centric by convention and learning how to work around these very limited constraints and still have an attractive product is a very challenging proposition. And yes, I've managed to build a product that works really well with those limitations. I've learned how to build LRU caches and using Weak References in building scaleable resource caching system.
  2. Hookt is my first ever published app. Back at Nokia, I worked on a lot of projects - but 90% of them did not ship because some guy up in the hierarchy suddenly decides it is no longer relevant. It's pretty draining when you invest a lot of heart and effort into something that will never see the light of day. That's why am so glad that Hookt S40 shipped!
  3. Threading. Yes, I am ashamed to say that I've never used threads (explicitly) in my entire life until I joined Hookt. I remembered an interview that I had in one company telling me: "How come you've never used threads - are you sure you are a developer?" - Well, now I know how he feels. Now, I can now hold my head up high and say, "Yes, I've developed a list box that's got tons of images inside each cell and when you scroll it, it does not lag. Why? Because I used threads!". Lol! I've also used them in things like networking and resource caching. I got burned a lot too before I learned how to properly use it (yes, databases got corrupted, UI flickered a lot, race conditions here and there, and of course - the deadly deadlocks!).
  4. Sockets. I was a complete newbie at developing networked apps before I joined Hookt. Now? Well, still a newbie, but I now know more! I can still remember suggesting a solution with my boss to just use the push notification feature of Nokia as a channel to deliver Hookt messages to other Hookt clients (to which Nokia said - "Hell no!"). I've also proposed using web sockets on S40 as opposed to using plain sockets. Now I know it is a bad idea. YAGNI (You ain't gonna need it) and KISS (Keep it Simple Stupid) lessons reinforced! And then there were problems talking to very experienced networking guys about SSL, certificates, and security - all of which I am entirely clueless about! But I am proud to say that after all these rough patches, I have managed to develop a very decent, sturdy, and reliable network layer based on sockets that serves as a backbone of Hookt.
  5. Database. Before using a 3rd party framework on a very important layer of your application like a database, make sure it's reliable and that there is a lot of support for it. Yes, I've made a stupid mistake of picking a crappy framework for my database layer! Why? I mean it did a decent job of indexing fields and making sure you don't work with correctly ordering of bytes directly when persisting records. Well, it's because the framework relied on a proper application shutdown in order for it to ensure that records will not be corrupted. That's completely unacceptable! Why? Because applications can crash sometimes - but that does not mean that it should corrupt the database! It still needs to be usable, with the data all intact! Also, another lesson learned is that you should not try to build relationships between tables - relational db style - if you cannot enforce the referential integrity between the two tables (especially true if you are not using relational db).
  6. O(c). If you have a phone running with a CPU of 300mhz, you'd better make sure that processing thousands of data would not result in a wait of 10 minutes. Yes, I've pushed my brain into thinking of solutions that produces constant runtime - and it was not easy - but it was fun!
  7. Test your application with loads of data. It will help you identify bottlenecks and thread problems that you would not detect easily.
  8. MVP. Yes, a polished app is nice. But a working app that's released earlier is better. Customer feedback is the key to building features that will actually be used by the customers.
Yeah, I'd say that's 2 years worth of learning, packed into a year! I definitely made silly mistakes along the way, but I learned a lot from those mistakes. I am very happy of what I have achieved and learned at Hookt. And to top it all up, I've shipped an app that's really responsive and memory efficient! I feel like a battle-hardened Level 30 Monk now, ready to take on that boss in the Dark Forest of Asgarth!

So, going back to the title, yeah, today is my last day at Hookt. Did I get fired because of all the mistakes I made? Well no, I actually resigned. Why you say? Well, I am in the process of trying to find my passion in life. While my stay in Hookt has been very enjoyable, I feel that I need to get out of my comfort zone in order to find what I am truly passionate about. I think this is what they call a mid-life crisis.. But whatever it is, I know that I won't find my passion if I don't do anything about it. So yeah, I'll be joining Global Relay on April 7, working with a data processor that processes billions of data. Sounds exciting? You betcha! 

So with that, I say.. Farewell Door #20.. And thank you for all the fish!


Sunday, February 24, 2013

So far, so good! (aka - how my first week at Hookt went)

Well, it has been a week since I first started my job at Hookt and so far, it has been a really good experience! Let me elaborate why:

1. I love the office. Sure - it's a very small office, probably less than 1000 sqft in size, and it shakes too every now and then (because of the train below it) - but it offers a certain feeling of "warmness" that I don't feel in big offices. When I was being interviewed by my (now) manager, he told me that being in that small office was all about getting to experience the "experience" that it has to offer - and now I know what he meant by that :)

2. I love the commute. It's very close to the Waterfront skytrain station - and by that, I mean it's actually inside the Waterfront station! I live in a condo just below the New West station and so all I have to do is to go down the elevator, take the train, read some news, and then 30 minutes later, I am at work!

3. I love the location. It is centrally located, right at the heart of downtown Vancouver. There are 3 food courts that are very close to our office, we are right by the water, and of course, the best thing is that if ever I feel tired, stressed out, or if I simply need some inspiration, I would just step out of the office, do my long walk around the harbor for a couple of minutes, and then I would go back feeling refreshed!

4. I love the work. Everyday, I look forward to coming in early as I feel this eagerness to conquer hard challenges at work. I feel very excited about engaging myself and others in coming up with solutions to all sorts of problems and it feels very fulfilling to be able to come up with a good one. Sure, I am kind of scared also about tackling big problems that I have never seen before in my entire life - nevertheless, I love the feeling of it as I feel like I am constantly being challenged and nothing feels sweeter than being able to squash that challenge! Level up! :)

5. I love being in control of my work. Being autonomous and empowered with how I want to do my work is probably one of the biggest thing that makes this work very exciting. I am constantly discovering new ways of solving problems - not only the technical ones, but also, about managing my work and the expectations of other people. Sure, I sometimes feel overwhelmed about the amount of work that I have to do but learning how to manage those is also a skill that I have to learn.

6. I love the uncertainty of things. Being in a team that develops a product that has yet to prove itself introduces a lot of uncertainty, not only on whether I'll still have a job a year later, but also about whether the product itself will be successful or not. However, with this risk also comes a very big opportunity for me to largely shape the future of our product (and no, I don't mean that in a generic job description kind of way) and of course, the potential to make something really useful that millions of people will possibly use. I want to make a very good product that a lot of people will use and Hookt gives me the opportunity to do just that.

7. I love working with the people in our team. I really feel the genuine interest that they have about the product as well as their desire to make it really good and quite honestly, it is contagious :)

Well, that's that! :) See you tomorrow Hookt office!


Monday, February 11, 2013

"So what are you most passionate about?"

After failing to answer the "passion question" which ultimately led to me not getting the job offer at Microsoft, I wanted to do a little retrospect about the things that I think I am passionate about. As I have said earlier, I consider myself passionate about a lot of things. However, since I never took the time to sit down, arrange my thoughts, and think about the things that I am very passionate about, expressing these verbally to someone would probably just result in that someone not really understanding what I am trying to express. And so I think that organizing and listing these thoughts from my mind will help me not only understand myself more but also, help others understand the things that I am passionate about. I will start by listing down the things that I think I am passionate about.

1. I think I am passionate about technology. In particular, I like following stories about cutting-edge tech gadgets, startups, and rumors about tech companies. Every morning, I use Flipboard to browse and read stories from Mashable, Engadget, TechCrunch, FastCompany, etc.. Going through these helps me stay afloat with the rapid pace in which technology moves. It also helps me learn about the next big things in technology and how they can be used to solve our day to day problems.

2. I think I am passionate about proving to myself that I can do very challenging things. Whether its at work, job interviews, or just for fun, I like to be constantly challenged. I like to work on things that nobody wants to do and do a very good job at it. I especially like it if it's something that I have never done before. Maybe this is just for the sake of self validation or a crave for a praise from somebody but this is something that I am very hungry for at the moment.

3. I like to think that someday, I will make a product that is really awesome and that it will solve a particular problem that a lot of people have - and so I think I am passionate about observing regular and simple problems that people encounter in their everyday lives and going through a mental exercise of how I can use technology to solve them.

4. I have also recently discovered that I think I have this passion and obsession about making customers really happy and satisfied. I have started to go the extra mile in order to validate their needs and make sure that I build what they want. Somebody once told me that quality - in the eyes of the customers - simply mean the presence of what they want to see and the absence of what they don't want to see - and this is now what I always say to myself whenever I build something for the customers.

5. I think I am passionate about keeping myself fit. I love hiking, swimming, biking, and running. During the cold season, I tend to slack off, but I make it up during the spring and the summer season.

6. I think I am passionate about discovering great places to eat good food! I like going out with families and friends and try out good food from different restaurants.

So I think that's that. But wait! Now that I think about it, I have never done a lot of successful things with most of the passions that I have just listed above! I have never developed a successful product that a lot of people will use - nor have I ever published even a simple app to the app store. I have made some customers happy but I am still looking for something to brag about. I have never used any of the cutting-edge technologies that I have been learning from the tech media to better the lives of people. I have never applied life lessons that I have learned from Jeff Bezos, Jeff Weiner, Mark Zuckerberg, or other great CEOs to build a kick-ass company or simply, just build a great product. I have never gained any muscles or even a 6 pack ab from doing all of the physical activities that I have been engaged in although I have most certainly gained a couple of pounds already from eating good food from good restaurants.. I have never.. I have never, I have never!!

I think the thing with passion is that something great must come out of it - otherwise, how can you call it a passion? Wikipedia defines passion as "A term applied to a very strong feeling about a person or thing. Passion is an intense emotion compelling feeling, enthusiasm, or desire for something.". I feel strongly about these things but it is probably not strong enough as nothing great has ever come out of them yet. In fact, maybe I should not call them passions at all - maybe they are just "interests" or "hobbies".. or "Likes" in the context of Facebook.

Well, this exercise has proven to be really good and helpful! Now I think I know what I need to do to truly answer the question.. "So what are you most passionate about?" I need to erase my passion list from my brain, start from scratch, and then when asked what is the thing that I am very passionate about, I would probably just answer "Well, I am still figuring that out.."... and probably, a good starting point for me would be to accept that other job offer from that start-up company..

Thursday, January 24, 2013

My Microsoft SDET Interview Experience - Part 2

Continuation... (Click here for Part 1)

Hello again! Welcome back! This is the 2nd part of my Microsoft SDET Interview Experience. If you have not read the 1st part yet, you can click the link above and that should take you to the first part of this series.

The Flight to Seattle

Since I live in the Vancouver lower mainland, the drive to Seattle from my place normally just takes around 3.5 hours. Under normal circumstances, I would have just drove down south and not mind the border lineups. But I decided not to do it at that particular time because I wanted to have some time to go over some of the programming problems that had stumped me early on. This was crunch time for me and every minute was valuable. Besides, Microsoft would pay for the cab rides to and from the airport so I decided to take advantage of that.

The night before my interview, I carefully packed my things and I made sure that I carried my good ol' Data Structure book as well as my now worn-out programming notebook. I also made sure to download the map of Bellevue and Seattle into my Android phone in case I needed directions. That night, I decided to sleep early with the expectation that the next day would be a very exhausting day for me.

At last, the morning finally came when I have to fly to Seattle for my 2nd round of interviews with Microsoft. After I said my goodbye to my lovely wife and my cute baby, I headed down to the train station to grab a cab that will take me to the Airport. As it was a 30-minute ride to the airport, I decided not to waste anytime and so I grabbed my programming notebook and I tried to solve a problem of how to convert integers to Roman Numerals. I solved the problem before I arrived at the airport and I thought that this was definitely a good way to start my day.

I cleared the airport checks pretty quickly and so that left me with 3 more hours to burn before my flight to Seattle. Again, I whipped up my programming notebook and decided to solve more problems while waiting for my flight. I decided to go through the problems like implementing the atoi function, reversing words in a string, implementing substr, and going over tree-traversal algorithms again and again (recursive-type functions always gives me a lot of headache). The flight to Seattle from Vancouver was quite quick (around 40 minutes) but even in the plane, I would still try to solve more problems in my programming notebook.

I landed in Seattle at around 12:00 PM. Their airport is kind of big and so I had to take a shuttle train in order to get into the arrival area. After I arrived in the arrival area, I immediately picked up a cab that would take me to my hotel. The cab ride was around 35 minutes and so again, this gave me some time to go over some more programming problems.

It was very sunny when I arrived at the hotel - and when you live on the (north) west coast where it pretty much rains most of the time, you'll get to develop a much deeper appreciation of the sunny days like this. So after I stepped on the hotel lobby, I decided that my plan for today would be to go outside and walk for a few hours - buy a cheap swimming short (because the hotel has a Pool and a Jacuzzi!), eat out at that all-you-can eat Chinese joint, and visit the Microsoft campus where I will be having my interview. After I unpacked my stuff, I immediately headed out to enjoy the sunshine. Mind you, that AYCE Chinese joint was very good! Only 9.99 and the food selection was huge! You couldn't get anything like that here in Vancouver!

After I had my fill, I decided to head out and check the Microsoft campus. After 30 minutes of walking up north, I finally saw the Microsoft logo! And just like a tourist, I decided to snap a couple of pictures :) I was like a kid walking down a theme park. There were banners of Microsoft Surface everywhere. The ambiance felt like that of a University too. I was easily wowed by those Microsoft-branded shuttles and Priuses that go around their campus. And man, their campus is HUGE! There must have been like 70 buildings within that Campus! I instantly fell in love with the place and so I jokingly told to myself "Next month, I'm going to work here!".

But alas, as much as I wanted to enjoy more of that sunshine goodness, I had to go back to my hotel in order to go through some more coding problems. So after I found Building 111 where I will be initially interviewing, I began heading back into my hotel where I would spend 4 more hours of solving more programming problems. I went through some more problems about string manipulation as well as those related to arrays, stacks, and queues until I finally got really tired and hungry. It was already 8 PM and I haven't eaten my dinner yet. I wanted to eat nearby so that I can continue on with my study but I did not find any good food at all at the hotel and so I decided to go outside and head out to Denny's and just continue my study there while I was eating. On the way to Denny's, I met an Indian guy who asked me for directions to his house. I told him that I was new to this area too but luckily, I had saved Bellevue's map into my Android phone and so I was able to show him where he needed to go. We both headed down at the same direction since Denny's was close to where he was going and there, I have learned that it was his first day at Microsoft (jealous grin)! We chatted for a bit and he told me that I would do good in the interviews and that I should not worry about it at all - he sounded sincere and so that gave me a confidence boost! I told to myself that this was probably a good sign and that I was so lucky to have met him :) So after we parted ways, I went on to Denny's and ordered a country-styled steak and I continued to solve more programming problems while eating at Denny's.

I headed back to the hotel after 2 hours. After I arrived at the hotel, I did my routine exercise at the gym followed by a quick swim at the pool before I decided to finally hit the hay. It was a long day so I decided to set 3 alarms in case I overslept. But alas, all these adrenaline produced by my excitement kept me awake until 3:30 AM - so I decided to set one more alarm - just in case.

The Interview Day

Finally, the alarm went off and I was completely awake at 6:30 in the morning. I only had 3 hours of sleep but I felt great that day! I turned all of the alarms off, one by one, and then I decided to take a hot shower. I suddenly realized that I got so pent up in studying all sorts of programming problems that I forgot to think about the answer to one question that I knew would matter the most - and that is, "Why on earth do you want to become an SDET?". And so I spent some time digging deep into my subconscious while soaked in a hot tub until I found the answer that made me happy.

After stepping out of the bath, I noticed that my interview clothes were a bit wrinkled and so decided to iron them out as I wanted to look good on my interview. I did a final check on the things that I will be bringing and after all of these were taken care of, I decided to head down to the lobby to get a light breakfast and there, I saw other Microsoft interview candidates! A few minutes after that, I headed out of the hotel and into Building 111 where I would have my first interview with Adam, my recruiter. All that beautiful sunshine from yesterday was nowhere to be seen that day - and I eventually would learn that it will be mostly just fog and an overcast weather for the rest of the week - "ah, back to the typical west coast weather" I told myself.

Normally, I'd be very nervous of an interview process of this magnitude which was about to take place - but since I prepared really hard for this, all of the nervousness that I was supposed to be feeling were replaced with excitement - "Aha, no more sweaty armpits!", I told myself :) I checked in at the lobby at around 8:00 AM and there, the receptionist gave me a sticky print-out with my name on it. I had an extra hour to burn as my interview with Adam was not until 9:00 AM and so I decided to look around their lobby for a bit. There must have been like 15 people in there waiting for their interviews too - some were going for internships and some were looking for full-time jobs.

They had one of the coolest lobbies that I have ever seen - lots of wacky chairs, Xbox 360 with kinect, guitar, and a drum kit, the old and the new Surface tablets, and of course, Nokia Lumias! As time went by, so did the number of applicants. They were slowly being fetched by their recruiters, one after another, where they will be briefed about how their entire day will proceed. Finally, at around 9:00 AM, Adam went down and then he said "Is there anybody here named Jim?".


1st Interview: Adam, the Technical Recruiter

Adam took me to the 2nd floor where his office was located. I was initially curious why I was not brought to those glass-walled offices at the lobby where most of the interviewers where briefed but that thought quickly disappeared. And so after reaching Adam's office, I said to myself, "The hardest and possibly longest interview of my entire life has officially begun".

Adam was a very nice person. He immediately put me into ease and assured me that Microsoft interviews are over-hyped by the Internet and that they are not actually that terrible. Indeed, at the end of the day, what he told me was completely true - but more on that later. Adam then told me, "So, you are interviewing for the SDET Lead position?" to which I responded, "No just for the SDET 2 position". Somebody probably made a mistake somewhere but I had a feeling at that time that it was probably one of those tests to see if you can catch that bug as this mistake was also present in the mail that Chelsea sent to me :) Adam then continued on with the discussion about what I should be expecting during that day. He told me that:

1. It's okay to not get the correct answers. Interviewers look more on your thought process and how you would break down and tackle unknown problems.
2. It's okay to say, "Sorry, I don't know the answer" as opposed to trying to come up with something that is not true.
3. Ask your interviewer a lot of clarifying questions. Some of the problems that they will be asking will be very ambiguous in nature in order to test if you are good in extracting necessary information to solve a problem.

After that, we did some trial runs about designing and testing a vending machine and how I would go about tackling this kind of problem statement. I provided him with my inputs and he was happy with it. Then shortly after, he went over the name of my interviewers. He initially gave me three names, wrote it at the back of his business card, and then he gave it to me. He told me to expect to get to around 3-5 interviews for the entire day and that usually, reaching five interviews is a very good sign. With a strong sense of urgency, getting 5 interviews would be one of my primary goals for the entire day. 

He later asked me if there were any questions that I wanted to ask him. I told him:
1. On the scale of 1-10, how do you like working for Microsoft?
2. What's the work-life balance here like?
3. What do you for fun here at the office?

Adam went to great lengths in explaining the work-life balance at Microsoft. He carefully pointed out that lots of people are very passionate about their work that sometimes, they stay really late working in the office. However, he mentioned that management does not encourage it and that it is up to each individual to decide how they want to work.

We were running out of time so he decided to answer my other questions while we were walking down to the lobby to get me a ride to Building 84, where I will have my 2nd interview with Brendan, the SDET 2 guy. I thanked Adam and then he took off after saying "Good Luck with the Interviews!".

2nd Interview: Brendan, the SDET 2 guy

I took the Prius to Building 84 where I would be having my 2nd interview with Brendan. It took around 13 minutes before the shuttle arrived at Building 84 and so I had some time to chat with the  driver. She told me how she loved living in the USA as compared to Vancouver where it was very difficult to find a high paying job.

After the small chit-chat that we had, I arrived at Building 84. I thanked the driver and then I proceeded into the lobby where I was told to wait for Brendan. Shortly after, he picked me up and he brought me to his office. "Oh, another office" I told to myself. At this point, I started to wonder if all the Microsoft employees get to own their own office space.

Just like Adam, Brendan was a really nice guy too. And exactly just like Adam, he told me, "So, you are interviewing for the SDET Lead position.." to which I responded again, "No, it's actually just for an SDET 2 position!". This time, I was finally convinced that this was probably just an honest mistake and not a test :) We started off our conversation about why I wanted to become an SDET (aha!) and what my thoughts were with regards to testing. After a few more chitchat, I was finally asked to do my first board work. I was excited - I have been preparing exactly for this kind of challenge. I was raring to go.. before I started, he told me that he does not give problems requiring an "a-ha" moment to solve - everything is straightforward - no tricks required! I felt relieved after hearing him say that as I do not know a lot of tricks myself. After that disclaimer, he asked me what I wanted to do first, the testing question or the coding question. I picked the former first as I wanted to pace myself properly for the coding question. After hearing that, he drew a small box with an image and a description beside it and then told me, "So how would you test this?". I immediately asked a lot of clarifying questions about what this small box did, where does it get its content from, and things like that until I had enough information to describe how I would actually test the small box with a text and an image. After some more discussions, he made the scenario a little more complicated and so I asked more questions about it again. He seemed satisfied with the answer that I have provided and so we moved on to the coding question.

Brendan now asked me to find a number in an array with the most occurrence. Carefully, I outlined the steps that I needed to perform to solve the problem, introduced some use cases to validate the steps that I have just outlined, and asked him if it was okay to code it. Once I knew the steps, the coding was actually really simple. I was smiling while coding because in my mind, I thought that my "battle plan" actually works! After coding it, he asked me how I would test it. He also introduced a use case that I did not cover initially but I did not have enough time to code it as we only had 5 minutes left and so I just worked with him how the new interface for the function would look like. He seemed satisfied and after that, he concluded our interview.

He escorted me outside of his office and into a common area where he would fetch my 3rd interviewer of the day - Siva, the PM. After Brendan was gone, I did a mini-celebration for doing a good job at this interview by pumping my fist :) I was so happy with what I just did and moreover, delighted that my hard work has finally started to pay off.

3rd Interview: Siva, the PM

After a couple of minutes of wait, Siva finally came to pick me up. I have read from other people's blogs that Microsoft interviewers share their feedback immediately to the next interviewer in order to tailor their next interview questions on the potential weaknesses of the interviewee and that's probably why it took a couple of minutes before Siva came out. I thanked Brendan for interviewing me and then we proceeded directly to Siva's office. While on the way, I could not resist the temptation anymore about the office situation and so I asked him "So where are the cubes?" to which he responded "Oh, there are no cubes here, each employee gets his own office!". "Oh wow! Now that's actually cool!" I told him. Usually, managers and executives only get office spaces - but in here, they treat everybody equally! Later on, I would realize that I still preferred open cubes over offices simply because you get to talk to your colleagues a lot faster simply by sliding your chair into his desk :)

Anyway, my 3rd interview with Siva started with the same pattern as with the 2nd interview by asking me why I wanted to become an SDET. I was just so thankful that I had thought about this question just a couple of hours just before I headed out for the interview :) After some more boiler plate questions, Siva discussed how the hierarchy works at Microsoft. Specifically, he pointed out that the PM / SDE / SDET triad does most of the grunt work at Microsoft. These three groups are tightly coupled together to complete a feature spec'ed by the PM. They don't have a separate group that will perform System or Integration test and so it is up to the SDETs to ensure that all of these bases are covered. At this point, I was just so excited about the amount of responsibility and accountability SDETs have at Microsoft that I could not help but smile like a kid while he was explaining these things to me.

As with the 2nd interview, Siva finally asked me to code something on the black board. This time, it was about finding a number in a circularly singly linked list. I immediately went on to outline the steps that I would take in order to solve this problem. I have also voiced out and identified why it is harder to search for a number in a circular linked list as opposed to a regular linked list. I struggled at the beginning to find a proper solution to the problem but I kept thinking out loud about all of the ideas that were going through in my mind until finally, I found a solution that works. He was okay with it and so I started to code it. He verified the code if it was correct and then he then asked me how to test it. My approach to testing these kinds of things was to categorize possible sets of test inputs as regular / expected values, unexpected / irregular values, and non-functional tests and so I always answered in that format. My thinking was that this structure was better as it was less hacky and it demonstrated understanding of how to properly partition test inputs. Siva seemed to be satisfied with the answers that I have provided to him. After that, he asked me if I had more questions and then he concluded the interview by sending me off to the same common area where I would wait for my 4th interviewer - Patrick, the guy with many roles.

4th Interview / Lunch: Patrick, the guy with many roles

Patrick was the guy that was going to take me to lunch and so I thanked Siva for a wonderful interview and then he was off. Patrick asked me if I wanted to drop off my bag to his office before we go to the cafeteria and so I said yes. We then proceeded to the Cafeteria which was close to Building 85. It took around 10 minutes for us to reach the cafeteria and so along the way, we chatted for a bit about how similar the weather is in Vancouver and Seattle but that it actually rains more in Seattle than in Vancouver.

After we reached the cafeteria, my first impression was that it looked a lot like a university cafeteria! There are tons of food to choose from and the prices are not too bad at all! Unfortunately, the receptionist at Building 111 did not give me any food coupons and so Patrick had to pay my meal out of his own pocket. I lined up for the Asian restaurant as they seemed to be the fastest in serving food and I did not want Patrick to wait for me for too long. I ordered some noodles, rice, and a sesame chicken and after that, we looked for a space where we can chat some more. Patrick only ordered a soup and an apple and so that got me to think if I should have done the same just so I can keep up with our conversation. I've read in some blogs that they sometimes ask you to code in a tissue paper but luckily, I did not get to do that as I did not have a pen with me at that time :) And so we chatted a bit more about how its like living in Seattle, about the traffic in there, and how Seattle is a multicultural city. Then he went on to describe his current and past roles in Microsoft and man, I was just so amazed at how Patrick showed his deep passion just by the way that he talks about his previous roles.

As I had expected, I was not able to finish my meal as I was already full and so we decided to head over to Patrick's office where we would continue on with our conversation. He talked some more about his roles and why he decided to move to the test organization from dev and that got me really excited just by listening to him describing how badly he wants to impact the organization. One thing that got stuck in my mind was his definition of quality - which was, as he carefully put - "..the presence of what the customers want and the absence of what they don't want". "Nicely put!" I said silently to myself. I'll definitely be "borrowing" that definition of yours :)

Finally, it's down to coding time once again. This time, I was asked to merge two sorted singly-linked lists. And so once again, I outlined the steps that I would need in order to do the code properly and then once everything was clear, I started to code it. One consideration that I failed to think early on was that I should have just merged both the lists in place as opposed to creating a new list in memory and then assigning the values to each of the nodes since it was a linked list after all (toinks!). Nevertheless, I continued on with the naive approach. Patrick asked if there was a way to reduce the memory allocation (which was to actually not allocate a new Node in memory for each of the existing nodes) but I said that I wanted to finish first the naive solution first before optimizing it and so I cautiously went with it. In retrospect, maybe I should have gone with the optimized route since I know how to do it in the first place but I was being too careful at that time not to introduce serious bugs into my code and so I decided to stick on the safe side of things. After I had finished my coding, Patrick found a bug and he gave me a hint as to what that was. I immediately found it but I got a little confused as to how to fix it. I start to panic a little but then I remembered one of the bullet points in my "battle plan": think out loud - and so I did just that. I was able to fix the problem and Patrick seemed to be okay (but maybe not too happy) with the final solution. We did not go back to try and optimize the function that I had just wrote and so I felt bad about not getting the chance to improve my code. After that, we proceeded on to the testing question.

Patrick drew a box on the whiteboard that looked like a vending machine - and indeed, it was a vending machine! I've practiced this problem with Adam just this morning and so I already knew some of the things that I needed to look for when testing this kind of machine. Patrick focused more on how do I perform and coordinate System and Integration testing with other groups if they were responsible for manufacturing some components of the vending machine. I answered this question with confidence and he seemed to be satisfied with my response. After a few more questions, he concluded the interview. This was the longest interview among my list, exactly two hours long.

At this point, Patrick was the last on my list. I wanted the interview to continue as I felt that I have done a good job so far.. and well, it did continue! Woohoo :) He wrote down another name on Adam's business card - and this time, it was Luis, the Principal in Test. Patrick escorted me back to Building 85's lobby where I would have a 30-minute break before my interview with Luis resumes. I thanked Patrick for the interview and then he was off.

5th Interview - Luis, the Principal inTest

At this point, my body was already starting to feel a little fatigued and I am kind of feeling a little dizzy already. Maybe it was my lack of sleep that caused this or maybe it had just been a long day for me. So I decided to spend my 30-minute break just sitting in the lobby and looking at my little boy's cute pictures on my Android phone to help me relax.

A couple of minutes more, Luis came down to pick me up. He then promptly asked me - so how are you feeling? To which I responded - "A little tired :)". Now a second after I said that to Luis, I wanted to hit myself. "Toinks! Why would I say that I'm tired! C'mon, show your enthusiasm!" - I hastily said to myself silently. So I shook of the tiredness that I have been feeling, went on to walk for a few more minutes and then finally, we reached Luis' office. Now this office was a little different from the previous offices that I've been through - this was a corner office with a lot of huge windows and a lot of natural light coming in. "Ah, so people up in the hierarchy gets a corner office!" I told myself.

And so we started of chatting about my experience at Nokia. As with the others, Luis seemed very interested too with the approaches that I did in testing UI components. I understand the pain in testing UI and I guess they kind of felt that too within their group. After some more chit-chat, he then asked me to stand up and code another problem for him. "Have you ever done strtok?" he asked - to which I answered "I know how it works.". I gave him a brief explanation as to how it works and then he expanded on it, citing the exact requirements that he had with regards to how he wanted the function to behave. Once I fully understood what he wanted, I again immediately outlined the steps that I needed to code this function. This took a bit of time as there were a lot of edge cases and design considerations that I needed to consider before I started to do my coding. This time, I also made sure I considered the performance of the function by storing the delimiters as look-up values in an array. As this function was tricky, I tried my best not to get lost in the process while coding it by talking out loud and strictly following the steps that I have outlined on the whiteboard. I was able to finish the code and Luis did not have any objections with it although I am pretty sure I probably made a mistake or two along the way regarding those dreaded "+1 / -1 errors" as my function had some of those :) Luis then asked me how to test the function that I had just wrote and again, I answered the question using my approach of partitioning the possible test inputs as I have described in my previous interviews. I also made certain to mention that my function will have problems in processing multi-byte characters as well as if it was used in a threaded environment as I used a shared resource that was not protected by a mutex or a semaphore.

After some more questions, he concluded the interview. He seemed to be happy and without hesitation, he said that there was one more person that he wanted me to meet. "5 interviews.. I have reached my goal.. I am so happy!" - I said to myself. But I did not want to let my guard down just yet. Was there another coding problem that I needed to solve? Or perhaps a puzzle problem? Come to think of it, I have not been asked why manholes are round or how the hell would I move mount Fuji. Well, I was about to find out the answer to that soon enough. I thanked Luis for a great interview and then Greg picked me from the lobby and took me to his office where I would have my last interview of the day.

6th and Final Interview - Greg, the Director in Test

On the way to his office, Greg asked my how I was feeling and to that, I answered "Still surviving :)". He smiled and said, "Well, you are almost there!". After that exchange, I just felt that I gave another stupid answer. Toinks! I should have told him about how interesting my entire day has been so far (which I truly believe was a very interesting day mind you!) but instead, I just caved in to my tiredness and let my body do the talking for me. I tried to shake off that mistake in the hopes of lifting up my spirit again. Finally, we arrived at Greg's office.

Consistent to my observation, Greg was pretty up in the hierarchy and so he had this very nice corner office with lots of windows on it. Immediately, I noticed that he did not have an empty space on his whiteboard for me to write code - unlike the 4 previous interviewers before him - and so I said to myself, "No more coding.. finally". He quickly confirmed what I had been thinking and then I just smiled. What went on with this final interview was a very interesting conversation about the lessons that I have learned throughout my entire career. This was probably an exercise to determine my self awareness and how I quickly I can learn out of the previous mistakes and successes that I have encountered throughout my career. Come to think of it, whenever the previous interviewers asked me how my day went, I would just say, "Okay", or "I'm tired", or "Surviving" and so I felt that I was not able to provide them with a glimpse of how I thought my day really went! I thought to myself that this was my last chance to demonstrate my self-awareness and so I poured out every ounce of my energy, consistently digging deep into my soul and subconscious into answering Greg's insightful questions in the hopes of letting him discover that yes, I do have great self awareness!

The interview went on for a couple of minutes more and I am not sure how long that last interview was to be honest as I was enjoying myself too much to notice what time it was. Before Greg concluded the interview, he asked if I have any questions at all about any of these. At this point, my brain was just completely spent and so I just said, "No, I think I have asked all of the questions that I needed to ask.". I had just ran out of gas and I felt completely spent so I just left it at that. After Greg concluded the interview, he escorted me out of his office and into the lobby. I thanked him for a wonderful interview and then after a firm handshake, it was finally over. "I have survived the interviews - mission accomplished" - I said to myself. I wanted to do my celebratory jump and shout as loud as I can but I decided to do it outside the office for the sake of self-preservation :)

Victory! :)

The Aftermath

I went to the reception to see if I can get one of those Microsoft-branded Prius to take me back to Building 111. The receptionist was very kind and she made sure that I would get one as quick as possible. She mentioned that they prioritize job interviewees for pick-up and so I was happy to hear that. Microsoft does go a very long way of impressing their potential candidates and so far, I am sold! I finally headed out of Building 85 and I proceeded to the waiting shed where I waited for the Prius to come pick me up. It took a couple of minutes for the Prius to arrive but finally, I managed to get picked up, together with another candidate who had just finished interviewing for a PM intern gig. I asked how her day went and like me, she said she was completely tired. She had 4 interviews, she mentioned. I said I had 5 plus the recruiter. It took around 15 minutes before we arrived at Building 111 and once we were there, we said our goodbyes. She proceeded back to Building 111. Adam told me that I did not have to meet him back at Building 111 and that he should just be calling me sometime in the next 2 weeks.

With that, I took a last look at the Microsoft building, thanked God for a very wonderful day, and then I headed back home. On my way back, I did not forget to shout as loud as I can and jump as high as I can to express my happiness of how things just went. Did I meet my goal? You bet! I got 5 interviews, I did not embarrass myself in front of these wonderful interviewers, my "battle plan" worked, and I learned a lot more things within a week than I could have ever imagined! I did some silly mistakes too that I could have easily prevented! I fought to prove to myself that I can do it, just like any other people, and not to compete with others - and maybe that would be my undoing - but I was happy nonetheless. But even if I do not get that gig that I wanted at Microsoft, that would be okay (although I would probably be heartbroken for the first couple of months :) ) because I personally got a lot out of the interviewing process than I could have ever imagined and I am just so thankful that I went on with the interview and persevered!

As I walked further away from the Microsoft campus, "illusions of grandeur" suddenly started to float around my mind. I imagined myself actually working there everyday, eating at their cafeteria, indulging myself with the unlimited soda and milk that they have in their fridge, having my own office space, riding those Microsoft-branded shuttle buses, and of course, working with these great people that I had just the privilege of interviewing with! "Ah, that would be nice" I muttered. But I immediately snapped that train of thought away from my mind as I did not want to think that far ahead. I shifted my focus on how I should be celebrating today's big victory and so after I arrived back at the hotel, I called my wife using Facetime and there, I shared with her the wonderful experience that I just had. She was very happy - and I too was happy as I get to see my cute little baby boy once more. After the call, I went to the same AYCE Chinese buffet to try out their dinner special and after I had my fill, I went back to the hotel, had a nice swim and a rest at the Jacuzzi, watched a couple of episodes of 30 Rock on Netflix, and then I finally called it a day.

The morning finally came when I fly back to Vancouver. I still can't believe that the interview was finally over. "Did I just go through that very tough interview and survived to live the tale?" I said to myself. "Yes I just did that didn't I?" I again told myself, with a small grin in my face. The weather was still the same that day. Lots of fog covered the airport and that proved to be fatal as my flight was delayed for 4 hours because of the fog. After some lengthy delay, I finally got to board the plane back to Vancouver and once I got home, I immediately hugged my wife and my baby boy.. and I said to them, "I did it! I survived!" :)

Update

Well, I guess the only question that was left was.. "Did I get the job?" ..and the answer to that was.. No :( Adam contacted me a week and a half later about how the interview went. He mentioned that I did exceedingly well with my coding, design, and test skills and that they are top notch. However, he struggled to explain why I did not get the offer as he too was stumped by the decision but he mentioned that it ultimately boiled down to me not being able to demonstrate enough passion about the things that I did in the past. He also mentioned that he wanted to continue working with me in finding the right team as he believed that I have what it takes to work at Microsoft and that this time was probably just a case of wrong chemistry. I was happy that it was not my technical skills that got me but I was also equally disappointed of having to fall short of a job offer at Microsoft as I felt that it went really well and that I have established a really good connection with the team that I was interviewing with. I consider myself very passionate about technology and I am always excited about hard challenges and new opportunities but I was pretty disappointed that the hiring group did not see that in my answers. Maybe I probably need to work on my communication skills more - or as Adam said, maybe this is just the case of me interviewing with the wrong team. In any case, this is something that I would need to pay attention to in the future.

So there you have it! I feel that even though I did not get the job at Microsoft, I still consider myself lucky and blessed as I have learned a lot from this experience. Now, I can finally say that yes, Microsoft interviews are not that scary after all :)

Wednesday, January 23, 2013

My Microsoft SDET Interview Experience - Part 1

Introduction

Hi there! How are you? My name is Jim. I have been a Software Engineer for almost 7 years, mostly focusing on client-side mobile device development and writing test tools using C++. Today, I would like to share to you my wonderful experience of interviewing with Microsoft. I know that there are already tons of wonderful blogs out there detailing about how their interview experience with Microsoft went. However, I still want to share to you my experience as a way of giving back to the community. These blogs that I have read definitely helped me prepare for the difficult interview ahead (and to a greater extent, to not look stupid and embarrass myself in front of these smart people!) and so I would like to do the same and help others the way other people have helped me. 

Prior to this interview, I would rate myself as mediocre in terms of data structures, algorithms, and whiteboard coding as I almost never had to do or use most of these at work (no thanks to Google and auto complete for spoiling me). In fact, I can still remember freezing in front of a whiteboard, often sweating my armpits out, and finding myself doodling and rambling nonsensically in front of the interviewers when asked to code or design something on the whiteboard during past interviews that I've had (oh the shame!). However, if there is something that I am very proud of, it's that I am an extremely hard worker, I am very passionate about the things that I like to do the most, and I don't give up easily even if the odds are stacked heavily against me. These skills have gotten me past extremely difficult situations throughout my career and so I am hoping that these same traits of mine will also be the difference maker between me going home early and me acing the Microsoft job interview. So having said all of these, I would like to share with you the preparations that I did and how I trained myself from potentially having an extremely disastrous interviews with Microsoft into something that I can say was a very decent, exciting, and fun interviewing experience!


How it all started?

Well, my Microsoft adventure started last year, just 3 weeks before Christmas. I got a message from Kim - a recruiter from Microsoft - via my LinkedIn page and she was asking if I was interested in exploring potential opportunities with Microsoft in Redmond, WA as an SDET for the Windows team. After reading her message, my immediate reaction  was.."Windows.. WINDOWS!! Holy Cow!". I felt very excited.. and nervous at the same time. I mean we are talking about "The" Windows here - Microsoft's biggest and most widely used product!

During that time, I was also slowly starting to look for a new job as I was about to get laid off since our office here at Burnaby was closing down. Now I am very much familiar with how notoriously difficult interviews are in Microsoft that it even has its own Wikipedia page! Plus, I was a little bit reluctant in relocating my family to Washington since I have already grown to love living here in Vancouver. Moreover, I suck at data structures, algorithms, puzzles, and whiteboard coding and my initial thought was that I am only going to be eaten alive by these interviewers. Nevertheless, I told myself that I should give this one a shot - "I have nothing to loose and everything to gain!".. I told myself. "It's Windows that we're talking about here".. I also told myself. Also, my thinking during that time was that this interview will prepare me for the big job hunt ahead of me - and so I kept telling myself "If I can prepare myself well for an interview with Microsoft, then I would be ready for anything!". And besides, even if I don't succeed, I will get a 3-day "vacation" out of it.. That's right, when you have a baby, this counts as a vacation - albeit a stressful one :) And so after a day or two of pep-talking myself, I finally decided to say yes to Kim.


The HR Phone Screen

After sending my affirmative response to Kim's inquiry, she responded immediately and tried to schedule an HR phone screen with me. As it was nearing the holiday season, the scheduling proved to be challenging as I kept missing her calls and the time that I kept proposing to her would not always work with her schedule. Finally, we settled for a time that worked for the both of us. She rang my phone at exactly 11 AM and our conversation began. I was excited as this was my first time interviewing with Microsoft. She asked me a couple of questions about my work experience and if I had experience in using C++, C#, COM, Web Services, and Testing User Interfaces. I answered promptly that I did not have any experience with C#, Web Services, and COM  but that I was good with C++ and I have a lot of experience in writing automated tests. She also asked if I was willing to relocate to Washington if an offer was made and I said that it was an option that I am willing to look into if the offer is right. After that, she explained what the role was all about. She also emphasized clearly that this role requires a very strong programming experience because in Microsoft, SDETs are treated as first class citizens and that they are also 100% developers, just like their SDE counterparts.

After a few more minutes, we concluded our conversation. She asked me to forward my resume to her as well as to apply for the SDET 2 position on the Microsoft Careers page. She also forwarded me a word document containing some initial screening questions that I needed to answer. She clearly stated that this document will be given to the hiring manager so I should carefully think about what I put in there. I said "Yes, I will try my best to make this look good". She seemed satisfied with our conversation and so we said our goodbyes after talking for around 30 minutes.

After our talk, I immediately forwarded my resume to her and applied for the SDET 2 job at the Microsoft Careers page. A few hours later, I received the word document that Kim promised she would send to me. It mostly contained legal and HR questions like "Why do you want to work for Microsoft", "What are your current compensation and benefits?", and the likes of that. I tried my best to fill up the form and then I forwarded it to Kim as soon as I can.

A few minutes later, I got back a call from her saying that the Hiring Manager already wants to speak to me after seeing my resume. I was ecstatic and surprised at the same time! Something in my resume must have caught his attention. Kim congratulated me in securing a Tech Phone Screen. She mentioned that she will be scheduling a 1 hour interview right away and that I should be patient as it is the holiday season so I should be expecting a little bit of friction with regards to arranging a proper schedule. I said okay and then we concluded our short talk.


The Dilemma

After some initial hiccups with the scheduling, Kim was able to setup me up with a Tech Phone screen interview with Rajeev, a Sr. Test Lead at Microsoft. After receiving the name of my interviewer, I did what a "normal" and "curious" interviewee would do - I Googled (or cyber-stalked :)) Rajeev. What I saw impressed me. This guy had done lots of very cool stuff in just a short amount of time. "Damn.. I have to start preparing.. as in right now!" ..was what I said to myself after realizing the predicament that I have just put myself into. Without thinking much about it, my initial, knee-jerk reaction was to cramp as much CS stuff into my brain as I humanly can.. and do that within 4 days! Later, I would find out the hard way that this was not the best approach at all - but more on that later. And so I went through as many elementary data structures as I can possibly fit into my small brain - Array, Stack, Queue, Binary Tree, Graph, Trie, and Linked List. I also went through well-known algorithms that I can understand like sorting algorithms (Merge and Bubble), tree traversal mechanisms (Pre, Post, and In-Order) as well as how to do BFS and DFS. I also visited sites like Career Cup and Glass Door to do some research what kind of questions Microsoft interviewers normally ask during Tech Phone Screens. I also rigorously restrained myself into coding in a notebook in order to prepare for those dreaded whiteboard (or online notepad) coding questions that these interviewers normally ask their interviewees to do.

Naturally, I burned myself just 2 days into my preparation for the Tech Screen. I was so overwhelmed with the amount of information that I had to go through within that short amount of time. Moreover, the interview questions that most interviewees received from their interviewers - as documented in Career Cup and Glass Door - scared the living hell out of me. At that time, I would not know how the hell would I deal with answering questions like finding if a tree is a subtree of another tree, those problems involving maximum sum of contiguous numbers in an array, and many other questions that I have never seen in my entire life. In my mind at that time, all I can think of was how the hell can I come up with an "elegant" solution in front of an interviewer under time pressure and of course, if faced with a problem that I have never encountered before. I did not have the answer to that question at that moment and so I proceeded with my naive approach of "brute-forcing" and even memorizing my way through all of the questions that I can humanly process.


The Tech Phone Screen

And so after 4 days of rigorous preparation, the day when I have to do a Tech Phone Screen with Rajeev has finally arrived. "Was I ready?", "Did I do enough to prepare for this interview?", "Am I just going to embarrass myself in front of this really smart guy?" Those were the questions that went circling around my head as I awaited for Rajeev's call. And so 15 minutes before the interview, I went to an empty meeting room in our office and locked the door. I had my programming practice notebook placed in front of me with a black pen for writing down notes and there, I took deep breaths in order to relax myself. Exactly around 2:00 PM, my phone start ringing - and it was from Washington. "This is it", I told myself. I answered the phone and it was Rajeev, the Sr. Test Lead from Microsoft.

Just a few minutes after we started talking, my nerves calmed down a bit. "Wow, this guy is very polite" - I thought to myself. I've always hated phone interviews because I've always had a hard time understanding what the other guy is saying at the other end of the line - especially when the line is very choppy. Moreover, I don't see their facial reactions and so it is hard to tell whether they liked my answers or not. Nevertheless, Rajeev was very accommodating with my relentless requests to repeat his question most of the time.

What went on with the phone conversation was a discussion about my experience at Nokia, one project after another. He was particularly interested in my background as a test engineer and how I developed automated tests for the products that I was involved in. He asked me about how I approached UI testing as well as how do I ensure that the test code that I wrote will not break as much if heavy changes in the UI were made. Rajeev also drilled down into my approach on how do I ensure that a code, module, and a system can be made testable and of course, how do I work with the developers in making sure that the code and the ultimately, the product that they develop is testable. For most of the answers that I had given to him, he would simply say, "I see..".

Around the 30 minute mark and after some more questions, he seemed to be satisfied with all the answers that I have given to him. At this point, I was still waiting for the dreaded coding or perhaps a notoriously ambiguous puzzle question but then, he said that was all that he had for this interview. "What's this?" I silently asked in my mind - "Was I not worthy of at least a string reversal question?" "Did I screw this interview up? It had only been 30 minutes - this was supposed to be 1 hour.." I thought to myself. He asked me if I had further questions about him or about the organization - to which I responded "So how do you test something as big as Windows?". Rajeev chuckled a bit and he said that 1 hour was not enough to answer this so he gave me a brief answer that revolved mostly with the proper collaboration of People, Processes, and Tools.

That was all the question that I had during that time and so we said our Thank Yous' and Goodbyes' after 40 minutes of talking. After the call, I was a little bit uncertain about the result of the interview given the expectations that I had set for myself for the Tech Screen and so I sent a mail to Kim immediately noting that the interview was finished and that I thought it was shorter than I expected. A few hours later, she replied back saying that the interview went really well according to Rajeev but since the hiring manager is already away for the holiday season, they will be figuring out the next step once he comes back next year. I was so happy to hear that and after the call, I did my celebratory jump and a fist pump :) Sure, there were still a lot of things that I needed to figure out for the next round of interviews but right now, I felt that I needed to do a little celebration for the small victory that I had just achieved and so I aptly rewarded myself by watching "The Hobbit".. in 3D at the theater close to where I live :)


The Calm Before The Storm

I had just lost my job at Nokia due to layoffs during this time and so I decided to relax a little to recover from that experience and focus more on my family and our new born baby boy. Besides, the holiday season was coming fast and some relatives are coming to visit our 4 month old baby - what can be better than that!

During this time, I was definitely glad that I took a break out of this interviewing mode. I shifted all of my focus into my family and there, we had a very enjoyable Christmas and New Year. I had completely forgotten about the dreaded Microsoft interview during this time and I'm glad because I had a stress-free holiday with my family and loved ones :)

I was hoping that this relaxation mode would last for a few more weeks more but I was in for a reality slap. A week after January, Chelsea, from Microsoft staffing, sent me an email telling me that they want to fly me over to Bellevue, Washington (aka the Mothership) for their infamous back to back to back (and if you are lucky, to back to back) interviews with the hiring group. As it turns out, the more they like you, the more interviews you'll get! I've also read that some even got as many as 7! As excited as I was at that point, I knew what this message really meant to me - that I needed to face my algorithm, data structure, and coding problems again and this time, I'd better make sure that I do it right. After reading this email, I immediately knew that I had to snap out of my holiday slump as soon as possible and get into shape as soon as I can as this will be a very hard battle that I need to prepare.. the hard way. 

And so with a strong sense of urgency, I started to gather myself up to prepare for battle. I provided Chelsea and her staffing team with all of the documents that they needed in order to setup my travel to Bellevue. They needed a copy of my passport as well as copies of my transcript of records. They also asked me to digitally sign an NDA form in order to prevent me from leaking out sensitive information that the hiring committee will potentially be disclosing with me during my interviews with them. After I have done all the required paper works, they finally confirmed my interview date and issued me an e-ticket for my flight between YVR -> SEA. They also booked me a hotel room for 2 nights at Courtyard Marriot in Bellevue. I had 6 days to prepare for the next round which is not that long considering the amount of things that I still needed to go through. And so, I had to come up with a "battle plan" and dig deeper into myself in order to find out a way on how the hell can I survive Microsoft's notoriously hard interview.


Dilemma No More

Before I went out for the holiday, I had this big problem of how to solve programming problems on the whiteboard that I have never seen before without having to overload my brain into memorizing all possible questions and solutions scattered all across the internet. Well, I started out Day 1 doing exactly just that again (toink!). I can still remember that after that day was over, I almost did not want to go to the interview anymore. I told my wife that I would just be making a fool of myself and that I would just be wasting my interviewer's time by coming in unprepared. She tried to talk me out of it and well, I said that okay, I will try again tomorrow.

And so the morning after that, I started to think about the adjustments that I needed to make because I know now (I had to learn the the hard way) that overloading my brain with all the CS stuff that that I can search on the web was not the right way to go. Also, I noticed that after I finished my preparation for my first round of the interview, I would always feel tired during the evenings which led me to getting burned out a lot quicker. Clearly, something had to be done to fix that as well. This required a lot of thinking and soul searching and finally, at the end of the Day 2, I had discovered what I had to do. I'm pretty sure these things have been said before by a lot by the people across the blogsphere but they really are just sentences made out of words until you realize what the problem really is and then all of a sudden, you get a deeper understanding of what that those sentences really mean to you. 

Suddenly, everything was bright again. No longer did I feel that I am incapable of surviving Microsoft's second round of interview. I now feel more confident about my skills, knowing that I have a good battle plan that I can rely on. I just need to practice it to perfection!  Simply put, my "battle plan" was simple:

1. Understand the problem. Don't start writing any code until you know what you have to do. Write a step-by-step outline of what you need to do if you were to solve the problem by hand and write some use cases to validate it. This is very important and I cannot stress this enough. This will probably spell the difference between being able to figure out the solution to a problem that you have never seen before problem and just going in circles while you write your code on the whiteboard.

2. Stick to the fundamentals and make absolutely sure you know them from the inside and out. I focused mainly on Array, Linked List, Queue, Stack, and Binary Tree. Know how to implement them by hand and then repeat again in order to have a good grasp of how they work.

3. Practice coding on the paper. This is the only way that you'll be able to write a good code on the whiteboard. The good thing is that you don't have to memorize the entire STL library too. You just need to learn the fundamentals and learn them good (e.g. Pointers, References, Arrays, Passing Arrays to function, etc.). If you need a hashmap that uses int to to store the key and the value, just say to your interviewer that you have a hashmap that looks like this: HashMap - no need to fuzz over the exact syntax as it is defined in the STL specification.

4. Examplify. In order to gain an understanding of how to solve a problem that you have never seen before, use simple examples. Eventually, once you have worked out a couple of these simple examples against the problem that you are trying to solve, a pattern will eventually emerge and you'll be able to work from there and do Step #1.

5. When you write your solution, prioritize a working solution over an optimized solution. Most of the time, optimized solutions require much more thought and the path to it is usually not that straightforward. A working solution is easier to derive given the amount of time that you have to code and it is a lot easier to discover how to create an optimal solution if you know what causes a non-optimal scenario in the first place and you usually discover this when you prioritize writing a working solution first. As with the real world, it does not need to be perfect at the beginning.

6. Practice makes perfect. It is through practice that you gain confidence to solve more difficult problems. Don't try the same mistake that I did by memorizing solutions to problems - it will do you no good. Instead, try to work out simple problems first. Do not look at the solution until you have solved the problem yourself. It is by going through this pain that you get to grow and understand how to properly solve problems. Eventually, your intuition will just kick in and you'll be able to recognize patterns that will help you solve harder problems.

7. Exercise. I know, who has time for this right? Well doing all of these things not only require mental toughness but also physical toughness! If you are going to do these all day, you'd better have a strong body to support it as well! I find exercising extremely helpful in releasing stress especially when you are at a point where you are completely stuck at a problem. Also, it gives you a break from all of the things that you have been doing so that you can come back to it with a fresh mind.

8. Family. If you are at a complete breaking point or at your absolute low, don't give up. Remember that no matter what, your family is there to support you. In fact, they are probably the only ones who will root for you regardless of how hopeless the scenario is. So remember to draw strength from them too.

So there you go. These are what made me realize that "Hey, perhaps I really do have a chance at passing Microsoft's interview after all!". Of course, this literally took days of hard work - I would take care of the baby in the morning and then in the afternoon until evening, I will run over my coding exercises in my notebook. After that, I made sure that I would go to the gym to de-stress myself and maybe spend some time in the sauna to reflect about the things that I have learned. And then after that, I'd do more coding usually until midnight or until I am satisfied with my progress. 

Well this has been a very long post. If you have made it this far, I thank you for reading it :) I will probably write another post detailing my Second Round of interviews at Microsoft so as not to make this post any more longer than it needs to :) But until then, good luck and I hope that this post will help you as it had helped me.

Click this link to see Part 2 of my SDET Interview Experience with Microsoft

Monday, September 6, 2010

X1 Complete! Level 1 is now playable!


It was not easy.. but nobody said that it will be!

After an extremely grueling month and loosing a bunch more hours of sleep and exercise, we finally finished X1 on time! Level 1 is now playable! Hurray! Here's how our release chart looked like.


We were pretty much on schedule in our sprints but the effort that we had to put to keep up with the schedule was significant! And again, it was not easy - but we did it :)

So what's next? Now, we have to move on to complete our X2 milestone. This means completing 5 more levels, 10 more enemies, 4 more primary weapons, and 2 more sub weapons! And to make matters worse, all of these have to be finished by the end of November! That's right, feature complete by the end of November. This will require an extraordinary effort from the team but I am very positive that this is possible. Here's a video of how our game looks like. I hope you enjoy the fruit of our labor :)


Cheers,
Jim


Tuesday, August 17, 2010

Level 1 Boss Fight!

Well, August has been very long, hot, and busy but I finally managed to finish the boss fight for Level 1! Here are some of the screenshots that I've managed to take (gotta learn how to capture videos really soon!):



Level 1 is almost done - all it needs are just a bit of polishing and of course, the other big thing in my list - Collidable Terrains!

Cheers,
Jim

Monday, August 9, 2010

Early Screenshots! (Yeah, no video yet)

Well, I did promise to produce a video - but unfortunately, the video capture tool was giving me a lot of problems - and so, I've decided to upload some screenshots instead. I know these doesn't give a lot of justice in showing how awesome our game has become but something is better than nothing right? :) So here it is, a couple (well, just two) of screenshots from our Doodle Space Wings!




Cheers,
Jim