Hacker Newsnew | past | comments | ask | show | jobs | submit | battlebeansbogs's commentslogin

Came here for this. Why would your pizza definitions be in code at all.. Python is my favourite language but boy does it make people crazy, imagine recompiling your an app because restaurant A wanted to add a new pizza definition?

To speak to the wider point about DRY, it's a guiding principle for abstraction. If you have two kinds of abtractions for your method, one leads to code repetition, the other does not. Generally favour the does not.

The fact that you should have additional rules, like you shouldn't need rabbit hole debugging (jumping through a million files/objects) to understand core behaviour is not a failure of a useful guiding principle


Yes, I absolutely would. I think a better question is would I want other people to use a bread slicer that chopped my fingers off on average less than they did with a manual version. You might think more highly of your own abilities, but raising the average is worthwhile even if not perfect.


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

Search: