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

Aug
17
comment COCOMO II SLOC count for web application development
@MichaelT: Can we agree that the same comment applies to Function Points, doubled and vulnerable? (Recall your comment about Function Points REQUIRING a high dollar consultant, which is where this discussion started.)
Aug
17
comment COCOMO II SLOC count for web application development
@MichaelT: If you swing a hammer, and you don't know how to swing it, the odds are good that you're going to hit your thumb. Same thing goes with software estimates.
Aug
17
comment COCOMO II SLOC count for web application development
@MichaelT: If your chosen tool can only be used with the help of a dedicated high-dollar consultant, you probably chose the wrong tool. As an alternative, consider Detailed COCOMO, which still uses SLOC, but allows you, among other things, to partition your estimate by, say, implementation language, do individual estimates for "subsystems" in each language, then roll up a final total estimate.
Aug
17
comment COCOMO II SLOC count for web application development
@MichaelT, "function points", last I looked, were not at all well-defined, and they are not at all amenable to post-construction counting. The reasons SLOC keeps winning these wars is that (a) SLOC are almost ridiculously easy to count, and (b) SLOC is very strongly correlated to everything else that has been proposed.
Aug
14
comment Program like NASA?: Margaret Hamilton's Three Primitive Control Structures
"Scatter/gather" is a very generic term these days. In this case, I meant that the manager send some stuff to A and some other stuff to B, runs both A and B, and packages up the results from both of them. "Scatter/gather" traditionally meant to take a large parallelizable task divide it up iinto pieces, "scatter" the pieces among several processors, then "gather" the individual results into one large object. I know of no open-source project that implements these primitives, as this is work that was done in the mid-to-late 1960s.
Aug
6
comment Proper way to interpret this dereference operation?
Part of the problem is the insistence on C/C++ syntax. Other languages have simpler syntax and correspondingly smaller, simpler grammars.
Aug
6
comment Proper way to interpret this dereference operation?
@JamesS.: No. Integer addition is commutative, even on computers. (Computer integer addition is not necessarily associative, if you take overflows into account.) All that matters is that both B->data and B->start have been "evaluated" before you attempt to add them. The compiler can evaluate either one first. Depending on the particular machine instruction set, it might make sense to evaluate one or the other first. Read "Design of an Optimizing Compiler", if you can find a copy (it is old, and HARD to find, and worth the effort!).
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
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
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
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.