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

Feb
27
awarded  Civic Duty
Feb
26
answered How to represent calculated deadline is reasonable?
Feb
26
comment Does anyone work 10 hours shifts as a developer?
There is a HUGE body of research that shows, beyond doubt, that most people's productivity and alertness falls off DRAMATICALLY after 8 hours of work. The early adopters of the 8-hour-day, 5-day-week did it because they were humane. Their competitors did it because the early adopters saw their scrap, rework, and accident rates drop through the floor, which sent their profit margins through the roof, requiring their competitors to copy the move if they wanted to stay in business.
Feb
25
comment Engineering interview candidate refuses to use whiteboard
What are you looking to evaluate with the whiteboard test? How fast he thinks on his feet, how neatly he writes on the board, how he talks through a problem attack..., and how is it relevant to the interview and the position you are looking to fill? And note: If you can't answer this question IMMEDIATELY, you should probably reconsider whether this is actually doing anything useful. (Note: Testing motivation is not necessarily bad. Many of the early astronaut screening tests had nothing to do with space, but were good tests of motivation.)
Feb
25
comment Do iterative methods reduce cyclomatic complexity and improve supportability?
@Caleb: Agreed. The point I try to make is that people far too often go for these really complicated metrics and combinations of metrics, not realizing that just about all of them have been shown to be strongly correlated on real code with plain old Lines Of Code (LOC), and hence have no more predictive or descriptive value than LOC.
Feb
25
answered Do iterative methods reduce cyclomatic complexity and improve supportability?
Feb
25
comment Do iterative methods reduce cyclomatic complexity and improve supportability?
There's just this one little problem with the Maintainability Index. The three components of it are Halstead Volume, Cyclomatic Complexity, and Lines of Code. Both Halstead Volume and Cyclomatic Complexity have been shown to be very strongly correlated to Lines of Code. This means that an alternative approximate equation for the Maintainability Index that depended ONLY on Lines of Code could be derived that would be almost as accurate as the original, with considerably less computational difficulty.
Feb
24
answered Writing a TCP protocol or use HTTP for file transfer?
Feb
20
comment Validation of the input parameter in caller: code duplication?
Actually, it may be better to validate the parameter, and, if the parameter is invalid, throw an exception yourself. Here's why: the clowns who call your routine without bothering to make certain they gave it valid data are the same ones who will not bother to check the error return code that indicates they passed invalid data. Throwing an exception FORCES the problem to be fixed.
Feb
17
comment Is it possible to modify Lamport's mutual exclusion algorithm to work without a FIFO guarantee?
+1 for reminding everyone that TCP does these things so we don't have to. I have seen too many occasions where people wanted to use UDP because they couldn't stand (what they thought was) the high overhead of TCP, and then the proceeded to reimplement almost everything TCP does because they needed reliability.
Feb
14
comment What's the effect of this assignment (whatever the language)?
No, there's no typo. The point of the example is obviously to illustrate just how big a mess can be made with side-effects. (And I still recall the late Prof. Edsger W. Dijkstra saying, in a talk at UT Austin ca. 1998, that the real objective hadn't changed in 50 years: "Don't make a mess of it!")
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.)