Prof. Dr. Barne Kleinen

Website of Prof. Dr. Barne Kleinen, Professor for Media Informatics (Bachelor/Master) at HTW Berlin

Learn Python with Tests

Material in   Courses: Info3 Info2   Tags: Python  

I often recommend to write a suite of (automatic) tests to explore a programming language and compile your own “cheat sheet” for the language.

By keeping the test suite “green”, you can be sure that everything you see in the source code is actually working.

I drew this idea from two sources: Jim Weirich’s Ruby Koans and the recommendation of API Testing by Michael Feathers.

Jim Weirich’s Ruby Koans, are a big suite of prepared test cases where you have to fill out the test expectations to learn ruby with a strong emphasis on edge cases - where ruby works in a special way that may not be totally clear or deductible from other programming languages. This idea has been transferred to many other programming languages, e.g. Greg Malcoms Python Koans.

(TBD: Short Note about exploring APIs with Unit Tests)

(TBD: Link repos)