News for hackers. Stuff that matters.
Re:Simple Ways of Reducing the Cognitive Load in Code by signa11 on Tuesday June 28, 2016 @11:57PM (#11999401)
> State can be stored in instance variables as well...

but then we are back to the beginning of the thread...

Re:Simple Ways of Reducing the Cognitive Load in Code by gnaritas on Wednesday June 29, 2016 @05:47PM (#12005076)
No, we aren't, since objects are the proper way in this case to reduce cognitive load. This notion that all the code has to be in one method to be understood is symptomatic of programmers who don't know how to factor correctly thus leading to the necessity of having to read a methods implementation to understand what it does, i.e. they're bad programmers blaming their shortcomings on well factored code rather than learning how to read and write well factored code correctly. Breaking down large methods into numerous small ones makes the code easier to read and understand, not harder, unless you do it entirely wrong.