I just recently published a book called "Nature, in Code" [https://leanpub.com/natureincode] that is largely about Evolution - explained by implementing key concepts in JavaScript. It is also a beginner's book for people to learn programming.
From a personal perspective, I've always understood a concept much better once I implemented it in code. Because of that, I started teaching population genetics primarily as a computer lab class. This book is an attempt to be more broad (in terms of subject, and reach).