David Kopec

author
+ Follow
since Jun 13, 2018
Cows and Likes
Cows
Total received
5
In last 30 days
0
Total given
0
Likes
Total received
4
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Kopec

ludoviko azuaje wrote:Let me tell you that I found the choice of algorithms in your book quite interesting and well balanced, I think that your book is worth reading.



Thanks, much appreciated.
1 month ago
Anecdotally, students like Python classes better because they can get more done faster (fewer lines of code, easier to use libraries, more friendly ecosystem) than in the other popular teaching languages—Java & C++. And since they're more engaged and excited it helps with retention, so of course faculty is in favor of it too. Another benefit of Python as a teaching language is that it has a pretty strong resemblance to what most pseudocode typically looks like.

So, I don't think there's just one reason, but the reasons I can think of are:
- succinct, easy to read syntax
- welcoming community
- strong library ecosystem
- excellent cross-platform story
- limited boilerplate to get started

Many languages check some of these boxes, but few check all of them. Also, being used widely in machine learning/data science has made Python popular in academia as well.
1 month ago
Hi Campbell,

We solve the problem in two different ways. In Chapter 3 we solve it using a backtracking constraint-satisfaction problem solving framework. In Chapter 5 we solve it using a genetic algorithm. These aren't necessarily the most efficient ways to solve the problem, but the problem lends itself towards illustrating several different problem solving techniques well. I haven't read the original paper, I don't think. Actually, it's possible I did many years ago...

Thanks for the question,
Dave
1 month ago
There's an extended justification in the Introduction, but in short we chose problems that everyone who has a CS undergraduate degree would be familiar with. Then, when we ran out of those, we went with CS problem solving techniques that we think everyone should be familiar with that builds software, and designed problems around them. Thanks for the question.
1 month ago
I wouldn't say that Python lends itself towards a particular kind of problem better than other languages, but I would say more generally that Python's rich standard library and ecosystem lends itself towards solving any problem faster than most other languages. If you want to do something in Python, there's probably already a good library for it. Of course in the book we use only the Python standard library because we don't want you to just "pip install a solution." We want to show you how you would build those libraries.
1 month ago
The book requires an intermediate-advanced knowledge of Python. It's not targeted at beginners. In college terms—we would assume you have at least two semesters of programming experience. In non-college terms we would expect you have mastered the basics of programming in Python, and now want to dive into some CS topics with that knowledge.
1 month ago
As it says on the cover, the book is all in Python 3.7. Several examples will not work in earlier versions.
1 month ago
Hi Carl,

Some people believe that Python is helping with retention (keeping students in programs) because it's frankly easier to get started with. There's less boilerplate and it resembles more the pseudocode they may see in a text book than the C-family of languages including Java. It also has a very rich ecosystem and beginner friendly community. I would be interested in seeing some empirical studies about how it's affected retention, but I'm not immediately aware of that. But you're right—it's definitely a trend. I saw a chart a couple years ago showing half of the top 40 CS programs in the US have switched to Python for the first course.

Best,
David
1 month ago
Hi Piet,

Thanks for buying the Swift version. The Python book has mostly the same problems. We added a couple more, but it's essentially the same, so if you already have read the Swift version, the Python version is probably not worth your time. We are considering Go and Java for the next book in the series and currently are leaning towards Java.

Thanks for the question,
David
1 month ago
No, I was not previously familiar with that book. I just looked at its table of contents right now. That actually looks like more of a traditional algorithms & data structures book than CCSPiS (which is not at all a traditional algorithms & data structures book). I only see a little overlap: stacks & queues, recursion, graphs.

CCSPiS is a hands on tutorial to problem solving techniques (hey here's how a neural network works to classify wines, or hey here's how to do A* when you have a grid). It's definitely not a traditional algorithms and data structures book, and it doesn't try to be a replacement for one. For example, you could not use CCSPiS as a textbook for an algorithms & data structures class.

Thanks for the question.
1 year ago
iOS
Hi Kent,

If you have previously worked through Apple's Swift book or some other Swift intro book/tutorial, then yes (https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html). We are explicitly not marketing the book as an intro to Swift. We assume readers are already familiar with the basic syntax and semantics of the language. We call it "a great second book on Swift." It will help you learn intermediate and advanced Swift concepts like protocol-oriented programming (Chapter 4), generics (Chapters 2, 3, 4, 5, 6), and functional approaches to solving problems.

Best,
David
1 year ago
iOS
Sorry, I don't have enough familiarity with Kotlin to intelligently answer this question. As far as Swift goes, it has many strengths, some of which include:
- an emphasis on safety: stringently type checked code, optionals instead of null-pointer exceptions, and extensive syntax for working with optionals
- progressive disclosure: easy to get started with but featureful (you don't need to use every feature at first)
- protocol-oriented programming: a style that focuses on composition, giving protocols first-class status
- multiparadigm: can be programming in a procedural, object-oriented, functional, or protocol-oriented style
- modern syntax: this is especially true for people transitioning to Swift from Objective-C
- great learning environment in the form of Playgrounds in Xcode on the Mac and the Playgrounds app for iPad for younger kids
There are more but these are probably the main attractions for people learning the language (besides wanting to make iOS or Mac apps of course!).
1 year ago
iOS
Thanks for the question.

The book is really geared for those who already know the basic syntax and semantics of Swift. I would not recommend it to those learning in other languages since it does talk about (and make use of) several Swift specific features (like protocol-oriented programming in Chapter 4 for instance), since there are great language specific books probably already out that you can find. We are working on porting the book to other languages. With all of that said, one intrepid reader did port the first five chapters to C++:
https://github.com/araya-andres/classic_computer_sci

Again, I would really not recommend the book to those who do not already know some Swift—so buy at your own risk if you don't know Swift. You can checkout two free sample chapters (Chapter 2 Search and Chapter 4 Graph Problems) on Manning's website and judge for yourself though:
https://www.manning.com/books/classic-computer-science-problems-in-swift
1 year ago
iOS

German Gonzalez-Morris wrote:Hello,

Reading the table of contents, paid my attention about 8 queens problem solved with constraint programming.

In your book do you use a custom approach for it ?
(or a library which makes easier to implement constraints)

Regards,

Germán


Hi Germán,
We build a very simple framework for solving constraint satisfaction problems from scratch in Chapter 3 using a naive backtracking search. It's not particularly efficient, but it's good enough to give readers an understanding of what a constraint satisfaction problem is, and to solve some simple ones like the aforementioned 8 Queens problem.
Thanks for the question,
David
1 year ago
iOS
Thanks for having me, it's nice to be here.
1 year ago
iOS