Clean Code Handbook: Naming, Functions, Comments, Error Handling, Small Classes, Refactoring Safely and Readable Code Reviews

· neobooks
Ebook
69
Pages
Eligible

About this ebook

Every developer has opened a function called calc with arguments named o, t and c, and watched the afternoon disappear. This handbook shows you how to turn code like that into something a colleague can read in seconds, without changing what it does. Using one small fictional shop as a running example, it covers naming, functions that do one thing, short argument lists, comments that explain why, error handling, small classes and modules, duplication, flags and conditionals, and dead code. You learn to refactor in small safe steps, with tests that prove the behaviour stayed the same, and to run code reviews that improve readability without starting arguments. Examples use Python 3.14 and pytest, every one was run, and the principles apply in any language.
Every developer has opened a function called calc with arguments named o, t and c, and watched the afternoon disappear. This handbook shows you how to turn code like that into something a colleague can read in seconds, without changing what it does. Using one small fictional shop as a running exa...

Discover more

About the author

Imad Muratspahic is an independent author of practical how-to guides, technical handbooks, history and fiction. The books aim to be clear, honest and useful from the first page.
Imad Muratspahic is an independent author of practical how-to guides, technical handbooks, history and fiction. The books aim to be clear, honest and useful from the first page.

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.