{"product_id":"five-lines-of-code-how-and-when-to-refactor","title":"Five Lines of Code: How and when to refactor","description":"Five Lines of Code teaches refactoring that's focused on concrete rules and getting any method down to five lines or less! There’s no jargon or tricky automated-testing skills required, just easy guidelines and patterns illustrated by detailed code samples.\n\nIn Five Lines of Code you will learn:\n\nThe signs of bad code\nImproving code safely, even when you don’t understand it\nBalancing optimization and code generality\nProper compiler practices\nThe Extract method, Introducing Strategy pattern, and many other refactoring patterns\nWriting stable code that enables change-by-addition\nWriting code that needs no comments\nReal-world practices for great refactoring\n\nImproving existing code—refactoring—is one of the most common tasks you’ll face as a programmer. Five Lines of Code teaches you clear and actionable refactoring rules that you can apply without relying on intuitive judgements such as “code smells.” Following the author’s expert perspective—that refactoring and code smells can be learned by following a concrete set of principles—you’ll learn when to refactor your code, what patterns to apply to what problem, and the code characteristics that indicate it’s time for a rework.\n\nForeword by Robert C. Martin.\n\nPurchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.\n\nAbout the technology\nEvery codebase includes mistakes and inefficiencies that you need to find and fix. Refactor the right way, and your code becomes elegant, easy to read, and easy to maintain. In this book, you’ll learn a unique approach to refactoring that implements any method in five lines or fewer. You’ll also discover a secret most senior devs know: sometimes it’s quicker to hammer out code and fix it later!\n\nAbout the book\nFive Lines of Code is a fresh look at refactoring for developers of all skill levels. In it, you’ll master author Christian Clausen’s innovative approach, learning concrete rules to get any method down to five lines—or less! You’ll learn when to refactor, specific refactoring patterns that apply to most common problems, and characteristics of code that should be deleted altogether.\n\nWhat's inside\n\nThe signs of bad code\nImproving code safely, even when you don’t understand it\nBalancing optimization and code generality\nProper compiler practices\n\nAbout the reader\nFor developers of all skill levels. Examples use easy-to-read Typescript, in the same style as Java and C#.\n\nAbout the author\nChristian Clausen works as a Technical Agile Coach, teaching teams how to refactor code.\n\nTable of Contents\n1 Refactoring refactoring\n2 Looking under the hood of refactoring\nPART 1 LEARN BY REFACTORING A COMPUTER GAME\n3 Shatter long function\n4 Make type codes work\n5 Fuse similar code together\n6 Defend the data\nPART 2 TAKING WHAT YOU HAVE LEARNED INTO THE REAL WORLD\n7 Collaborate with the compiler\n8 Stay away from comments\n9 Love deleting code\n10 Never be afraid to add code\n11 Follow the structure in the code\n12 Avoid optimizations and generality\n13 Make bad code look bad\n14 Wrapping up\u003cbr\u003eASIN: 161729831X\u003cbr\u003eVSKU: BVV.161729831X.VG\u003cbr\u003eCondition: Very Good\u003cbr\u003eAuthor\/Artist:Clausen, Christian\u003cbr\u003eBinding: Paperback\u003cbr\u003e\u003cb\u003eNote:\u003c\/b\u003e Any images shown are stock photographs and product may differ from what is shown.  \u003cbr\u003e\u003cb\u003eCondition Notes\u003c\/b\u003e: Book has little sign of wear or use  \u003cbr\u003e","brand":"Blue Vase Books","offers":[{"title":"Default Title","offer_id":43300570005565,"sku":"BVV.161729831X.VG","price":25.89,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0589\/4225\/9261\/files\/161729831X-0.jpg?v=1782595477","url":"https:\/\/www.bluevasebooks.com\/products\/five-lines-of-code-how-and-when-to-refactor","provider":"Blue Vase Books","version":"1.0","type":"link"}