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

Principles would be stuff in the form of "You should do things this way to end up with a better product, regardless of paradigm". Of the top of my head would be things like:

- Modularity/Separation of concerns: The different functions a program needs to accomplish should be uncoupled as much as logically possible, to the point where you could easily swap out one with another way of accomplishing the same objective without affecting anything else.

- Don't repeat yourself: Any time you're writing nearly the same thing over and over, that whole pattern should be abstracted away.

- "I've only proven it correct, not run it.": You should be able to test the software in an environment that shows you what it would do, without affecting the thing you really want to operate on.

- Write in a way that other humans can easily understand what you're doing. (e.g. name variables after what they're being used for, write comments help the code make sense and convey any tradeoffs)



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

Search: