12,163 reputation
52842
bio website
location
age
visits member for 3 years, 11 months
seen 39 mins 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
14
comment What's the effect of this assignment (whatever the language)?
@delnan: Actually, it depends on the implementation. Some languages don't define whether the left-hand side of an assignment is evaluated before or after the right-hand side, but rather warn that the order is undefined, and the programmer is expected to be smart enough to write his code in a way that it doesn't matter.
Feb
14
comment What's the effect of this assignment (whatever the language)?
This is a beautiful example of how functions having side-effects can be a really Bad Thing. If the compiler could assume that f(x) == f(x) for all x and all f, the results would be very different, and very intuitive.
Feb
13
comment Can I use GPL software in a commercial application
GPLv2 requires you to make available the machine-readable source code. GPLv3 says, in part, "You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License...". In other words, offering a photocopy of the source listing is NOT GOOD ENOUGH.
Feb
10
comment When would you need “hundreds of thousands” of threads?
Some years ago, I spent a few years doing real-time FLIR image-processing, crunching 256x256 images at 30 frames per second. Unless you have a LOT of HARDWARE processors, and a SEAMLESS way of partitioning your data among them, the LAST thing you want to do is add context switching, memory contention, and cache thrashing to the actual computational costs.
Feb
9
comment What will be the better way for data retrieval on application that needs to handle limited amount of data.?
About ten years ago, in a graduate systems modelling class I audited, a classmate did a careful study, and showed that using XML to pass data caused two orders of magnitude of performance loss. (The data file expands to 100x the necessary size, requiring 100x storage, 100x communications bandwidth, and a much bigger parser.) In the light of this, maybe you should reconsider your use of XML?
Feb
6
comment Why has C prevailed over Pascal?
@SK-logic: PASCAL was in commercial use (defense industry) in the mid-to-late 1970s. BBN was using it for the Key Distribution Center for an experimental network crypto system. (They went through two major design iterations that I knew of, the first using raw PASCAL, the second using PASCAL plus a multitasking kernel.) TI-DSEG did a pilot project in 1988, writing a 6DOF simulation in PASCAL. They guys who did it said that the maintainability was SO much better than FORTRAN that they were happy to live with the slight performance hits.
Feb
6
comment Objective Metrics for Software Quality
@locster: I've been doing this for something over 30 years. These days, I routinely see stream-of-consciousness run-on routines, that go on and on for a few hundred SLOC, for no reason. In all those years, I have seen exactly one (1) routine that actually NEEDED to be more than one printer page of code (about 60 lines). All the rest could have been quite profitably factored down, and the readability and reliablity increased significantly. (That doesn't count big state machines. They can be a problem in this area, but they are RARE.)
Feb
6
comment When should pointers be checked for NULL in C?
@James: The problem with error codes is that programmers almost never bother to check them. Throwing an exception or tripping an assert FORCES them to deal with the problem.
Feb
6
comment When should pointers be checked for NULL in C?
@detly: If you are in a function that requires a non-NULL pointer, and you don't have a mechanism to return a fatal error to the caller, you throw an exception or trip an assert. I personally prefer throwing an exception, as that pretty much guarantees a traceback with the crash-and-burn. (I caught a lot of static on this some years ago, on an Ada project. I had to educate several people, including my manager, on the concept of policy/mechanism separation.)
Feb
6
answered When should pointers be checked for NULL in C?
Feb
5
comment How can I deal with a team member who dislikes making comments in code?
Have you considered an alternate hypothesis, that the code is perfectly understandable to him AND TO ANYONE ELSE WITH HIS WIZARD LEVEL OF SOPHISTICATION, but not to people who have barely achieved Journeyman or are still Apprentices? I have seen cases like this, in specialized real-time image-processing applications, and, as it turned out, it was absolutely necessary to train up to Wizard to be able to work on the code, NOT because it was undocumented, but because the problem domain was inherently hard. By the time I understood the domain, his code WAS self-documenting (and CLEAN!).
Feb
5
comment Objective Metrics for Software Quality
@locster: Given two 100 SLOC modules, one with a CC of 47 is likely to have more problems than one with a CC of 3. HOWEVER, for real-world code, in large quantity, one finds that short modules tend to have low CC and long modules tend to have high CC, to the point that knowing the SLOC gives you a very good guess at the CC, and vice versa. This is what is meant by "very strongly correlated." AS SUCH, on real code, any benefit you get from noticing CC = 47 is MORE EASILY gotten from noticing SLOC = 1500. (Numbers pulled at random, principle is the same.)
Feb
4
answered Objective Metrics for Software Quality
Feb
4
comment Is the average number of bugs per loc the same for different programming languages?
Unfortunately, Hatton's paper is paywalled by the IEEE, so it is impossible to determine whether it says anything useful. (That the second comment compares C and C++ seems to argue against it.)
Feb
4
comment Is the average number of bugs per loc the same for different programming languages?
Let me ask you this question. Does the answer actually matter to you? If, for example, you were told that a particular higher-level language offered, say, doubled programmer productivity and 1/4 the defect rate, across the board, what would you do with that information?
Feb
1
comment Will experience suffice for a Computer Science degree
Something you might want to look at: argee.net/DefenseWatch/…
Feb
1
comment What can I do to strengthen up my pen and pencil coding skills?
Same way you get to Carnegie Hall: PRACTICE, PRACTICE, PRACTICE!
Jan
24
comment Is the number of bugs in a section of code proportional to the # of lines ? The square of the # of lines ?
Saying that "the validity of Halstead's metrics have been questioned" does not begin to tell the tale. Halstead's metrics have all been shown to be strongly correlated with raw SLOC (source lines of code). The implications are obvious.
Jan
23
comment Why has C prevailed over Pascal?
I think that your comment ".. and all the MS/Windows operating systems" may be factually incorrect. Windows was originally designed and coded in PASCAL. From en.wikipedia.org/wiki/Talk:X86_calling_conventions: "Just thought I would weigh in here. I looked up the __pascal keyword in the Watcom C/C++ User's Guide, and its clear that: __pascal calling convention was used for OS/2 1.x and Microsoft Windows 3.x APIs "
Jan
22
comment What programming language generates fewest hard-to-find bugs?
@Malfist: Let me clarify it for you. My personal experience was that it didn't take significantly longer to get Ada code COMPILABLE than it takes C/C++ or FORTRAN. By that, I mean "It compiles without errors or warnings."