DEV Community

Discussion on: FizzBuzz Refactoring Challenge with Open/Closed Principle

Collapse
 
srleyva profile image
Stephen Leyva (He/Him)

This is actually something we’ve discussed heavily at places where I’ve worked. Usually implementation like this makes it harder to read (which is interesting considering the arguments for SOLID are maintainability). I’ve seen these patterns beneficial in libraries to be consumed and projects that are a massive scale where design principles help with on-boarding. For smaller things, seems like overkill.

Collapse
 
tomcools profile image
Tom Cools

The easier solution is in the article he mentioned: itnext.io/fizzbuzzbazz-how-to-answ... (String Concatenation).

Thread Thread
 
srleyva profile image
Stephen Leyva (He/Him)

Oh yah this isn’t a dig at the authors post at all. Much can be gleaned from applying design principles to a simple problem for education sake. I was commenting on design patterns in general. They are another tool in a developers toolbox, nothing more. The article did a great job of highlighting one of the SOLID principles.