Thursday, January 31, 2013

Guesstimations: Super Bowl XLVII - Predictions

I wonder how casinos creates the odds to sports games. This year for the Super Bowl, the most popular spread is the San Francisco 49ers 4.5 points over Baltimore Ravens. Points prediction seems pretty high with at least 5 touchdowns between both teams.

It would have been nice to collect some of the season data to create a more scientific prediction myself.  But just from watching the last two games, my gut guess would be Ravens, 24-21.

Recommended:
http://douglastclee.blogspot.com/2013/02/guesstimations-super-bowl-xlvii.html

Interview: How would you direct someone else on how to cook an omelet?

How would you direct someone else on how to cook an omelette?


This seems like a rather boring question... this seems to have a mixture of figuring your attentiveness to detail while keeping it simple. There are probably some variations that you could consider depending on the role you are interviewing for. Less detail for management, more details for designers, more economical analysis for financial analysis, including hiring a chef, question all the requirements of an omelette... I decided on what I consider a simple, minimal style with some focus to details.

1. Ask the person if they already know how to cook an omelette
1a. If yes, then ask what the basic steps are to making an omelette. If it sounds reasonable, then I would just let them cook an omelette because it will be unlikely worse than my omelette. End
2. Make sure the person has all the necessary preparations, non-stick frying pan, stove, spatula, oil/butter, eggs, a bowl, plate, and something to beat the eggs.
3. Crack eggs into bowl
4. Beat eggs
5. Turn on stove to med/high
6. Put pan on stove
7. Add oil/butter onto pan
8. Wait 2 minutes
9. Spread oil/butter so that it evenly coats the bottom of the inside of the pan
10. Add the beaten eggs
11. Wait until you see the bottom layer solidifying
12. Use spatula to slide under the egg to test if the eggs are sticking to the pan
13. If sticking to the pan
13a. Lower the heat
13b. Keep sliding the spatula around the bottom of the eggs to keep egg from burning
14. When the eggs look 90% solid, tilt the pan slightly and slide the egg so that it is partially off the pan
15. Use spatula to fold the egg in half
16. Turn off the stove
17. Let omelette sit in a pan for about a minute
18. Lift pan, tilt slightly, and slide omelette into plate.
19. Place plate to the side
20. Clean all the used items
21. If omelette is presentable, serve omelette
22, Post-mortem - If omelette is not presentable, depending on blah, blah, and blah.... (ie common mistake guideline, seek second opinion, etc.)

You could add a step to add other things to the omelette. But given that I struggle making my own omelette, I would not be able to direct someone else to do it. Yes, it also happens to be convenient to shorten the answer for an interview but it happens to be the truth for me.

Assuming the person has no idea how to cook like myself, the key point is not make too many assumptions but also not to make it too long. The interviewer may interject so be ready. Some may do this to test your ability to multitask. Others to see how well you handle interruption. Also be ready to clarify on certain steps that you may have overlooked and why you thought certain steps were important to state. Don't make it overly fancy if you happen to be an omelette bistro. It is still an interview question so make sure you can finish within 2-3 minutes.

I recommend you to think through the main steps with some mental notes where you should clarify. This way you can get your preparations in correctly. Try to minimum how many times you need to backtrack when you realize you missed a step. If you realize you missed an important step, then do backtrack. If a minor detail, leave it to the end.

Some additional thoughts on other blog ideas... write a different set for different role types as mentioned above.

Tuesday, January 29, 2013

Interview: How many quarters would you need to reach the height of the Empire State building?

How many quarters would you need to reach the height of the Empire State building?


Below are 4 different ways that I could answer the question. The third one is the standard answer you'll hear from most people. The others are just my way of being different... although they may have already been thought by other people but I didn't find any (not that I spent a lot of time trying).

