Reputation
667
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
3 11
Newest
 Cleanup
Impact
~28k people reached

Jan
19
comment Why should a builder be an inner class instead of in its own class file?
I think the Builder pattern has morphed a bit since being documented in 1995. @Joppe has a point -- the GoF definition of Builder says "Use the builder pattern when * the algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled." The example is an RTFtext converter, where the built products are ASCIIText, TeXText, etc. The pattern with an inner class is not consistent with the GoF class diagram (I'm adding it to your answer for clarity).
Jan
19
comment Advantages of having multiple apps or sub apps SPAs in AngularJS SPA
I'm not an expert in AngularJS, so I won't speak of performance advantages if they exist. But the advantage to breaking down modules as you suggest is that if you want to extend your app(s), the modules are theoretically more reusable than if you put everything into one big app. For example, the app.login could be useful in any app that requires authentication (assuming it's the same authentication scheme). The same could be true for payment, catalog, etc.
Dec
29
comment Are exceptions as control flow considered a serious antipattern? If so, Why?
Wikipedia's definition of anti-pattern says it's common. Given you never saw this again, and I've never seen it ever, maybe it's just bad style and not technically an anti-pattern?
Dec
25
revised Drawbacks of a master error handler?
added 309 characters in body
Dec
25
answered Drawbacks of a master error handler?
Dec
22
answered Is it true that for Observer Pattern to work, there probably is some polling mechanism underneath?
Dec
22
comment Is it true that for Observer Pattern to work, there probably is some polling mechanism underneath?
Polling means software is actively sampling the status of something. If your macbook's CPU was spending time "constantly asking," it would be too slow to do any work.
Dec
1
awarded  Yearling
Nov
16
answered Advantages of Strategy Pattern
Nov
16
comment Advantages of Strategy Pattern
Can you be clearer about why it's easier to test? The example for refactoring a case statement (or if/then) to a polymorphic method (basis for strategy) is pretty easy to test. refactoring.com/catalog/replaceConditionalWithPolymorphism.html If I know all the conditions to test for, I write a test for each. If I have strategies, I have to instantiate and execute one for each. How is the strategy approach easier to test? We're not talking about complex nested ifs when you refactor to strategy.
Nov
16
comment Advantages of Strategy Pattern
Is this homework? It's better to state that up-front if so.
Nov
12
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
@PiotrFalkowski Agree about the interface (I expressed doubts about DI). My answer is about extracting and granularity.
Nov
12
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
@whatsisname I agree with your conclusion that it's only three lines. But I could see it as good reuse if they're repeated (DRY) and/or dilute the cohesion of the classes where they're placed. C# is not my strength, but If you wanted to start counting bytes transferred, attempt re-try on connection failures, or throttle download requests, wouldn't this be a good encapsulation?
Nov
12
comment Are first person comments distracting and unprofessional?
How about first-person refactoring: OurFormIsNotResized = (WindowState <> 1) ... If OurFormIsNotResized Then ...
Nov
12
comment The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
@whatsisname Can you say (without using sarcasm) why it's not significant? If the code appeared a three different places (say in three other classes) wouldn't it be useful to make a pure fabrication?
Nov
12
answered The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?
Nov
11
comment Are there any significant disadvantages to depending upon abstractions?
@SteveCallender I found reading a lot of Robert Martin's texts made my brain hurt, but at the same time it's intriguing to see the metrics, namely the graph you mentioned on page 13. Abstractness or concreteness of packages is far from intuitive. I wouldn't worry about it, as I don't think it's wise to do top-down designs of packages using these metrics. Even if you measure arbitrary packages, it's not clear how you would refactor them. I found the package design strategies from Craig Larman's Applying UML and Patterns to be more straightforward.
Nov
11
comment Are there any significant disadvantages to depending upon abstractions?
@Spotted No problem about not being able to patch. It's just a pretty specific example and not typical of most software.
Nov
11
comment Are there any significant disadvantages to depending upon abstractions?
@Eilon my comment was about modularity is not always needed (not abstractions).
Nov
11
revised Are there any significant disadvantages to depending upon abstractions?
added 32 characters in body