Reputation
351
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 10
Impact
~3k people reached

  • 0 posts edited
  • 0 helpful flags
  • 83 votes cast
Jul
16
comment Is there a name for this pattern?
The TryParse pattern might be slightly related to this. It is a .Net idiom where you return a boolean with true when something executes fine, and false if some internal (and expected) exception happened: stackoverflow.com/a/17207748/401828
Jul
12
comment Is there a name for this pattern?
@Deduplicator This answer gives some reasons to support its point, but your comment doesn't. Why is is to be considered good code instead of the clever anti-pattern?
Jul
12
comment Is there a name for this pattern?
I agree this is a somewhat commont practice, and it might have its use, and calling it by name is for this very reason yet more important. But I believe it is not a "pattern" in the sense of a design pattern (these must be very formally defined, for what I know). Perhaps a better way to call it is an idiom, because it's very idiomatic of C-based languages (so as they call something "pythonic" when it is idiomatic in python, and some constructs are idiomatic in C#/Linq, or in functional languages, etc.) en.wikipedia.org/wiki/Programming_idiom
Jul
12
comment Is there a name for this pattern?
You might want to take a look: stackoverflow.com/q/2576571/401828
Jul
12
comment Is there a name for this pattern?
I guess some would argue this is an anti-pattern, because it violates the command-query separation principle and makes the code intention a bit less clear, not to mention the "one-liner" assignment/test makes it a bit harder to spot an error in case of debugging.
Jun
22
comment Drawing concentric circles without gaps
Also, I would consider number "5" to be an acceptable result. Did you consider it good? And if not, why?
Jun
22
comment Drawing concentric circles without gaps
@beppe9000 Imagine you draw the inner cicles first, and then the outer ones. The innermost circle, the tinyest one, would be a single pixel. Then the second one would depend on what "contiguous" mean: if you need the pixels to be side-contiguous, then you'd get only squares, unless you accept more than one pixel thickness... Can you visualize it?
Jun
22
comment Drawing concentric circles without gaps
How would you define "perfectly contigous"? Any acceptance test should be dependent on this definition. Should any white pixels of the same circumference be at least diagonal-contiguous, or should they be side-contiguous?
Jun
22
comment Drawing concentric circles without gaps
Oh, like a lollipop then... That is game changing, of course.
Jun
22
revised Drawing concentric circles without gaps
added 211 characters in body
Jun
22
answered Drawing concentric circles without gaps
Jun
20
comment How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
Do you think, then, that I should at least try to use MVVMLight as some sorte of "cure" from "Caliburn.Micro disorientation"? I would surely take a look if that is the case.
Jun
19
comment How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
@Rachel I must tell you that Caliburn has a ViewModel-First approach by default. Its bootstrapper instantiates a ViewModel (first) and then it corresponding View - already bound by the ViewModelBinder - is automatically displayed, with DataContext already set to the ViewModel instance.
Jun
19
comment How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
@Rachel regarding "how close [caliburn] ties the view to the MVM layer", what exactely do you mean? What would be the "non-caliburn" way of tying those layers in a better, more MVVM way? (I ask sincerely because I don't currently know).
Jun
19
comment How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
@Rachel I was planning to use this approach with Caliburn.Micro, but couldn't find a RelayCommand implementation (since it "binds" directly to methods by convention, instead of binding to ICommand properties).
Jun
19
revised How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
rephrased some explanations
Jun
19
comment How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
I'm not sure if I phrased my question correctly, so if I inadvertently violated any condition, please let me know so that I can rephrase it.
Jun
19
asked How to choose NOT to use a framework (Caliburn.Micro, etc.) in a given MVVM application?
Jun
19
comment When NOT to use a framework
The last paragraph contains an all too common trap: "Some people (...) can't take the time to (...). This mis-match (...) ends up costing everyone lots of time and effort." So they don't have time to lose (now), and because of that they end up losing a lot (more?) of time (later) ...
Jun
19
comment When NOT to use a framework
He didn't say "percent", did he? ;o)