Reputation
Next privilege 200 Rep.
See reduced ads
Badges
1 8
Newest
 Organizer
Impact
~160 people reached

  • 0 posts edited
  • 1 helpful flag
  • 401 votes cast
Jan
29
comment Is it acceptable to copy and paste long but straightforward code instead of wrapping them into a class or function?
You could also quote SRP: having a code block that has only one purpose makes it so much easier to understand and maintain..
Nov
12
answered Is there a performance benefit to using the method reference syntax instead of lambda syntax in Java 8?
Nov
12
comment Maintain hundreds of customized branches over master branch
It sounds like a long winded way of saying "just refactor your code"
Oct
28
comment Compilable modern alternatives to C/C++
Really, this does not answer the original question of "What more modern alternatives are there to C for writing high performance code compiled code?"
Sep
24
comment Why isn't there a true “Date-Only” data type?
First of all, the question was about why is there no data type for representing only dates. Your answer was not addressing the question - or rather about half of your answer was explaining why having such a type is bad idea. Popularity of libraries like Joda-Time and Noda Time and design of the recent java.time library show clearly that there is actual very practical need for those data types. The only reason for not having it in the SDK library is simply lack of foresight by library designers. It is as simple as that.
Sep
24
comment Why isn't there a true “Date-Only” data type?
This is an interesting argument but it is completely wrong in assuming that the only valid fidelity of time tracking is precise moment of time. For example in the case of the date of birth or historic events the millisecond precision of the exact moment of its occurrence is rarely important or often even impossible to determine -- when did the battle of Gettysburg end? When was Caesar assassinated? The choice of the date/time data type must reflect the resolution of the data it represents. And sometimes the representation is exactly what you need.
Jul
23
comment What are the ways to avoid duplication of logic between domain classes and SQL queries?
The trouble with putting (procedural) business logic in SQL is that is extremely painful to refactor. Even if you have top notch SQL refactoring tools, they usually don't interface with code refactoring tools in your IDE (or at least I have not yet seen such a toolset)
May
26
comment How do you avoid getters and setters?
@DanielPryden, true, omitting get prefix is a valid pattern in Java, but if you look at how or when this is used, it usually is reserved for either computed, derived or transformed values, not so much for object attributes/properties of an object. In any case, bringing it back to the original topic, it does not matter if you put a get prefix in front of it or not, if it's only function is to get a value of a private field, it is a getter. Disguising it by omitting the get prefix is only going to confuse people.
May
23
comment How do you avoid getters and setters?
@DanielPryden I am not saying any such thing. What I was trying to say is that labeling certain idiomatic patterns as not useful just because you don't agree with them is pure hubris. Code isn't only meant for machines to execute. It's also useful to remember the people (including you five years from now) who read it later and need to understand it. Human brain is great with recognizing patterns. Naming your getters and setters in idiomatic ways helps people to recognize them for what they are.
May
21
comment How do you avoid getters and setters?
@DanielPryden the conventions that are idiomatic to a language are useful even if you are not doing "enterprise development"...
Apr
9
awarded  Organizer
Apr
9
revised How much work should I place inside a lock statement?
Added tags for locking and concurrency
Apr
9
suggested approved edit on How much work should I place inside a lock statement?
Jan
20
comment Understanding the difference between mutable and immutable classes
As it has been pointed out by multiple people already, hashCode and equals methods have absolutely nothing to do with mutability.
Dec
19
awarded  Critic
Nov
5
awarded  Civic Duty
Oct
23
answered Is staying implementation agnostic really worth it?
Oct
11
comment 3d Packing algorithm for item's shipping
I think the fine sarcasm in this reply got lost in the translation somewhere...
Oct
1
comment How do languages with Maybe types instead of nulls handle edge conditions?
@supercat The question was about equivalence of null versus Maybe<T>. While internals of building arrays and lists is an interesting topic, it does not add any value to the larger discussion. As for the nullability of reference types in C#, I readily admint that my last encounter with C# was brief and it has been more than 3 years since I last programmed in C#, so you may well be right about that. In any case, my point was, that Nullable<T> can be used as poor man's Maybe<T> in C#. For all practical purposes they are the same construct.
Oct
1
comment How do languages with Maybe types instead of nulls handle edge conditions?
@supercat I think you are derailing the discussion here.