Reputation
13,250
Next privilege 15,000 Rep.
Protect questions
Badges
5 30 46
Newest
 Nice Answer
Impact
~417k people reached

22h
comment Why is 'continue' the keyword for skipping the rest of the loop iteration?
@coredump Thank you. That makes sense.
1d
comment Why is 'continue' the keyword for skipping the rest of the loop iteration?
@coredump, I'd be curious as to when "cycle" and "exit" were added to FORTRAN, because they darned sure WEREN'T in FORTRAN IV when I learned it in 1970, and I'm pretty sure they weren't in FORTRAN II, either, as I sort of learned that before I learned FORTRAN IV. (My first live FORTRAN programming was FORTRAN IV on a CDC 6600.) Accepted practice in FORTRAN IV was to GOTO either the last statement in the loop (a CONTINUE if you needed "continue" semantics), or to a statement just past the end if you needed "break" semantics.
Jul
20
comment Why does scala require parenthesis around the condition of an if statement
Jörg W Mittag points out in his answer that the Scala designer consciously copied this from C (and everyone else who copied it from C). So there were three decisions, the decision by the designers of B to do it this way, and the decision to copy this from B into C, and the decision to copy from C into Scala.
Jul
20
comment rand() gives same numbers again for a small range
If you have a 20x20 checkerboard, as opposed to a 20x20 continuous (real) XY plane, then what you have is a 400-cell lookup table to check for collisions. This is TRIVIAL.
Jul
17
comment Using variable + method invocation or repeating invocation?
@Kroltan: I'm not a C# guy, so I wouldn't know the difference between C# and Java. It looks like Java to me.
Jul
16
comment VB6 - Large text files with no line terminators
This is a straightforward parsing problem, easily solved with a state machine that processes one character at a time. With smaller datasets, it is the kind of thing freshmen used to be expected to solve in their first PASCAL programming class.
Jul
14
comment Why do most of us use 'i' as a loop counter variable?
@LouisRhys, what kind of reference are you looking for? If you want one about the mathematical notation, almost any linear algebra textbook will show plenty of examples. Ditto any competent numerical methods text. If you are looking for a FORTRAN reference, dig out any OLD (by definition!) FORTRAN IV textbook. Alternatively, you could try to dig out an old FORTRAN reference manual (I think CDC document number 60279900 was the FORTRAN IV reference manual).
Jul
11
comment How can I stop echo feedback when making a streaming microphone device?
The standard approach is acoustic echo cancellation using a Normalized Least Mean Squares adaptive filter, running on a DSP. The technique is RELATIVELY straightforward, but there are some tricky wrinkles to getting it right, that make it VERY easy to screw it up.
Jul
1
comment Improve bisection method or alternate algorithm for efficient determination of text font size to fit in a box
@Thalia, Mandrill's answer describes the false position method. The modified false position method is a variation on the theme. See en.wikipedia.org/wiki/False_position_method for more information. (This is why you wanted to take the numerical methods class, although, come to think of it, false position methods are not usually taught these days.)
Jul
1
comment Improve bisection method or alternate algorithm for efficient determination of text font size to fit in a box
Bisection requires that you have the final solution bracketed, but otherwise assumes nothing about the form of the solution. If you know something about the form of the solution, you also have a way of estimating where to look for the solution. Use that to guess your new font, rather than just bisecting, and iterate, and you have what numerical analysis people call the "false position method". (Note: Hamming's "modified false position method" is better. Newton's method is far better, but you don't have the derivative available.)
Jul
1
comment Improve bisection method or alternate algorithm for efficient determination of text font size to fit in a box
The relationship between font "size" and font width may not actually be linear, but it will be approximately linear.
Jun
23
comment What is the best aproach for coding in a slow compilation environment
@MikeDunlavey: Well, DUHHH! Think about it. The compiler has to read in every character of every source and include file. That means it has to go out to the disk fairly often, move the head, wait for the head to move, wait for the disk to spin around to the sector of interest, read the sector of interest at a rate determined by the magnetic density of the disk and the angular rate of the disk, possibly repeat the whole process because that sector read was to find out where the REAL sector of interest is on the disk... Disk I/O is freaking EXPENSIVE.
Jun
23
comment Has there been recent research on Fred Brooks's model of the “Surgical Software Team”?
This was the "Chief Programmer Team" concept, originally described by Harlan Mills in 1971. Brooks picked it up. The fundamental issue was that what Mills called a "chief programmer" is what others call a superprogrammer, a Dennis Ritchie, and those kinds of programmers are just not all that common. Remember, 50% of EVERYTHING, including programmers, falls below the median.
Jun
15
comment How to translate from a programming language to another?
Have you considered embedding your DSL in LISP, instead of hacking up Yet Another Ill-Considered C Lookalike?
Jun
5
comment Which SPDX license is equivalent to 'All Rights Reserved'?
"all rights reserved", in that context, means EXACTLY what it says. NO permissions have been given. It is a legal term of art. Think of it as a magickal incantation that must be uttered in precisely that form to invoke the Law Demons.
Jun
3
comment How can I map a number of points of a polygon to matching points of a larger rectangle?
There is an ancient proverb that says "One picture is worth a thousand words." This would seem to be one of the times where that observation is appropriate.
Jun
1
comment Is byte stuffing required when using a packet field length
@supercat: The question was about a protocol for data to be transmitted via TCP. TCP provides a reliable medium for payload data. That was one of the specific requirements for its design, back in the 1970s.
May
12
comment Is 25% to me as sole author a good deal?
@Bobson: +1000 if I could.
May
12
comment GPLing an implementation of a patented algorithm
There's a flip side that you may not have considered. It is POSSIBLE that the paper published ten years ago constitutes prior art which would invalidate their patent. If someone else wrote that paper, whatever it disclosed may not have been theirs to patent. You REALLY need to consult a patent attorney on this one.
May
12
comment What is the most efficient / fastest way to keep a list in order?
@JamesJackson, upvoted it for you.