Reputation
13,935
Next privilege 15,000 Rep.
Protect questions
Badges
5 31 49
Newest
 Nice Answer
Impact
~532k people reached

Apr
19
comment Why does the type go after the variable name in modern programming languages?
@StevenBurnap, a quick search reveals that Wirth's first book on Modula-2 came out in mid-1982. Ada was under development several years before that (DoD1 was in 1977 or so, as I recall), and standardized, as both an ANSI standard and a MIL-STD, in 1983. All four of the teams that submitted candidates for Ada took PASCAL as their starting points. (Bell Labs was invited by DoD to submit a candidate language based on C. They demurred, saying that C was not then and would not ever be robust enough for the DoD mission-critical software.)
Apr
19
comment Why does the type go after the variable name in modern programming languages?
Ada also does it that way, but Ada is most certainly not an "academic language".
Mar
10
comment Why are the sizes of programs so large?
@BrianDrummond, sounds like a really crappy runtime, or a crappy runtime and library and linker. In a training video I saw many years ago, Jean Ichbiah et al mentioned that a typical Ada runtime (for the original version of the language) would be about 4K. Out of curiosity, I checked this against the TI 320C30 runtime package we were using. He was right on the money.
Feb
25
comment Is it a good idea to document every assumption in code, even if it goes against the standard of the language?
This is a VERY good idea. It BOTH documents the assumption AND it hardwires the null guard into the code.
Feb
11
comment Is there any work into the application of the Halstead complexity measures to determine software quality?
McCabe's cyclomatic complexity has been shown, on real code, to be very strongly correlated with raw SLOC, to the point that there is no incremental value whatsoever in computing it.
Feb
11
comment Is there any work into the application of the Halstead complexity measures to determine software quality?
When X and Y are merely correlated, and Y and Z are merely correlated, yes, X and Z are not necessarily correlated, because of the relatively high noise levels in the first two correlations. When X and Y are strongly correlated, and Y and Z are strongly correlated, there is very, very little noise involved, and it becomes highly probable in any given case that X and Z will be found to be correlated.
Feb
10
comment Why did BASIC use line numbers?
COBOL did not use those line numbers. They were strictly a convenience, so that when some poor schlub dropped his deck, and cards went everywhere, he could just gather them up and run them through the card sorter to get them back into the correct order. You were NOT required to punch the line numbers into the cards. (Students didn't. Production shops did.)
Feb
3
comment Can I trust the Basic Schedule Equation?
@SteveCampbell, the equation as written claims that schedule rises as the cube root of effort involved. That's what I was trying to say sounded highly dubious.
Jan
28
comment Is the algorithm more important than the programming language?
The point is not that your particular favorite language was or was not represented in one particular experiment. The point is that language MATTERS. There have been a LOT of anecdotal studies, that show this pretty conclusively. It is also worth noting that, despite being mostly rejected by American programmers, Ada is still heavily used in Europe, especially for high-reliability systems, and it is still used in certain fielded systems in the US.
Jan
22
comment Using a license without a year value
@BartvanIngenSchenau, I have never seen a commercial copyright notice on any code anywhere that did not include the phrase "All Rights Reserved". I expect that this is because there was a nasty lawsuit somewhere, that turned on the presence or absence of that phrase.
Jan
21
comment Using a license without a year value
As a general rule, you should, in the United States at least, add the phrase "All rights reserved" after the owner's name(s). AFTER THAT, you can start granting licensing permissions.
Jan
11
comment What can qualify for potential tail call recursion (TCO) optimization or tail recursion elimination (TRE)
Short answer: Read the various "Lambda: The Ultimate" papers from the MIT AI Lab. They go into a great deal of detail on, among other things, tail recursion and tail call elimination.
Jan
9
comment Why are statements in many programming languages terminated by semicolons?
@kevincline: While I'm thinking about it, a few years later: Texas Instruments DSEG (now part of Raytheon) had a group that did 6DOF simulation. Traditionally, 6DOF sims were written in FORTRAN. About the time I joined TI DSEG, they decided to try writing our project's sim in PASCAL, to see how bad the performance hit was. Their report: They took a few percent hit, but the readability and maintainability improvement was so dramatic that they were NEVER going back to FORTRAN for sims.
Dec
9
comment Which programming language (or machine language) first used line numbers?
Columns 1..5 were for statement labels, which had to be numbers. Columns 73..80 were for card sequence numbers. If you were unfortunate enough to drop your card deck, having sequence numbers on all of the cards meant that you could run your deck through a card sorter and get it back into the correct order.
Dec
8
comment Which are the alternatives to using a stack to represent function call semantics?
I should add that the PDP-8 JMS xxx (JuMp to Subroutine at xxx) instruction stored the return address at address xxx and jumped to xxx+1. To return, the programmer coded an indirect jump through location xxx. Same basic idea as the 6600, no stack.
Nov
23
comment Optimization: How much time saved is considered worth it?
It Depends On What You Are Doing. If you are doing the typical random web page garbage, no, it probably doesn't matter if it takes one second or two. If you are doing real-time image processing, where you have megapixel frames of video coming at you 30 or 60 times every second, you better believe accessing the DRAM in the correct order makes a difference.
Nov
22
comment Private variables and the old FORTRAN common blocks
Recognize that, first, C++ was required to maintain backwards compatibility with C, and, second, C++ had to look ATTRACTIVE to the flying code monkeys who collectively believe that C is a good language, while simultaneously dragging them kicking and screaming into the light. Stroustrup's first goal for C++ was adding strong typing to C, the feature that caused the flying code monkeys to scream from the rooftops when they encountered it in PASCAL and Ada. His SECOND goal was to port the Simula-67 class concept, which became OOP.
Nov
13
comment Designing a programming language, seeking simple and logical parameter behavior
It might help you to read programmers.stackexchange.com/questions/153474/…
Nov
12
comment How big should be an input array to unit test a method with a loop?
PRECISELY. It simplifies the BLEEP out of the testing problem. This is why they taught you about subroutines in first-semester programming class!
Nov
12
comment How big should be an input array to unit test a method with a loop?
I should mention in passing that doing it this way, with the decomposition explicit in the code, can get you in hot water with your management if your coworkers have never been exposed to "Structure and Interpretation of Computer Programs". Been there, done that, got the scars, had to write a full page of comments explaining the basics of continuation-passing style.