Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I thought there'd be something meatier than "don't write bugs" and "reread your code" but I was wrong.


I think the author put specific recommendations into their own sibling posts, accessible from this table of contents: https://www.teamten.com/lawrence/programming/


These 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();".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: