Sunday, December 30, 2012
Tom, funny, in Puerto Vallarta
Thursday, December 27, 2012
Botanical gardens
Monday, December 24, 2012
Preparing for Coding Questions in Software Engineering Interview
In 2006, I wrote this guide "How to Prepare for a Software Engineering Interview". Since then, I've been frequently asked: "How do I prepare specifically for the coding questions?"
Today I will answer that. Below are my tips, culled from my experiences interviewing around 500 engineering candidates for Microsoft, Google, and Minted.
My goal is to elicit your best performance during the interviews. To use an analogy, if you were getting ready for a 400-meter dash, my goal is to enable you to run your fastest time and prevent you from freezing up during the race. The tips are not going to turn someone who runs a 10-minute mile into a track star overnight.
1. Practice mock-interview coding questions in these areas:
- String operations. Implement strlen, strcat, strchr.
- Data structures. Hash tables, arrays, binary tree.
- Running time. Determine the big-O of algorithms.
- If frontend: CSS, javascript, ajax calls, cross-browser compatibility.
Note: The point is to get you warmed up, not to tell you exactly what's going to be asked. Your interviewer wants to ask you a question you've never heard before, and may skip questions (and concoct new ones on the spot) until one that's new to you. So there's no point trying to scour the internet practicing all questions so that you can recite the answer.
2. Avoid extended silences during the coding question. A major reason for the coding question is to observe your thought process, not merely whether you arrive at the perfect final answer.
If you are silent, the interviewer has no idea whether you are analyzing several plausible solutions (a good sign), or whether you are completely at a loss on how to tackle the problem.
Even if you are stuck, here are some things you can do that are better than being silent:- Describe algorithms you're considering and then discarding ("Dynamic programming won't work in this case because...")
- Enumerate edge cases that your algorithm needs to cover ("I'll need to make sure my solution handles an array with duplicate values...")
- Talk about the part of the problem that you cannot solve ("I need to find a way to split the input into two halves, but all hashing functions seem too uneven...")
Basically, just open your mouth and issue a stream of your problem-solving thoughts. Even repeatedly going over the same conundrums is superior to a long silence.
3. If you see a brute-force solution right away, say it first, and then hunt for the more optimal solution. At least you've demonstrated that you have one potential solution, even if it's not efficient.
If you don't get the refinement, you can always implement the brute-force method, and impress the interviewer with your quicky-written and correct (albeit inefficient) code.
4. Practice writing code on paper, without a syntax highlighter. I mentioned this in the 2006 guide and it is worth re-iterating.
It is going to feel foreign at first. You will suddenly forget how to write for-loop syntax when you are using a pen or whiteboard. That's why it's even more important that you practice beforehand.
Good luck and godspeed to you.
Sunday, December 23, 2012
Cake at work
Thursday, December 20, 2012
Dickens Fair!
I finally understand why some people get addicted to shopping. I could not stop buying hats. I spent an hour trying on and buying different hats. If I had not left, I would've purchased more hats. If those hat merchants had any sense, they should've seen that I was a giant mark and bombarded me with their wares.
Groups of women regularly walked by in petticoats. It was awesome. Occasionally the Queen came through and blessed us, and other attendees said in an English accent, "Bless you, Majesty."
Me with one of the workers at the Fair. Her dress is homemade!
Monday, December 17, 2012
LASIK
The doctor was very forceful in yanking my head around and telling me to stop moving. It was comforting to have someone be so authoritative, even if they were scolding me.
Then a brief moment of relief, followed by the dread that now it is time to do the other eye.
My eyes are still bruised (you can see in the photo) but I can see pretty far already. It hasn't sunk in yet that I will not have to wear contacts or glasses in future.
Elf!
The movie starts out slow, and plays out one of my biggest nightmares: strangers coming into my house and eating all of my food.
The scenes traveling over mountains were beautiful. The movie did a good job of maintaining suspense on several fronts simultaneously.
The feathers graphics were nice. I kept marveling at how they look good close-up, fluttering in the wind.
Thursday, December 13, 2012
Sha-mayn / Super emo
Yesterday we ate at Zushi Puzzle.
Wednesday, December 12, 2012
Aragorn
I was very bothered by it, and wrote James this heated reply:
It is quite untrue to the characters! Aragorn was always conflicted whether he ought to become king -- the whole fear of inheriting the corruption from his ancestor and "this weakness runs also in my veins". The "still not king" theme really goes against his central passion as a character!
Also he showed no predilection whatsoever to being attracted to hobbits. I feel like this writing just took a bunch of cheap shots that are not based on the actual book.
Here is what I would write instead:
Sunday, December 09, 2012
Freedom + Fashion charity cooking event!
Saturday, December 08, 2012
advice: how to motivate your project partners
Friend: "I want my partners to work hard. Does this mean I have to work longer than all the rest of them?"
Me: "No, you just have to set clear goals. If I told you that tomorrow we might go on a run, you wouldn't be sure how much to prepare, so you'd watch me and follow my lead. But if I told you that tomorrow at 10am, I'm coming over to get you and then we're running 5 miles, you'd drink water and go to bed early. No matter what I'm doing, you'd be stretching and getting ready on your own."
Friend: [agreeing noises]
Me: "Being clear makes it a lot more motivating. If I told you that we're running 5 miles at 10am, it's very likely that we'll do it. If I just said that we're running tomorrow, we'd look up at 11pm after a day of playing Starcraft and say, 'Weren't we supposed to go running today?'"
Friend: "LOL true."
deploy jokes
X: "People from Australia are on the site, and we need to do things to it!"
To our Australian engineer: "Can you tell them to stop using the site for a few minutes?"
Australian engineer: "Okay!"
X: "Email all@australia."
On skype chatroom at midnight:
On-call engineer: "Okay is everyone ready to deploy? 9+5=13" [Our deploy script requires the engineer to do a simple math problem.]
On-call engineer: "I mean, 8+5=13. It's scary I got that wrong at first."
Me: "Have you stopped drinking at all between beer o'clock [Minted Friday happy-hour tradition] and now?"
On-call engineer: "Don't ask me questions you don't want to know the answer to."
On skype chatroom:
On-call engineeer: "Oh web4, where art thou web4,
Deny thy code and refuse thy branch,
Or if thou wild not, be but sworn my Thursday
release XXXX branch"
Me: "You can't rhyme branch with branch!"
Friday, December 07, 2012
Minted shirts!
When I worked at Microsoft, because there were so few women, the shirts came only in men's sizes. It sent such a loud signal that women were not valued. Is that history now, or are there any companies nowadays that still do this?
If there are still any that do this, and you are a woman who works there:
1. that's awful
2. http://minted.com/jobs
:)
Thursday, December 06, 2012
moderation
James: "I set up push notifications on my phone for your blog comments. So that I can moderate them right away."
Me: "Wow! That's so great! My fear is that the novelty will wear off, and you'll have a longer and longer lag to moderate them."
James: "If it isn't working out in a week or so, I can write an app."
Me: [getting really upset] "What, to do sentiment analysis and auto-moderate? If I was going to go that way, I would've just written that myself!"
James: "An app that shows the blog comment on the lock screen, so that I can approve it from there."
Tuesday, December 04, 2012
Thanksgiving
Meanwhile she stir-fried six Chinese dishes with ease.
Tom brought his girlfriend to meet my parents. Afterwards we all squeezed in one car and went to the Cosmopolitan hotel. I love the style of the interior decor! Three-story-tall chandelier strings, leather walls, egg chairs.
I am glad I flew to spend Thanksgiving with my family, even though it was only 30 hours so that I could go into work on Friday morning. It was a great 30 hours!
Monday, December 03, 2012
Team being adorable
Me: "Does M know that he's supposed to deploy code tonight?"
D: "Yes."
Me: "Oh, how do you know that he knows?"
D: "He made it clear. Multiple times."
Me: [laughing] "By complaining?"
H: "Yes."
My team is so endearing.
Temp box
H: [coming back from the fridge] "The large pizza box doesn't fit. I need to transfer it to the smaller box.". [opens small pizza box, discovers there is still pizza in it] "I need to swap these."
D (intern): [getting up with his own empty pizza box in hand]: "You're going to need a temp box. Unless you can XOR pizza."
Later the interns sent me a reddit thread about top revenge stories, and I spent one hour reading it, riveted.
Ice cream
Sunday, December 02, 2012
Knights of Round Table
She mentioned that one engineer at her work is nitpicking on irrelevant details. My theory is this behavior happens when the vision and milestones are not clear.
It is like how after the Knights of the Round Table rid the land of barbarians, they got bored and began picking duels with each other. When the quest for the Holy Grail began, the knights had a common purpose again and stopped squabbling.