Re:Be wary of functions which take several parameters of the...
by Scapeghost on Thursday September 26, 2019 @10:29PM
(#21087883)
"Reading" code in this sense doesn't just mean explicit review by different people, but also as in reading it subconsciously as you scroll through your own code.
If I see a chain of numbers like 1, 2, 3, 4 my brain has to recall the order of parameters or look it up.
If I'm looking for rectangles that should be wider than they are tall, I have to keep thinking "the third number should be higher than the fourth number"
Oh and I can't just Cmd+F "width:" or "height:" either.
Re:Be wary of functions which take several parameters of the...
by kragen on Friday September 27, 2019 @10:17AM
(#21092250)
It's unusual to sit down and read a subroutine for pleasure, but it's common to read it when you're debugging a problem, trying to figure out how to extend the subroutine, refactoring something it calls, or doing something similar somewhere else.
Re:Be wary of functions which take several parameters of the...
by benji-york on Friday September 27, 2019 @08:18AM
(#21091029)
I would enjoy an explanation of your thinking.
One of the most pernicious myths of software engineering is that it happens.