DEV Community

loading...

Discussion on: My 5 Favorite Software Design Principles 

Collapse
jeremycmorgan profile image
Jeremy Morgan Author

I can live with that. I usually stop and abstract when I find myself repeating something the 2nd time because I don't want it to spiral out of control. I've been criticized in code reviews for abstracting too much into methods, some of them only having one or two lines. I abstract things early which may be repeated... that arguably can be another form of YAGNI lol.

But I do like the "do one thing and do it well" philosophy. 3 times is reasonable.

Collapse
citizen428 profile image
Michael Kohl
Thread Thread
jeremycmorgan profile image
Jeremy Morgan Author

Guilty. But lots of abstractions means faster running unit tests, right?

Thread Thread
citizen428 profile image
Michael Kohl • Edited

Not sure if you're sarcastic here, but if you're not our units under test originate in very different testing philosophies.