456 reputation
2311
bio website
location
age
visits member for 1 year, 11 months
seen Feb 8 '13 at 11:14

Feb
1
comment What can I do to strengthen up my pen and pencil coding skills?
Thank you, but that Project Euler you've mentioned. I'm a bit afraid, that problems there are too hard for an ordinary programmer. At least, from that website look it seems so.
Feb
1
comment What can I do to strengthen up my pen and pencil coding skills?
In case someone will ask me to write a code without PC.
Dec
5
comment Is there any complications or side effects for changing final field access/visibility modifier from private to protected?
Thank you for interesting addition.
Dec
3
comment Why does Java allow to implement different interfaces, each containing a method with the same signature?
"Definition: Two of the components of a method declaration comprise the method signature—the method's name and the parameter types." from here: docs.oracle.com/javase/tutorial/java/javaOO/methods.html - so it includes method name and number and types of parameters, no return type unfortunately/fortunately (there is a whole different question on this).
Dec
2
comment Why does Java allow to implement different interfaces, each containing a method with the same signature?
Thank you for the reply, but I don't believe you that compiler cannot check whether two different implemented interfaces have methods with the same signature. Yet it can tell when implemented interfaces contain methods with the same signature, but different return types.
Dec
2
comment Why does Java allow to implement different interfaces, each containing a method with the same signature?
Thank for your reply, but in case when there is two interfaces with two methods with the same signature but different return type, you couldn't implement bot of them. And nobody couldn't predict that.
Dec
2
comment Why does Java allow to implement different interfaces, each containing a method with the same signature?
Thank you for your answer. You can implement two interfaces containing methods with different signatures in Java. But I found out that if you're extending two interfaces both having a method with a same signature but different returning types, then it'll be a compile time error: The return types are incompatible for the inherited methods Fooable.foo(int), AnotherFooable.foo(int).
Dec
2
comment Why does Java allow to implement different interfaces, each containing a method with the same signature?
I just meant that a third interface extending both that interfaces will contain both methods from that interfaces which is actually a single method. And that's I can't undertand too.
Nov
28
comment Help me understand a part of Java Language Specification
I asked about it on the concurrency interest mailing list and they replied that hard copy of JLS contains additional numbered point on "Thread t does not execute any further instructions". So step 2 that is referred to on step 3 (which is actually a step 4) is that step with a missing numbered point. So it's just a missed numbered point that caused a confusion.
Nov
27
comment Help me understand a part of Java Language Specification
I believe it's the only reason, because logically no way what is written can be true.
Nov
22
comment Help me understand a phrase from the “Java concurrency in practice”
Also thanks for helping me to understand a meaning of post-conditions.
Nov
19
comment Help me understand a phrase from the “Java concurrency in practice”
If you're right and this should read as post-conditions, thank you very much!
Nov
17
comment About insertion sort and especially why it's said that copy is much faster than swap?
AFAIK, Java 5 has 'compareAndSet' atomic operation (which is used in concurrent applications), so I believe that it can optimize swap to be a single instruction. Because of this I'm even more confused about what author says.
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
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.
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.