replica watches
https://luxurywatch.io

replica watches uk

www.bestwatchreplica.co

http://www.rolex-replica.me/
discount replica watch

Technical

Of all the blockers of dynamism, I have known comfort zone to be the deadliest. For it gives us a false hope that the place and position we are in, is perfect. A poison for growth mindset I would say.
Once we stay somewhere for 5+ years, it becomes a home for us. Home is hard to leave. For it renders us with a feeling of fulfillment.

Being a creature of habit, my behavior lately exhibits every sign of a person in comfort zone. I have never been quite fond of change. I am staying in the same flat for the last five years, driving the same car to work through the same route. Every person at the restaurant I visit knows my taste buds and all I have to say is, “The same cuisine I order always, please”. Microsoft has been my home for close to six years now.

This has greatly distanced me from the real world. Silent contemplation in lonely nights on these aspects renders me anxious. The Tech world is changing and so are the requirements. Not having slightest of clue on how the water tastes outside and where I stand, I said yes when an opportunity knocked my door tenth time since my college days.

When it all started?

It was a lazy friday noon. Winds blew hot, burning skin of people it touched. Sitting idle, my eyes alighted on a mail from a recruiter at the company. As usual, I responded that I was content with my work and things were going well for me. She asked me to just have a phone conversation and if things looked fascinating, we could move forward.
I said, “Yes”. After all, what harm could one phone call have done. Must I say, she was very convincing.

1 Informational (35 minutes) + 1 Screening (20 minutes) + 2 Skype (45 minutes each) + 5 F2F onsite rounds

Informational

This was supposed to be just a phone call until it became really interesting. Things like fantastic opportunities, work culture, smart engineers and location preferences were presented. In exchange, I talked about the work I have been doing at Microsoft.

Screening

Being no different from screening rounds of other companies, the focus was mainly to judge if my skills are worth time of their great engineers. Call it a first level of check.
Basic questions to test Algorithmic + Coding + Mathematical skills — Quick sort, Merge sort, Hashing, Powers of 2, Tree traversals etc.
I got a call next day that they can move to the interview process.

Video call – Round #1

The first DP problem on the face gave me sweats I find myself unable to pen in words even today. A simple problem, anyone with decent practice could have solved in 5 minutes.

Count number of ways to divide an array of n balls in k non-empty subsets.

After few failed attempts, I came up with a working recurrence relation:
Number of ways would be:
Put (k – 1) balls in n sunsets and remaining one in any of n sunsets +
Put (k – 1) balls in (n – 1) subsets and remaining one in the empty subset
f(n, k) = f(n, k – 1) * kC1 + f(n – 1, k – 1)

I didn’t do very well in this round as my first few formulae didn’t work and I took few hints to come up with the right solution. However, I was able to write the working code very fast, which turned to my advantage.
The feedback was shared in 2 hours that I exhibited good potential. My coding was fast. But I needed to practice more. Since it was an onsite opportunity, they asked for another round.

Video call – Round #2

A fairly simple problem to find a missing character in two words. They kept on tweaking the problem, adding more constraints and complexity along the way.
I wrote code for three approaches.

Onsite (Finally), phew…

Emirates

I wasn’t quite sure if I would be able to make to onsite. I was disappointed of my performance and I needed a break to get over frustration. A visit to hometown seemed to be the most logical decision, which I later regretted after wasting thousands of bucks on flight tickets.
One lazy Friday evening in office, when I was doing some code review, my recruiter informed me over call that they can move ahead with the onsite process. I was wildly surprised. She mentioned that she didn’t want me to spend the weekend in worry and hence, shared the happy news as soon as she could.

They booked my flight and hotel tickets. We talked for several days about my travel arrangements, preparation and any queries I had in mind.

The D day

Time flies. The D day arrived sooner than I had anticipated. I landed in the evening, checked in to the hotel, had a lavish dinner and slept like a baby to prep myself for the next big day.

Round #1

In order to avoid last minute rush, especially in a place I had never been before, I arrived an hour early. The lobby was decor’ed with statues of slim geeks in skinny jeans holding mobile phones in their hands, emphasizing the direction the current generation is going and the core focus of the company. Beside me was a digital display with an array of tiles which flipped every couple of seconds showcasing that the company cares about Diversity and Inclusion.
There wasn’t a slightest of fear on what’s gonna happen next. Instead my mind was puzzled with how the tiles were working. Ah! So they have multiple threads delivering the content to the tiles sitting in UI. The threads may never be sitting idle as the text appearing the those tiles as keyboard inputs. Or may be this is an illusion of parallelism as the context switch is so fast.

A guy in his early 30s, wearing a broad smile and a pony hanging on his back broke my reverie.
“Are you Aashish?”, his voice was as fresh as morning dew.
Having done some research about him on LinkedIn, “Yes”, I knew who I was talking to.
“Hi! I am sorry I’m late by 30 seconds. I took a wrong turn. Hope you didn’t have to wait long.”, he smiled, “Let us walk to the interview room, shall we?”. There was a passion in his tone of voice. A passion that I have seen in very few people I have interacted with in my life so far.

We walked in a small meeting room. A white board was walled on the left, a table for 4 positioned in the center and a laptop connected to a projector on the right.
We spent the first few minutes knowing about his background, his work and his team.
“You’ve been given two words A and B. How many minimum concatenations of word A is needed to form subsequence B?”, he explained the problem with one example.
Despite solving few problems on subsequences in the past, I had never heard of this pattern of problem before. It wasn’t a surprise. The company was wildly famous for asking new problems. And if not, they would tweak it to the extent it becomes new.

I started with asking questions to understand the scope of the problem.
“Will the words contain only ASCII characters How long can be the words? Can they fit in one machine? What do we return if no concatenation can make a desired subsequence? etc”
The first approach that popped up my mind was to put all characters of word A in a set and check if it contains every character from word B. Once it’s certain that a solution exists, I played with two pointers pointing to words A and B and wrapping around pointer to word A to the beginning when we fall short of characters. The minimum concatenation is the count of wrapping done.
The time complexity of this solution is O(lenA x lenB).

While the above approach worked fine, the time complexity wasn’t great. I proposed another solution to create a map of characters to their indices (unordered_map<char, list<int>>) in word A. Now instead of linearly looking for a character from word B in A, a binary search in the map would reduce the time complexity to logA. One key point to take care was to make sure we are picking the next index from where we left of and increment the count of minimum concatenation at right time. upper_bound method worked like a charm. The time complexity reduced to O(log(lenA) x lenB).

“Sounds great. Do you want to code it?”, he seemed fine with the approach.
The code was pretty straight forward to write. He took a look at the implementation, went through various corner cases and finally said, “Great, we have 5 more minutes. If you have any question about the company, the team or anything else, fire at me.”
The company being a leader in Scalability, I was curious to know how they dealt with various challenges they faced and learning from it. Work-life balance, company culture, healthy environment, quality of work were other topics we discussed. He wished me good luck for the next round and left.

Round #2

Ralf isn’t a Computer Scientist. But his quote holds true for every aspect of engineering I know of. The beauty of the world lies in design. But we are not here to talk about how Lamborghini design is better than its rivals or why Tesla is winning over the world. Well, not today.

System Design has been a hype for quite long and for all the right reasons. It’s the core of every business & technical strategy and the success behind every company.

