Skip to main content
7 events
when toggle format what by license comment
May 7, 2015 at 6:37 comment added Wil Moore III @KorayTugay Think of it this way. If an object is describing more than a single cohesive concept, you've got a smell.
May 5, 2015 at 17:09 comment added Koray Tugay How can an object do one thing?
Oct 1, 2014 at 17:10 history edited Wil Moore III CC BY-SA 3.0
Removed code sample because it actually wasn't very good in the first place. The paragraphs before the code snippet do a fine enough job alone.
Oct 1, 2014 at 17:09 comment added Wil Moore III @Roy, yes, fair enough. I probably should have never added that code sample. Granted, it was almost 3 years ago, but even then, I probably should not have used PHP (I'm cringing just looking at it now), and I should have not used a regex since it is one of those things that some people can look at and immediately get it but for others, no matter how succinct, regexes are an immediate turn off. I'm going to edit the answer and drop the code sample. Thanks for the comment.
Oct 1, 2014 at 11:17 comment added Roy I disagree that your refactoring example is clearer. I agree the original code needs work, but purely in terms of clarity and communicating intent I think the original is much better. I'm very suspect of any refactoring that claims it improves clarity while introducing regex.
Apr 18, 2012 at 12:59 history made wiki Post Made Community Wiki by JohnFx
Mar 26, 2012 at 17:57 history answered Wil Moore III CC BY-SA 3.0