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

I'm often a fan of single source files, at the package level, including inline embedded API docs and unit tests.


That doesn't scale because it makes merging and file navigation nearly impossible, and the increased cognitive load is too much for anything real.

Encapsulate functionality and break it into logical containers.

That's what modules are.

That's what files are.

That's what functions are.

That's what software engineering is.


Sometimes it does scale.




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

Search: