What books do I need to read to improve code quality?

The higher the quality of the code, the more likely it is to produce software that is more reliable, easier to maintain, and has fewer bugs. Many of the principles of improving code quality are concerned with ensuring that software meets the above standards not only initially, but throughout the software lifecycle as requirements evolve and new scenarios arise.

The 4 high-level goals I want to achieve when writing code are as follows:

  • The code should work fine;
  • The code should continue to work fine;
  • Code should adapt to changing requirements;
  • Code should not duplicate work done by others.

What books do I need to read to improve code quality?

1. Good code, bad code

Google development engineers explain high-quality code from scratch, integrate the author and team's years of software development practical experience, and help you easily understand and master programming skills through 50+ tips and 100+ cases.

This book introduces key concepts and techniques that professional software engineers often use to write reliable, maintainable code. This book is not simply a list of "do's" and "don'ts", but aims to explain the core theory behind each concept and technology, as well as the factors that need to be weighed. This should give the reader a basic understanding of how to think and program like an experienced software engineer.

The target readers of this book are those who already have basic programming skills and want to continue to improve their programming skills. This book is suitable for people with 0 to 3 years of working experience as a software engineer. Engineers with extensive work experience may find that many of the topics in this book are already within their grasp, but I hope they will use this book as a useful resource to guide their peers.

When reading any book or article on software engineering, it is important to remember that this is a subjective topic, and solutions to real-world problems are often not entirely clear. In my experience, good engineers read any article with a healthy dose of skepticism, eager to understand the underlying ideas. Opinions vary and evolve, as do the tools and programming languages ​​available. Knowing when to apply certain recommendations and when to ignore them requires understanding their rationale, context, and limitations.

This book aims to collect a series of useful topics and techniques to guide engineers to write better code. While it may be wise to consider these themes and techniques, they should not be viewed as infallible theories, or as hard and fast rules that must never be broken. Good judgment is an essential trait of a good engineer.

The practical tips shared in this book can help you write code that is robust, reliable, and easy for team members to understand and adapt to changing requirements. Covers how to think about code like an effective software engineer, how to write functions that read like a well-formed sentence, how to make sure your code is reliable and bug-free, how to conduct effective unit tests, how to identify code that might cause problems and correct it. How to make improvements, how to write code that is reusable and adaptable to new requirements, how to increase the reader's productivity in the medium and long term, and how to save valuable time for developers and teams, and more.

2. Refactoring: Improving the Design of Existing Code (2nd Edition)

Refactoring for 20 years, vividly explaining the principles and specific practices of refactoring, the secrets of practice from ordinary programmers to programming masters and the way to clean code.

This book is a refactoring guide written for professional programmers. My purpose is to show you how to refactor in a controlled and efficient manner. You will learn how to methodically improve the program structure without introducing bugs, which is the correct way to refactor.

Now I'm going to tell you how to get the most out of it without reading the entire book.

  • If you want to know what refactoring is , read Chapter 1, where the examples will make it clear to you.
  • If you want to know why you should refactor , read the first two chapters, which tell you what refactoring is and why you should.
  • If you want to know where to refactor , read Chapter 3, which tells you about some code characteristics that indicate "here needs to be refactored".
  • If you want to start refactoring , please read the first four chapters in full, and then read the refactoring checklist selectively. Just start by skimming the list to see what's there without understanding all the details. Once you really need to implement a refactoring technique, read it in detail and get help from it. The list section is for reference only, you don't have to read it all at once.

This book is an updated version 20 years after the publication of the classic "Refactoring". The book clearly reveals the process of refactoring, explains the principles and practices of refactoring, and gives when and where to start mining the code for improvement. More than 60 feasible refactorings are given in the book, and each refactoring introduces the motivation and technique of a proven code transformation technique. The refactoring guidelines proposed in this book will help developers modify the code in small steps at a time, thereby reducing the risk in the development process.

3. The way to clean code

Uncle Bob's work, Programmer, brings together decades of experience in programming and explains how to solve the difficult problems faced by software developers, project managers and software project leaders.

