• Complain

Burchard - Refactoring JavaScript turning bad code into good code

Here you can read online Burchard - Refactoring JavaScript turning bad code into good code full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Sebastopol;CA, year: 2017, publisher: OReilly Media, genre: Romance novel. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Burchard Refactoring JavaScript turning bad code into good code
  • Book:
    Refactoring JavaScript turning bad code into good code
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2017
  • City:
    Sebastopol;CA
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Refactoring JavaScript turning bad code into good code: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Refactoring JavaScript turning bad code into good code" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

How often do you hear people say things like this? Our JavaScript is a mess, but were thinking about using [framework of the month].

Like it or not, JavaScript is not going away. No matter what framework or compiles-to-js language or library you use, bugs and performance concerns will always be an issue if the underlying quality of your JavaScript is poor. Rewrites, including porting to the framework of the month, are terribly expensive and unpredictable. The bugs wont magically go away, and can happily reproduce themselves in a new context. To complicate things further, features will get dropped, at least temporarily.

The other popular method of fixing your JS is playing JavaScript Jenga, where each developer slowly and carefully takes their best guess at how the out-of-control system can be altered to allow for new features, hoping that this doesnt bring the whole stack of blocks down. This book provides clear guidance on how best to avoid these...

Burchard: author's other books


Who wrote Refactoring JavaScript turning bad code into good code? Find out the surname, the name of the author of the book and a list of all author's works by series.

Refactoring JavaScript turning bad code into good code — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Refactoring JavaScript turning bad code into good code" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Refactoring JavaScript

by Evan Burchard

Copyright 2017 Evan Burchard. All rights reserved.

Printed in the United States of America.

Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com/safari). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .

  • Editors: Nan Barber and Allyson MacDonald
  • Production Editor: Kristen Brown
  • Copyeditor: Rachel Monaghan
  • Proofreader: Rachel Head
  • Indexer: Ellen Troutman-Zaig
  • Interior Designer: David Futato
  • Cover Designer: Karen Montgomery
  • Illustrator: Rebecca Demarest
  • March 2017: First Edition
Revision History for the First Edition
  • 2017-03-10: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781491964927 for release details.

The OReilly logo is a registered trademark of OReilly Media, Inc. Refactoring JavaScript, the cover image, and related trade dress are trademarks of OReilly Media, Inc.

While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

978-1-491-96492-7

[LSI]

For Jade, again and always.

Foreword

I still remember reading Martin Fowlers book Refactoring: Improving the Design of Existing Code when it came out in 1999. It was a revelation: I had never before seen code being considered to be something malleable. Programmers tend to have the urge to rewrite code bases from scratch, but this book argued that it is possible to evolve and clean up existing code via small, principled, and comparatively safe steps. While doing so, tests provide an additional safety net and enable you to move forward with confidence. One piece of advice from the book will always stick with mewhenever you code, always keep two kinds of activity completely separate: implementing new functionality and refactoring existing code. If you do that, youll avoid doing too many things at the same time and will produce less bugs.

Refactoring JavaScript takes the ideas of refactoring and applies them to the world of JavaScript. JavaScripts dynamic nature means that you need different techniques compared to more static languages such as Java. In Java, you have static typing. And inheritance and polymorphism are used quite often. For JavaScript, you often rely on static checking tools (such as ESLint and Flow) and can adapt objects flexibly according to your needs. Functional programming techniques are also more popular. Additionally, tests play an even more important role, but they also tend to be more lightweight. With all of these issues and more (e.g., asynchronous code), this book has you covered!

Happy reading!

Axel Rauschmayer

November 2016

Preface

Welcome to Refactoring JavaScript. Throughout this book, well be looking at ways to write better JavaScript, drawing inspiration from classical refactoring techniques while exploring various styles of coding.

Why This Book Exists

Like it or not, JavaScript is not going away. No matter what framework or compiles-to-JS language or library you use, bugs and performance concerns will always be an issue if the underlying quality of your JavaScript is poor. Rewrites, including porting to the framework of the month, are terribly expensive and unpredictable. The bugs wont magically go away, and can happily reproduce themselves in a new context. To complicate things further, features will get dropped, at least temporarily.

This book provides clear guidance on how best to avoid these pathological approaches to writing JavaScript. Bad code doesnt have to stay that way. And making it better doesnt have to be intimidating or unreasonably expensive.

Who This Book Is For

This book is meant for programmers who have some experience writing bad code, and an interest in writing better code. Its for those writing JavaScript on the frontend or the backend. Its for those writing JavaScript by choice as well as those who are stuck with it due to JavaScripts monopoly of the browser platform.

If youre an absolute beginner, you might want to write some bad code for a couple of months first. If youre not interested in writing better code, you might not have the patience for this book. If neither of those situations describes you, were good to go.

Interestingly enough, there are numerous efforts working to make JavaScript better, while at the same time others aim to make it obsolete. The number of ways to write good and bad JavaScript continues to expand. Frameworks can go a long way toward handling complexity, but programmers constrained by frameworks will be limited. If you find that you (or your codebase) are struggling to work outside of a framework (or at some of the more confusing edges of it), this book should give you new ideas for how to approach your work.

If you have trouble testing, debugging, or having confidence in your codebase, this book should be helpful.

Most of us dont work on perfect codebases, especially in JavaScript, where engineers might primarily use Ruby, Python, Java, and so on. What this book does is help you identify what specific parts of a codebase are bad, while providing a multitude of options for improvement.

How To Use This Book

Chapters describe the interplay between JavaScript, refactoring, quality, confidence, and testing. In many books, it is common to tack on testing at the end. In this book, for the types of code we are exploring, this wouldnt be appropriate. Testing is essential for confidence. Confidence is essential to refactoring. Refactoring is essential to quality, which is the goal:

testing -> confidence -> refactoring -> quality

JavaScript (and its ecosystem) happens to provide the space in which that transformation takes place, so these opening chapters necessarily include an exploration of the language itself. If youre completely comfortable with the transformation just described, you might want to skim or skip these chapters. Although that is not recommended, it is your book, so you can use it however you want. If you think its best used as a doorstop or to start a fire for warmth or a sacrifice of some sort, go for it. If you do find an unconventional use for the book, email me a picture or video. Im at http://evanburchard.com/contact or @evanburchard on Twitter and GitHub.

Can I burn or doorstopify digital copies too?

Unfortunately, no. However, since this book is under a Creative Commons license, youre free to share links to the HTML version and any other files available at http://refactoringjs.com, for example.

After , we go through refactoring functions and objects, and we dont shy away from some of the more complicated bits of JavaScript. Generally, the goal of these chapters is to provide options for improving code without radically changing the interface. Through applying techniques found in these two chapters, youll be able to turn a mess of a codebase into one that has a decent baseline of quality.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Refactoring JavaScript turning bad code into good code»

Look at similar books to Refactoring JavaScript turning bad code into good code. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Refactoring JavaScript turning bad code into good code»

Discussion, reviews of the book Refactoring JavaScript turning bad code into good code and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.