Re:Sorting in Python
by bnmnetp on Wednesday June 11, 2014 @03:17PM
(#7879888)
Good point. Although we do introduce the long way first.
The reason we don't use a,b = b,a in our code is that it isn't very portable to other languages. We wrote this book as a second semester textbook. So most students are not very good programmers and will be transitioning to something like Java or C++ in the next semester.
Further, for most of the sorting algorithms we have exercises where we suggest that users modify the code themselves to use simultaneous assignment.
Re:Sorting in Python
by javafoo on Wednesday June 11, 2014 @04:07PM
(#7880134)
Crawling your book, i stumble over several codes that use flags instead of "return" to exit, by example, you use two flags for searching on an ordered list.
These kind of codes are not great for beginners because they tend to think that setting the flag is equivalent to exiting which is as you know an illusion.
Re:Sorting in Python
by chhantyal on Wednesday June 11, 2014 @02:44PM
(#7879678)
I highly recommend this book to any intermediate Python programmer. This is the book that made me not to get scared whenever there comes thing called algorithms.
Very well written, beginner friendly and great examples to demonstrate algos in action.
Re:Sorting in Python
by dhissami on Wednesday June 11, 2014 @03:05PM
(#7879815)
I agree. This book taught me stacks, queues, deques, trees, and graphs. I was already exposed to searching/sorting and recursion from other resources, including John Zelle's "Python Programming: An Introduction to Computer Science" (2nd edition), which I recommend to any beginning Python programmer as a prelude to this one. It's perfect for self-teaching. Contact the publisher (same one, actually) for exercise answers and work through them all. I even emailed the author for a clarification and he responded with a thorough answer. Overall, a great learning experience that took my programming knowledge and skills to the next level.
Re:Sorting in Python
by jonhmchan on Wednesday June 11, 2014 @01:30PM
(#7879216)
This book is how I picked up algorithms and data structures having never gone through a formal computer science program. Glad to see it's still being worked on.
Re:Sorting in Python
by bnmnetp on Wednesday June 11, 2014 @02:16PM
(#7879505)
Thanks, I enjoy working on all aspects of this project. For anyone interested in helping us out you can find us on github.com/bnmnetp/runestone. I would love to have more contributors.
Re:Sorting in Python
by jonhmchan on Wednesday June 11, 2014 @04:21PM
(#7880204)
Oh I absolutely will. I've featured it heavily on Bento and its entire algorithms and data structures section is basically links to chapters in this book.
Re:Sorting in Python
by codegeek on Wednesday June 11, 2014 @03:37PM
(#7879997)
wow, I never knew about this. Love interactive learning materials like this. My daughter is going to be using this to learn Python and I will start with the turtle interactive program.
This is the way to learn things. Interactive, break things, try things and see how it actually works. Just donated to the cause and bookmarked the repo. Hope to contribute in future.
Re:Sorting in Python
by nirkalimi on Wednesday June 11, 2014 @06:45PM
(#7880882)
Thanks for this! I spent a good amount of time learning from this just now. This is especially helpful to those self taught hackers who haven't really thought about/formally been introduced to these sorting techniques. I especially like all the interactive learning material. I hope for more!
Good, but then why does all your code say
And not It's confusing when you are trying to understand an algorithm, and the descriptions don't match the code.On the more general lines it seems like a quite pleasant book.
The reason we don't use a,b = b,a in our code is that it isn't very portable to other languages. We wrote this book as a second semester textbook. So most students are not very good programmers and will be transitioning to something like Java or C++ in the next semester.
Further, for most of the sorting algorithms we have exercises where we suggest that users modify the code themselves to use simultaneous assignment.
These kind of codes are not great for beginners because they tend to think that setting the flag is equivalent to exiting which is as you know an illusion.
Very well written, beginner friendly and great examples to demonstrate algos in action.
Thanks a ton to author for this gem :)
This is the way to learn things. Interactive, break things, try things and see how it actually works. Just donated to the cause and bookmarked the repo. Hope to contribute in future.