1. Assuming you start at the base of the Empire State building and knowing that the tallest building is around half a mile in height, the cheapest way to reach the height of the building would be to hike up a mountain. I don't know where the closest mountain is, flights are rather cheap. All flights will reach the needed height, thus the cheapest flight will do. Flight can be as low as $79, so $100 would be a safe guarantee for a flight. Thus it would take 429 quarters, including $5 for the airtrain to JFK and subway ($2.25).
2. If you had to return back to the base, then a helicopter tour would be cheaper at $150. Thus 600, maybe 618 if you take the subway.
3. If assuming stacking quarters as most people would assume it is asking, then you'll need the height of the building and the thickness of quarters to determine the "minimum" number of quarters you will need. Empire is not the tallest so I'd take a wild guess that it is about a third of a mile, thus around 1500 feet. Thickness of a quarter is maybe a sixteenth of an inch. 4 quarters is about a quarter inch, so seems reasonable. Since we're estimating let's use 15 (because it seems like it would be a nice round number for 1500). 1500 feet = 18000 inches. 18k * 15 quarters / inch = 270,000 quarters.
4. Given that I cannot even stack quarters beyond a foot, you'll probably need a pyramid worth of quarters. Equation for a cone is (pi) * r ^ 2 *h / 3. 45 degrees is a safe angle to stack quarters without them shifting, so r will the same as h. (3.14159 * 18k ^ 3) / 3 ~ (20k ^ 3) = 8 * 10 ^ 12 in^3. Volume of a quarter is a (pi) r^2 * h. Quarter is about an inch wide, (3 * 1^2 * 1/16) = 3/16 ~ 1/4 in^3. So it would take apprximately 32 * 10^12 quarters to reach the height of the empire state building.
5. Add the cost of all the labor to complete #4.

One answer provided online is 263,000 quarters. My third number is not far from that value. I still think the fourth one is most reasonable, although I think the first and second are funnier.

Other notes: Elevator available to the public doesn't take you all the way to the top. There is an argument whether antennas should be included in the height of a build. Asking what/which quarter implies you can ask the height of the empire state building, thus that would not be a good question (but it may not hurt to ask).

Reference:
~ - approximately for easier calcuations
Question - http://www.techrepublic.com/blog/career/glassdoors-top-25-oddball-interview-questions-for-2013/4783
Anwer - http://answers.yahoo.com/question/index?qid=20070523180130AA8ll3C

http://en.wikipedia.org/wiki/Empire_State_Building
  Height of Empire State Building (roof) = 1250 feet = 381.0 meters = 102 floors
  Height of the tip of ESB = 1454 feet = 443.2 meters

Monday, January 28, 2013

Interview: Have you ever stolen a pen from work?

Have you ever stolen a pen from work?

Just some fun thoughts that I wouldn't recommend using:
  1. No. People either steal more than one pen or they do not steal at all. Who steals just one pen?
  2. No. I've always been expected to work from home / remotely / always on-call.
  3. No. Who uses a pen anymore? / Do you mean a stylus?
  4. Did the company expense all items I buy for work?
  5. Has the owner / CEO / President exploited company expenses / taxes for personal purchases?
  6. How many TD Bank pens do you think your company has?
I would avoid saying yes / no:
  1. I have plenty of pens at home thus I have no intentions to steal any pens.
  2. I may have accidentally brought one home, but usually it also accidentally returns back to the office because I didn't realize that I accidentally brought it home.
  3. I bring pens to work.
In reality, I typically bring my own pens to work because they are better than the cheap company pens. Decent gel pens have a nice consistency and less hassle than the ordinary ball-point pens. Avoid bad/cheap gel pens because they can cause a lot of smudges if the point breaks.


 Off topic - I see the green TD Bank pens all over the place, and I will admit that they work very well except a little too big for my taste. Very off topic - I missed a chance to get a free TD Bank umbrella. Those looked pretty awesome.














Reference:
http://www.techrepublic.com/blog/career/glassdoors-top-25-oddball-interview-questions-for-2013/4783

Interview: Calculate the angle of analog clock

Calculate the angle of two clock pointers when time is 11:50


Continuing with some of the questions from Glassdoor's top 25 oddball questions... I am skipping around to whichever I find interesting. A couple of them are pretty common and already have rather standard answers. So, I picked this one because this turned out to have an extra step than what I originally thought.

Humor
Before I get to the common response, try one of the following if you're feeling lucky (disclaimer: make sure interviewer has the proper sense of humor)... the angle is the difference between meeting a deadline and getting fired... 0 degrees because it takes you 10 minutes to solve it... 90 or 180 on a digital clock... null, pointers have no direction in [programming language].

My Thought Process
At first glance, I thought the answer was 60 degrees because 11:50 is 10 minutes before noon/midnight. 10 minutes of 60 minutes in an hour = 1/6. Clock is 360 degrees, so 60 degrees. Then made a sanity check by trying to picture the clock at 11:50.

