12,972 reputation
53046
bio website
location
age
visits member for 4 years, 8 months
seen 1 hour ago
Very senior embedded real-time systems programmer (Texas law is very picky about the use of the term "engineer"), unsuccessful candidate for U.S. Congress, and unreconstructed Cold Warrior.

Feb
20
answered Should all possible counter-cases be tested?
Feb
20
comment Origin of the “array” term in computer science
I wasn't sure whether the original FORTRAN had arrays. I knew that FORTRAN II (predecessor to FORTRAN IV, the version I first really learned in 1970) had them.
Feb
19
comment What benefit is there to using recursive binary search over iterative binary search or vice versa?
@raptortech97: Read c2.com/cgi/wiki?TailRecursion for more information.
Feb
19
comment What benefit is there to using recursive binary search over iterative binary search or vice versa?
Binary search is tail-recursive, not generally recursive. As such, a recursive implementation should, given a competent language processor, incur NO speed or stack space penalty over an iterative implementation. Read the "Lambda: The Ultimate ..." papers from the MIT AI Lab for the gory details.
Feb
19
comment What benefit is there to using recursive binary search over iterative binary search or vice versa?
My understanding is that the JVM does not support a general GOTO operation, which is necessary for general tail call optimization. Tail recursion is a special case of tail call.
Feb
18
answered What benefit is there to using recursive binary search over iterative binary search or vice versa?
Feb
18
answered Is there a (systematic) way to convert a recursive program to a version using user stack?
Feb
18
comment Optimizing code by using registers, but what if they are not enough in number?
@delnan: Worst case, with the temporary, you fetch radius[i] once, store it once in the temp, and then fetch the temp a few times, AS OPPOSED to fetching radius[i] those few times. The question is how much extra does the subscript operation cost. Moreover, depending on what you are doing between uses of the (temp-cached) expression, the compiler may be required to assume that something could have changed, and do an expensive operation. Using a scope-limited temp tells him that the temp DIDN'T change.
Feb
18
comment Should curly braces appear on their own line?
@Alex, comprehension is generally limited to what the programmer can see WITHOUT turning a page, or scrolling, or punching a button. Fancy "navigation" features still boil down to turning pages, meaning the programmer has to remember what he left behind, reducing comprehension. An IDE that can collapse and expand blocks might help, but I've only heard of one such (Rational R1000, for Ada) and I've never used it.
Feb
16
answered Using message queue systems - forcing synchronous processing
Feb
15
comment Should private functions be held to the same standards as public functions?
@user87166, the basic principle is that most things in life follow a normal distribution, a bell-shaped curve. The curve is symmetric about the mean, which in everyday life we call the "average". Half of the curve is left of the average, below average, half is above average. (TECHNICALLY, half are below the median. For everyday purposes on programming skills, the median and the mean are probably close enough to be considered equal.)
Feb
15
answered The difference between (-(a*b)) and ((-a)*b)
Feb
14
answered Should private functions be held to the same standards as public functions?
Feb
12
comment Boss is ordering me to send spam. How to I deal with this issue/what is my options?
@Miloshio, there's no "maybe" about it. You MUST speak with a lawyer IMMEDIATELY.
Feb
9
comment What is best practice on ordering parameters in a function?
This is inherently dependent on the application domain and sub-domain. Consider RK4(F, A, B, H): Integrate F from A to B with stepsize H using a 4th-order Runge-Kutta integrator. Consider NEWT(F, FP, A, B, EPSILON, LIMITCOUNT): Using Newton's Method (aka Newton-Raphson Iteration, if you're old and grey and FORTRAN IV is your FRIEND), find a root of function F, using derivative function FP, between A and B, to error limit EPSILON, and quit if you haven't converged after LIMITCOUNT steps. (OK, you could bind F and FP together, but that's about it.)
Feb
6
comment Why no fortran standard library?
@Rook, I am afraid you are destined to be horribly disappointed.
Feb
5
comment How to setup an agile startup without the customer?
@enderland: How do you know that your sample user even EXISTS, much less exists in sufficient quantity and with sufficient disposable income to make it worthwhile to build your proposed product? Doing it Apple's way at least guarantees you know your customers are out there.
Feb
5
comment How to setup an agile startup without the customer?
You can SORT OF work around this by adopting Steve Jobs's approach: Apple built cool stuff that Apple people wanted to buy. If your plan is for your startup to get rich building something you couldn't get excited about to save your life, you've got a bigger problem than "how do we run Agile for this".
Jan
28
comment Best strategy for converting change in longitude and latitude to north, south, east, west in degrees
And one more. If you have access to a good university, with a Navy ROTC detachment (or the equivalent in your country), go make an appointment with the Professor of Naval Science (translation: commanding officer of the detachment), explain your question, and ask him NICELY for an introduction to the guy who teaches Navigation. (Any branch will likely be able to put you in touch with someone, but this is closer to a Navy problem than anything.)
Jan
28
comment Best strategy for converting change in longitude and latitude to north, south, east, west in degrees
Spherical Earth or oblate spheroid? If spheroid, which spheroid model?