News for hackers. Stuff that matters.
Re:Don't DRY Your Code Prematurely by insane_dreamer on Thursday May 30, 2024 @04:35PM (#40528338)
> I'd prioritize readability over DRY.

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

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