I only got time to gulp some water before a guy with notebook in his hand walked in. Bald, mature & experienced look, he seemed like the kind of person people would want to go for seeking expert opinions.
“So how did your first round go?”, he broke the ice.
“It was great”, I said cheerfully.
“Well, that’s rare here. I usually hear responses like, it was okay or I don’t know.”, he said, “Hope it went as good as you said”, he further added.
“Are you aware of what a System Design is.”, he asked, “Have you ever used FaceBook or Yelp checkin system? I want you to design that.”, he continued without waiting for my answer. Guess it was a rhetorical question.
“Before we start, let me tell you that I would most probably not ask you to write any code. So feel free to fire all complex and advanced data Structures that pop in your mind. “

As all design discussions start, I began with understanding the scope of the system. Users would tap on the Add location and it would show the list of 10 nearest location to choose from. The check in status would then be saved on the server. Delivering the status to user’s friends was out of scope. It’s good to have high availability and low latency for good user experience in a system like this. Availability can have an edge over Consistency. If a user doesn’t see a newly added location for sometime, it should be okay.
He wanted me to come up with numbers. It was important, especially when you design something of FB scale. How many people, how many daily active users, how many locations, the size of database, number of machines, network bandwidth etc.
So, there are 2.2 billion users. Let’s say we have 70% (1.5 billion) DAU and 30% of them checkin at least once a day. There can be hot users as well. Let’s worry about them later.
The locations can be anything from coffee shops to hospitals to parks to big shopping complexes. All locations can be stored in a database.
“How many locations do you think there can be?”, he chimed in.
Umm, there are around ‘X’ places in the world and each place can have an average of ‘Y’ locations…
“Don’t you think that it would make more sense to calculate the number of locations based on the world population rather than geographical area?”
Ah, yes! The world population is 7 billion and there can be one location on an average per hundred people. We agreed upon 700 millions locations.
“Which type of database will you use to store the locations? How many machines do you need?”
I calculated the size of data to deal with and explained sharding can be done over LocationId in NoSQL. Calculation of network bandwidth with that data and machine config I was given (128 Gig, Octa core) gave an idea on the number of machines needed. Performance numbers talked by Jeff Dean was of great help.
When the user taps on the search location, latitude and longitude will be send to the server…
“Okay! How would you fetch the 10 nearest locations of a user?”
Well, locations can be added to a Graph in memory and…
“What if there is no node in Graph corresponding to user location? What if a user is standing in the middle of a street?”
Umm… The whole structure can be seen as a 2D plane with four quadrants. Locations can be read from DB and organized in memory in Quad tree. Nodes at each level would be connected through a Linked List. Looking for nearest location would boil down to Quad-nary search based on user location where we discard three children at each level as we narrow down the search. If a node doesn’t have enough locations, we would check its siblings/cousins, maintain a max heap of size 10 and return the result.
“Can you improve it further?”
I think we can use K Dimensional tree as well. Unlike Quad tree, we don’t need to fork exactly in the middle.
“So how does the whole flow look like?”
I drew a high level design on the white board where the user location is sent from client to an Application server. The App server then passes the location to a NearestLocationFinder engine. Result is passed back to user. User checks in. The checkin data is sent to another Application server. Since the checkin data can contain huge bits like images and videos, the App server would put the checkin data in a Message Queue. We would spin off few workers to pick entries from Message Queue and write to a Database. We would need two Load Balancers. One for each Application server.

We further discussed on dealing with SPOF (Single Point of Failure) through replica, pros & cons of Master – Master and Master – Slave models. A caching mechanism in place (something like Memcached) for low latency to display user checkin history.

Forty minutes just flew. As usual, the interview ended up with me asking few questions around Scalability.
Having realized many things that can go wrong in a design of humongous scale, “How often do you calculate these numbers? Are they very accurate?”, I asked in wonder.
“We do work with numbers. But they aren’t always correct. It takes a lot of experience”, he replied, “Good luck with your next interview”, and he left.

Round #3

The interviews so far had been a breeze. Discussing interesting problems is always fascinating and mind boggling.
In no time, the third interviewer walked in, introduced himself, the team he was working on and other cool stuffs.
A simple problem on expression evaluation, except it had a twist on how Compilers work. State Automata quickly struck my mind like a bolt of lightning. I drew few states to parse and switch between the states based on input. He mostly emphasized on why I used Data Structure ‘X’ over ‘Y’. Coding was simple and I had to use map and Stack. That’s the beauty of state machine. Once there is a working diagram, coding doesn’t take much efforts.

“Let’s try to break the code”, he smiled while going through the code.
I looked for every possible corner case that crossed my mind and each one of them seemed to be covered.
“What if one of the numbers is 0?”, he looked at me.
“Damn!”
In the heat of discussing big things, I missed to handle critical divide by zero error. Albeit I fixed it quickly, I think the harm was done.

Lunch break

A person with no expression on his face was waiting outside to take me to lunch. He looked very well acquainted with the environment and the work place, probably because of spending many years there. We quickly rushed to the cafeteria. An array of delicious cuisines, varying from Indian to Italian to Mediterranean to every other I could think of, accompanied with drinks and deserts. I wish it weren’t an interview day and I were there with an empty belly & mind void of any thought.
While taking a stroll in the beautiful campus post lunch, we crossed meditation room, music hall decor’ed with Grand Piano & other instruments, very strange shaped offices fostering creativity. Filled with awe, we entered a room that looked like forest. Trees peeking from the left, tiny waterfall gliding softly in the corner, birds chirping over the branches. In the center was lying a young girl doing something on her laptop. I was amazed and blown away.

Round #4

A glimpse of the amazing campus pushed me to give my best. I met another cool guy who asked a problem on finding nearest favorite city of a user.
“I am not, in particular, looking for a solution. I am looking for ideas”, he added.

I asked few questions to understand the scale at play — How many cities can there be? Can we fit all of them in one machine?
I threw some Algorithm (which I don’t remember) in the beginning. While I was explaining on the board, a variation of Dijkshtra’s popped up my mind which seemed to work well. He was fine with it. I also added some preprocessing to optimize the Algorithm as the cities don’t change very frequently. Writing code took another 5 minutes.
“How often would you preprocess the data?”,he asked.
In the times when there is less load on the server, like once every 24 hours.
“Don’t you think it will hamper accuracy?”.
Yes, it’ll. But not very far. It will help users get data in reasonable time window. User experience matters. The error in system exists even today. Maps wasn’t able to detect the new U turn for weeks.

I was happy and content until he added the twist.
“How would you improve it?”, he smiled.
This was the most optimal solution that crossed my mind there. Luckily while skimming through my FB newsfeed few months back, I watched a video on comparison of Djikshtra’s and heuristics based A* Algorithm.
“We can use some heuristics to scope the search instead of going haywire. I remember reading about A* Algorithm in my graduation days.”, I felt relaxed.
I could see him smiling. It looked like this was what he was looking for.
So if the direction of favorite city of the user lies South, we can bail out the Algo and not explore the North. There can be a possibility that we have a rocky road in the direction we are looking and there is a faster way if we take the opposite direction and use a newly constructed flyover.
“This is a good practical solution. Not everytime we want the perfect accurate result. There is a careful balance between accuracy and latency”, he smiled.
We discussed few other practical approaches, few things on and collection of data and ML.

