Object Oriented Design


Practice

TETRIS

“Implement Tetris” is a problem the can’t be given away. There’s no secret that you could tell someone that would fundamentally improve how they implement Tetris. It’s a process of programming and design choices.

Contrast this with “Imagine a person walking up a flight of stairs. Imagine that at any point the person can either take a small stride (up a single step) or a large stride (up two steps). How many unique paths are there to reach the Nth stair?” The solution to this problem is the fibonacci series. Now, I don’t mean to say that being able to solve this problem means nothing. Being able to answer this is some indication that a programmer is mathy and smart. But the problem can be given away, requires a single leap of insight, and is probably a bad interview question for those reasons. If you’ve done Tetris on your own beforehand the interview will go much better/faster. There are a couple of bits of tricky logic you won’t get hung up on (rotations and deleting full lines) and you’ll be able to speak much more fluently about the design problems and the trade-offs of each since you’re not thinking it through completely on the spot. That is, knowing the problem well I could walk through a complete solution in ~20 minutes. When I solved it as an interviewer it took more like 60 minutes. That seems like it fits your description?


References

22 March 2019