Reputation
595
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
1 6 16
Impact
~27k people reached

  • 0 posts edited
  • 0 helpful flags
  • 15 votes cast
Jun
23
comment Observer pattern for unpredictable observation time
For the standard observer pattern, do programmers expect this behavior upon subscription? If not, then should I create two subscription functions - one just like your example, and another to only publish future events?
Jun
23
asked Observer pattern for unpredictable observation time
Jun
1
accepted What design pattern do you use to support graceful fallback on old platforms?
Jun
1
comment What design pattern do you use to support graceful fallback on old platforms?
In my actual project, there are a ton of places where I need to style the user interface differently for different operating system versions. It's not only one if-else.
Jun
1
comment What design pattern do you use to support graceful fallback on old platforms?
I like this one. Is it called the Encapsulate-into-a-function pattern? :p
May
31
comment What design pattern do you use to support graceful fallback on old platforms?
@BryanOakley This happens quite a lot in Objective-C when programming for different iOS versions. Apple often likes to deprecate APIs and replace them with a new APIa that are not backwards compatible.
May
31
comment What design pattern do you use to support graceful fallback on old platforms?
I think you need more than just Strategy Pattern. At a higher level, you need a Factory. This factory takes in a platform version. If the platform version is high enough, return the high platform strategy, else return the low platform strategy.
May
31
asked What design pattern do you use to support graceful fallback on old platforms?
May
17
awarded  Yearling
Apr
12
comment What are the disadvantages of naming things alphabetically?
@vitalik It will be even harder working in a Chinese company where they write kanji vertically.
Apr
8
accepted What are the disadvantages of naming things alphabetically?
Apr
8
comment What are the disadvantages of naming things alphabetically?
So if I worked in a Spanish company, CarHonda would be appropriate because adjectives come after nouns in Spanish.
Apr
8
accepted How can a child state machine relinquish control back to the parent state machine?
Apr
7
asked What are the disadvantages of naming things alphabetically?
Feb
9
asked How can a child state machine relinquish control back to the parent state machine?
Feb
3
accepted How to name a private method in a language which doesn't support privacy?
Jan
26
comment How to name a private method in a language which doesn't support privacy?
Double underscore, you say... What would a single underscore mean?
Jan
26
asked How to name a private method in a language which doesn't support privacy?
Sep
14
awarded  Nice Question
Aug
29
asked Should a function use premature returns or wrap everything in if clauses?