1,147 reputation
1823
bio website accelerando.euweb.cz
location Prague, Czech Republic
age 52
visits member for 3 years, 3 months
seen Dec 31 '14 at 12:24

Senior developer, algorithms master, PM, analyst, applied mathematician.

The Three Little Daughters Raiser

Hobbies:
logics, history, psychology, sociology, pedagogics, photo, cycling, hiking.

In past:
space-/astro- geodesist, cartographer, astronomer, teacher, radiometrist on the liquidation of the Chernobyl catastrophe in 1986.


Jan
18
comment Replacement for instanceof Java?
After reading from a DB, you are setting the value to a freshly created object. It will have a class as declared, not necesarily equal to the class of the read value. So, you have to find out what class you have. Or what sort of data a class has - in the case of single class with switching among different classes of data
Jan
18
comment Replacement for instanceof Java?
@Schmooo Are you sure you need three different classes? Maybe one class with a switch inside will serve better?
Jan
18
comment Replacement for instanceof Java?
@Schmooo And getClass should be avoided, too?
Jan
18
comment Replacement for instanceof Java?
@delnan The QA was - what else except instanceof can be used. I answered it. And added a link to comparison. As a bonus. So, your attack is excessive.
Jan
18
comment Replacement for instanceof Java?
@Schmooo If you have saved an instance of a class in some way that preserves the class, you can use either getClass or instanceof. If you haven't preserved the class, you can use neither.
Jan
18
comment Replacement for instanceof Java?
I have nothing against your first sentence. But the second one - sorry, I can't understand what do you mean at all.
Jan
18
answered Replacement for instanceof Java?
Jan
16
answered Algorithm to denormalize database
Jan
16
revised Algorithm to denormalize database
grammar correction
Jan
16
suggested approved edit on Algorithm to denormalize database
Jan
13
answered Fundamental Difference between fn() and new fn() in javascript
Jan
13
answered Drawing Flowchart for function calculate a number in the Fibonacci Series
Jan
7
awarded  Popular Question
Dec
31
revised How do I prevent unknowningly duplicating code?
added 15 characters in body
Dec
31
comment How do I prevent unknowningly duplicating code?
@Secure 1. I thought I had explained it. Yes, in more theoretical terms, but I am talking to professionals. 2. As for "very often" or "very rare", I think, it depends on the language, frameworks used, the general task and the style of programming (I mean, Pascal style applied to Java etc.). 3. And what is "very often"? For me it is more than once for a project :-)
Dec
30
comment How do I prevent unknowningly duplicating code?
You have forgotten to mention what is the usefulness of expressing two algorithms that only look similar, but really are different, as one module? The code should express the logic of the task. It is my point. You insist that it is bad... Hmmm. You need really hard arguments.
Dec
30
awarded  Yearling
Dec
30
comment How do I prevent unknowningly duplicating code?
@Secure Yes, you can't make code absolutely safe against changes, but you can make it safer. Otherwards all posts on this theme are senseless - go and punish all of us.
Dec
30
comment How do I prevent unknowningly duplicating code?
@Secure If you have two same pieces on different places, and these pieces are really the same - than if you have them united, the possibility to create a new mistake while changing that piece is lower. If these two pieces are the same accidentally, than uniting them will, on the contrary, create dangerous situation, it is very possible that you will need the change in merely one of them. And you will forget that it is used in another place where it is expected to remain the same.
Dec
30
revised How do I prevent unknowningly duplicating code?
added 125 characters in body