1,038 reputation
511
bio website
location
age
visits member for 3 years, 3 months
seen Dec 19 at 13:59

Dec
19
comment How to define “or” logically
I think this is the "purest" approach in certain mathematical sense. The OR-operator is a function after all, and the truth table is really the essence of that function as a relation and a set. Of course this could be written in an amusing OO manner too: BinaryOperator or = new TruthTableBasedBinaryOperator(new TruthTable(false, true, true, true));
Dec
19
comment On planning and implementing classes and their properties
@gnat But the question is not at all about code. It's about design. Sure, peers could complain about your way of designing or sketching diagrams too, but peers are not mentioned here at all since the question is really not about collaboration or teamwork either. It's about design.
Dec
19
comment On planning and implementing classes and their properties
@gnat This question is about object oriented design decisions, not readable and maintainable code. So this is definitely not a duplicate of that particular question.
Dec
12
comment Design of a datamodel in a OO way
Neural networks? So you could have objects representing neurons or nodes, connections and networks?
Dec
10
comment Why isn't software abstract on a grander scale?
I think your question is somewhat hard to grasp. You believe that software "should be more abstract". Which software? How abstract that software is now and how abstract it should be? Why exactly it should be more abstract? I think finding a working level of abstraction is always a balancing act, and not only in software design. Now your question seems a little bit too abstract and vague. It should probably be less abstract and more precise. Just like some code I've seen and written too.
Dec
9
revised Is Singleton enough for a EMailUtil or there is any better implementation?
edited body
Dec
9
answered Is Singleton enough for a EMailUtil or there is any better implementation?
Dec
2
comment Collections, relationships and tracking changes (in DDD)
I think the question needs more information about the design. It's hard to see why adding or removing Authors would be error-prone and why the business method needs to detect new or removed Authors. Does your Author have an identity? What is the "additional data related to a book and author"?
Nov
28
revised Why 'String' objects are immutable with an explicit constructor in java?
deleted 9 characters in body
Nov
28
revised Why 'String' objects are immutable with an explicit constructor in java?
deleted 9 characters in body
Nov
28
comment When should I refactor a private class into a package-private class?
Thanks for the edit. I am not a huge fan of Java's inner classes either and I guess excluding them is a well thought design choice in C#. Now that your answer doesn't (accidentally) advocate using them, I give it +1
Nov
28
answered Why 'String' objects are immutable with an explicit constructor in java?
Nov
28
comment When should I refactor a private class into a package-private class?
Since this is a Java question, shouldn't you edit the answer? Your answer could mislead some developers as your definition of "static class" does not correspond to a static class in Java.
Nov
27
comment When should I refactor a private class into a package-private class?
It seems that C# does not have inner classes like Java does. Perhaps that is the root of this confusion? In Java terms all C# nested classes are "static"... :)
Nov
27
comment When should I refactor a private class into a package-private class?
Note that all package level classes are just like static nested classes in the sense that they don't have an implicit reference to an instance other than themselves like an inner class does. Inner class (non static nested class) is the exceptional case really. It can be hard to refactor an inner class into a static nested or into a package level class. References to the enclosing instance need to be solved in the process. A static nested class can't have such implicit dependency and thus it's generally safer (IMHO).
Nov
27
comment When should I refactor a private class into a package-private class?
My point is that a static class can and usually it should be instantiated. Just call the constructor: new NestedStatic(). If you call it twice, you get two separate objects with separate states. I think you're confusing static classes with classes that have only static members.
Nov
25
comment When should I refactor a private class into a package-private class?
I don't quite understand your point. What do you exactly mean by "static private class"? A static nested class? If the nested class has static fields, they should be immutable just like all visible static fields of any class should be. The static nested class should be instanced and used just like an inner class (non-static nested class). It just doesn't need an implicit reference to an instance of the enclosing type.
Nov
24
comment When should I refactor a private class into a package-private class?
Why would data in a static nested class be a problem?
Nov
21
answered What should an object be called that contains only setters and getters?
Nov
20
comment Algorithm for rating books: Relative perception
I would ask the same question as SpoonerNZ: on what basis the book deserves 8.5? If you wish to avoid the influence of relative overrating and underrating then you could ignore top and bottom 10% of all ratings for instance.