News for hackers. Stuff that matters.
Re:John Carmack on Inlined Code (2014) by fsloth on Tuesday January 22, 2019 @01:32AM (#18966413)
Obviously people are fairly opinionated about this.

I agree with you 100% - code reuse is far too overvalued and copy and pasting has a bad name.

If something "fits" a function then yes, by all means lift it as a function. But not all long snippets of code make sense when lifted out of the scope - there's no reason to wrap those.

Most of all, forcing all code to fit "merely calling functions style" is an antipattern that can make the code less understandable.

Re:John Carmack on Inlined Code (2014) by m0zg on Tuesday January 22, 2019 @03:06AM (#18966764)
Good code is like a good book, it's written to be read. A lot of people don't get that. Small single-use functions are like footnotes.
Re:John Carmack on Inlined Code (2014) by quincunx on Tuesday January 22, 2019 @03:36AM (#18966879)
... and maximizing entropy makes for a terrible read. Good code, like child poetry, should be allowed to rhyme.
Re:John Carmack on Inlined Code (2014) by pif on Tuesday January 22, 2019 @06:45AM (#18967595)
Fully agree with you.

The problem is many people don't know how to read code properly: they try to read all the details at once, instead of surfing at the top level(s) and going deeper only when they actually need. Such people are the bad developers who write bad code bacause they cannot read.

My personal mantra with copy&past while programming is: if your mouse gave you a little electric shock on pasting, would you paste it anyway?