Remix.run Logo
t-writescode 4 hours ago

Indeed. If you’re going to have an essay on top of a function or anywhere in code, earn the essay. That code better be operating on a ton of assumptions or using some creative logic to get to how it is that a simple reading doesn’t make sense.

I’ve done it myself on:

* engine definitions for complex workflows and DSLs

* heavy graph theory sections that included ASCII diagrams to clarify flow.

But those functions are probably 1 in 100 or rarer. Basically everything else is good enough with basic IDE-helping javadoc style comments at best, maybe with some input parameter clarification and business logic-clarifying 1-2 line comments sprinkled throughout.