347 reputation
122
bio website whitemagicsoftware.com
location Victoria, Canada
age 40
visits member for 3 years, 7 months
seen Sep 13 at 17:33

http://whitemagicsoftware.com

Read my technical manual Indispensable, which covers Business Intelligence with JasperReports and R:

http://whitemagicsoftware.com/books/indispensable


Jul
8
awarded  Nice Answer
Jul
8
awarded  Nice Question
Jun
22
awarded  Cleanup
Jun
16
awarded  Popular Question
Mar
19
comment Succinct Lazy Initialization Pattern
The Annotation Processing Tool might help here.
Mar
19
asked Succinct Lazy Initialization Pattern
Dec
1
accepted Approach to develop an inline editor for enumerated lists
Nov
29
revised Approach to develop an inline editor for enumerated lists
edited body
Nov
29
comment Approach to develop an inline editor for enumerated lists
I'm aware of what I wrote. I'm also aware that the question was tagged as cross-browser. :-) I appreciate you taking the time to respond, though.
Nov
29
comment Approach to develop an inline editor for enumerated lists
The question is tagged cross-browser.
Nov
29
comment Approach to develop an inline editor for enumerated lists
jsfiddle.net/ssr4n - Doesn't allow for editing with Firefox 25.0.1. While solutions are cool, I'm actually looking for alternative approaches to the problem. I'd be shocked to find a working cross-browser solution in a few lines of JavaScript.
Nov
29
asked Approach to develop an inline editor for enumerated lists
Nov
29
awarded  Informed
Nov
14
accepted What are the disadvantages of self-encapsulation?
Nov
14
comment What are the disadvantages of self-encapsulation?
@BryanChen: Thank you. Fixed.
Nov
14
revised What are the disadvantages of self-encapsulation?
added 37 characters in body
Nov
13
revised What are the disadvantages of self-encapsulation?
added 5 characters in body
Nov
12
comment What are the disadvantages of self-encapsulation?
I disagree about making issues harder to debug. By consistently applying self-encapsulation, it makes the entire system easier to debug. Add a stack trace in the accessor to show exactly when the unexpected value was set and how. Combined with Aspect Oriented Programming, debugging the system becomes trivial. I cannot imagine a manager saying, "The system should crash for our users."
Nov
12
comment What are the disadvantages of self-encapsulation?
While developers must handle unexpected values, eliminating null pointer dereferences would help produce crash-free software (other flaws would still be present). You mention needing to handle uninitialized values, but self-encapsulation ensures all values are initialized (i.e., never null), which means that no extra code is required to handle the null (i.e., uninitialized) case.
Nov
12
comment What are the disadvantages of self-encapsulation?
The hypothesis is that using class-scoped variables directly results in code that crashes more often than using variables indirectly (and consistently) via accessor methods that force all uninitialized variables to be initialized immediately prior to use. In the example shown, calling setAttribute( null ) will cause the attribute's value to be re-initialized prior to use (e.g., makes a database call to find the current value).