Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>1

This is one of my pet peeves. I had an engineer recently wrap Dapper up in a bunch of functions. Like, the whole point of dapper to me is that it gets out of your way and lets you write very simple, declarative SQL database interactions and mapping. When you start wrapping it up in a bunch of function calls, it becomes opaque.

DRY has been taken as far too much gospel.



I always prefer having loadBooks than “select * from books” everywhere. I prefer my code to be just the language version of how I would write an explanation if you ask me one specific question. Not for DRY, but for quick scanning and only diving into details when needed


Obviously there's a method called LoadBooks. The implementation of LoadBooks is what I'm talking about.




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

Search: