Published 1998. Answers used to be online in the publishers site, but they have gone for a long time ago. Please, anyone?
Published 1998. Answers used to be online in the publishers site, but they have gone for a long time ago. Please, anyone?
What is the point of doing exercises ..if you look at answers ?
.\..all you need is some common sense and a compiler.
..that is a valid point...but taking a peek generally turns into taking a peek every few seconds (and have a shallow copy !)And if stuck, take a peek at how they did it, and get insight on how it is possible to do such a thing.
That is not always enough, as you should know. You may think it's right, but in might really not be.
It might just happen to work for a certain case. But for all other cases, it might be wrong.
People can kill other people with guns, but that doesn't stop stores from selling them...that is a valid point...but taking a peek generally turns into taking a peek every few seconds (and have a shallow copy !)
So basically, the example becomes a lesson in debugging. That crucial skill programmers are supposed to have.
I get the "check your work" motivation for looking at provided answers, but I think you end up comparing the author's solution to yours just to see what they did different logically, and so forth... look at the errata to see if there are any mistakes in the answer etc. (Do people even think about the answer being a good answer?) Since depending on a textbook answer is frankly a mark on my pride, I don't encourage it either.
But, you know, it's bad to hide the answers from people with that sort of pretense. If the answers aren't online, they probably aren't anywhere except the wayback machine (if it's up) or in a companion workbook. You could also get a teacher's edition of your text.
There are problems that can be debugged, and there are problems that cannot. Compile errors is one typical example.
Put yourself in a newbie's shoes. They don't know what the compile errors mean. But perhaps by peeking at the solution, they might find out where their code differs from the answer, and by means of that, be able to detect and fix such mistakes in the future.
Also, if you get stuck, have no idea how to proceed after thinking and designing, taking a peek at a solution is usually more enlightening than just banging your head against the wall!
You can learn a lot by looking at answers and solutions.
Just looking at solutions and not doing the exercises sure enough won't help you in the end, but there are a lot of legitimate reasons to look at the answers and solutions. Don't underestimate those!
That doesn't teach what compiler errors mean. It gets rid of the error. By ignoring it and writing something possibly completely different. Maybe you really think this is a good practice for people when they give up, but I don't think so. I usually ask a question when I get stumped in the way you mean.
Only a person who hasn't designed something would think this is a good reason to be spoon fed. Usually you make a test program to figure out if your design works. If you don't have that kind of time, you're stuck running with what you have anyway, and hoping you can refactor the code later.Also, if you get stuck, have no idea how to proceed after thinking and designing, taking a peek at a solution is usually more enlightening than just banging your head against the wall!
Well, I didn't deny that they help, really... but I had to get my opinion out there. And you sound like you agree with me more than you disagree, especially here.You can learn a lot by looking at answers and solutions.
Just looking at solutions and not doing the exercises sure enough won't help you in the end, but there are a lot of legitimate reasons to look at the answers and solutions. Don't underestimate those!
It's fairly standard. Teachers are likely to have factual answers to a question or exercise already -- most teachers will make their own stuff or at least put a spin on things every year to prevent cheating. But if a textbook has excercises at all, solutions will be provided just as a courtesy. Because teachers would otherwise have to make and correct all the books material. That's a poor education waiting to happen.
The main thing to note is that you really understand why the error occurs (as in, maybe I made a syntactical error), and how to avoid it. Yes, it is entirely possible to do as you say, but coupled with a proper understanding, it can give you more insight.
When getting stuck, I think it is indeed a good thing to look at the answer. Because that way you learn. If you simply look at the answer and say, oh, that's just how it's supposed to be, oh well, then you're doing it wrong. If, OTOH, you look at it and say "Aha!", then you've just saved yourself a lot of time.
Ask questions on a forum is a fine thing, but remember that it takes time to find a board, register, post and wait for a reply. Maybe you just made a small spelling error.
I think we're going off the wrong tangent here. Let's switch to mathematics.Only a person who hasn't designed something would think this is a good reason to be spoon fed. Usually you make a test program to figure out if your design works. If you don't have that kind of time, you're stuck running with what you have anyway, and hoping you can refactor the code later.
Usually, to solve things by hand, there are all sorts of tricks which you have to learn.
How did you solve this integral again? Ah, by making this variable substitution.
If you can't find a solution and then look at the answer, I'm going to bet you that you learned something new. To make the most of it, you can calculate some other similar exercises and make sure you clear them.