DEV Community

Discussion on: How To Never Fail At The Fizzbuzz Interview Challenge

Collapse
 
tbodt profile image
tbodt

This is scarily close to being overengineered, IMHO

Collapse
 
waterlink profile image
Alex Fedorov

I guess that is why I add at the end:

Did you need to do all these refactorings?

Not necessarily.

Do you need to know how to do them so that you are ready for any requirement change?

Absolutely!

I would probably not do the Strings extraction here. At least, not until there is a feature on the top of backlog that requires it.

With the method extraction, I would probably leave it at the first level methods extraction (isFizz and isBuzz, without others). Again, until there is a feature that will make these other private methods handy.

As with any practice code, you want to take things to the max and extreme. You do that to see how things could be. And think when you would and would not do certain things (like I did in previous 2 paragraphs here).

Essentially, doing that expands your arsenal, when practicing and learning.