When I talk about a signal being weak, I mean that it isn't a strong indication that something must be done to correct it. The term "smell", I believe, was created to try to indicate that it's something that might be a concern, and is worth consideration, but if no clear general improvement is possible after some consideration, then no change is necessary. For example, if a function is long, then I'll look to see if I can find a natural way to break it up, but if after some consideration, it doesn't seem like breaking it up is going to make the code any clearer, or causes other issues, then I'll ignore that signal and continue. In this sense, I guess I'm saying that the strength of the signal is an indication of how much work I'm willing to do to remove the signal. For me, the signals such as "I'm having to write a lot of test code to show what I'm trying to achieve" are much stronger, and I'll go to great lengths to avoid it. For example, I may break up a function to make testing easier, even if I wouldn't have broken it up just because it smelled like it was too long. ?- Vaughn
On Wednesday, July 26, 2023 at 09:44:21 AM EDT, J. B. Rainsberger <me@...> wrote:
On Fri, Jul 21, 2023 at 9:56?PM Vaughn Cato via <vaughn_cato=[email protected]> wrote: ?
What makes this "weak" for you? The signals can only say "Pay attention here!" I'm not sure they could ever say anything stronger than that. But then, the signals from test runs can only say "Pay attention here!" as well. What makes them stronger for you than the "code smell"/"design risk" signals? ?
I don't find those signals stronger nor weaker, but merely different. What makes them feel stronger for you? J. B. (Joe) Rainsberger :: ?:: :: Replies from this account routinely take a few days, which allows me to reply thoughtfully. I reply more quickly to messages that clearly require answers urgently. If you need something from me and are on a deadline, then let me know how soon you need a reply so that I can better help you to get what you need. Thank you for your consideration. -- J. B. (Joe) Rainsberger :: :: :: Teaching evolutionary design and TDD since 2002 |