r/linguistics • • Dec 16 '20

MIT study: Reading computer code doesn't activate brain's language-processing centers

https://news.mit.edu/2020/brain-reading-computer-code-1215
965 Upvotes

111 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Dec 17 '20

[deleted]

1

u/Delta-9- Dec 17 '20

Granted the example is contrived, but I stand by my main point: "self-documented" code is just undocumented code with more keystrokes. Being readable is an important quality, but in the end it doesn't matter if your variable names are perfectly explicit and your tabs perfectly aligned if I still have to open up ten other modules and a library's documentation to understand what the hell the code is doing.

I can see how this still sounds like a straw man: "no code has no comments." Except... I maintain a Java app of about 20k lines that has zero documentation. The few comments that can be found are TODOs and disabled code. I pointed this out when I first joined the team, and the response was that the code was "self-documenting." I wasted days hunting through that codebase to understand things that could have been handily described with two sentences. Even the readme had nothing in it and I had to figure out how the build scripts work by reading bash and maven documentation.

So, now, whenever someone claims that their code is self-documenting I automatically want nothing to do with their project.