Hacker News new | past | comments | ask | show | jobs | submit login

> Sometimes it's best to be DRY right from the start.

Never zealously adopt a programming practice that can be summarized in a headline!




Yeah, don't be DRY from the start, YAGNI.


I feel like the "sometimes" suggests that in most cases we should zealously not dry things, but in some cases we might want to. Doesn't that make you curious what cases those might be?


> Doesn't that make you curious what cases those might be?

I've been programming for nigh on 40 years; I'm not terribly curious because I've seen successes and failures of pretty much every development paradigm firsthand. But since you ask, my comment above was a self-referential whimsicalism.

I DRY my code in phases. A rule of 3 is decent (e.g., if you've copied a chunk of code three times, give it a think; if you've copied it 9 times, give it a good hard stare).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: