© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Strahinja Djuric
DRY principle serves to prevent you from copy/pasting code all around, to reduce code base, and for easier maintenance. I think that the first example is not a really good example of the DRY principle. The other one is totally fine.
Chris Bongers
Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊
I tried to explain the first one is not really about the function, but about the DRY principle.
You must see that reverse as a very extensive function.
Thanks for your comment though, appreciate it ✌️