I quickly realized that the hour hand would not exactly be at the o'clock position. The hour hand would be slightly before the 0 degree (assuming o'clock is my reference). Each hour move 30 degrees (because each hour is the distance as 5 minutes which is half of 10 minutes). Thus for each minute, the hour hand would move 1/60 of 30 degrees, 0.5 degree.

The answer would be 60 degrees - 0.5 degrees * 10 minutes. Final answer is 55 degrees.

Additional Follow Up
A good potential follow up to this may be to provide the general equation (ie function, method, etc.) to generate the value for any time. Given X minutes and Y hours with noon as the 0 degree reference, the minutes degree will be X / 60 * 360 = X * 6 and hours degree will be X / 2 + 30 * Y. Thus, the final equation is |X * 6 - (X / 2 + 30 * Y)|. Test with original points, |50 * 6 - (50 / 2 + 30 * 11)| = |300 - (25 + 330)| = |-55| = 55. Test with 12:10, |10*6 - (10 / 2 + 30 * 0)| = |60 - (5 + 0)| = 55. Simplify the equation, | X * 5.5 + Y * 30|.

Add constraints... 0 <= Y < 24 and 0 <= X < 60. Y must be an integer; X must be a real number. If Y >= 12, then Y = Y - 12.

Some extra thoughts... If a graphic artist, then provide a time entry GUI. If animator, provide equation for reference to 3D space (ie angle if clock is angled at certain positions). If math, provide equation if only provided the positions of the two lines. If high school degree, use approximation because you should know that 3 and 9 are right angles so 90 degrees, so 10 (i.e. 50 minutes) and 11 breaks the 90 degrees into thirds, thus each hour is 30 degrees which gives you 60 degrees minus a few degrees. If physics, then ask about the velocity the clock is traveling at.

30 Degrees?


Guesstimation

Assuming you have figured there are 30 degrees between each hour, you can see that the answer must be greater than 30 degrees. From looking at the image above, you can see that the answer should be closer to 60 degrees. You will also notice that the hour hand is not exactly at the 12 mark. Therefore, the answer is less than 60 degrees. Mathematically, you should be able to estimate that the answer is between 30 and 60 degrees. If you eye ball the difference, you should be around 50-55 because 45 degrees would be symmetrically in the middle.

Misconception

I found that 30 degrees was a common answer to this question. This primarily comes because the image is of the hour hand on the 11 mark and the minute hand on the 10 mark. What is not considered is that the hour hand moved past the 11 mark due to the minute hand moving to the 10 mark.

Fortunately for me, my thought process was going from noon and going back 10 minutes. So I naturally picked up that the position of the hour hand was impacted by the minute hand. This is why I typically do a sanity check particularly with questions that appear simple but you get an uneasy feeling there is something amiss. For example, why would they be asking a simple geometric question in an interview? Or in this example, why would this be a top 25 list of oddball questions if the answer is so direct?

Reference

http://www.techrepublic.com/blog/career/glassdoors-top-25-oddball-interview-questions-for-2013/4783

Updated 1/24/2014 - Added section for 30 degrees to explain how the answer is not 30 degrees.

Saturday, January 26, 2013

Interview: Penguin, Sombrero

“A penguin walks through that door right now wearing a sombrero. What does he say and why is he here?”

I would enjoy this question as an interviewee because there seems to be a lot of flexibility with this question to define myself without being out right wrong. To answer this question, I'd consider the role I was applying for and perhaps even what has already gone with the interview.

If the interview has already been very light humored, a strict engineering/science role, or any other scenario where I want to demonstrate a realistic characteristic, I would treat the scenario as a more real-life scenario. I could go with that it is a penguin so it wouldn't say anything (assuming it was a real penguin); he is there because I am being tested on how I would react. If I was allowed to ask questions (if they were checking my evaluation skills), I'd ask if it was mechanical or if it was real. I'd ask if it was going to be part of my new project. If asked about the sombrero, I'd say that it was for comic relief or red herring.

I think in most cases, I'd rather go with the expanding on the scenario to demonstrate ability to think outside the box (primarily because that is what I enjoy doing). Like, "Hola!" and he's going to be either my trainer or work partner or "wing"-mate. Or, "I'm lost. Is this Mexico?" because the penguin is lost. I could also expand on the story depending on the reaction. I'm sure people have thought of wittier ideas, but make sure not to spend too much time thinking about it. "How much am I being paid to be a prop for this interview question?" "He better be worth it or you are going to owe me big time, [interviewer's name]!" "Why is it so hot out there!" "Have you seen my poncho?" "Have you seen our tour guide? He's a chameleon wearing a parka."

