News for hackers. Stuff that matters.
Re:How to reduce the cognitive load of your code by collyw on Tuesday March 29, 2016 @05:10PM (#11384897)
I was having this dilemma on my walk home. I try to write good idiomatic Django code, and know how to make it efficient in the ways described in Two Scoops (a book about Django best practices). I have inherited an app, parts of which are exactly the opposite of Django best practices (thin models fat controllers being the most obvious one - the application's documentation says that's the philosophy , while Django encourages, and works better the opposite way).

So do I spend more time refactoring and bringing this application to a decent state, or do I just keep on hacking more crap on to it? No one except for me seems to give a shit as long as it seems to be working.

Re:How to reduce the cognitive load of your code by JoeAltmaier on Tuesday March 29, 2016 @05:12PM (#11384915)
A rewrite is a different animal than writing new code. The problem with rewrites is the marginal utility is a diminishing return. Unless the code is really bad, or will require very frequent revisits.
Re:How to reduce the cognitive load of your code by mathattack on Tuesday March 29, 2016 @05:15PM (#11384939)
I think the best practice is to just refactor the bits that you need to touch. At a minimum avoid leaving them worse, and in an ideal world leave each piece you touch better for your having looked at it.
Re:How to reduce the cognitive load of your code by collyw on Wednesday March 30, 2016 @09:27AM (#11389053)
Thats my plan, assuming i get the chance to.