4 ms·
In an interview, stopping at this might just make you not get the job. If you're lucky the interviewer will laugh and ask the appropriate followup question. It
by tharkun__ 5y ago
In an interview, stopping at this might just make you not get the job. If you're lucky the interviewer will laugh and ask the appropriate followup question. It goes something like this:
Haha, awesome answer. I agree with you from a business perspective it seems stupid at first. Now I can't come up with a good reason to do this, but let's say I as your Product person have convinced you with enough good reasons that it is indeed a valuable task to fill this 747 with as many ping pong balls as you can. What would you do?
If you keep it at "I refuse to answer this question", you're out. If you laugh and maybe talk about your experience with Product people asking for stupid stuff all the time and then you ask some/all/other questions like these back:
Is this a 747 in it's "raw" state, i.e. no seats, no overhead compartments etc, basically empty fuselage? Am I supposed to fill the wings as well (i.e. the kerosine storage areas? Is the aircraft supposed to be able to fly after this? Do I have to care about the flammability of ping pong balls? Btw. how much do ping pong balls weigh and how big are they again, just to be sure we're talking about the same thing I'm thinking of here?
And the list goes on. This is just the stuff I could come up with in a minute without being in a high pressure interview situation :) One of my bosses once told me why he likes me working for him: You don't say "can't be done" you just ask back "How much can this cost?"
- swiley 5y agoYeah, unfortunately you get asked to do some pretty silly stuff all the time and being able to cope with that is a critical skill.
- tharkun__ 5y agoActually I find this a fun thought experiment that can show if you are just a code monkey or a software developer. Let's say the answer is that it's still supposed to fly (working software you are adding a feature to), so also no stuffing ping pong balls into wings and such. Ignore fire hazards and such (no edge cases for now, build an MVP). Now a plane fuselage is basically a cylinder. At one end I assume full size but there's suddenly a wall where the cockpit and such is. The other end is more "fun" because the cylinder becomes more narrow. In any case now we are probably gonna have to find a 3D bin packing algorithm for packing spheres into a cylinder, potentially its already implemented or we might need to implement it from some research paper we find but in any case it is probably a solved problem (reinvent the wheel in-house or use a library and be done with it? Is the library good enough? Is it supported or some dude in a basement wrote and abandoned it?). Just like in physics where we ignore some forces sometimes for easier calculations for example we can probably cut the narrowing cylinder into sections of one ping ponf ball width and assume constant diameter for those. The difference this make in the end either doesn't matter (80/20 rule of software development, don't gold plate it, make it good enough) or we assume that any extra balls we "miscalculated" can fit into the nooks and crannies we have ignored anyway because a plane fuselage is not a perfectly smooth tube anyway. Never mind the landing gear and such.
- rdtwo 5y agoActually the Anwser is simple to solve at least estimate fairly accurately if you assume the Airplane has to fly. You just need to know the model and how many pallets fit into the cargo. The pallets are square with known volumes you pack them at the packing factor for spheres and you are done. There is some bulk cargo area but it’s not big so you need to account for that and That’s about it. You can ignore mass unless the problem lets you smash then then you are just packing plastic blocks into a container and you have to double check you aren’t limited by cargo capacity and range. A more interesting problem would be to suppose you needed to float a 747 that crashed and sank in tact. How would you go about calculating the right number of ping pong balls to do that.
- tharkun__ 5y agoSquare pallets sounds awesomely easy indeed. I didn't know that existed. I've only seen the ones that are wider on the top vs. the bottom. Like this one https://www.dsm.com/content/dam/dsm/dyneema/en_GB/images/applications/v2/air-cargo-containers/container_header-img.jpeg https://www.dsm.com/content/dam/dsm/dyneema/en_GB/images/app... Those look like they'd be easier to deal with too though. And in any case a great discussion in the interview can ensue regardless. Which is the point. Interesting second problem too. So you have a regular 747 you say, which I suppose has a mass I can look up somewhere, we have statistics probably about how much cargo and passenger baggage usually weigh (or maybe these are even available for the specific flight?) and passengers hopefully made it out alive since you said the aircraft was intact and didn't burst into pieces. Now would come the part of just looking stuff up that I don't know but know is known to man already so you better look it up instead of reinventing it all. Apparently from a quick google I would probably want to know how much the plane's buoyancy already works for us (it definitely sank so there's that, but did it barely sink or did it sink like a stone?) and see how much a ping pong ball wants to float. My guess is that the ping pong balls are so buoyant that we can even ignore their small plastic shell and calculate it as if the plane was directly attached to the needed volume of air to make it float.