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

You reminded me of a rule of thumb that says: Keep the complexities in data structures and simplicity in algorithms




I have seen subscription systems built following that rule of thumb. It collapses pretty well, as the data structure then becomes impossible to engage with unless you are an expert, and the callers are never experts.

Things make more sense when the data structure lives in a world where most, if not all illegal atates become unrepresentable. But given that we often end un building APIs in representations with really weak type systems, doing that becomes impossible.


Ironically, the attempt to prevent illegal states may create "complex" code (quoted since it may be due to perceived or actual complexity).



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

Search: