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

Jul
30
comment Design: Lisp (or other scripting language) as an interactive interface for C++?
Something you might want to keep in mind: Your job is to give your users what they need to do their jobs, as easily as possible. This is not necessarily the same as what they think they want.
Jul
30
comment Design: Lisp (or other scripting language) as an interactive interface for C++?
@RobertHarvey, what I saw was that (a) he wanted a REPL, (b) he didn't want to write a complicated parser, (c) he wanted a programming language, and (d) he wanted something that was easy for non-programmers to use. FORTH and LISP have been thoroughly demonstrated to meet all of those criteria. The trick, as Xerox learned, is "Don't call it programming and don't call it a programming language." (Note that HP for all practical purposes taught lots and lots of engineers the basics of FORTH, without every saying FORTH, in the HP RPN calculators.)
Jul
30
answered Design: Lisp (or other scripting language) as an interactive interface for C++?
Jul
29
comment Why is 'continue' the keyword for skipping the rest of the loop iteration?
@coredump Thank you. That makes sense.
Jul
29
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
answered Using variable + method invocation or repeating invocation?
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
8
answered Audio driver which filters outgoing sound out of incoming
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.