Wait, what are we talking about? The fact that automation may speed up my coding process OR the fact that an lazy/unaware user will fail in using the automation?
The problem is not that automatic tools are bad, the problem is that choice is good. I (me, myself) would like to have an auto-include feature in QtCreator. You think that lazy/unexperienced users may fail in using it? Well, so just do as auto-declaration/definition: not making it "auto" but having a tool to do it with a right click
Thanks, there's no need for examples: as you, I can think a lot of cases in where automation will NOT aid unaware users. But this is the fact: unawareness is the problem, not automation.
Automation is a double-edged weapon: it can be really useful if you know what you're doing.
Being accustomed to Eclipse - which has such a feature - I would accept it gladly also in QtCreator. It's something that now I can use and appreciate like code completion: of course I could avoid using it, but it's faster, and I like to be fast in writing code.
Ahah niceBut I don't think that it's the case. You know, Whitehead said "Civilization advances by extending the number of important operations which we can perform without thinking of them". This is why studying is more and more important in our society: because if the button exists is ok, but we must be sure to understand why the button is there and why we have to learn anyway.
Sorry, I don't think I've ever said "without even knowing". Au contraire, I said "asking the user". I don't see why asking a question and avoiding to write some words would be "too smart" or "too risky". On the other hand if you write an class twice in two includes, you may also fail without knowing. So, there are also cases in which an automatic control may help to include the right thing.
I don't. This is what I call "automatic and tedious work" and I program the machines to do it for me. Everytime I include an header file - writing by hand - for a class that is not ambiguous, I think "in the time I'm wasting writing these headers I could solve bugs or add new features".
This is a nice phrase, but did you thought it through? Do you have the skills (not knowledge) to do everything that an automatic tool is doing for you? Why do you use compilers? Why do you use C++ and not programming directly in hex in your computer? Maybe you do. But the fact is that for some jobs skills are simply not required anymore. That may be sad, but it's true. I bet you would be dead as me if civilization will fail tomorrow and we would go back to the stone age.
Oh please, before talking about logic PLEASE read carefully what I said. I didn't said "your premises were false" or "the hypothesis didn't hold". I said "Knowing new things"... Feel free to use set theory to prove that I'm right (or wrong, if you can).
Math is usually a valid reference for correctness of a problem. See lambda calculus.
That code you wrote is right for b not equal to 0 and for non-overflowing integers. There is no problem with the code. The problem is assuming superficially that the code is correct for every value of a and b.
It's like the fraction a/b, real numbers: it's perfectly legal and always defined on its domain. The error - often done - is thinking that a fraction is defined with denominator equal to zero.
Actually, when writing that, I wasn't thinking to Dijkstra, but to Hoare and Church.
Ehehe that's a nice caseYou couldn't say that MY code is not correct after someone else edited it.
Anyway, the starting topic was: I would like QtCreator to have a feature to auto-include headers. I don't know how we come to this point, but my request is still valid, because I don't think that is such a feature that compromises the learning career of the next generation of programmers. I hate to write headers and Eclipse has been the only IDE that I really appreciated about this - but I understand that Java is a radically different environment so such a feature may be missing in QtCreator forever
Added after 11 minutes:
@SixDegrees, already done. Did you forget partial correctness?
EDIT: Anyway, I think your reference to the Halting problem and Goedel was a bit too general. There is no need to talk about total and partial correctness when the reality is that we are mostly interested in trivial properties on the natural numbers. Of course, Rice's theorem says that non-trivial properties are not decidable, but we all know that even if they are very numerous, we are interested in a small subset of properties - and even those give us issues.
Anyway, I think the validity of the Halting problem is mostly to be considered in the general case: you can prove the correctness of (for instance) a simple bubble sort. As I said (to wysota), formal methods for testing correctness do exists, for example lambda calculus or Hoare logic (which are the only one I know and used).
Bookmarks