8 ms·
Ask HN: What did I do so wrong in this coding interview
A few days ago I applied for a senior Full stack developer in a mid size company. HR interview went great, I had a quick code test on paper that went OK as well, and a quite long technical interview that went great.
The day after the HR sent me an coding test that involved creating a simple memory game in JS with a tiny back end to store high scores. So I banged out this code as fast as possible, while trying to emphasis on maintainability and testability. I sent back the result as github repo:
https://github.com/m4nuC/memGame
Didn't hear back for a few days but eventually arrived a mail stating that "this code felt far short from a senior developer standards" and obviously didn't get the job. I know I cut a few corners, no unit testing, a couple of minor bug and obviously not a production ready app but I thought that would be enough to show that I knew how to build a web app without spending 2 days on it.
I couldn't manage to get any more info from them on what they meant by "falling far short of senior developer standards" So what in your opinion went so wrong about the code?
- deleted 12y ago[deleted]
- rnd33 12y agoThen hopefully you would state that explicitly before-hand no? This guess work from the interviewee's side is what makes many of these interview code problems so completely arbitrary.
- deepakkapoor 12y agoI have not looked at your code but I can say with some experience that it has nothing to do with how you wrote it. There is no way for me to confirm but most likely this is what happens when you turn in a coding test. Someone who is perhaps at a debatable senior level looks at your code and often (I have seen this happening at places where I have worked) gives it to someone else for their feedback. The person your code gets handed over to is often not the person who will make hiring decision. He/she will look at your code and try to discover their own style in your code. If your code does not come close to the way they would have written it then it is bad code. A lot of things come into play here. Often it is unclear expections. I have done coding tests where the requirement was to pull data from a dataset and cache it in memory. This requirement can be met in many ways. I chose the simplest one but the feedback I got was similar to what you got. It totally depends on where the reader of your code is in the evolutionary stage https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243 https://medium.com/@webseanhickey/the-evolution-of-a-softwar... Reading code is harder than writing.
- cjbprime 12y agoYour game looks generally fine, they're being weird. Is it possible that you misunderstood and they (a) wanted you to use a different language than PHP (perhaps because they're a Rails shop or something), or (b) wanted you to do this in pure JS, with e.g. localStorage? Also, the block indentation/braces look deeply messed up on github, any idea what happened? https://github.com/m4nuC/memGame/blob/master/app/controllers/ScoresController.php https://github.com/m4nuC/memGame/blob/master/app/controllers...
- tokenizerrr 12y ago> 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.
- notaio 12y agoYes it seems like it. Gotta find VIM script to catch those
- davidcuddeback 12y agolistchars works pretty well. I have this in my .vimrc: set list set listchars=tab:>=,trail:~,extends:>,precedes:<,nbsp:. Edit: you can also configure it to use one type of indentation. I use "set expandtab" so that my files are always indented with spaces.
- notaio 12y agoThanks for that
- corncup 12y agoI'd suggest paying more attention to how the code shows up in Github next time (assuming they're reviewing it on Github). If I'm reviewing a potential hire's code, I'd want to see that they pay attention to details like that, lest the production code base get super ugly / hard to read.
- adriand 12y agoPersonally, I'm impressed by your work. These folks are missing out.
- notaio 12y agoThanks Adriand, much appreciate.
- uasked 12y agoI 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-paste. I suspect if someone has a vendetta against PHP (I don't, but some do), that might be a black mark. If I were to summarize this code, it looks like it was written by someone who can competently hack together a web app on their own, but doesn't have much experience with working on a modern dev team. I have no idea if I'm right. Just offering an employer's perspective.
- cypher543 12y agoWith 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.
- notduncansmith 12y agoPerhaps framework was the wrong choice of word. I wouldn't call jQuery a framework, but it certainly would have helped. A library like Rivets.js or similar would have been great to see as well, since at that point there'd be (close to?) 0 manual DOM manipulation required (thus obviating the need for jQuery), and he could still keep the page weight easily under 10k.
- cypher543 12y agoBut what's the point? These days, there's not a whole lot jQuery does that can't be done easily with vanilla JavaScript. Would you rather hire someone who can write lean code with minimal dependencies or someone who throws in whatever library is getting the most buzz "just because"?
- 12y ago
- andrewstuart 12y agoWhen developers assess the code of developers, the assessments can often be entirely arbitrary and utterly meaningless. It's one of the worst possible ways of assessing people because almost no-one does it in a scientific, quantifiable way at any level. The assessments are purely subjective.
- ryen 12y ago>Run sudo chmod -R 777 app/storage. Certainly opening up write access to everyone isn't going to win you any points.
- notaio 12y agoI would have made it 755 on my environment but I wanted to make sure the install work properly as I know this is often a friction point during install of Laravel
- ugh123 12y agoThen clearly you don't understand how to use your framework, or you don't understand how to run a webserver. Saying "I would have made it.. but..." is certainly not something i'd let fly in my dev team. I've taken a look at your code and you do not appear to be senior-level material. You managed to turn a relatively small game into 40+ files and 15+ directories of mostly useless framework fluff just to make what appears to be a mostly-javascript game. - Trying to review your code, I have to navigate a nested tree of framework php and nodejs includes to actually discover what the heck is going on. - Why do you need nodejs for development? That just introduces yet another framework to install and deal with packaging and deployment. Why not just stick to backbone or some other minimal framework tool in javascript? You're not even importing that much useful stuff to warrant using npm. - You're doing a lot of manual dom manipulation which looks sloppy - You've committed a minified css file Maybe some of the code you wrote might be okay, but your choice of setup and prep for a project seems pretty junior. Get some experience working with veteran developers on more complex projects (i.e. not simple web dev).
- lostcolony 12y agoAll the other comments so far are valid, but I have something else to add - did they indicate a time frame you had to have it done by, and did you use all of it? Because they may not have been looking for fast turnaround time, they may have been looking for quality. In 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.
- zachrose 12y agoYou seem like a sharp developer who shouldn't be spending your time doing bogus homework in today's market. Out of curiosity, whereabouts are you located?
- notaio 12y agoThanks. I am a French expat in Hongkong
- zachrose 12y agoCool. If you wind up in southern California hit me up.
- joesmo 12y agoExactly this. Might I suggest the next time a company asks you to do a project, tell them you don't work for free. It's tough sometimes because you really want the job, but in my experience, every single time I've broken my "not working for free" rule, I ended up doing work for a job I never got. What I'm trying to say is that there's a correlation between bad companies and tests like these. For a quick project I think you did a great job, BTW, though there should never be any need for sudo. That was the only decent feedback honestfeedback provided. The rest is BS.
- honestfeedback 12y agoDisclaimer: 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'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.
- notaio 12y agoSo using abstraction is not something a senior does ? It seems to me like the contrary. The more experience I have the more I like to abstract things instead of making them from scratch. But even so it seems a bit heavy of judgement to disqualify me with such strong word over this choice.
- wfunction 12y ago
- krapp 12y agoIt 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.
- antjanus 12y agoI think this is the root of it. Looking at the repo, you shouldn't have to go through 20 steps to just install the app. I believe Node is just for compiling and gulp stuff, so that's fine for front-end. I can't say I'd pass the interview but my idea of how this would work would be: - simple instal.php script that would use PHP's PDO to create a DB and a table with necessary info - simple api.php script that would take API calls in order to save scores and that's it. You could easily do this in Node as well thus keeping everything javascript - javascript front-end with no PHP involved there. An actual index.html file with everything in it, referencing one (non-minimized) JS file and whatever images and CSS. This is hindsight 20/20 obviously especially since we all want to show EVERYTHING we know during an interview and I'm guilty of doing things like this as well. I'm guilty of doing the opposite too, keeping things too "prototype-y" and messy.
- scarmig 12y agoEh. 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.
- stcredzero 12y ago(Note: the following is not criticism directed at you. I'm merely using your comment as a springboard for commentary about the industry on many matters you also show you are aware of.) These things are highly subjective. Yes. leads them to judge your work in the harshest light instead of an evaluative one Should any professionals have to present apologetics for others in his procession doing such a thing? We are all human beings, but shouldn't we be trying not to be this quickly and arbitrarily judgemental? Speaking of burning irrational hatreds: Somehow the social expectations of the programming profession are that we can get away with acting these out. PLEASE DO NOT MIX TABS AND SPACES. Drives me nuts--I would have dinged you for that. Yes. This can be problematic. The fact that it is still problematic after all these decades is a good indicator of how backwards we are as a profession. If you look at the various analyses answering the op as detection of signalling -- well, it's all about signalling. I'm not so sure this is too much more substantive than an interview where you need to have the right school name on the right degree and a properly pressed suit.
- utunga 12y ago>> leads them to judge your work in the harshest light instead of an evaluative one > Should any professionals have to present apologetics for others in his procession doing such a thing? We are all human beings, but shouldn't we be trying not to be this quickly and arbitrarily judgemental Well sure. But this is php we're talking about here.
- jsaxton86 12y agoI'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.
- headcanon 12y agoTIL 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.
- notduncansmith 12y agoI'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.
- cnp 12y agoThe key to all things is "Keep it Simple".
- ary 12y agoAssuming 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.
- wfunction 12y ago1. When your comments are longer than your code, either you're putting in too many comments, or your code is too hard to read. (The former seems to be the case here.) 2. Why is the spacing convention all over the place in some files? https://github.com/m4nuC/memGame/blob/master/app/controllers/ScoresController.php#L10 https://github.com/m4nuC/memGame/blob/master/app/controllers... https://github.com/m4nuC/memGame/blob/master/app/database/migrations/2014_07_03_144443_add_high_score_table.php#L13 https://github.com/m4nuC/memGame/blob/master/app/database/mi... 3. Why are there so many folders that only have .gitignore's inside them? In fact, why are there so many folders at all? 4. In my glances at some of your files I didn't find a single function with a lot of "meat" inside it, so it doesn't show much about your ability to write something that actually does something.
- jsmthrowaway 12y ago> 1. When your comments are longer than your code, either you're putting in too many comments, or your code is too hard to read. (The former seems to be the case here.) I hate this meme. There's nothing wrong with too much commentary. You are not on a comment budget. Please stop spreading this around, like the "rewriting is always a bad idea" meme that's embedded itself in young developers like dogma even though Spolsky's point is up for debate. Atwood is wrong about this one, too, and I hate that Spolsky and Atwood have so many "rules" of programming that people pass around. I've seen this meme borne out via comment ratio rules in style guides. That's ridiculous. We all work in editors that make comments a different color. I use light gray. My eyes can look right past them, but if I want the paragraph or two explaining the algorithm I'm looking at, it's there. The underlying flaw in Atwood's claim is that it is possible to write code in a way that is self-evident to every reader. You do not know every reader. Well-written commentary -- bordering on literate programming -- makes development much better. Even better if the code is the documentation. I don't know where this notion that we must conserve comments like water came from, but I'd be happy if it just stopped. Note here that I'm addressing quantity, not quality. I feel that is important to clarify.
- wfunction 12y agoI think you might've misunderstood what I'm saying. It's perfectly fine to have complex functions commented as much as necessary; heck, it's totally fine to have your comments be 100x as long your function when the function is actually hard to understand. What's not OK is commenting ALL of your code, especially not to such an extent where the comments are actually longer than the code size on average. (!) Some stuff just has to be self-explanatory, period -- that's a fact, not a meme. If you can't make the simplest code self-explanatory, then I'm sorry but you simply can't code as well as someone who can. And if you're going to comment everything, then you're also wasting valuable time that someone who didn't need to do so would've spent writing actual code and getting more done.
- cuong 12y agoThe code didn't scream senior developer, but given the constraints it looks like you're an able developer and worth the time to at least interview. Sorry for the bad experience, hope it turns out better.
- eel 12y agoWithout seeing the prompt they gave you and not knowing the context you would have gained from the technical interview, we're all just guessing here. My guess is that they were expecting a much simpler application for a simple problem. Also for a JS game with a tiny backend, the Github project code is heavily weighted toward PHP (73% PHP vs 20% JS). Perhaps in their internal discussions, a word like "over-engineered" was brought up. I'm not saying that it's bad code. It looks fine to me. Other point is that the technical interview is a time to ask questions for the interviewee (when they allow). What is their development process? Do they iterate and prototype a lot, or is their process closer to waterfall? Assuming their stack is primarily PHP, do they use a framework? Do they follow MVC? Do they use a JS framework? Etc... Having known the answers to these questions would have helped you create an application that looked closer to their comfort zone. (Even if you don't know a coding test is coming, you still should want to know the answers to these questions so that you can know if you are getting into a situation where you might have to maintain old applications written in PHP 4, for instance.)
- joesmo 12y agoIt's clear that their stack is not PHP from honestfeedback's comment about not being familiar with composer (though really composer does not require sudo if used properly). From briefly glancing at the code, I also think it looks fine and for a one to two hour project, IMO, is way more than any company should expect. I agree that knowing the answers to these questions is crucial regardless of coding tests, but an interviewer who can't judge code that's not in a familiar format (MVC, framework, etc.) is a junior developer and shouldn't be judging any code. I hope the OP finds a job someplace where his skills will be appreciated, a place that doesn't ask for free work. Sounds to me that they were really too lazy to look at the whole application or didn't have the technical know-how to understand an application written in frameworks they were not familiar with.
- longlho 12y agoAgreed w/ honestfeedback. - Overall project structure seems a bit unorganized IMO (no centralized build process, gulpfile inside subfolder). Overall this makes it fairly hard to dive right into the project. It might be my lack of experience in PHP project structure. - I think pulling in a server & a db might be an overkill. Local storage will do the job perfectly. - Mix of tabs & spaces is also very messy. - Styling is pretty sloppy too I believe. No clear organization/reusability in the stylesheets. - Vendor scripts/generated scripts should not be committed to the repo IMO. There're already bower & CDNjs & a bunch of other services. - Your JS is also very module/singleton-based although some of them are clearly object-oriented. Also seems to be a mix of jQuery usage & DOM directly, why not 1? I think what they're looking for is a couple of simple JS that's easily tested, maintained & expanded which IMO is more important for senior candidates. Less senior ones can always bang this out quickly but senior ones care way more about other attributes of a project than just getting it done asap.
- tetha 12y ago> - Overall project structure seems a bit unorganized IMO (no centralized build process, gulpfile inside subfolder). Overall this makes it fairly hard to dive right into the project. It might be my lack of experience in PHP project structure. This was what I noticed the most - and I can easily see this as a big part in the discussion, since seniors should lead and bootstrap projects. I'd have expected something like ./server and ./client and a README toplevel, client eventually having a public folder which can be served as-is (i.e. doesn't contain any build/dependency management files), potentially with a second public-minified around. Instead I end up with a src-folder hidden like 3 folders deep and another one toplevel for asymmetry. Beyond that, the folders in the php app follow the package-by-kind antipattern. There is no value in grouping all controllers in one place. There's value in grouping all the highscore handling in one place, though.
- ufmace 12y agoThis whole interview practice seems a bit odd to me. Does anyone else out there give these types of "Homework" assignments to candidates after they've already been through HR and tech interviews? If I gave out an assignment like this at all, I'd be inclined to give it before the on-site interview as a pre-screen. I thought the whole point of such a thing would be to screen out people who can't code at all before they take up valuable man-hours interviewing, with a secondary goal of creating discussion material for a technical interview. Assuming it doesn't completely suck, I'd use part of the technical interview to discuss various aspects of the solution - the merits of frameworks used, tradeoffs of design decisions you made, what would you need to do to scale to 1M users, where are the potential performance bottlenecks and security challenges, etc. Doing it like this makes me wonder if their real motive is something else. What are they really trying to determine with this sort of test at this time? They do it at a time where there isn't much opportunity to discuss the result, so what's the real goal? Whether, without prompting, you used their favorite language/framework/database and happen to have the same coding style as them? Seems pretty silly to me. Did you get any possible feeling that maybe they have some hidden or political reason for not wanting to hire you, and threw this test at you as a way to create an excuse for why they won't hire you? That would explain why they gave it after the interviews and don't seem to be interested in discussing why it doesn't meet their standards.
- Jemaclus 12y agoWe always give some sort of programming test, usually a dumbed down version of a problem we've recently solved ourselves. You shouldn't have to spend more than two hours on it, if that. Most of the time our applicants say they spent less than an hour on it. It also weeds out a non-zero number of people who aren't really super interested in the position.
- ufmace 12y agoThat sounds fine; it's more a question of the timing. I'm guessing you give your test before the in-person interview? That would make a lot more sense to me than doing it after, which they apparently did to OP.
- pistle 12y agoI see a disconnect between balance of dependencies vs. the minimum required to yield the target result. A lack of focus on the thing you are trying to show... coding skill/efficiency around the game problem. The tight piece should be a great set of game code. I see, which I see a lot when I see IoC for small jobs, inversion of focus. Lots of ceremony yielding a loss of clarity. You know laravel. You know about libraries and can use them. It's less clear that the code you wrote was good. It's sort of buried in a fair bit of noise. You won no favors by requiring an install of the nature you have and fumbling that a bit as well (chmod 777). The other thing is... you can't trust a potential employer's reason for saying, "No." They said it, but you don't know if the message is garbled by the HR rep or even a flat out lie because the short answer is, "No." and they don't want to spend time explaining themselves. They decided and moved on. They are not invested in your future. Coming here for feedback is a good practice. We care about you and have few reasons to just let you know, "No." Soooo many dev job fish in the sea. Get your line back in. Your bait is fine.
- utunga 12y agoFWIW instructions dictate "1) Use directional arrows to select a card. 2) Use "Enter" or "left click" to flip a card" In the demo I can use arrow keys. But only left click can flip a card. [enter] does nothing (using Chrome Version 35.0.1916.153 m on Windows 7). If they tried it and it failed (and if they had a big pile of submissions to get through) this would've definitely counted against your submission. -- More generally, having looked at what this game actually does vs number of lines of code I would use one word to describe it - overkill. -- Let me add. It was very helpful of you to post this question. Informative (I hope) for you, but also for everyone else, as we contemplate what coding mastery is really about.
- kamaal 12y agoIt only means they didn't deserve you. I have gone through a few interviews of this nature off late. Given the, timelines(and technology limitations) they give you to complete the assignment and return it to them and managing a day job with family, frankly speaking I had to slog through whole nights for sprints of 3 days. For nearly a month for various interviews. At the end some companies appreciated it and some just plainly gave a very discouraging feedback. If you can't appreciate a person who can deliver your requirements with 100% features covered and well tested to the point without wasting any time on clarifications, under crippling timelines- Then clearly you are looking for men from an another planet. You must just wish those companies all the best and move on. They are ultimately going to hire some career cup scraper any way.
- ugh123 12y agoCan you let us know what company this is?
- sirrocco 12y agoThanks for posting this, the whole thread was a learning experience and congrats for having the guts to "Ask HN". I won't really comment on the code but I think that the company could have come back with something like: "Hey, can you make this much smaller? with only minimal use of frameworks?" An explanation like "Falling far short of senior developer standards" sounds like an absolutely pointless comment and I feel someone had a bit of a childish reaction when seeing the code (their comment could fit them just as well).