I Mean, The Comment Is Accurate I Suppose

I Mean, The Comment Is Accurate I Suppose
code-comments-memes, useless-comments-memes, golang-memes, error-handling-memes, code-quality-memes | ProgrammerHumor.io

You know your codebase has reached peak quality when the comment literally just describes what the function name already screams at you. "returnRowErrorOnTxFailure returns the error" - yeah, and water is wet, thanks for that groundbreaking insight.

The best part? Someone took the time to write a multi-line comment explaining that this function returns an error so processing doesn't continue. Then proceeded to write a function that... checks if error is nil, returns nil, otherwise returns the error. Revolutionary stuff right here. Could've been a one-liner but where's the fun in that?

This is what happens when your team enforces comment coverage metrics without checking if the comments actually add value. Next up: "// this variable stores a value" above every variable declaration.

More Like This