For the convenience of JavaRush students, we decided to collect lectures and articles about the most important topics in programming. The eighth collection is about how to work with code: rules for writing high-quality code and rules for refactoring, writing comments on code. In the mini-guide, we briefly outline the essence of the articles, and if you follow the link, you can learn more about the topic of interest. Add the collection to your bookmarks and return to it when needed.
Articles and lectures
This is a short guide to writing higher level code. The article lists the basic rules and concepts that relate to creating a system and working with interfaces, classes and objects. The structure of the article is formed “from top to bottom,” that is, from the general structure of the application to more focused details.
This article will discuss the correct naming of certain elements. Correct names make the code much easier to read. The article also contains examples of comments in the code.
Development tips will never be superfluous, especially if you just started writing code. The article contains recommendations for code analysis that are specific to the Java language.
When monitoring code quality, it is important to remember the quality of the comments that accompany this code. This article will introduce you to the topic of commenting and why it's worth your time.
Working with code that someone else wrote can lead to some problems. The code may relate to technology that is unfamiliar to you. Perhaps this code needs improvement. Or there may be an urgent need to fix a bug found in an old codebase. In this text, the author gives several tips that can make working with legacy code easier.
Review article about static code analysis tools. They can help you find and fix problematic code before it goes into production. The text introduces some popular static analysis tools that can be used to test code in various situations. For example, DeepSource or SonarQube.
It's one thing to refactor your own code, another thing to refactor legacy code. It's much more complicated. The text provides tips on working with legacy code.
One way to improve the quality of a company's code is through refactoring. It is often overlooked because it is virtually invisible to users. The code still works, so everything is fine, right? However, problematic and cluttered code affects the speed of the product and its overall performance. The author of the article talks about the main benefits that can be obtained from code refactoring.
Anyone can learn to write code. But can you write it cleanly? In this article, the author shows his methods for writing clean code. The tips are simple, so even a beginner can handle them.
Modern tools make the development process easier. In particular, it is easier to monitor the style of your code, trying to minimize its “unauthorized” formatting. This review talks about what tools the IntelliJ Idea IDE provides to the developer to make the code pleasant to read and easy to understand.
The text provides two simple tips that will help a novice developer read other people's code. Read and put into practice.
Another article about how to make your code better. This time it's big. It contains a lot of simple tips. For example, one of them is writing unit tests. Read about the rest in the text.
Writing clean code is not that easy. This is hard, painstaking work. Through trial and error, you will improve by repeating the same steps over and over again until you find the solution you want. This article lists some tips to help you learn how to write clean code.
In software, an antipattern is a term that refers to techniques that should NOT be used when solving problems. The author talks about the six most common antipatterns: spaghetti code, golden hammer, boat anchor, dead code, code sprawl and divine object.
This text discusses the topic of lack of control over code quality in IT companies and why it is important. You will learn what technical debt is, why automation is the key to success, and how to build a code quality control process.
You've probably heard the term "static analysis". Most often, it refers to any one well-known tool or method. But in fact, there are several varieties of static analysis, each of which has a specific meaning when used. What types of analysis there are will be discussed in this article.
Videos
SOLID is the five design principles of object-oriented programming. In addition to the theory that you will be asked about during the interview, you will also need to learn how to write code according to the SOLID principles. How to achieve this will be discussed in the report of the lead developer from the EPAM St. Petersburg office, Alexander Barmin. The author's presentation is accompanied by examples of “pure” Java code written according to SOLID conditions. The author also answers questions from viewers.
Bonus
The article is devoted to a review of the book "Clean Code" by Robert Martin. The author looks at ways to improve and optimize the code, and at the end he gives a small but interesting problem.
Other materials in the series: |
|