Code Smells: Iteration
blog.jetbrains.com
Code Smells: Iteration
1–10 of 95 posts
Re: Code Smells: Iteration
#2To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system.
This article seems more about detecting choices around data structures which are bad in any context and have no real link to the overall system design.
Re: Code Smells: Iteration
#3Re: Code Smells: Iteration
#4At the risk of sounding arrogant, isn't this a bit obvious? To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system. This article seems more about detecting choices around data struct…
Re: Code Smells: Iteration
#5At the risk of sounding arrogant, isn't this a bit obvious? To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system. This article seems more about detecting choices around data struct…
Re: Code Smells: Iteration
#6At the risk of sounding arrogant, isn't this a bit obvious? To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system. This article seems more about detecting choices around data struct…
Re: Code Smells: Iteration
#7It isn't always that easy.
Re: Code Smells: Iteration
#8At the risk of sounding arrogant, isn't this a bit obvious? To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system. This article seems more about detecting choices around data struct…
// Use some inlined string as a magic code value:
doStuff("Some Magic Code");
...
// Later on same inlined string:
doOtherStuff("Some Magic Code");
versus: // Define it once:
const GOOD_NAME_FOR_MAGIC_CODE = "Some Magic Code";
// Use it:
doStuff(GOOD_NAME_FOR_MAGIC_CODE);
...
// Use it somewhere else:
doOtherStuff(GOOD_NAME_FOR_MAGIC_CODE);
If that triggers an "ah-ha!" moment for you then you've likely got bigger problems.Re: Code Smells: Iteration
#9At the risk of sounding arrogant, isn't this a bit obvious? To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system. This article seems more about detecting choices around data struct…
Re: Code Smells: Iteration
#10At the risk of sounding arrogant, isn't this a bit obvious? To me, code smells are more about spotting when someone's been forced to do something a bit weird and convoluted. It's possibly the cleanest solution available given the immediate context, but this is actually a symptom (or "smell") that something is wrong with the wider design of the system. This article seems more about detecting choices around data struct…
It's obvious to some of us, but not all of us. I see things way worse than this on a fairly regular basis.