4 ms·
I had a co-worker once who reworded all his long comments to be perfectly justified at 80 columns. It seemed like a waste of time, but he was productive enough
by blt 2y ago
I had a co-worker once who reworded all his long comments to be perfectly justified at 80 columns. It seemed like a waste of time, but he was productive enough overall that nobody cared.
- pdpi 2y agoI don’t justify to 80 columns, but I do reword/rephrase to keep to the 70-80 range, as close to 80 as practical. My justification (hah!) is that, if I put in the effort to write a large comment, I might as well put in the effort to make it relatively easy to read.
- jraph 2y agoA noble goal, but you are possibly making it worse for many people with this additional work, with no clear upside. Should I read your long comment, I'd prefer being able to chose the width at which I read it and take advantage of automatic wrapping. If you manually enter line breaks at column 80, suddenly you are making it impossible to read with a higher width, and completely breaking anyone reading on a screen/window with a width smaller than 80 characters (taking zoom / character size at comfortable reading level in account). You are forcing a fixed size on anyone, basically. You work against your goal by forcing line breaks at an arbitrary position, and doing more work for this. Just let the reader's software handle this in an optimal way for the reader's situation. You can't yourself because you lack information about the reader, which can change and their can also be several readers, each with their own situation.
- blt 2y agoI've never seen code with a long comment unbroken. 120 columns maybe, but never like 1000. What if the comment were indented? In most editors, the wrapped part would start at column 0 and break the appearance of indentation.
- jraph 2y agoRight, code is its own thing with its own customs. For some reasons I didn't assume we were talking about code. I do wrap my code comments because that's what people expect and want indeed. On the projects I work professionally we also have a hard limit at 120 characters enforced by checkstyle, so no choice. On personal projects it's usually 80, maybe I should relax that a bit, 120 is quite nice actually.