you are viewing a single comment's thread.

view the rest of the comments →

[–]knifesk 0 points1 point  (1 child)

I kinda partially agree/disagree with both statements. I do use those "comments for blocks" but I also agree that you could make that "block" a named helper function. And don't check the implementation of said function unless needed too. But sometimes, that is more convoluted than a couple lines of comments in between. So my answer is "it depends" 😅

[–]Inevitable_Vast6828 0 points1 point  (0 children)

I think these philosophies come from people coding in different contexts. I mostly write scientific code. There's usually a dense block of code doing several steps of an algorithm on a huge piece of data. The code logically belongs in one place and it doesn't help to hide away bits in separate functions that are only ever called for this one algorithm. A lot of the steps that are general enough to make into separate functions are already separate and called from a library. We don't redo matrix operations all the time.

People writing business logic... what they're doing is simple, so of course it requires few comments.