591 reputation
415
bio website
location United States
age
visits member for 3 years, 7 months
seen Feb 18 '13 at 20:10

enter image description here


Feb
18
comment Is browser fingerprinting a viable technique for identifying anonymous users?
The number of iPhones and iPad models is diverging.
Jun
23
comment Observer pattern for unpredictable observation time
I don't know what the standard is. Is the standard to be notified of future events only or is it standard to be notified when someone subscribes late?
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
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.
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
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.
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?
Aug
22
comment When would polling for events be better than using observer pattern?
I think the observer pattern for the engine RPM example can be fixed. You can publish only each 100th event with if (count % 100 == 0) to reduce excessive processing.
Aug
20
comment What does it mean to drop support for Internet Explorer 6?
They say they never test it in IE6, but they still do. It works perfectly fine up to this day in IE6.
Jun
17
comment Styling compound AND / OR if statements
I also like prefixing of mathematical operators. I realized it way to late in my programming career :)
Jun
17
comment Styling compound AND / OR if statements
+1 I like your styling. It answered my question directly, but I think Rei Miyasaka nailed the root of the problem. If I'm ever to lazy to do Rei's method, I'll use your styling.
Jun
17
comment Styling compound AND / OR if statements
@Job : I meant the "compiler optimizations" you were talking about, not whether Javascript has the ability to do this.
Jun
16
comment Styling compound AND / OR if statements
What if it's an interpreted language like Javascript?
Jun
6
comment Capitalization of hierarchical constants
Why should one rely on documentation to express the intent of their code? If poor code could be remedied by massive amounts of comments, then there would be no need for programmers.stackexchange.com. I believe that writing good code that "reads like a book" is better than cryptic code that needs to be explained by documentation.
Jun
5
comment Capitalization of hierarchical constants
Why is it not useful in Javascript to capitalize constants? Javascript has no modifiers like Java's final or C++'s const/define to make a variable constant. The only way to signify the constant nature of a variable in Javascript is make it look different from other variables.
May
18
comment “Super” vs “protected method” for running common code
My Kid inherits from Parent because Kid reacts the same as Parent except for one method: someMethod. If Kid had inherited from Grandparent, it would have to copy and paste all but one method from Parent.