The best interview of the day, I could feel it from the conversation with him. He was widely impressed.
“So tell me about the things you do at Microsoft. I went through your resume and it was pretty impressive”, he said.
“Microsoft is a great company. Smart people, awesome culture. To be honest, I don’t find anything bad there. If I had, I won’t have stayed 5 years there”, I responded. We discussed some of the work I was doing without violating any NDA.

Round #5 — The final battle

There is a saying, “All is well that ends well”.
No matter what I do, I can’t seem to annihilate those 45 minutes of my life. Rooted deep inside the neurons of my brain, it hurts even today and makes me wonder how I could have done it any better.

DP has always been my nightmare. No matter how many problems I solve, a new one still surprises me.
I was greeted by an Indian guy in the last round. Unlike other interviewers, he, without any talk, rushed to a problem which had some made up story on Cargo, men and packages.
I recognized it in an instant. It was a complex version of famous Painter Partition problem. A fairly difficult problem for people who haven’t practiced DP well. I gave a brute force exponential solution and explained on the white board followed by for-for-for DP solution. I, then with some example, pictured on the board how the table would be filled. He seemed fine with the approach and asked to code.
That’s where things went south. A recursive solution was easier and straight forward. I could have just written the brute force solution I had explained in the beginning and stored the result in a table to optimize. It was a win-win situation. But No! I had to cripple myself to death.

Beaming with confidence, I started writing for-for-for iterative solution and explaining what each line of code was supposed to do along the way. I made critical off-by-one error and another error in calculation where a column was being added the way I didn’t want to. I also felt irritated that even after explaining Algo twice — Once on the white board, later while writing code, he was wasting time in asking things I had already explained. This didn’t happen in any other round and I would never expect it from someone working at a company of that stature.
I, however was able to correct one of the errors and was close to fixing second when he asked me to write the recursion solution. Something I could have done in the first place without suffering any agony.
“Let bygones be bygones”, I sighed, took a deep breath and wrote the perfect working solution in single attempt, all within 3 minutes. I just needed another minute to store the result in a table. But the time was over. If only he had cooperated more, I had performed better.
And as I had guessed, he, without any talk, took me out of the building.

If I do an assessment of my performance, I did good in first, not sure about second, okay in third, great in fourth and not good in fifth. Interview process was a breeze and as smooth as butter. I was pretty impressed with how well organized everything was.

Please feel free to ask any question, except the name of the company 🙂

You may also like:

Copyright © 2019, Aashish Barnwal,  All rights reserved.

Read more

Prologue

Not long back, popularity of Yahoo Messenger was at its peak. Google mail was in diapers, to be subscribed only through invitation. A time when TheFaceBook was to see light of the day and WhatsApp was never heard.
Late in night, when I have nothing much to do, often I contemplate on the Tech advancement I have witnessed ever since I knew what software was. Please don’t take off your seat just yet, I am not gonna take you back to medieval age when computers sat only on the desks of rich people.

It was 2006 when I got my first PC. 256 MB DDR1 RAM, 20 GB HDD, single core processor. It’s fascinating to see users and how they use devices & services have come a long way. SaaS (Software as a Service) is on the top of mind. The world is going paperless and companies which are scared of moving to cloud may fray. With overwhelming 24 billions devices connected to internet today, the emphasis on Scalability has become more than it ever was. The amount of data we produce is enthralling and mind-boggling – that’s 2.5 quintillion bytes of data per day. 90% of all the data till date was generated over the last two years. It is everywhere – AI, Machine Learning, self driving cars, home automation system. It’s the future.

Data never sleeps

If we talk about numbers, we have 1.5 billion monthly WhatsApp users sending 65 billion messages and making 2 billion minutes of call every day, 73k Google searches & 78k Youtube video views per second, 175 billion Pinterest pins. Every 60 seconds on Facebook: 510,000 comments are posted, 293,000 statuses are updated, and 136,000 photos are uploaded. Imagine the storage and computational power sitting on the servers to process and store the humongous amount of data.
Compare it with what we had 10 years ago. With advancement in technology, IoT, cheaper network bandwidth and cloud storage, more people connecting to the internet, the data is bound to grow exponentially.

Growing data - Scalability
Data growth

Consumers, today, don’t care which Operating System they use, which device they hold in their hands and how much power those devices are packed with. They just want Software and services to work like a charm.

Every company, if they are to take the world with the storm (read Google Search, WhatsApp or MS Office) they are building, has to tackle two things eventually – Scalability and Cross Platform strategy.
I would scope this blog to Scalability and leave the latter for some other day.

So what’s Scalability?

You are the founder of a finance company, often dealing with clients (read it people). Clients come to you for your hassle free, time bounded services. They are happy because you promise them to get the work done in 3 working days. That’s how you make money.
For one year, you are pretty much happy. Happy clients, happy you. No big deal. More people hear about your services through word of mouth. And soon enough, you are flooded with clients from all over the world. You compromise sleeps and start working overtime. This works well for another five months before you realize that you can’t work alone. You hire more people, as beefy and efficient as you. Because businesses run on trust. You can’t just say that you don’t have time. People stop coming when you no longer provide what you promise.
Scalability is when you can serve the requests in the reasonable time window by hiring more resources. Bigger hard drives, more RAM, powerful processor (more cores). That’s vertical scaling. But there is a limit on how much resources you can add to a machine. Costs go up and there comes a point when buying a new machine is cheaper and more feasible. That’s horizontal scaling.

In the next part, I would touch upon Databases, Caching, Message Queue, Sharding and few other topics before delving into System Design problem space. Stay tuned!

Resources

Copyright © 2019, Aashish Barnwal,  All rights reserved.

Read more

Vampires, we’re. Bright screens are our sun. In broad daylight, we love to stare at the geeky characters under shiny roofs. Caffeine is our rescue, in times of exhaustion.

Before I begin with my journey at Microsoft, let me tell you that the views and opinions expressed are completely mine. Please bear with me, as I speak, for my style is pretty inconsistent. Drowned in the pool of experiences, I am reinventing myself while writing all this. This post is bit long even for me. After all, squeezing 5 years of experience is difficult to fit in one blog. Go and grab a cup of coffee. I will wait.

Where do I start? Sticking to one place is no joke and I don’t expect anyone to stay this long, unless they are really happy. My chase for money faded away long ago and work contentment, for me, has been the driving force ever since holding the utmost importance in this agile Tech world.

When you reach the stage where you can afford all the food you want, all the travel, the cars, and the entertainment, you want, what else is remaining? It becomes a never ending battle to reach to the top. A rat race, I would say. A wise man once said, “Save nothing but experiences”. If not, you would end up having all the materialistic pleasures, but your life would be wrapped up in emptiness. It would lack the sense of fulfillment you seek. While slogging away in the name of money, a day will come when you’re gonna ask yourself, “Was this all worth it?”

It doesn’t seem long back when I set foot in the Microsoft campus. But when I look back over the years I spent here, I oftentimes, get overwhelmed. Microsoft, as a company, what has always seemed to me, is a great place to work at, while leaving my imprints across the globe as billions of users get to use its products.

My fascination for Microsoft products goes back to as early as 2002. In those Windows 98 days, we used to have sixty minutes of computer class once a week with one PC being shared between a class of ten students. I used to wait passionately for just 5 minutes of my hands on the PC.

May 2009 – When it all started

