Comment

Comment by jalapenos

In practice it really does mean self documenting code.

Like variables called "daysSinceDocumentLastUpdated" instead of "days". The why comes from reading a sequence of such well described symbols, laid out in a easy to follow way.

It doesn't do away with comments, but it reduces them to strange situations, which in turn provides refactoring targets.

Tbh, its major benefit is the fact that comments get stale or don't get updated, because they aren't held in line by test suites and compilers.

Most comments I come across in legacy code simply don't mean anything to me or any coworkers, and often cause more confusion. So they just get deleted anyway.

parent jalapenos 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton