Live data from Hacker News

Ask HN: What did I do so wrong in this coding interview

news.ycombinator.com

21–30 of 98 posts

Re: Ask HN: What did I do so wrong in this coding interview

#21
It may have been a red flag if they asked you for a simple memory game with a tiny back end and you gave them a Laravel install with a Node.js dependency that you admittedly "cut corners" on and left "a couple of minor bugs" in.

I don't know exactly what they were expecting from you if anything in terms of efficiency or scale but there is a chance this looks like a massive, bloated chunk of unnecessary dependencies and code, which suggests you might not know how to manage a project efficiently. Just requiring Node.js to do javascript development in a PHP environment, itself, is kind of smelly to me.

I'm not saying it's fair, just that it's the impression i'm left with.

Re: Ask HN: What did I do so wrong in this coding interview

#22
post #7

I briefly took a look at the code and I'll help you out with some honest feedback (I've hired before). The problem looks like it's on the frontend, mainly. It doesn't look like you're leveraging a framework (instead manually munging the DOM), which suggests unfamiliarity with modern framework-based frontend development flow (this may or may not be true). Regarding the backend, it looks like mainly PHP framework copy-…

With all due respect, it's a memory game, not a large-scale web application. I don't understand why "frameworks" are the answer to everything these days. There's nothing wrong with interacting directly with the DOM, especially for something like this.

Especially because, as you were to use something like Angular or Ember, you would just end up implementing the same DOM manipulation code, just wrapped in an Angular directive or whatever

Re: Ask HN: What did I do so wrong in this coding interview

#23
Eh. These things are highly subjective. Seems competent overall: I'm not wowed, but these types of assignments are, as you surmised, about establishing baseline competency.

Some thoughts for the future:

1) PHP was a bad choice; some people have a burning, irrational hatred for it, and it leads them to judge your work in the harshest light instead of an evaluative one.

2) Speaking of burning irrational hatreds: PLEASE DO NOT MIX TABS AND SPACES. Drives me nuts--I would have dinged you for that. Not enough to make me say it is "falling far short of senior developer standards," but it makes me question your habits of development.

Tests are always nice, too: they're like the anti-PHP, and give a great deal of bang for buck in terms of coloring people's impressions of you.

Re: Ask HN: What did I do so wrong in this coding interview

#24
I'm trying to figure out how much effort went into this. I ran cloc, and here's what I got:

  --------------------------------------------------------------------------------
  Language                      files          blank        comment           code
  --------------------------------------------------------------------------------
  Javascript                     1803          66480          85484         423029
  HTML                             57            847             79          20374
  SASS                             19             21              8          12114
  C++                              38           1011            763           7700
  C/C++ Header                     45            816            713           5165
  CSS                              16            133             27            777
  PHP                              36            330           1048            597
  CoffeeScript                     14             72             44            326
  make                             13             91              3            255
  YAML                             39              8              0            227
  Bourne Shell                     16             49             42            197
  Python                            1             32              7            125
  m4                                1             12              0             61
  Bourne Again Shell                5             15             16             38
  XML                               1              0              0             18
  Ruby                              1              0              2              4
  --------------------------------------------------------------------------------
  SUM:                           2105          69917          88236         471007
  --------------------------------------------------------------------------------
Most of this is obviously third party code, but it looks like you wrote thousands of lines of PHP, plus a bunch of frontend code?

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.

Re: Ask HN: What did I do so wrong in this coding interview

#25

Disclaimer: I'm posting this under a new dummy account because I don't want this to be seen as feedback from my company. We didn't interview you, but I'm a senior manager and I want to help w/o implicitly dragging my team into it. (The key word is also "help"; I'm not trying to belittle you, just give my honest assessment of this project, quick as it was to create.) tl;dr: I agree with the assessment that this doesn'…

[deleted]

Re: Ask HN: What did I do so wrong in this coding interview

#26
I've never hired anyone, so take my thoughts with a bucket of salt, but one concern I'd have is that there's just way too much code here. There only needed to be one or two PHP files for the whole app (assuming you were supposed to use PHP in the first place). If they're not a PHP shop, they likely look down on PHP with severe disdain (as many do) and so this may have led to some premature judgement.

Drawing the grid with Javascript wasn't necessary at all: that could have been pure HTML/CSS.

No use of jQuery is probably a red flag - not that it's inherently bad to avoid jQuery if you don't need it, but using it would have made your code substantially cleaner/easier to maintain. If a quick and dirty project like this is your assignment, I'd be a little concerned if you didn't install a tool that would help you complete it as quickly as possible - especially one that's (for better or worse) pretty much a given on any project that involves Javascript.

Finally, while I understand that you may not be a UI designer, there's a pretty severe lack of polish on this interface. Part of being a full-stack developer is being a front-end developer; part of being a front-end developer is some sense of design; and part of being a "senior" full-stack developer is being able to set a strong example across the entire stack (including the front-end). The arrow keys for navigation was a nice touch on the interaction side, but visually it was amateur hour.

I'm not a strong PHP developer so I won't speak to your back-end skills, but hopefully this has given you some perspective on why they made the decision they did. For what it's worth, I agree with their feedback. I know that's hard to hear, but just pick yourself back up and keep getting better.

In the mean-time, I suggest applying for lower-level positions. Find somewhere that will provide a good learning environment, alongside some strong senior developers that can mentor you without expecting you to perform at a senior level. Then, in a few years (or months if you're a quick study), get back on the horse and apply for some more senior positions. You'll get there someday.

Re: Ask HN: What did I do so wrong in this coding interview

#28
Assuming you did this in a day or less I think your prospective employer kind of missed the point of the exercise. Turning out a (fairly well put-together) working prototype in this timeframe shows that you can code, your first-pass level of quality, and that you know how to prioritize.

The output of this project should have been a starting point for further discussion. Instead what you describe tells me the company you interviewed with is probably a "one-pass" (it's expected to be perfect the first time) shop and likely have loads of technical debt. Competent software shops understand the long term nature of development and the tradeoffs involved. They missed an important opportunity to learn about your true depth and ability to work with others by not having you do a paired refactoring of some aspect they didn't like.

Just as people are often bad at being the interviewees people can be equally as bad (or worse) interviewers. There are loads of jobs out there for you. Don't let things like this discourage you.

Re: Ask HN: What did I do so wrong in this coding interview

#30
post #18
post #7

I briefly took a look at the code and I'll help you out with some honest feedback (I've hired before). The problem looks like it's on the frontend, mainly. It doesn't look like you're leveraging a framework (instead manually munging the DOM), which suggests unfamiliarity with modern framework-based frontend development flow (this may or may not be true). Regarding the backend, it looks like mainly PHP framework copy-…

I'd disagree on the JS part. I think given the timeframe and context it's fine as is. He did do a lot of things right such as not leaking globals and using gulp/browserify.

cell.js line 21 actually does leak a global, its an undeclared var reference, and will be attached to window in the browser.
Post reply on HN