Reputation
652
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
3 9
Newest
 Revival
Impact
~12k people reached

  • 0 posts edited
  • 0 helpful flags
  • 34 votes cast
Jun
13
answered Best way to handle blank dates
Jun
8
awarded  Revival
Jun
8
comment Maintaining State without assignment
Sure. Please look at my edit.
Jun
8
revised Maintaining State without assignment
added 860 characters in body
Jun
2
revised Maintaining State without assignment
added 1 character in body
Jun
1
answered Maintaining State without assignment
May
30
comment How do you avoid getters and setters?
As the question is tagged as a Java question, please note that Java conventions require you to start your methods' names with a lower case.
May
28
answered Passing same argument to multiple small functions versus doing everything in one big function?
May
28
revised Decorator design pattern in swift
edited body
Jan
12
answered Decorator design pattern in swift
Jan
9
revised How should blank/empty value objects be instantiated/structured?
added 1 character in body
Jan
9
comment How to randomly get or find a sub-tree (include root node) from a given tree that contains n leaf-nodes
Count the number of leaf nodes in the given tree. If this number is greater or equal to n, return the tree itself. Otherwise, there is no subtree with at least n leaf nodes.
Jan
7
comment Why would a program require a specific minimum number of CPU cores?
Are you sure the problem is really and directly related to the number of cores? Maybe the mentioned game is partially based on a feature only (correctly) provided by CPU with at least 4 cores?
Jan
7
revised How should blank/empty value objects be instantiated/structured?
added 34 characters in body
Jan
7
answered How should blank/empty value objects be instantiated/structured?
Dec
31
answered Range of values based on key values
Oct
24
comment What can one do to improve readability of math-oriented code in C#, Java, and similar?
Yes, in general, and by definition, a DSL may be useful when you work in a specific domain. However, if this DSL doesn't exist, or if it doesn't fit the needs, you have to maintain it, which may be problematic. Also, for the specific question ("How can I use the sin, cos, … methods/functions without writing the Math class every time"), a DSL is maybe an oversized solution.
Oct
18
awarded  Yearling
Jul
7
comment Automatically create or update object in database
I would not ask anything to the database directly from the UI, since it's a clear violation of the MVC design pattern. Even if you don't intend to strictly respect it, consider the fact that you will probably want to access to the database without using the GUI. In OOP, I would also avoid to pass states such as Add or Edit. Prefer the use of inheritance or, generally even better, composition to specialise the GUI's behaviour. In this context, you could consider the ActionListener as the Strategy of a Strategy Design Pattern.
Nov
18
comment Ordering if conditions for efficiency and clean code
I don't think it's foolhardy, in the worse case you spend time for no perceptible speed improvement. But, indeed, generally tests are not so heterogeneous that a such "optimisation" is interesting.