Reputation
281
Top tag
Next privilege 300 Rep.
Create new tags
Badges
1 6
Newest
 Nice Answer
Impact
~4k people reached

  • 0 posts edited
  • 0 helpful flags
  • 37 votes cast
Jan
31
answered Help in understanding computer science, programming and abstraction
Jan
25
comment Should we avoid language features that C++ has but Java doesn't to increase maintainability?
Beyond the choice of features, there is the matter of style and idiom. Programs are generally easier to read and maintain if they use the normal idioms for the language in which they were written. Even if one could write a portion of a C++ program using only Java-like features, the result would be strange, stilted C++.
Oct
28
comment Could an instance be equal to some other instance of a more specific type?
It can be OK to override hashCode without overriding equals. For example, one would do that to test a different hashing algorithm for the same equality condition.
Oct
3
comment Is there a specific reason for the poor readability of regular expression syntax design?
If I remember correctly, the syntax used in ed in the early 1980's was significantly simpler than the current syntax, so the terseness was less of a problem.
Sep
18
awarded  Nice Answer
Sep
17
awarded  Yearling
Sep
17
answered How to deal with tremendous number of failing tests?
May
29
answered Is it good that testers are competing to see who opens more bugs?
Feb
11
answered Bridging the gap between abstract machines and computer achitectures?
Jan
3
comment Why do class-based OO-languages always use the keyword `new` to create an object?
In Java, it is possible for class X to contain a method X that cannot be distinguished by its parameter list from an X constructor. "new" distinguishes object creation from method invocation.
Jun
29
comment Good or bad practice to mask Java collections with meaningful class names?
Practical example illustrating the main point in this answer: The documentation for public class Properties extends Hashtable<Object,Object> in java.util says "Because Properties inherits from Hashtable, the put and putAll methods can be applied to a Properties object. Their use is strongly discouraged as they allow the caller to insert entries whose keys or values are not Strings.". Composition would have been much cleaner.
Jun
13
awarded  Commentator
Jun
13
comment Is my work on a developer test being taken advantage of?
In the future, I suggest putting a personal copyright notice in a comment in each source code file. If they are only using the code to evaluate your programming, they should not care. If they are thinking of using it as production code, they won't like it.
Apr
29
answered Why can we not insert into files without the additional writes? (I neither mean append, nor over-write)
Apr
19
comment Do compiler-writers actually need to 'understand' machine code?
The last time I worked on a compiler it generated assembly language but I had to fully understand the machine code and the processor behavior, in order to generate correct and efficient code.
Aug
2
awarded  Teacher
Jul
27
comment Big-O of this algorithm?
@Fallen I agree that the complexity of a loop can vary. I'm stating a condition: if each of the three nested loops has iteration count bounded above by a linear function of n then the innermost code is executed O(n) times. Note that Big-O is only an upper bound. The constant function f(n)=0 is O(n^3).
Jul
27
answered Big-O of this algorithm?
Jul
27
comment Big-O of this algorithm?
@Fallen As long as each of the three loops has an iteration count that is bounded above by a linear function of n, it must be O(n^3). It may also be O(n^2), or less, depending on the loop ranges. Big-O notation is only an upper bound.
Mar
28
comment Tracking scientific error when working with floating-point numbers
How big a system of linear equations do you expect to have to solve? I've only dealt with up to a few thousand equations. At that sort of size, with 64 bit binary floats, floating point rounding error is very manageable. "Scientific error" is a very broad category - it would include instrument errors in measuring the physical quantities on which the program operates. "Rounding error" is a more precise term for the type of error you seem to be talking about.