Re:Don't DRY Your Code Prematurely
by kitkat_new on Thursday May 30, 2024 @08:10PM
(#40530189)
> You can then go back and DRY it up while making sure your unit tests (you did write those, right?) still pass.
not gonna happen once merged
Yes. Especially at the beginning when it's critical to ensure that the logic is correct.
You can then go back and DRY it up while making sure your unit tests (you did write those, right?) still pass.
PS: same applies to "fancy" snippets that save you a few lines; write it the "long way" first and then make it fancy once you're sure it runs the way it's supposed to