Live data from Hacker News

How to win the coding interview

blog.devmastery.com

1–10 of 305 posts

Re: How to win the coding interview

#2
I have a talking space alien.

God says... other debt well_obviously over_the_top hot_air tree_hugger I_just_might scum jobs I_hate_when_that_happens hopefully we_ve_already_got_one a_screw_loose kludge Dad walking so_he_sess play bastard Hasta well_I_never I_planned_that I'm_off_today lust charged hey_thats_right you_are_my_sunshine not_too_shabby take_the_day_off pow I'm_tired_of_this lulz

Re: How to win the coding interview

#3
> Let’s be honest, most developers don’t love having to write code as part of an interview process. Some have even threatened to quit the business over it.

I actually prefer a coding interview over an interview with an unprepared interviewer, who is making up questions on the fly and expects the exact answer he/she has in mind.

Re: How to win the coding interview

#4
Very interesting article, thanks for writing! I have but one, eh, comment:

> Your code should be commented

Sure.. but:

  > * @param {string} stringToTest - the string to test.

  >   // make sure we have a string.
  >    if (typeof stringToTest !== "string") {
  >

  > function isPalindrome(stringToTest) {
  >  ...
  >    // if we get here, it's a palindrome
  >    return true;
Do we really need to explain that stringToTest means string to test? I for one find such low level comments almost completely redundant. I prefer strong variable naming and other ways of creating clean code to littering the code with comments that the code expresses naturally.

Comments should IMHO be reserved for explaining special complexities, any particular gotchyas, etc.

Re: How to win the coding interview

#5
Perhaps better named "How to win my coding interview."

Author goes into the specifics he personally expects from an interview. Since he's not positing these as universal standards (and rightly not) I'm not sure if this is relevant to anybody other than the people who intend to interview at dev mastery.

Re: How to win the coding interview

#6
post #3

> Let’s be honest, most developers don’t love having to write code as part of an interview process. Some have even threatened to quit the business over it. I actually prefer a coding interview over an interview with an unprepared interviewer, who is making up questions on the fly and expects the exact answer he/she has in mind.

Yep, spot on.

Re: How to win the coding interview

#9
Is there even room on a whiteboard to write comments and tests? Often there's barely even room to write readable code ...

If you're writing in a shared text editor then sure.

And isn't all the talking you do already commemts enough?

Edit: I'm bad at reading comprehension on a mobile screen. The tests and comments bit is in a different section.

Re: How to win the coding interview

#10
post #9

Is there even room on a whiteboard to write comments and tests ? Often there's barely even room to write readable code ... If you're writing in a shared text editor then sure. And isn't all the talking you do already commemts enough? Edit: I'm bad at reading comprehension on a mobile screen. The tests and comments bit is in a different section.

I don't think the part about tests and comments is meant to apply to the whiteboard coding. It's in the section about coding on a computer.
Post reply on HN