On 6/29/06, James Edward Gray II <james / grayproductions.net> wrote:
> On Jun 28, 2006, at 5:59 PM, Dark Ambient wrote:
>
>
> You've come to the right place and we are happy to help. Welcome.
Thank you , that's very kind!
> My wife came to me for help last night for this exact problem in the
> Learn to Program book. ;) Here's two pieces of advice we talked about:
I feel much better hearing of Dana's experience.
> 1. Feel free to skip chapter 10 altogether. I consider recursion to
> be a fairly advanced topic, so it's awful strange for it to pop up
> here in a book for those who have never programmed before. I'm
> pretty sure he's just trying to give you more practice with methods
> and build your confidence, but that only works if you are
> successful. ;) You can safely come back to this chapter when you
> know more and are better prepared for the challenge.
The "sort" project is divided, one is just the sort and Chris
recommends doing a second version using recursion. His explanation of
recursion was digestable but perhaps for a beginner not as easy to
implement. Challenges are okay.
> 2. If you want to press on, see if this description of the problem
> makes a little more sense: One way to sort an Array is to constantly
> move the lowest element out of it, and into a result Array. If you
> do this for all elements in the Array, you sort it. For example:
My biggest problem was that in my mind one had to solve the problem
using the tools covered in the book. Judging from the other examples
others here were kind to offer up, I don't feel that there was enough
in the previous chapters to arm , at least myself, with the tools to
implement the sort. I was very much locked into the notion for some
time to figure it out based on what I already knew. Having re-read
chapters and examples, and read through the array class in the
reference docs I was still struggling to find the right way.
While something like "Insertion sort" was pretty clear to understand
once I saw it, most of why I understood it didn't come from the book
but from using PHP in the past.
Stuart