4 ms·
I thought there'd be something meatier than "don't write bugs" and "reread your code" but I was wrong.
by OccamsMirror 5y ago
I thought there'd be something meatier than "don't write bugs" and "reread your code" but I was wrong.
- legerdemain 5y agoI think the author put specific recommendations into their own sibling posts, accessible from this table of contents: https://www.teamten.com/lawrence/programming/ https://www.teamten.com/lawrence/programming/
- Joker_vD 5y agoThese are all actually good advice. Even "Avoid fields for communication between methods" although there are enough cases where it's better than the proposed alternative: when you have the method's implementation split into 10 private methods that need to pass 4-5 different pieces of data (for a total of 10-15 pieces) between each other, it's easier to just invent a private Context object, shove the data into its fields, attach those methods to it, and implement the public method as "return = new Context(...).doWork();".