12,476 reputation
53045
bio website
location
age
visits member for 4 years, 2 months
seen 11 hours 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.

Jul
28
comment Why was the first compiler written before the first interpreter?
McCarthy did not write the LISP interpreter. McCarthy invented a mathematical formalism. Steve Russell, one of the students in the MIT AI Lab at the time, realized he could write an interpreter to execute McCarthy's flights of fancy, and the rest is history.
Jul
27
comment If statements in “generic” assembly?
That's one way to do it. You really only need two, EQUALS and one of the unequal cases.
Jul
21
comment How to prove that following practices and industrial standards are profitable, and investment in refactoring are good
+1 for "Sometimes the grass really is markedly greener on the other side."
Jul
21
comment Why does C dominate in the embedded software market?
Correctness is always #1 on the list of requirements for a production program. Performance is #2. Far too often, programmers are not only willing but downright foaming-at-the-mouth eager to abandon enforcement of correctness in the name of performance.
Jul
18
comment Why are floats called “real numbers” in some languages?
I think you have the question backwards. At a time when most of the existing languages were using "real" to mean floating-point (as opposed to integer), C chose to use "float" instead of "real". Your question could just as easily, and more correctly IMHO, be stated as "Why does C (and its derivatives) use "float" instead of "real" to denote (machine-approximate, i.e., floating-point) real numbers?".
Jul
18
comment Why does C dominate in the embedded software market?
@dan04, in the vast majority of cases, that wasn't actually a problem. A 6DOF simulation group at Texas Instruments Defense Systems and Electronics Group did a little experiment in about 1988. Up until then, they'd done all their simulations in FORTRAN. They tried writing one in PASCAL, to see how bad it would hurt. They discovered that PASCAL gave them a small performance hit, but the increase in reliability and ease of debugging MORE than made up for it. Bluntly, they found that PASCAL's strong type checking was a GOOD thing. (And yes, they were doing arrays.)
Jul
17
comment Why does C have no competitors in low level stuff?
Ada is a lot pickier than C when it comes to doing things that are likely to result in you shooting yourself in the foot if you do it wrong. C lets you do it. Ada insists that you tell her that you INTEND to blow your foot to smithereens.
Jul
17
comment Why does C dominate in the embedded software market?
Don't underestimate the power of inertia and sloth. There were a LOT of "programmers" who screamed bloody murder about the mandatory strong type checking in PASCAL, then ate their broccoli and discovered it tasted pretty good in C++. (There are also some interesting anecdotes about guys forced to use Ada who previous screamed bloody murder about "bondage and discipline languages", who stopped screaming when they realized that the compiler was finding BUGS that would have eaten them alive during testing.)
Jul
15
comment Is there still any value in learning assembly languages today?
You would be AMAZED how much IBM 360 business applications programming was done in assembly language, because of hard performance requirements that just could not be met with the high-level languages and compilers of the day (or because the compiler was considered to be too expensive, or because the code was ported from an earlier system...)
Jul
15
comment What diagram would be the best to describe the situation
Actually, the UML activity diagram is a flowchart with funny-shaped boxes.
Jul
14
answered Parsing mathematical expressions with two values that have parentheses and minus signs
Jul
12
comment Is it a good idea to do contract work for a former full time employer?
The old rule of thumb was to take your Direct salary, drop three zeroes off the end, and that gave you your Contract hourly rate. The rationale is that you are going to spend about 50% of your time "on the beach", between contracts, hustling for the next gig, and you need ROUGHLY the same income. This rule of thumb does not take into account the fact that your expenses as a contractor will usually be significantly higher than your experiences as a Direct employee.
Jul
11
comment Is it a good idea to return a default value if a field in a query cannot be found?
@supercat: Observe that there is no real semantic difference between what you suggest and what I espouse. The only difference is how the caller supplies the default returner. In your method, you pass a callback method with your key when you call the get(). In mine, you wrap an exception catcher around the get(), and call the callback method yourself if the exception is thrown. Observe that it is usually easier to track down an unhandled exception than it is a branch to Never-Never Land. (Worst case is when a branch through a null pointer yields a valid code address: you die screaming.)
Jul
7
answered Full signed part of two complement long
Jul
3
answered Is it a good idea to return a default value if a field in a query cannot be found?
Jun
30
comment Is it safe to rely on static analysis to “reproduce” concurrency bugs reliably?
Something to add: 6) NEVER acquire and hold more than one lock at any given instant. 7) If you absolutely, positively MUST acquire and hold more than one lock at any given instant, make damned certain that they are ALWAYS acquired in the SAME order. If process A and process B must both acquire locks Red and Green, they can deadlock if one of the acquires Red first and the other acquires Green first.
Jun
30
comment Is it safe to rely on static analysis to “reproduce” concurrency bugs reliably?
@delnan: EXTREMELY cogent, perceptive comment. +100 if I could.
Jun
26
comment Which are the alternatives to using a stack to represent function call semantics?
@LorenzoDematté: Precisely. That was how the CDC 6600 Return Jump (RJ) subroutine call worked. "RJ xxx" stored a jump to PC+1 in xxx and then jumped to xxx+1. When the subroutine finished, it jumped to xxx, which jumped back to the calling routine. This works fine for nonrecursive languages like FORTRAN, but it doesn't work for recursive languages like PASCAL. PASCAL had to implement a call stack in software.
Jun
17
comment How to define different names for the same type and have the compiler check them?
The question is whether you want to catch the error the moment you utter it, or when you try to store it and discover the types don't match up. Over fifty years of computer science seems to suggest that you want to catch the error as early as possible. A complicated expression with two errors, in the presence of implicit type calculus, could wind up generating total garbage with a correct result signature, which is the worst-case scenario.
Jun
17
comment How to define different names for the same type and have the compiler check them?
@kevincline, the explicit instantiation requirement is arguably a Good Thing. As I recall, it was Tony Hoare who proposed a set of default typing rules, analogous to the FORTRAN I-N integer rule, to the ALGOL committee. They chastised him most severely, explaining that requiring explicit declaration of variables, and their types, reduced programming errors. (The author of that tale added that this happened BEFORE anyone knew the possibly-apocryphal story of the lost interplanetary probe, caused by a typo combined with default typing in FORTRAN.)