Earlier quoted context omitted.
> Also, the block indentation/braces look deeply messed up on github, any idea what happened? Combination of using spaces and tabs for indentation. Looks like it'd look fine with tab size set to 4, but it should of course only use one method of indentation.
Yes it seems like it. Gotta find VIM script to catch those
Ask HN: What did I do so wrong in this coding interview
11–20 of 98 posts
Re: Ask HN: What did I do so wrong in this coding interview
#12Certainly opening up write access to everyone isn't going to win you any points.
Re: Ask HN: What did I do so wrong in this coding interview
#13In the future if you get something similar, you may want to ask what they're looking for (gathering requirements, you might say), and optimize accordingly. Ultimately, it may be completely unrelated, but I've had both kinds of coding tests, ones where I had an hour and had to cut corners as such, and ones where I had an entire weekend and was explicitly told to make it production quality, whatever I felt that entailed.
Re: Ask HN: What did I do so wrong in this coding interview
#14>Run sudo chmod -R 777 app/storage. Certainly opening up write access to everyone isn't going to win you any points.
Re: Ask HN: What did I do so wrong in this coding interview
#15I 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-…
Re: Ask HN: What did I do so wrong in this coding interview
#16Re: Ask HN: What did I do so wrong in this coding interview
#17Earlier quoted context omitted.
> Also, the block indentation/braces look deeply messed up on github, any idea what happened? Combination of using spaces and tabs for indentation. Looks like it'd look fine with tab size set to 4, but it should of course only use one method of indentation.
Yes it seems like it. Gotta find VIM script to catch those
Re: Ask HN: What did I do so wrong in this coding interview
#18I 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-…
Re: Ask HN: What did I do so wrong in this coding interview
#19tl;dr: I agree with the assessment that this doesn't look like the kind of code I'd expect of a senior developer.
The biggest issue from my POV is that you pull in a _lot_ of heavy-weight frameworks and implicit dependencies for what could be a really simple app. To actually examine the application logic of your submission, I have to flip through dozens of auto-generated PHP files, Javascript module wrappers, and empty directories.
Sometimes, calling yourself a "senior" engineer means doing less, not more. The layers of indirection, framework code, and build toolchain applied here make it harder to follow what your code is actually doing. Coupled with a lack of unit tests, it seems impossible to verify in any short amount of time that it actually works as promised.
Even with all that MVC goodness, the separation of concerns on the client isn't great. There's a mix of display logic and app state visible in lots of places. (IMHO game.js is the worst offender here, as the entire game state and DOM rendering are mixed pretty indiscriminately.)
Finally, asking a reviewer to run a bunch of code from an untrusted repo via 'sudo' is pretty much a giant red flag for me. A simple JS+PHP webapp shouldn't require me to do anything as root on my machine. (I'm also not familiar with Composer, but my brief skimming of the homepage, it seems like the whole point is to not require system-wide installation of dependencies, so the sudo bit is especially weird.)
It looks functional, and if you were interviewing specifically at a shop that used these frameworks and tools, it might not be so bad. If asked to review this without that context, though, I would give similar feedback to what you received.
Re: Ask HN: What did I do so wrong in this coding interview
#20I 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.