Code is indeed the language we ultimately use to express our requirements. We can create various languages ​​that are close to the needs. We can create tools that help parse and codify requirements into formal structures. However, we can never throw away the necessary precision - so the code lives on.

Of course you have been plagued by bad code. So - why write bad code?

Want to finish it quickly? Are you in a hurry? possible. Maybe you feel like you don't have enough time to do a good job; if you take the time to clean up your code, your boss will throw a fit. Maybe you're just impatient with the procedure, hoping it's over sooner. Maybe you look at the other things you've committed to and realize you need to finish what you're doing quickly so you can move on to the next task. We've all done it.

We've all glanced at the mess we've made and decided to let it go and move on to a new day. We've all seen our own crappy program work, and concluded that a crappy program that works is better than nothing. We've all said that one day we'll go back and clean it up. Of course, in those days, none of us had heard of LeBlanc's Law: Later equals never .

Learning to write clean code is hard. It goes beyond asking you to master principles and patterns. You have to work on it. You have to practice it yourself and experience your own failures. You have to observe the practices and failures of others. You have to watch other people toddler and then go back and study their steps. You have to see how other people rack their brains to make decisions, and how they pay the price for bad decisions.

It takes a lot of thought to read this book. This isn't one of those "feel good" airplane books you can read before landing. This book is going to make you work, and work very hard. How to study hard? Read the code - lots of code. And you have to figure out where a certain piece of code is good and where it is bad. As we break down and assemble modules, you'll have to keep pace. It takes some work, but it's worth the effort.

4. The way to clean code: the professionalism of programmers

The way to clean code CleanCode sister chapter Programmer's more than 40 years of experience and experience Explain the principles of software technology, technical tools and practices to help professional software developers have admirable professionalism.

This book is a summary of programming master "Uncle Bob"'s more than 40 years of programming experience, explaining what kind of attitude, what principles, and what actions need to be taken to become a truly professional programmer. The author uses the detours and mistakes he and his colleagues have gone through as examples, with the intention of leading the way for latecomers and helping them to take their careers to a higher level.

In addition to code, it is best to have such a book on your bookshelf:

Soft Skills: A Survival Guide Beyond Code (2nd Edition)

A career guide for programmers and software developers, highlighting the "human" factor in technology, listening to the experience of John Z. Sonmez, the life mentor of software developers, and explaining the "soft skills" that practitioners in the IT industry need to know.

When I say "a good software developer," I don't mean someone who is good at coding, good at bug solving, and good at unit testing. On the contrary, what I call "good software developers" are those who can take control of their careers, achieve their goals, and enjoy life. Of course, other skills are important, but I still assume that you are proficient in how to implement sorting algorithms in C++ language, or know how to ensure that the code written will not make your subsequent maintainers want to drive over you...

Needless to say, this book is not about "what you can do", this book is about "you" - about your career, your life, your body, your mind and your soul —if you are convinced that the soul exists. Now, I don't want you to imagine me as some kind of lunatic. I’m not a transcendentalist monk who sits on the floor meditating while smoking a cactus leaf cigarette and trying to help you ascend to a higher level of enlightenment. Quite the opposite, I think you'll find me a very down-to-earth person who just happens to be thinking - how does being a software developer go beyond writing code itself?

This book focuses on every aspect of a software developer's life, from demystifying the interview process, to crafting a killer resume, to making popular video content, to building your personal brand, to improving your work efficiency, to connecting with your career. Combat burnout, even down to investing in real estate and taking care of your own health. The book is divided into seven chapters including career chapter, self-marketing chapter, learning chapter, productivity chapter, financial management chapter, fitness chapter, and mentality chapter, summarizing various "soft skills" required by practitioners in the software industry. By reading this book, software engineers, programmers, and other technical personnel can actively think about their careers, enrich their lives, and bring themselves closer to success.

Guess you like

Origin blog.csdn.net/epubit17/article/details/129459704