<- Back

Tech Interview or story behind Game of Life

25 Dec 2020

I had an onsite interview with some big tech company many years ago. It was one of my first interviews in such big companies with this classic onsite stage - a huge amount of coding, designing, talking about previous experience, culture contribution/fit, etc.

As I just start gaining experience with this type of interview. Somewhere in the middle, I was already tired and exhausted. It was near the end of the onsite interview when 2 folks came into the room and said that they want to do one more coding round. They said it will be a quick one for ±40 minutes. So they give me a white piece of paper and a pen. The question was - Can you implement Game of Life?

As I remember for a few seconds my brain just freezes and starts thinking about the philosophical meaning of this question. Anyway, after that freeze, I start asking questions like what does it mean, about what game they are talking about, etc. At that point, I felt that I’m not “geek” enough for them because I didn’t know this game. Actually, it was not a game - it was a cellular automaton devised by the British mathematician John Horton Conway in 1970. After all, time passing and I wrote down the rules of this into the paper, draw some simple interface, defined edge cases, and start writing the code for this zero-player game.

Short note: They were not a game company, or something related to this. They are far away from cellular automaton and games as I’m from inventing the new type of rocket that brings us to Mars in a few hours from any point of our planet.

I would love to say that’s zero-player game sounds not very fun and in my head, I hold the idea - “who will play in it and what’s the idea of this” along the way. When code was ready and a lot of time passed they said - nice, it was the first part of this interview. So the second part sounds like - Can you design the web app, like chess.com where people can start the game, play together, move to the state of any point of the game timeline. It was the system design part of this interview.

So my brain just blew up. How few people can play in a zero-player game? O_o In front of me was a few papers with matrixes, some numbers, code, some notes about edge cases, rules, etc. I didn’t imagine how to play in this game alone, without anyone but they ask to implement an app where millions of people will play together against each other. Somehow this discussion ended and after a few rounds, I left the office. I was a bit tired and really angry at myself. On the way to my hotel, I was thinking about how I didn’t know/hear about that game before. I thought that was my fault that I didn’t hear about it before.

At the hotel, I opened my laptop, google about that game, saw the video, read the wiki, and when I saw how it should look like I’ve decided to quickly implement it to understand better what’s the idea behind it. So I wrote that small piece of code that allows me to see and play this game. I’ve added the teams to have a kind of competitive piece in this game and that’s it. It was fun for a few hours in the evening after the interview but that’s it. I never use this “new” knowledge. I only can say now - I know what is Game of Life.

Of course, I didn’t pass that round, and feedback of the interview was - “Spent too much time to implement a solution”. I was not upset or smth. I know that’s just the first interview. I’m training and trying to gain experience of how interviews in big companies look like. But one thing that I understand - an interview is not always about your skills or smth. It depends on many factors, sometimes on luck. Passing an interview it’s a skill and you can develop it. Nowadays, the rules of this big hiring game look like this. If you can change it - do it, if not - learn the rules and try to be the best at playing this game.

As a reminder of this experience, I put this game on my website and you can play it. 👾 Play. Nowadays you can find a lot of courses, services, startups around hiring, passing coding interviews, etc. Looks like a new market born on top of it. Even I tried to build a small startup in this industry, but this story for another time.

Thanks for reading.