Re:Ask HN: What did I do so wrong in this coding interview
by headcanon on Wednesday July 09, 2014 @11:14PM
(#8013398)
TIL about cloc! Thank you good sir.
It seems as though this is because he had node_modules checked into source control on the frontend part. npm basically likes to download the whole internet when you run npm install, so these stats do not suprise me. Checking in that directory is generally discouraged, but its possible he wanted to avoid adding the node dependency in order to ease installation.
Re:Ask HN: What did I do so wrong in this coding interview
by jsaxton86 on Wednesday July 09, 2014 @11:49PM
(#8013504)
You are correct. Here are the revised numbers after excluding public/scripts/node_modules:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
PHP 36 330 1048 597
Javascript 9 101 86 362
SASS 6 4 4 127
XML 1 0 0 18
CSS 1 0 0 1
-------------------------------------------------------------------------------
SUM: 53 435 1138 1105
-------------------------------------------------------------------------------
Re:Ask HN: What did I do so wrong in this coding interview
by joshschreuder on Thursday July 10, 2014 @12:06AM
(#8013556)
NPM actually encourages you to check the directory in when building something deployable like a website or app:
https://www.npmjs.org/doc/faq.html#Should-I-check-my-node_mo...
I'm not a web developer, but this seems like a day or two of work? That seems unreasonable to me, and I probably wouldn't have agreed to that level of commitment, especially if they were still interested in me after an interview.
Side note: in the webdev world, is it normal to have third party code mixed with stuff you wrote yourself? In C++ land most of the third party stuff would have gone in a contrib directory or something before being built into a library of some sort.