3 ms·
This is a great example of why the "clean code" movement is so destructive. Writers (bloggers, textbook authors, professors, whatever) can very easily take adva
by stathibus 5y ago
This is a great example of why the "clean code" movement is so destructive. Writers (bloggers, textbook authors, professors, whatever) can very easily take advantage of inexperienced developers who are dying for someone to tell them what is and isn't the right way to do things, and virtually all "code smell" style blanket rules are detrimental to learning. In this case and in many other cases, the rules doesn't tie back in any way to what the code actually needs to do.
- selfhoster11 5y agoI very strongly disagree. Clean code principles have a lot of good rules to teach to new coders, and it's possible to get an intuition of when and where to apply clean code principles (or any other principles), and when not to. Arguably, you need to obtain such an intuition at some point - otherwise you're just applying random rules left and right without thought for whether that's the right thing to do in context.
- stathibus 5y agoThe problem is not that all principles are bad. The problem is that there are so many people writing down stupid rules, and neither the good nor the bad ones get concretely justified, so it's very difficult for new programmers to discriminate between them. This is how we end up with new CS grads who wrap every new bit of functionality inside a class with getter/setter methods and write dozens of useless unit tests.