Learn all about refactoring - why it is important and how to do it
Discover easy ways to refactor code with examples
Explore techniques that can be applied to most other programming languages
Description
Refactoring improves your code without changing its behavior. With refactoring, the best approach is to apply small targeted changes to a codebase. Instead of doing a huge sweeping change to your code, refactoring is better as a long-term and continuous enterprise. Refactoring TypeScript explains how to spot bugs and remove them from your code.
You’ll start by seeing how wordy conditionals, methods, and null checks make code unhealthy and unstable. Whether it is identifying messy nested conditionals or removing unnecessary methods, this book will show various techniques to avoid these pitfalls and write code that is easier to understand, maintain, and test.
By the end of the book, you’ll have learned some of the main causes of unhealthy code, tips to identify them and techniques to address them.
Who is this book for?
This book is designed for programmers who are looking to explore various refactoring techniques to develop healthy and maintainable code. Some experience in JavaScript and TypeScript can help you easily grasp the concepts explained in this book.
What you will learn
Spot and fix common code smells to create code that is easier to read and understand
Discover ways to identify long methods and refactor them
Create objects that keep your code flexible, maintainable, and testable
Apply the Single Responsibility Principle to develop less-coupled code
Discover how to combine different refactoring techniques
Learn ways to solve the issues caused by overusing primitives
really? second book from Packt ever and both are garbage, or even worse, the junior level of authors is incredibly, this is going directly to my bbq, I am impressed to be honest, they dont even write decent code, and they are just few pages, and repeat the same code 2 or 3 times!!, waste of paper, time, money, etc. dont make more garbage books or dedicate yourself to do other stuff, James Hickey and Marina Mosti, dont try to teach anytmore pls, you are making even worse programmers.you can laugh a lot by seeing the "expert" codes, not even aware of whatever linter tool, eslint, tslint or jshint, they use junior level code, plain and simple.never again with packt, see my photo, how they fill with garbage entire pages, it is like a magazine not even a book, and they waste a lot of space doing ridiculous stuff.
With a background in creative arts, philosophy, and software development, James Hickey has been helping developers become software artisans and navigate their careers. He has worked professionally in web and mobile-based projects mentoring development teams and leading business-critical projects. His technical interests focus on software design and architecture.
Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.
If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.
Please Note: Packt eBooks are non-returnable and non-refundable.
Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:
You may make copies of your eBook for your own use onto any machine
You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website?
If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:
Register on our website using your email address and the password.
Search for the title by name or ISBN using the search option.
Select the title you want to purchase.
Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title.
Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook?
If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
To view your account details or to download a new copy of the book go to www.packtpub.com/account
Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.
You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.
What are the benefits of eBooks?
You can get the information you need immediately
You can easily take them with you on a laptop
You can download them an unlimited number of times
You can print them out
They are copy-paste enabled
They are searchable
There is no password protection
They are lower price than print
They save resources and space
What is an eBook?
Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.
When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.
For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.