Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Last time I had a coding test during a job interview, I was left alone for an hour with a laptop that was screen-shared with a number of interviewers that was unknown to me. It felt a little like live coding in public but without any audible feedback. That might stress some people out I’d guess, but it felt chill to me. I did my usual thing, even used StackOverflow for some quick syntax & library tips, and finished the program (a Tetris-like game with an AI player, in Python). Got the job. It was pretty fun TBH, even with a lot of experience, I’d prefer the live-coding interview over talking through database schemas or whatever.


That's quite a bit for an interview. How long did it take? Did they gave you code to plug a piece into? Or did you have to write the whole game?


It was a whole game from scratch in the programming language of my choice. They only specified the rules. It was keyboard and console only, btw, no graphics or controllers or sound. I took the whole hour and was mostly done when I ran out of time. I forgot to write the score keeping before the interviewer came back. The AI player was “extra credit” and I finished that, so it helped excuse my scoring oversight.

It wasn’t that much or that bad, really. The setup was pretty simple, and quite doable for junior devs IMO (though full disclosure I had just left a position as a lead game programmer, so for me specifically it would have looked a little bad if I didn’t smash this particular interview question). It also helped that the problem was open-ended with extra credit features. I learned later when giving the interview myself that most people never finished the basic game, the majority never tried to write an AI player, and the interviewers were quite forgiving with their ranking & scoring - it was adaptive to the candidates. The coding part of the interview was just trying to be a bit fun and not just be pure dumb LeetCode problems. IMO it worked, I totally enjoyed the interview. The rest of the 4 hour interview included some whiteboard questions (on DB schemas, which I flubbed pretty hard) and also a lot of just talking about experiences and goals.


Yea that would do it for me haha. My bread and butter is embedded C! Technically it's C++ but we try to ease off the ridiculous C++isms because this stuff needs to be readable to the person that was waken up with a phone call at 3am and needs to explain some random behavior lol.

I've never done anything spectacularly fancy with CLI terminals. I could rig up a UI with c++ and qt, or python and tkinter.. but it's been a while. Longer ago, I used to do objc but that was forever ago!

So yea, I'd die on this one hahaha.

I should try it sometime. I love tetris!


Oh you could do what I’m talking about in C, no problem. By console and keyboard only, what I mean is that this is a game done in the shell with a REPL using printf() and scanf(), it was not graphical or anything. The programming problems weren’t about game programming, it was just design a little data structure to hold the board state, implement valid move checking, detect win/lose states. Really simple stuff, I guarantee it wouldn’t be hard for you.

Re: ridiculous C++isms and embedded C, I’ve been in the same spot for my entire career. After learning C++ in college, I joined a CG film company that had banned C++ (dumb story) so I learned how to write object oriented C. Working in console games after that, we weren’t allowed to use any built-in memory management or exceptions or a current compiler, so very restricted C++. (And the worst bug I ever fixed was when someone tried to get clever with their C++ copy constructor.) These days I use CUDA, which is also technically C++ but basically C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: