127 reputation
5
bio website patriciashanahan.com
location San Diego, CA
age 65
visits member for 1 year, 7 months
seen yesterday

I'm a retired programmer, computer architect, and long time contributor to USENET, especially comp.lang.java.programmer.

I'm now learning web application writing for fun, so I expect to need a lot of answers. I'll try to contribute as well.


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.
Jul
14
comment Am I approaching learning Java correctly?
The right way to learn Java is whatever way works best for you. If the tutorial is not working, try something else. I usually learn a programming language by alternating between reading a book and writing code.
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.
Mar
5
awarded  Quorum
Mar
1
comment Why does automated testing keep failing in my company?
I think that adding automated testing to an existing code base that was not written with testing in mind, is very, very difficult. It is much easier to write tests and code in parallel.
Feb
28
answered How to invoke anonymous functions in testing?
Feb
28
comment When do you use float and when do you use double
I would probably not consider float for a few thousand values unless there were a performance problem related to floating point caching and data transfer. There is usually a substantial cost to doing the analysis to show that float is precise enough.
Feb
28
awarded  Supporter
Nov
25
awarded  Autobiographer