I think this question allows you the opportunity to show an ability to assume unrealistic assumptions, handle unknown scenarios, ability to analyze, ability to break down the problem. On the social aspect, you demonstrate your ability on how to handle pressure (interviewer may question your assumptions), humor (if you expand on the scene), acting (if that's the job role), or even question the interviewer.

I think importantly relax because these types of questions are not typically filter questions. This question is not made to find the best possible answer. It typically is a good sign because the interviewer is digging for unique attributes... or on the other hand, interviewer doesn't really care because it was a question they had to ask so only the best ones will stand out which means mediocre ones will not affect your position. The worst thing to do is not answer the question, get nervous, or say how absurd the question is (unless maybe your interviewing to be a lawyer or venture capitalist or some role that requires you to challenge the oddness). Some other notes to consider: make sure to see how the interviewer reacts and change the style accordingly.


Reference:
http://www.techrepublic.com/blog/career/glassdoors-top-25-oddball-interview-questions-for-2013/4783

Thursday, January 24, 2013

Quote: Buddhist Proverb - Student, Teacher

"When the student is ready, the teacher will appear." 
"When the disciple is ready, the master will appear."
Buddhist Proverb

As a teacher, I find this the hardest challenge. I've volunteered as a TA in college and as a coach a handful of times. I've had a couple students where they just do not care for the material. I mean to the point where not a single information even enters their mind. I have often questioned myself how to get it through.

On a macroscopic level, it is better to move on and spend my time with students that are ready. But on a microscopic level, what do I do if I "have" to. There are two main scenarios thus far that boggles me.

Once I had to teach a student who came to my office hour. So this student has already made up his mind to get assistance (or maybe to have me do his homework). After the first time (where I basically walked him to the answer after an hour when it should haven't taken 2 minutes), I made a separate set of questions when he came the second time. The assignment was to create an HTML webpage. The foundation was already there where you just save and the page will come up. The assignment was just to display a specific text, "Hello World" to the page. So I showed him how to display some other sentence, "This text appears here." He typed it in, and there it is on the screen. Then I told him to change the sentence to something else. Refreshed the page, and the new sentence is there. I then told him to put in a third sentence but without giving him the step-by-step instructions... and bewilderingly, he was not able to do it again. I even asked him to put in the original question (basically change it back to what he had before), and still a blank face. The instruction basically is to just replace sentence, save, and refresh. How does someone reach a senior undergraduate level and not be able to do that? Even without that level of education, how do I even break the process down so that it is understandable? I saved the multiple files and told him to take it home to review and review the book again (after 2 hours). He did come back a couple more times but I don't feel that I was very helpful even then.

More recently, I have a coworker (Coworker A) who I believe was hired through connections. He supposedly has over two decades of work experience. I was assigned to train him. I'm not sure how many times I had to repeat myself, resend the same emails with the details of what I just repeated, and he still claims to never have known, trained, or notified. I believe that I am a pretty decent trainer in that I've trained almost all my teammates across several jobs, typically the go-to person on how to do things or better processes, and assistance outside of work. Although I have many speculations on my he may be demotivated to do things professionally, I still patiently go through all the steps if I have time. I have even brought this up with my supervisor who does not seem to do much about it which she normally does. Sadly, this may have been the first time that some frustration may have come across where Coworker A became extremely defensive and said that I was attacking him. I really was just frustrated in that I do not know how to break down the material in such a way to get through to him.

I do not know why some people are this way because even for me when I do not care much for something, I still listen and information still enters my head. When I say do not care much, I really mean that there are certain information I care more for. Perhaps that is the difference in that there is little that I truly have no care for but I think that is more out of ignorance or taking something for granted. Once realized, I still make mental notes of it. So, I really believe that you must first be open to information otherwise, no teacher can assist you... although mentally, I still try to figure a way.

Bored: Deshelling Dungeness Crab

A neat video on how to get meat out of a dungeness crab more easily than picking out the shell by knocking it out with a bowl. 


Friday, January 18, 2013

Interview: How many cows are in Canada?

How many cows are in Canada?

I was surfing around stumbled on this interview question. At first, this appeared to be one of those break down the problem to smaller more manageable parts, like "How many quarters would you need to reach the height of the Empire State building," or "Estimate how many windows are in New York." But then I quickly realized, I do not have the faintest idea what the base case should be. Below is my thought process to answer the question with my current knowledge without looking up facts.

I think the premise of the question is really how I troubleshoot or go about the question more than the correct answer like the questions mentioned above. There are many factors that cannot be used because I do not know the start or end points of such data, like how much milk is produced or how much beef is consumed. I do not know how much is consumed domestically nor how much is exported for the former data point. I do not know how many people eat beef nor even the frequency.

To start, I think my solution would be some sort of range that I slowly refine as much as I can with smaller error. This will cause a wider range, but at least it is some information that can be used. Assuming there are cows that are kept for recreational purposes, I will assume this number is negligent. With that assumption, cows are raised for the purpose of consumption or to produce goods for consumption (ie milk).

Starting with calculating the upper range and consumption, I will assume cows (around 500 - 1000 pounds) weight about 750 pounds [from memory]. A person who normally eats beef will eat about 1 pound per week. Because most hamburgers and steaks are served in units of quarter pounds to one pound, and on rare occassion 32 ozs. Anything larger is assumed negligent [round up for upper range, down for lower range if necessary]. 1 pound seems like a lot of beef. So for 50 weeks (slightly less than a year but makes it easier to calculate), a person will eat about 50 pounds per year. So a cow will feed at most 15 people.

I do not know the population of Canada, but the US is about 300M (I actually know this number). Canada is about the same size but a good amount of the land area is not populated. I'd guesstimate that is is about a third of the US, so the population is 100M (also a nice round number). 100M / 15 = 6.67M, so approximately 6.67M cows are needed for consumption assuming all people eat approximately 1 pound / week. Another assumption is that Canadians eat as much or less than Americans.

Now, I have to compensate the number for actual population because cows do not grow instantly. Thus, 7M is a good starting low range for number of cows in Canada. Now I have to figure how long cows live for.... and I have no idea. Hmmmmmmmmmmm.... Cows eat grass... You can buy beef for approximately $5-20 per pound... I'll use $10 (pure guess and an easy number to use). Thus, $7500 worth of grass, feed, etc. Minus profit of middle stores, probably a third or even a quarter... so $2000. This is going now where quickly...

At this point, I will realize I am taking too much time, so I'll guess that it is about 5 years. My answer would be between 7M and 35M cows. With some sanity check that it is less than a billion cows and more than hundreds of cows.

As good practice, I would email research afterwards to show that I am also capable of following up and doing research. Provide online resources if you need to demonstrate that you can web search.

After minimum research, there are approximately 13M cows in Canada. Canada has a population of 35M. Approximately 91M cows in US. US has a population of 311M. US consumes 26B pounds of beef. 0.012 pounds of beef per person per year. Although the final number fell into the range I provided, using the calculations above, I should have come between 2.3M and 11.5M. A cow's life is between 1-2 years for meat and 15 years for dairy. An easier way to remember is that there are about a third of the country's population. I'd estimate less for other countries unless they export cows, but that's enough research for a blog.

Prologue

Also see post on other methods I would answer the question
After doing a few more practices of other forms of this question, I've found that I do have some idea approximately what the number should be. There may be some tendency to fidget which metrics to use to estimate the final number because my final numbers tend to be within a range that surprises even myself. So just remember, typically these questions is just your process of thinking. You may come up with the worst guess but may have the best explanation, and it is the latter that has greater weight and for some interviews may be the only weight.

Update

7/31/2014 - Checking on some old subjects and stumbled across a new link on how this question is not useful. I agree that there are more effective questions (as I've noted in My Take on Odd Questions). It does have its use but has too many variables to consider. Either way, a candidate should still be prepared for these questions because there will be some companies that will ask this type of questions. For me, I still enjoy thinking of different variants. It kind of has a nice intention to test one's imagination.

Reference

http://publications.gc.ca/site/archivee-archived.html?url=http://publications.gc.ca/collections/collection_2011/statcan/23-012-X/23-012-x2010002-eng.pdf
Google
http://www.greenkeyllc.com/blog/2013/06/google-no-longer-cares-how-many-cows-there-are-in-canada/