Nick

15%
Flag icon
Don’t Use a Comment When You Can Use a Function or a Variable Consider the following stretch of code:    // does the module from the global list <mod> depend on the    // subsystem we are part of?    if (smodule.getDependSubsystems().contains(subSysMod.getSubSystem())) This could be rephrased without the comment as    ArrayList moduleDependees = smodule.getDependSubsystems();    String ourSubSystem = subSysMod.getSubSystem();    if (moduleDependees.contains(ourSubSystem))
The Robert C. Martin Clean Code Collection (Collection) (Robert C. Martin Series)
Rate this book
Clear rating
Open Preview