News for hackers. Stuff that matters.
Re:Ask HN: What did I do so wrong in this coding interview by cjbprime on Wednesday July 09, 2014 @10:18PM (#8013249)
Your 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...

Re:Ask HN: What did I do so wrong in this coding interview by tokenizerrr on Wednesday July 09, 2014 @10:23PM (#8013262)
> 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.

Re:Ask HN: What did I do so wrong in this coding interview by notaio on Wednesday July 09, 2014 @10:28PM (#8013275)
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 by corncup on Wednesday July 09, 2014 @10:35PM (#8013292)
I'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.
Re:Ask HN: What did I do so wrong in this coding interview by cjbprime on Wednesday July 09, 2014 @10:44PM (#8013311)
Yeah, I confess I'd find it hard to review someone's code with random-looking indentation going on, it's easy to imagine someone treating it as a bad sign. Definitely fix this for your next interview, keep trying though. :-)
Re:Ask HN: What did I do so wrong in this coding interview by davidcuddeback on Wednesday July 09, 2014 @10:34PM (#8013291)
listchars 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.
Re:Ask HN: What did I do so wrong in this coding interview by notaio on Wednesday July 09, 2014 @11:13PM (#8013396)
Thanks for that