Memories of the tough time and the difficult decision while joining Graduation college are as fresh as morning dew. 2008 recession had plagued the software industry and associated opportunities adversely. The sheer fear of decreasing market demand of software engineers had panicked young blood to not pursue engineering in Computer Science. Despite the risk involved in those times and an admission in not so famous university, my passion & optimistic mind entwined their wings and somehow worked together, and here I am, penning half decade of my experience at Microsoft, in astonishment and all flabbergasted.

July 15, 2013

Fresh blood joins. All the vampires rejoice.

5 years it’s been and it feels like it were only yesterday, when I wandered the corridors of the humongous campus for the first time. Days bled off into years. I have seen people come. I have seen people leave. Life moves on. Everyone is replaceable. The higher, one is at the management hierarchy, lesser is the tolerance for mistakes.

The time I joined Microsoft, peers around me were celebrating 5 years of completion and I had one naive question — “How come they never thought of a switch?”. Spending long time at one place is quite a thing, and more than the place, it tells a lot about the person — Happiness, Patience, and sometimes they just let life go with the flow. Well, for me, it never really occurred to me that there is a world outside Microsoft that also builds awesome products and has huge user base. Having worked on world class products like Microsoft Excel and its underlying complex architecture, I feel my existence in this universe is making a mark upon people changing their lives through technology.

In this short span of time, I got to work on 6 version-1 projects each having different complexity and its own problem space. The journey has culminated in a great experience, adding a check to my learning curve at every stage.

The world of flow-charts and diagrams – Office Visio

My career started as SDET in Visio team, a part of Microsoft Office division. It was embarrassing that I was going to work on something I never heard of. Visio is an enterprise software not so famous among students. It captures a huge market for clients looking forward to create flow charts and diagrams. In a nutshell, it is something that simplifies tens of millions of human life. As a test engineer, I designed test suites and wrote automation for various features to make sure the regressions are caught early and help stabilise the product.

January, 2014

K2 phase: It’s Android baby

When I had a feeling that I have learnt enough that would help fasten my deliverable, a reorg happened and devalued most of the things that I worked upon. As they say, only skills acquired through the process matters in the long run, skills to understand and solve a problem. New team and new manager, it was a tabula rasa. Satya’s vision to focus on mobile and services landed me in Android team. Familiar environment and some prior experience, starting was as smooth as butter. Nightmares begun when I was assigned a problem to apply effects on an image. The office codebase is huge, medieval and it’s an ocean if you don’t know where to start. I still remember those hard moments when I was just looking through the code to pick hints, searching keywords like pImage, IImage in the hope that at least the naming convention would lead me somewhere. It was one of the fastest paced project and I was (un)lucky to be a part of it. Learning was great and sleeps were compromised. My team owned low level Graphics rendering stuffs, everything that you see on screen.

20150710_014510

It was an exhilarating roller coaster ride as I had never worked on a project of that urgency before. K2 is the second most dangerous mountain to climb and so was this project. Satya’s leadership and his vision for the company was as clear as a bell. We didn’t want to box ourselves in the Windows world. This was a big leap from our past rusted thinking and it was the beginning of reinventing the company. In Satya’s words, we needed to Hit Refresh. Even if we lost the war in Mobile Operating System, Microsoft could make a mark by releasing products on other platforms. SaaS (Software as a Service) was on the top of mind and Microsoft wasn’t behind. But to truly unlock its potential, we needed to annihilate the platform barrier. The world was transitioning at steep pace and the way users used the computing devices was reshaping. Desktop PCs and laptops were no more in trend and to succeed as a company, users needed to feel connected wherever they go. What is the benefit of all those technologies when users can’t edit a document on mobile while going to office and resume on laptop? Delaying this project could have been catastrophic. Decisions are good as long as they are taken at right time.

The idea of Shared code had always fascinated me and I got a chance to see how it works. The biggest challenge of developing apps on Android was device fragmentation. Apps you build might work like a charm on one device, while it might be completely screwed up on others. This project literally boosted my confidence as I was really quick when it came to building something on Android. It was an honor to be recognized as Subject Matter Expert. When I got empty hours, I contributed to Android community on StackOverflow and earned many medals. As of now, I hold 12 gold, 48 silver and 89 bronze medals.

July, 2015

Apple, A costly affair

Satya’s vision for efficient engineering annihilated the concept of tester & developer and rendered everyone a Software Engineer. I moved to Graphics team for iOS where I made core design changes and wrote code to be shared across various apps cross platform. The biggest challenge was to think of design that could sail well across multiple platforms and apps. Making changes at such a lower level was risky, heart throbbing and required solid understanding. Tolerance for mistakes was minuscule and the impact was so huge that making even a small mistake had big ripple effects breaking many features across the apps. Some of the nasty bugs gave me nightmares. It becomes worse when you have to fix the bug overnight and when you do it, you get response on the top of your fix mentioning that your change would be impacting twenty millions customers. Even 1 millisecond of performance regression raised eyebrows asking critical questions related to the design and the solution. I have learnt that this is part of life and as long as the learning curve is steep, things would just work fine. It has taught me the skill to never give up. Perseverance and grit are great virtues to survive in this industry.

Before the release of K2, shared code was a myth. As much fantastic as it may sound when discussed, it was practically not possible given the platform differences, language barrier at different end points and the engineering cost involved to bring the complex humongous codebase together. With the release of WXP on Android, we proved it to be doable and sealed it after moving iOS codebase to the same shared codebase.

Having got familiarized with both Android and iOS, I must say that I would choose Android over iOS any time of the day both as a developer and a user. Apple’s developer tool XCode hangs and crashes every now and then and sucks. Things that can be achieved in a straight forward way in Android can be pain when it comes to iOS.

October, 2016

Recalc or Die – Excel

About 30 years ago in a place far, far away, when C++ was still in diapers, Microsoft Excel was born. We even shipped Excel on floppy. We didn’t have much of C++ that time. So we wrote our own wrappers.

Shared rendering was over and I moved to Excel iOS team where I worked on Excel rendering component. Excel is one of the most complex projects and there are dozens of layers of architecture. Few of the bugs literally drove me crazy. I remember frying neurons of my brain for days without a clue on where in the code the problem might be. Some bugs were in the Apple library itself.

March, 2017

Excel on Mac

Another year, another project. Some familiarity with how Excel works, at least a part of it, landed me into another Excel endpoint. This time, it was Mac. It was way more complex than iOS. The quality was super important, for most of the people with big names use Mac, all of them being paid customers. A simple screw up could motivate one of the journalists to write and given how powerful social media are these days, it could have gone viral in no time. We did get good detailed feedback from a NASA scientist which reemphasized the impact we had been making.

February, 2018

SharePoint

While working on Excel and rendering technologies was fascinating because of the huge mass reach, lack of opportunities to add much design and code in Excel troubled me. The Data Structures and design used were fascinating. But they were written in 90s. Another good thing was that I never had to explain Excel to anyone. I remember meeting a college friend in Seattle who was widely surprised when I mentioned that we are fixing bugs in Excel. She always thought Excel to be super stable.

My restless mind, always looking forward to swim out of comfort zone to try and learn new things, found its medicine when a new SharePoint team in IDC was formed. I never realised the sheer potential of SharePoint until I started working on it. New technologies & tools, two decades old product, unknown territory, ownership of core components and never ending challenges, I couldn’t have asked for more.

