DEV Community


Discussion on: Probably the hottest code refactoring you ever saw 🔥

aleksikauppila profile image
Aleksi Kauppila

Thanks for posting Ioannis, good job!

You can take this to the next level with Replace conditional with Polymorphism. Even though you have successfully improved the code in this example, every new format will require you to modify this algorithm.

potouridisio profile image
Ioannis Potouridis Author

Great! Thanks for sharing.

Forem Open with the Forem app