Good Habits for Great Coding by Michael Stueben
Author:Michael Stueben
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA
This test code is good enough to catch obvious errors, and that is all smoke tests should do. When I finally came to write the binarySearch, almost every logic error was immediately exposed by this test code. Of course, fixing one error would introduce another error, but the smoke test usually caught that error too.
The binarySearch function took me 70 minutes to write (passing the smoke tests) and to refactor. How confident was I about my binarySearch? Not very, because smoke tests are crude. The final step was to create and test 1000 random-sized sorted arrays of random integers. Then every possible number in each array, and some not in each array, were searched for. The following code does this.
def binarySearchTest():
runs = 1000 # The number of random arrays to be tested.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(26291)
Hello! Python by Anthony Briggs(25217)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(24447)
Kotlin in Action by Dmitry Jemerov(23536)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(22881)
Dependency Injection in .NET by Mark Seemann(22668)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(21433)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(20273)
Grails in Action by Glen Smith Peter Ledbrook(19343)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17056)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(16366)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(14077)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(12255)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11533)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10645)
Hit Refresh by Satya Nadella(9223)
The Kubernetes Operator Framework Book by Michael Dame(8579)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8432)
Robo-Advisor with Python by Aki Ranin(8376)