As I reminisce my time here, I worked with 6 managers in 6 different projects. Lots of learning, challenges, obsession to achieve the best and never ending work. The journey has been no less than a roller coaster. I have sailed unfamiliar ships to unknown territories. I wrote and debugged code in more than ten languages (C, C++, Java, C#, Objecttive C/C++, Javascript, Typescript, Python etc).

Normal days at Microsoft

If you wonder how normal days as a Software Engineer at Microsoft look like, well it can be summarized something like:

  • You get a feature and are asked to come up with a design and various approaches to develop this.
  • You discuss various pros and cons and why one approach should be preferred over others.
  • You write code to develop the functionality. If the code is not shared, Bingo! your life just got easier. If it is shared across apps and platforms , you have to make sure it doesn’t regress anything. There are tons of test cases your code must pass.
  • If you get a bug due to your code and it is hi-pri, a hot mail thread starts overnight stating it impacted ‘X’ millions of customers.
  • If you get a bug not related to your code, well happy debugging. There are tens of millions of lines of code and you don’t have slightest of clue in what layer of architecture, the issue might be. I remember debugging a bug for 8 continuous days and at the end, I found that it was a race condition issue. The bug reproduced every once in 30-40 attempts.
  • Your code performance is super critical. I remember being part of a burning mail thread once because my code regressed the performance by 1 millisecond. I couldn’t see the difference manually as 1 millisecond is something your eyes can’t perceive.
  • You think you’re smart. Well think again. There are smarter people talking to whom is so much fun. You are stuck debugging an issue for 2 days. You don’t see anything working. You are pissed off. You send a mail to the people asking for help. They read your issue on phone, respond with a fix and it works.

In a nutshell, the emphasis is more on reading and understanding code than writing a new one. If you can’t understand well what is written, how are you going to modify it? This varies from team to team. Since office was released in medieval time when C++ was still in diapers, making changes in the code becomes a bit difficult, especially when you are making changes to an existing feature.
Microsoft is full of smart people. You can learn something from almost everyone.

Why I chose to stay at Microsoft?

There were many times I thought of a switch. The thing that always seemed to hold me was the thought that I would be doing the same kind of work that I am doing here. Besides, I am happy here, living life as I always wanted, trying out different things, exploring the world around me and pursuing my hobbies one after the other.

While we’re busy in earning money, life is busy in deducting time

If you ask me if I’m happy with the salary I get here. I would probably say, Yes. And I will shortly explain why. Pay is decent, but it is lesser than what competitive companies offer. Many of my friends have switched to other companies for higher pay. There was hardly a day in my 60 months of career at Microsoft that forced me to think of a switch, because of following reasons:

Work-life balance

The best thing I like about Microsoft is the work-life balance. The timings are flexible. If you get a good manager who knows how to handle pressure well, you won’t have to work overnight unless it’s absolutely necessary.

Company culture and vision

At Microsoft, we strive to build products that amaze customers within thirty seconds of usage. If we fail to wow them, we lose them for life. That’s the underlying principle behind every Office product. Productivity and efficiency are taken very seriously. Effort is important, but knowing where to make an effort makes all the difference.

Pursue hobbies

I chose to stay at Microsoft because while working here, I can pursue my hobbies. You get plenty of time for things you want to do. I travel, do fashion and landscape photoshoot, play piano and write blogs, all while writing code in week days.

Money is a good servant but a bad master

The money I earn here is enough to survive and buy things of interest. If I would earn more money, I would buy bigger car or dine in more luxurious restaurants. The standard of living will improve. But the question is, how far are you willing to go for the sake of money. Run for money never ends. Having lived my fair share of life, I realized that life should be made up of moments. As long as you are happy with what you have, you are living a good life. With more money, comes more responsibility. Yes, there are times when I regret not being able to afford a Grand Piano, but I can settle with a smaller version of it.

Brand value

Although Microsoft pays lesser than few startups, I love it. My granddad proudly says that his grandson works at Microsoft. Microsoft is one of few companies that has survived four decades while staying relevant. People are still crazy about it.

Impact

Products that I work on are used by billions of people. I can say that the part of picture manipulation code in Word/Excel/PowerPoint has been written by me. This kind of huge impact can only be felt by working at some of the biggies like Google and Facebook.

Hit Refresh

When Satya Nadella took over, the change was visible sooner than we had anticipated. The company was at the cusp of transformation and is going through a significant transition phase as we speak. It’s not just a Windows company anymore. The focus has gradually shifted to its mobile first, cloud first business. The reason is simple. With so many technological advancements and automated home & car systems generating a lot of data, the humongous data has to be stored somewhere. 90% of the world’s data has been generated over last two years. Microsoft is pushing hard to make a dent through providing cloud services and thereby, stay relevant.

Microsoft is in right hands. Its stocks are soaring all time high. Investors have confidence and they’re betting in its bright future. It’s far from pinnacle of success and there is a long way to go. But I believe in the company’s vision. And as an employee, it’s a great feeling and amazing place to be at, while being part of the major transformation. I can either watch it happen or be a part of it. Well, the former doesn’t excite me enough.

You might like my other posts along the same line:

Journey of a boy from small town to Microsoft – An untold story Part 1

Copyright © 2018, Aashish Barnwal, All rights reserved.
Read more

If you are wondering how I ended up at Microsoft, well, it’s a long story and if you have got some time, you can read it here:

Journey of a boy from small town to Microsoft – An untold story Part 1

If you like to read about dreams and goals, you might like my journey. I won’t claim it to be inspiring and motivating. Neither would I claim it to be struggling and unique. I will leave it for you to decide. But everyone has a journey and a story to tell. And this my friend, is my journey.

This post is retired. Please read Half decade at Microsoft and counting… for fresh content.

July 15, 2013

Each year when I wake up in the morning and find Facebook reminding me of this very date, I can’t stop myself to feel happy and grateful. I thank god who has graced my life with all the opportunities & happiness and given me an ability to be good at what I do.

4 years it’s been since I joined Microsoft and it feels like it were only yesterday when I wandered the corridors of the humongous campus for the first time. Days bled off into years. I have seen people come. I have seen people leave. Life moves on. Everyone is replaceable.

Continue reading Life of a Microsoft Engineer

Read more

I am a CSE Graduate from KIIT University. I joined Microsoft straight out of college. Usually, Microsoft doesn’t visit there, but that year I got lucky.

2 written tests + 3 F2F technical interviews + 1 Skype technical interview

Written test 1 (Objective), 30 minutes

First written test was conducted by some third party company. It consisted of 15 objective questions from C, Sorting, Data Structures, Big O, compiler and state machine. We were given 30 minutes. Cut off was 12 out of 15 questions. 77 out of 400 students made it.

Written test 2 (Coding), 60 minutes

Three problems to be solved in 60 minutes with no use of compiler. One problem on Linked List, second on heap and third on array. I coded all problems from scratch including main method. I also wrote flexible methods that could work on any kind of inputs (instead of deleting nodes from 4 to 6, it would delete nodes between ‘M’ and ‘N’ ) and handle all corner cases. The result was announced after 20 days. 30 out of 77 made it.

F2F Interview #1, 60 minutes

We were interviewed in groups of 6. Each one of us in a group was given same problem to solve. I couldn’t code the perfect solution in an hour. All I had discussed 6 different ways to solve the problem. I was afraid that I might be rejected in first round. The interview lasted for 60 minutes.

14 out of 30 were selected.

Continue reading My interview experience at Microsoft
Read more

My contribution on Quora on cracking technical interviews:

 

  1. What should I do in the next 6 months to get into a company like Amazon/Google?
  2. How do I go about preparing for interviews on GeeksforGeeks?
  3. What are the top 20 websites for interview preparation?
  4. What are some useful websites for a CS student?
  5. How does one become good at problem solving?
  6. Career Cup or GeeksforGeeks?
  7. Should I do competitive programming or learn GeeksforGeeks, from a placement point of view?
  8. Which is the best book to start learning algorithms?
  9. Which books should I refer for data structures in C?
  10. I suck in competitive programming but I wish to make a mark there. I’m improving my skills by practicing on GeeksforGeeks. Is this the right approach?
  11. Should I learn algorithms and data structures in my vacation or learn any other thing? See details.
  12. How many academic projects should be mentioned in the resume while appearing for big companies like Amazon, MS, Adobe by a fresher?
  13. What are your reviews of Data structures and Algorithm made easy by Narasimha Karumanchi? Should it be used and when?
  14. Is it neccessary to put subjects of interest in our resume, we dont get good job at big tech companies if not added?
  15. Do we have to mention our Data structures skills in our resume in subjects of interest part ?
  16. Does the bloggers get paid when they write article on geeksforgeeks?
  17. How can one contribute to GeeksforGeeks and become one of the moderators?
  18. Studying Algorithms and data structures cover similar topics in c,c++ and Java languages?
  19. What is the difference between dynamic programming and recursion?
  20. What is easiest approach to tackle Dynamic programming problems?
  21. How should I explain dynamic programming to a 4-year-old?

Copyright © 2017, Aashish Barnwal,  All rights reserved.

Read more

My interview with GeeksforGeeks: Geek on the top – Aashish Barnwal

My contribution on GeeksforGeeks over the years:

  1. How to prepare for top MNCs?
  2. Implementing Iterator pattern of a single Linked List
  3. Curiously recurring template pattern (CRTP)
  4. Opaque pointer
  5. Factory design pattern
  6. K Dimensional Tree | Set 1 (Search and Insert)
  7. Design an efficient data structure for given operations
  8. Ternary Search Tree
  9. Print unique rows in a given boolean matrix
  10. Implement LRU Cache
  11. Sort numbers stored on different machines
  12. Find the k most frequent words from a file
  13. Given a sequence of words, print all anagrams together | Set 1
  14. Given a sequence of words, print all anagrams together | Set 2
  15. Generate integer from 1 to 7 with equal probability
  16. Graph and its representations
  17. Median of two sorted arrays of different sizes
  18. Iterative Quick Sort
  19. Magic Square
  20. Comparator function of qsort() in C
  21. Copy elision in C++
  22. Playing with Destructors in C++
  23. Casting operators in C++ | Set 1 (const_cast)
  24. DFA based division
  25. Counting Sort
  26. Space and time efficient Binomial Coefficient
  27. Efficient program to calculate e^x
  28. Greedy Algorithms | Set 2 (Kruskal’s Minimum Spanning Tree Algorithm)
  29. Greedy Algorithms | Set 3 (Huffman Coding) – GeeksforGeeks
  30. Greedy Algorithms | Set 4 (Efficient Huffman Coding for Sorted Input)
  31. Greedy Algorithms | Set 6 (Prim’s MST for Adjacency List Representation)
  32. Dynamic Programming | Set 27 (Maximum sum rectangle in a 2D matrix)
  33. Dynamic Programming | Set 28 (Minimum insertions to form a palindrome)
  34. Dynamic Programming | Set 30 (Dice Throw)
  35. Dynamic Programming | Set 31 (Optimal Strategy for a Game)
  36. Dynamic Programming | Set 34 (Assembly Line Scheduling)
  37. Find minimum elements after considering all possible transformations – GeeksforGeeks
  38. Check whether a given graph is Bipartite or not
  39. Maximum of all subarrays of size k (Added a O(n) method)
  40. Linked complete binary tree & its creation
  41. Print all permutations in sorted (lexicographic) order
  42. Lexicographic rank of a string
  43. Union-Find Algorithm | Set 1 (Detect Cycle in a an Undirected Graph)
  44. Measure one litre using two vessels and infinite water supply
  45. Random number generator in arbitrary probability distribution fashion
  46. Iterative Postorder Traversal | Set 1 (Using Two Stacks)
  47. Iterative Postorder Traversal | Set 2 (Using One Stack)
  48. Boundary Traversal of binary tree
  49. An in-place algorithm for String Transformation
  50. Morris traversal for Preorder
  51. Construct Full Binary Tree from given preorder and postorder traversals
  52. Two nodes of a BST are swapped, correct the BST
  53. Check if each internal node of a BST has exactly one child
  54. Largest subarray with equal number of 0s and 1s
  55. Check if a number is Palindrome
  56. Given a number, find the next smallest palindrome
  57. Construct BST from given preorder traversal | Set 1
  58. Construct BST from given preorder traversal | Set 2
  59. Flattening a Linked List
  60. Find the largest multiple of 3
  61. Count numbers that don’t contain 3
  62. Check divisibility by 7
  63. To find sum of two numbers without using any operator
  64. Find a pair with the given difference
  65. Add two numbers represented by linked lists | Set 2
  66. Longest Palindromic Substring | Set 1
  67. Longest Palindromic Substring | Set 2
  68. Count the number of possible triangles
  69. Find the number of islands
  70. Pascal’s Triangle
  71. Stack | Set 1 (Introduction)
  72. Heap Sort

Mentions:

  1. Find a pair with the given difference
  2. Sliding Window Maximum (Maximum of all subarrays of size k)
Copyright © 2017, Aashish Barnwal,  All rights reserved.
Read more

Every evening on the roof top of my hostel in Delhi, I used to see the shining airplanes going off into the thin air and wondered when I would get a chance to fly in one of these with my own capability. While that dream was fulfilled the moment I joined Microsoft, I started wondering to fly to United States in the best of airlines to feel how is it like to be in the most powerful country in the world..You can say that my dreams always get upgraded.

Being at Microsoft has its own benefits

I owned an important piece of project in Microsoft. There was a talk going on to fasten the velocity of work we were doing. Given the complexity of the project, its architecture was written in many layers few of which was coded by team at Redmond. Due to time zone difference and the critical timing, we had to act on it quickly to enhance quality of product. They decided to send me over to interact with people, understand different layers and their communication.

A sudden plan

I hardly remember traveling somewhere in such a big rush. It was 4 O’ clock in the evening when I was checking flight tickets and changing date in the calendar on the online portal to finalize which day to travel. 6 O’ clock, my friends found a flight that was to take off the next morning to Seattle and I spent next hour mentally preparing myself to fly so unprepared. It was just hard to believe that I would be traveling to US, one of my dream destinations without any preparation. My parents were asking me every other day if I bought winter apparels. I usually prefer to plan everything in advance and this time, without have a flight ticket in hand, I didn’t want. With support from my friends at Microsoft, I finally decided to give it a chance. There are few things in world for which you need not to be prepared. After all, traveling somewhere without much thinking has its own share of fun. And this was not somewhere. This was what I dreamed of long enough.

It all started with a joke. I was worried I was not getting any ticket in good airlines next week. I was tired, exhausted not a clue on what to do. “There is a flight next day at 4 in the morning. You can catch that.”

“Holy cow! This would be too early. How on earth would I be able to catch that?”

I knew they were serious when my manager said. “Actually, I think you can go.”

“But I haven’t done any shopping”, my forehead was shining with worry lines.

“It’s alright. What are the things you need? You can borrow them from me.”
My friends helped to prepare an itinerary. I literally got only 2 hours to dine and pack my bags. I usually never take more than 30 minutes to pack, but since this was my first trip to US, I didn’t want to take any chances.

It’s Emirates, baby

The moment I stepped into the flight, I got the answer why it has been coined as the best airlines in the world. The service, the infra and the experience was just amazing. It is very unlikely that you would be left unhappy after an Emirates travel. It was a 22 hours long journey with a 3 hours layover in Dubai. Being a movie buff and their huge collection of movies, I didn’t find it difficult to spend time.

2e5e596100000578-3315070-emirates_new_a380_has_two_classes_business_and_economy_and_will_-a-4_14473313834311

Hello from Redmond!

The flight was just on time. You might find it funny but the first thing I missed at Seattle airport was no taxi driver asking me where would I want to go. I didn’t have US Sim Card and it was freezing cold to stay for long in the open weather. There are two Marriott hotels in Redmond and I missed to mention which one I wanted to go to the local taxi. Even with a 50% chance of landing at the correct hotel didn’t work for me. Redmond is kinda a developed village. It’s hard to find anyone on the road. It was near difficult to ask someone for navigation. Luckily, the second Marriott was just a few blocks away.

Few of the pictures of the hotel:

16112518_1402536169766187_7154495049550897719_o[1].jpg

16114143_1402536173099520_2625156290256392395_n1

I learned that labor is costly in US. The gorgeous lady at the business center handed me over a map which had directions to follow my room. It’s very unlike in India that you would have to carry luggage to your room on your own in a decent hotel.

My first status update from Facebook on the arrival night.

It’s been only 11:00 PM here and I am done with sleep. It’s quite chilly outside and the roads are empty. A grave silence is there in the winds. Next couple of nights, I am gonna spend as a night crawler. I wonder if the new government would encourage vigilante. All of a sudden, I feel like I have all the time in the world and I have very less to do.
If I was not able to respond to your chats due to my busy schedule, Let’s catch up now

Being a hobby photographer, I found everything very interesting and screaming at me to be clicked.

The view outside my hotel room. As you can see, cars are parked in the open air. In the morning, the car windows are covered with a thick layer of ice.

dsc_0380

Just by the first look, I can say that discipline and patience flow in veins here. I never saw anyone rushing, everyone (well almost) greets you with a wide smile, cute children laughing on pavements and the most important thing – punctuality. People prefer to be on time. They dine by 8, sleep by 11 and woke up at 6.

Good morning Redmond

It is said that breakfast is the most important meal of the day. You don’t realize it until you skip dinner and have a heavy breakfast in Indian style dinner. Good morning Redmond!

20170124_154027797_ios

!JetLag

I was under impression that I won’t be getting sleep at usual time because of all the jet lag stories I heard. To my surprise, jet lag did magic to my schedule which I couldn’t follow even after trying for 10 years and many apps claiming to help you do so. I slept at 10, wake up at 6 and rushed to office by 8. It was just an amazing feeling. It was refreshing. I was way more productive. I never knew a good schedule can do miracles in your day to day life.

US Diaries – Part 2

 

Copyright © 2017, Aashish Barnwal,  All rights reserved.
Read more

This post was residing in my draft for quite long. I finally got some time out of my busy schedule to refine it.

The first question quickly pops up on why am I writing this post at all. There are already tens of hundreds of similar compilations on web that talks about this.

Well, following reasons compelled me to do so:

  1. Being a GFG moderator, I’ve been getting many requests from readers through various social media (FB, LinkedIn, Quora, InstaGuide) and various mail clients asking for mentorship and guidance on how to prepare for top MNCs like Microsoft, Amazon, Google etc
  2. Having gone through similar journey and witnessing many of my friends succeeding, I feel knowledge should be shared. My experience might be useful for newer generations who happen to chase the same goal as once was mine

Please note that this article is purely a reflection of my learnings, what I followed through the years and my experience. This is NOT the only way to improvise on what is needed – your coding skills, strengthening DS & Algorithms and boosting problem solving skills. I repeat, this is NOT the only way. There are things I couldn’t follow because of time constraints or didn’t follow because I was just not aware. Please comment if I missed anything which is worth mentioning here.

Language

Language has been a topic of debate between aspirants since years. It’s always good to master one language, knowing ins and out of it rather than hopping from one language to other. Why?  Because sometimes it might happen to you that when you get a problem, you start wondering what language you should choose and your focus is compromised. When you should really concentrate on problem solving, Implementation comes later. Then while you are coding, you plan to change the language in between. This won’t serve you good in interviews. If you’re able to solve a problem in language ‘X’, eventually you will also solve it in language ‘Y’. Learning a new language is just a matter of time. A language might not be as widely used after 5 years as it is being used now. Your ability to solve a problem will what matter in the long run.

I usually switch between C and C++. If time is at its crunch, I prefer to use STL (standard library functions) instead of writing my own version of Linked List. If I want to develop a project, an android app for instance, I go for a managed language because it is easier. If I want to automate something to save my time, like replying and liking my birthday wishes, a python script is the saving grace. You got the point, right? Master one language and learn others as per requirements.

Data Structures and Algorithms

Data Structures and Algorithms is very important and serves as the backbone of problem solving.

For beginners, Fundamentals of Data Structures in C by Sahni Horowitz is good. After reading it, you should be able to understand basic Data Structures, how they are implemented and fewer examples where they can be used. Don’t expect to learn advanced DS through this. After your basic concepts are clear and you are comfortable implementing them in a language of your choice, you can work on learning algorithms and solving problems.

Many sites (including GeeksforGeeks) present problems in a very adhoc manner with no order of difficulty level. This makes things difficult for beginners because they don’t know the difficulty level of the problem they are attempting. Data Structures and Algorithms made easy by Narasimha Karumanchi is a good read after you are comfortable with the basics. It has pretty good collection of problems organized by difficulty level. Just make sure to try to solve problems on your own instead of rushing for the solution. Once you have a fair understanding of DS and have got some confidence in solving problems, jump to online portals and start solving problems from topic of your choice. GeeksforGeeks is good to start with.

For Algorithms, Introduction to Algorithms by Cormen is a must read.

Advanced Data Structures

Sometimes, basic DS don’t serve the purpose to solve problems and you need to know advanced DS. Day to day problems like implementing a prefix based search for a phone contact list to finding the dictionary word from a jumbled sequence of characters need special kind of DS. If you appear for Google, find some time for – TST, Trie, Suffix tree, Suffix array, Fibonacci heap, Segment tree, Gap buffer, Rope, Skip list, K Dimensional tree and so on. People would say you don’t need it. But believe me, it comes handy. While it is good to know the implementation of these DS, I would suggest to also know when to use one.
Elements of Programming Interview is must if you’re appearing for Google.

Problem solving

So you got a gun, understand how to use it, probably have used it before. If you are going to fight a war, you won’t like to rely upon your amateur experience. You would prefer to practice hard to save your ass. Now try to think it in perspective of problem solving. You know what DS are. But you also need to know when to use one. Welcome to the world of problem solving. You are given a problem and you are asked to solve it. That problem can be anything starting from a simple puzzle to implementing a user scenario. You must have noticed degree of connection feature in LinkedIn. How will you implement it? Does your approach take care of scalability? Will your code crumble when user base increases ten folds? This is the most important skill top MNCs usually look for. How do you approach a problem? How do  you divide it into modules? How do you solve each of them and then combine them?

Dynamic Programming

I separated out DP because it is one monster which is difficult to master upon. No matter how many problems did you solve in the past, a new DP problem can always surprise you. The more you will practice, higher the chances will be to find out patterns. Google is peculiar about DP. You should expect at least one DP problem per interview round  if you are preparing for Google. Practice DP section from:

Competitive Programming

Competitive Programming plays a very important role in boosting problem solving skills and ability to perform under time pressure. Do participate in various online portals like TopCoder, CodeChef, SPOJ. Here is a post on Getting started in sport of programming.

Design and Testing

So you are good in DS and Algos. You are probably good in problem solving as well and you come up with different approaches with varying time and space complexity. The problem which you solve in Competitive Programming is well defined and has to work under an environment which nobody will probably use. What if you are asked to implement a user scenario. The problem statement is usually vague and you need to discuss a lot to resolve ambiguities. This is where design comes into picture. How will you design a redo-undo feature? What data structures will you use to store history in a web browser? How will you implement auto-complete feature in address bar? Let’s say Amazon wants to build a feature that would resume a video stored in cloud from any device. What data structures will you use? How will you scale up things? Does your design take care of concurrency issues? What about the performance? What if you and your girlfriend share the same cloud account and are trying to play the same video from different devices?

Now you have thought through the design well, have come up with different data structures to use with pros and cons in mind. While implementing, you must take care of corner cases. You must be aware about the integer overflow issue in Youtube video view count. While implementing, they never really thought that the view count can exceed what an integer variable can hold and BOOM, the view count cycled back to zero.

Before a feature goes live, it must be tested well. It is good to practice some test questions as well. How will you test a Insert image feature in MS Word? What about a cut-copy-paste feature? How will you test Temple Run game? Try to write all the possible test cases and how you are going to handle this in your code. Writing a robust code is very important. If you take care of these things at an earlier stage, you can avoid silly bugs (and boost your chances of getting selected in interviews).

More on System Design

No System is perfect. That’s the biggest challenge. That’s why this interview (and hence its preparation) has always been grey. What worked on System ‘X’ may not work on ‘Y’. It’s all about requirements. WhatsApp doesn’t store messages in their servers, but FB does. It changes things.

If you have time and passion, read Designing data intensive applications by Martin Kleppmann. Go through System Design Primer, Grokking the System Design Interview, System Design section on InterviewBit. Watch videos from Jeff Dean (the Big guy) & Tim Berglund, follow engineering blogs on Medium. You can also setup mock interviews to see how you would sail in real interviews. Honestly speaking, people do well in such interviews only when they have worked on such systems before.

Google cares about perf numbers a lot — how many machines, bandwidth, latency etc. Follow HighScalibility to know how real world big systems work, decisions they took and the rationale behind various trade offs.

Culture eats strategy for breakfast

Companies these days focus on hiring candidates with right attitudes — who can play well in the team, are easy to work with, proactive, so on and so forth. Brilliant jerks they say, ruin the culture and hence the product in the long run. It started with Atlassian and now everyone else is following it. This part is not to be taken lightly.

Amazon is particularly obsessed about their 14 leadership principles. They are very choosy about it. Do spend some time contemplating on various aspects of your career in your previous companies — failures, mistakes, learnings, things you would change if you go back in time and do it all over again, customer obsession, leadership, pro-activeness etc. Following resources can be useful:

  1. InterviewGenie – Amazon
  2. Interviewing at Amazon — Leadership Principles – Dave Anderson: The best resource out there
  3. The Amazon Way: 14 Leadership Principles Behind the World’s Most Disruptive Company

What else?

Have a sound understanding of Operating System. The dinosaur book by Galvin is a good read. Know how networking works and have insights on DBMS.

Resume building

First impression is the best. Resume is the first thing that HR will use to decide whether to call you for interview or not. And they have got hundreds of them. So they will usually scan it for 20 seconds to 2 minutes. It should be clean, concise and elegant. Each word mentioned should worth the space it eats. The rule of thumb is if you have less than one year of experience, the size of resume should not exceed a page (with few exceptions).

Few points to note:

  • Maintain a header to fit info like name, email id, address and contact number
  • Mention level of expertise corresponding to each language. Example: Proficient in C and good at Java
  • If you are mentioning a project, write your key learning, impact in the team and . If this project is online (an app), don’t forget to include the link. This will show that you built something that is being used by people . Guess what, this is what companies do, building a product, stabilizing it as per user feedback, taking in new feature requests and so on.

Here are few useful tips from Gayle – What are common mistakes that applicants make when writing their resumes for tech companies?

How to apply for Microsoft?

I get many messages asking me for a favour to refer them. When I ask them how much comfortable they are with DS and Algos, they say good enough. Then I rephrase my question to how do they feel when they solve interview experiences at GeeksforGeeks. Either they haven’t heard of GeeksforGeeks or they never read. This is not a surprise. GeeksforGeeks is still growing. But when I ask them a problem on DS by tweaking already existing famous ones, all they say is they haven’t solved this problem before. Please do NOT do that. It’s one thing to yearn for something. But quite other to put efforts to make it a reality.

If you are not able to clear the interviews, you will have wait again for 6-12 months depending on the company policy before you can apply again. Now coming to the point,  you can apply for a position at Microsoft either through Careers page or through referral. Referral usually bumps chances of getting an interview call because your resume gets to the system through a person Microsoft trusts to be a good engineer. How do you ask for a referral? It’s simple. Forward your resume to someone you know working there. No one will say NO unless your resume is filled with something which doesn’t fit company requirements. Rule of thumb is we believe in solving problems and if you are good at it, we would love to see you here. Remember, everyone wants to work with a smart person. And this is usually true for any company, not just for Microsoft.

Do’s and Don’ts

  • Practice, practice and practice
  • Make a habit of writing clean and readable code (avoid variables names like i, j)
  • Make sure to handle all corner cases
  • Use pen and paper to practice code. In interviews you have NO access to a compiler
  • Don’t mug up the solutions. Try to solve on your own
  • Think of different ways of solving a problem and thoughts on why one should be preferred over the other

Resources

I have answered few questions related to interview preparation on Quora. You might find some content missing here in blog and it is intentional to avoid the duplication of efforts. Please read my technical answers here.

Resources (which I haven’t talked about):

  • Cracking the coding interview by Gayle Laakmann: A must read once before interviews. It covers aspects like what interviewers expect from you, how to deal with behavioral questions and few interesting problems. It will change your thoughts about design and test problems for good
  • GeeksforGeeks: A bible of problems (with well explained solutions). Make sure you do NOT rush for solutions. Try to solve problems on your own no matter how much time does it take. With time and honest practice, you should get better
  • CareerCup: A huge collection of problems. Though you can’t rely upon solutions, it provides a rich community for discussing problems. I found it good for discussing design problems
  • Project Euler: A heaven for mathematics lovers. You solve the problems using some formulas on paper and then write code to get the final solution. Solve at least 40 problems from this site.

You might like following write ups:

PS: This blog is published on GeeksforGeeks.

Good luck!

Copyright © 2016, Aashish Barnwal,  All rights reserved.

Read more