© Kristian Rother 2017

Kristian Rother, Pro Python Best Practices, 10.1007/978-1-4842-2241-6_14

14. Cleaning Up Code

Kristian Rother

(1)Berlin, Germany

“First make it work, then make it right, and, finally, make it fast.”

—Stephen C. Johnson and Brian W. Kernighan in“The C Language and Models for Systems Programming,” Byte magazine (August 1983)

When we learn to program in a new language, we write very small programs at first. In Python, small programs are tiny; tasks like searching a text file, shrinking a digital image, or creating a diagram can be completed with ten lines of code or less. At the beginning of a programmer’s learning path, each of these lines is hard work: learning simple things such as appending a value to a list or cutting a ...

Get Pro Python Best Practices: Debugging, Testing and Maintenance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.