these days i will write a thick and impenetrable block of code with mysterious comments and just before it a long paragraph about why this whole thing edits

i still believe code should 'speak for itself' or whatever but also that there is a non negligible gap between what a computer is supposed to do and what we want to get done, and that is worth explaining and keeping around as the code evolves

· · Web · 3 · 6 · 8



also "making code more readable" != "making code easier to scroll through while maintaining the illusion of understanding it"

re: programming 

@CobaltVelvet I like this idea. A friend IRL once put it best as "code should speak for itself, that's why programming languages have markup for comments" or something like that.


@CobaltVelvet @paul this mirrors the advice I got from a mentor back when I was first starting out: as a rule, the code should clearly tell you what it's doing, and the comments should tell you why it's doing that

Occasionally, making the code itself clear isn't reasonable, and those couple of lines might need a "what this does" comment. But usually it's better to rewrite it refactor unclear code

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!