471 reputation
2511
bio website
location
age
visits member for 2 years, 2 months
seen Feb 8 '13 at 11:14

Nov
17
awarded  Commentator
Nov
17
comment About insertion sort and especially why it's said that copy is much faster than swap?
Well, if compare bubble sort and insertion sort, in case of bubble sort we're doing n^2 swaps (n*(n-1)/2 to be precise, but for big O notation it doesn't matter), right? in case of insertion sort we're doing n^2 copies. So in first case we're doing 9n^2 copies (if 3 copies = 1 swap), and in second case we're doing n^2 copies. So anyway, for big O notation, we're doing same amount of copies and because copy as I believe is very fast 9n^2 is almost the same as n^2. Please correct me if I'm wrong.
Nov
15
asked Question on refactoring and code design
Nov
14
asked About insertion sort and especially why it's said that copy is much faster than swap?
Nov
7
awarded  Nice Question
Nov
4
comment What is the difference between “data hiding” and “encapsulation”?
Thank you for reply. I still don't understand, why if data hiding is the same but just a bit broader than encapsulation, it's referred to in the book as if they were of similar broadness and not one including another.
Nov
4
comment What is the difference between “data hiding” and “encapsulation”?
Thanks for your reply. A follow up questions: 1) does java programming language have facilities that second notion related to encapsulation refers to? 2) I don't understand why overriding of data hiding matters. E.g. in java you can access any field (public or private) through reflection.
Nov
4
asked What is the difference between “data hiding” and “encapsulation”?
Oct
25
accepted two ways of doing the same thing, what is preferred?
Oct
25
comment two ways of doing the same thing, what is preferred?
because it doesn't belong there. The validation info is a technical information and objects themselves contain only business-specific data.
Oct
25
comment two ways of doing the same thing, what is preferred?
Maybe I didn't understood you correctly, but I don't want to add errors to objects itself. Objects only contains some business - date, not their validation data. That's why I'm keeping all validation data inside the context.
Oct
25
comment two ways of doing the same thing, what is preferred?
note: context.addError should have error as a parameter. ErrorHandler can be used by clients.
Oct
25
comment two ways of doing the same thing, what is preferred?
Yes that's right.
Oct
25
comment two ways of doing the same thing, what is preferred?
@Tjaart The context is created when user entered values and pushed them into an application. I'm setting values user entered to those objects inside the context and If I see a wrong value, I add an error to the context, so when context will try to persist objects, he will instead notify user that bad value is entered.
Oct
25
comment two ways of doing the same thing, what is preferred?
there is a couple of objects in the context, so I should specify for which object to add an error.
Oct
25
asked two ways of doing the same thing, what is preferred?
Oct
3
revised When to use functional programming approach and when not? (in Java)
added 27 characters in body
Oct
3
revised When to use functional programming approach and when not? (in Java)
edited title
Oct
3
revised When to use functional programming approach and when not? (in Java)
edited title
Oct
3
asked When to use functional programming approach and when not? (in Java)