Live data from Hacker News

An Interview Question that Actually Works

blog.filepicker.io

11–20 of 21 posts

Re: An Interview Question that Actually Works

#11
Agreed with siblings stating that the question is arcane, Googleable best practices knowledge. Any time I want to find the answer to something like this, I Google it.

The author should ask themselves honestly if they ask this question just so they can quickly say, "Nope, wrong! Your answer doesn't cover [X number of unstated assumptions]." While I understand things are complex, my first answer would have been something along the lines of position: fixed; bottom: 0;. If that makes me wrong because it doesn't work on [Y smartphone] or [Z tablet], then two things need to be done to make this question worthwhile:

1. State your assumptions and intended audience up-front.

2. Allow the candidate to Google.

If the candidate is allowed to research and put together a comprehensive answer based on the knowledge they've gathered, that turns this question into a much more insightful one.

Re: An Interview Question that Actually Works

#13
This question/post highlights one of the reasons the "no karma score" here at HN is not so great (or perhaps could be improved). We, the HN community, might vote a particular answer to the top but OP/author will not necessarily know that this comment is at the top of the page for any particular reason.

In other words, let's say that @gfodor's comment ("This has to be one of the worst interview questions I've ever heard.") gets 500 upvotes. It will then get ranked first, meaning that it will be the first comment shown when the page is loaded. But that is not obvious - there are no other visual cues that confirm this information. The only way to know this is to have either looked through the source code, or to have been around and seen this question asked/answered.

So this valuable info (that 500 other HNers also thought this was a terrible question) is 100% lost to everyone. No one knows how popular it is. The OP cannot learn that his opinion is thought to be a terrible interview question.

I wish we had a better way of doing this... Maybe OP can see comment scores but no one else can? Dunno...

Re: An Interview Question that Actually Works

#15
post #7
post #4

Earlier quoted context omitted.

The position:fixed reference was a typo. Good catch!

I'm still confused though, since the linked jsFiddle uses position:absolute. Clearly that would never work - That's pretty basic html/css wisdom. I would expect position:fixed to do work though, although your post suggest that that might not be the case on all platforms. I guess I wouldn't realise that until I began testing on a broader range of devices than the normal development stack holds.

position: fixed is if you actually want the footer to always be visible, with the main body content scrolling out from under it. To my knowledge, this works across all devices.

The goal of this snippet is to have the footer always below the content, but in the event the content is shorter than the page height, the footer should still be placed at the bottom of the page.

Really Javascript isn't a terrible solution here, since it only needs to be run on load and on window resize (rare events), but the CSS is indeed nifty and worth knowing it exists.

Re: An Interview Question that Actually Works

#16

My 2 cents: This is a horrible interview question. It tests arcane knowledge that takes about 15 seconds of googling, kind of like the varchar2 question in this blog post: http://www.joelonsoftware.com/articles/fog0000000073.html . It doesn't really tell you if the interviewee can code, and it probably doesn't tell you much about how they think. Developers should be asked to write code and design systems, whether lar…

A valid point. I should've been more clear that this question really only makes sense when talking to a frontend dev. I always try to avoid the "varchar2" style question, a phone interview shouldn't be a trivia contest. For a frontend dev the sticky footer question can tell you more about a persons coding style and thought process. A proficient frontend dev would have an opinion about how sticky footer should be done and be able to identify common pitfalls.

Re: An Interview Question that Actually Works

#17

This article made me feel like a crotchety old programmer for the first time in my career as I cringed at the use of the phrase "great engineer" to describe someone capable of discussing a markup/stylesheet problem during an interview. It's all relative, I guess.

I know the feeling all too well. Managing cross-platform frontend development has become an incredibly intricate, so much so that anyone who can bend the browser to their will deserves the "great engineer" stamp.

Re: An Interview Question that Actually Works

#18

My 2 cents: This is a horrible interview question. It tests arcane knowledge that takes about 15 seconds of googling, kind of like the varchar2 question in this blog post: http://www.joelonsoftware.com/articles/fog0000000073.html . It doesn't really tell you if the interviewee can code, and it probably doesn't tell you much about how they think. Developers should be asked to write code and design systems, whether lar…

Assuming I understand it correctly, the paradoxical thing about this article is that it seems to imply the engineers currently working there would have failed this interview question.

Re: An Interview Question that Actually Works

#19

My 2 cents: This is a horrible interview question. It tests arcane knowledge that takes about 15 seconds of googling, kind of like the varchar2 question in this blog post: http://www.joelonsoftware.com/articles/fog0000000073.html . It doesn't really tell you if the interviewee can code, and it probably doesn't tell you much about how they think. Developers should be asked to write code and design systems, whether lar…

>> Developers should be asked to write code and design systems, whether large scale services or libraries.

Specify. Blurry comments like this don't make the situation any better, no offense. You know that the solution i's entirely situation agnostic.

Re: An Interview Question that Actually Works

#20
This is one of the more mindboggling snippets of CSS you'll ever see. It's up there with techniques that keep two columns the same height without using Javascript or a element.

I've implemented this before, but still wouldn't be able to produce it on the spot without Googling. This post encouraged me to take a deeper look.

This page goes in depth on how it works, but is still a bit confusing: http://code.google.com/p/cleanstickyfooter/

The craziest part is the #wrapper element, which uses a nifty hack to support old and new browsers. Old browsers don't work with css min-height, but they do allow the height property to expand. Moreover, old browsers will ignore an "important!" tag if the same property is addressed later in that selector.

It's a perfect storm of dumb luck that "min-height: 100%; height: auto important!; height: 100%;" actually manages to do what you want, for this exact scenario, in all browsers. That line looks pretty stupid to most modern css devs.

Here's an arguably cleaner approach that I believe will work for most modern browsers (I think after IE6, but could easily be mistaken). No need for the wrapper around all content, but you still need that darn "push" div. Actually now that I think about it, it might even work for older browsers if you add "height: auto important!; height: 100%;" to the body. Maybe someone can test? http://jsfiddle.net/A3BLm/1/

Post reply on HN