Reputation
2,953
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
15 30
Newest
 Good Answer
Impact
~148k people reached

1h
comment Is there empirical evidence supporting Brook's Law (or a modification of it)?
@Mandrill I find it curious that nobody made the effort to research this, since it's one of the fundamental insights of software engineering. Anecdotes remain just that -- anecdotes. Research work that documented hundreds or thousands of cases where this purported law holds would go a long way. Research is very important for software engineering, otherwise we will remain in an age of cargo cult methodologies and processes :/
Aug
7
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
I think this answer isn't helpful. It complicates things way beyond the current level of understanding of the OP. It's clear the OP doesn't understand the basic execution model of a CPU + RAM, and how a compiler translates symbolic high-level source to an executable binary. Tagged memory, RTTI, Lisp, etc, is way beyond what the asker needs to know in my opinion, and will only confuse him/her more.
Aug
7
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@user16307 Try not to worry about C++ and C#. What these people are saying is way above your current understanding of how computers and compilers work. For the purposes of what you're trying to understand, the hardware does NOT know anything about types, char or int or whatever. When you told the compiler some variable was an int, it generated executable code to handle a memory location AS IF it were an int. The memory location itself contains no info about types; it's just that your program decided to treat it as an int. Forget everything else you heard about runtime type information.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@vaxquis Jorg's answer is pretty good as well, and has my +1.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@vaxquis I'd argue that the computer doesn't know. The compilers for C++, Java, etc. produce additional code to handle this information -- which again, I think it's a more advanced topic than what the OP is asking about -- but the hardware knows nothing of it. You have to keep track of this because the computer doesn't know how to do it; C++ (for example) merely generates code for this, so that you don't have to write it yourself. Compare this to writing assembly code. This is why I consider Ryan's answer the best for the kind of knowledge level I assume the OP to have.
Aug
6
comment Are data type declarators like “int” and “char” stored in RAM when a C program executes?
@vaxquis I don't think the OP is asking about the sort of things RTTI addresses. The OP is asking something way more basic: how does a computer "know" whether the contents of a register or a memory location is an int, or a char, or whatnot. And the answer is "the computer doesn't, but the compiler will generate code that treats the stored value differently according to the type at compile time."
Aug
6
comment Is type safety worth the trade-offs?
@MasonWheeler Agreed, that blog post is embarrassingly bad. The conclusions are also awful ("Java claims to be static, but it does this which isn't static, therefore static typing is no good"). Maybe there are better arguments out there, but this blog isn't one.
Aug
6
comment Is type safety worth the trade-offs?
The paper: Haskell vs ..., An Experiment in Software Prototyping Productivity - Paul Hudak and Mark P. Jones. It describes the results of an experiment ordered by ARPA and the US Navy.
Aug
6
comment Is type safety worth the trade-offs?
Your scenario of rapid prototyping is hinted to be wrong in Paul Hudak's paper about a US navy study which required to develop an AEGIS-like simulation in different languages, one of which was Haskell. It meets almost all your criteria: it was rapid prototyping, the requirements where ill-defined, and the cost of failure was near-zero (this being an extremely informal experiment). Haskell came out the winner in evey category: development time, exceeding the requirements, requiring fewer LOC, and producing the only working example among all contestants!
Aug
6
comment Java difference between String a = null and String a = new String()
Agreed. But also, if the OP doesn't need to change s, they should initialize it once and make it final. No need to mess with null or empty Strings :)
Aug
6
comment Java difference between String a = null and String a = new String()
If at all possible, try to write something like final String x = "the string";. This way: a- x cannot be null, and b- x is guaranteed not to change its value during its scope, avoiding nasty surprises.
Aug
4
comment What was the reason for the creation of boolean variables?
@Niall Explicitly testing for == true is bad style in most programming languages I know. If you have a boolean, just use its value directly!
Jul
30
comment How do programmers quit a job?
Is this standard practice in the US? I'd say the problem with the question and this answer is that they are too localized to be useful to programmers around the world. For example, in my country you never write a letter; that's so uncommon you'd be stared at. On the other hand, you must send a standard telegram (this is mandatory both for quitting or for firing someone; the telegram is a legal template where you must fill in the blanks) and it's customary to give some sort of informal notice.
Jul
23
comment What is the point of having every service class have an interface?
@wrschneider I disagree. Interfaces are less cluttered, since they only expose methods of the contract. There are no implementation details, no private or protected or (accidentally) public methods. An interface simply defines a cleaner contract.
Jul
23
comment What is the point of having every service class have an interface?
@wrschneider Unfortunately Java classes are pretty bad (as in "unclear" and "cluttered") at defining public contracts, which is why interfaces are preferred.
Jul
23
comment Why is modularity a good idea?
But why is a God Object a bad idea? Simply giving it an anti-pattern name won't convince anyone :)
Jul
22
comment Who should write Unit Tests?
@KonradMorawski "she" is a generic placeholder, it doesn't imply the programmer is actually female. I've seen it used in many programming books as a way to balance the use of the generic "he" (which also doesn't mean the programmer is actually male).
Jul
17
comment What is the meaning of “doesn't compose”?
It's closer in meaning to function composition than to object aggregation.
Jul
16
comment Isn't there a substantial problem with SVN tags?
You can clone a single branch with git. Other than that, I agree with your answer.
Jul
16
comment Is the function using python list comprehension, stateless?
Where do you think you see state?