An introductory book for beginners to understand code

Students often ask, which programming language should I start with if I want to learn programming with zero foundation.

If you want to learn programming and want to work in Internet technology positions, compared with many programming languages, Java is currently one of the programming languages ​​with the highest usage rate and the most application fields. From the perspective of application field, ecology and industry usage rate, it is very suitable. A friend who learns programming with zero foundation comes to learn.

In other words, learn Java, easy to find a job picture~~

Moreover, choosing Java as the "programming mother tongue", even if there is a need to learn other programming languages ​​in the future, you can quickly get started with other programming languages ​​​​with the Java language foundation - the so-called "advance can be attacked, retreat can be defended"" One door leads, door to door leads."

For those who are getting started with zero foundation, looking at the dense codes, they will inevitably feel afraid of difficulties, and think to themselves: "These are all magic horses? Where should I learn from?"

In fact, for friends who have already started programming, sometimes they often feel overwhelmed when reading the source code!

Is coding and reading code really that difficult?

As a person who has to deal with the code, if he knows how it is designed, what underlying logic it follows, understands the meaning of the code more, and is familiar enough with it, he will be more comfortable in programming and reading source code!

Therefore, today I would like to share with you a good book that can easily and efficiently master Java grammar structure and programming thinking - "Coding Java: An Introductory Book for Beginners to Understand Code"!

Most of the content in the book is presented in the form of code. Through code cases, you can learn the relevant knowledge of Java basics, and through detailed code comments, you can understand Java code more easily!

If you want to not be afraid of code, you must see more code; if you want to see code without fear, you must supplement it with code comments!

This book can be said to be a book that helps everyone fall in love with code and programming from the beginning, and makes it easy for beginners to understand code!

Features of this book

The content of the book is described in the form of "first person", that is, in this book, you will have a character. From now on, your name is "Xiao Si", and your character will continue to appear in this book in the future. The book makes your learning more immersive.

Most of the content in this book is based on practical cases. About the history of the Java language and other related introductions, if you are interested, you can learn about it through the Internet.

All content related to the theoretical basis that is divorced from practical operations and code output is a stumbling block for your early learning, and it will not bring any help to your learning except that it will take up more of your energy.

Many people fail to reach an entry-level level after studying in college for four years, precisely because they have learned too much useless so-called basic and theoretical knowledge, ignoring the importance of practical operation.

The learning of any technology needs to produce results through practical operation and bring positive interactive feedback to learners. Only in this way can learners be more interested in learning. Just like letting you learn to drive, it is useful to drive the car away first, instead of studying the composition of the engine before you touch the car.

How to use this book correctly

After clarifying the basic learning ideas, it is necessary to understand the correct learning method. The author Laoxie has always emphasized the "One Belt, Three" learning method. Next, I will describe this method in detail.

The so-called "one" means that when you come into contact with a new knowledge point, you must write it by hand first, because any understanding is based on a certain memory. In the early learning process, the keyboard may still be a more energy-intensive peripheral for you. You may feel no pressure in the daily Chinese typing process, but the codes are all English words, the arrangement of letters is very different from Chinese, and various formatting symbols and operators are frequently used in the code. These will distract you.

When most people learn programming, they feel that they "learn it as soon as they learn it, but lose it as soon as they do it". The main reason is that the method is wrong.

When writing code, never divide the screen into two, put the old evil code on one side, and put your own code on the other side, and then type according to the code. This is not writing code at all. Instead, I was practicing typing. This is like giving you an English article and asking you to type it with typing software. So when you use the keyboard to write code, the second code must not appear on the screen. At this time, memory and understanding become very important. The process of learning is to input first and then output. You see, Lao Xie wrote it once, which is the process of input. Through the explanation in the book, first memorize and understand it, and then implement it on the pen, because handwriting is your more than ten The most familiar output method in the past two decades, you don't have to think about where a certain letter or character is on the keyboard, so you can focus more on the structure and logic of the code.

When you write it by hand, you will have a second understanding and memory of this code.

In addition, the expressiveness of the physical level is often overlooked by us. When we use computers every day, we are often troubled by not being able to remember where a certain file is stored. I believe you have also had such a situation. This is the disadvantage of electronic products, although it can help us complete certain tasks faster. But it didn't impress us more.

The physical level of expressiveness is different. You try to recall the last time you wrote something with a pen, if your memory is not bad, I am sure you will recall where you wrote it, what you wrote it, whether you wrote it standing or sitting If you write it, you will still remember whether you wrote it with a pencil, pen or ballpoint pen, whether you wrote it on paper or a notebook, and you can even remember whether you wrote it in the upper left corner or the lower right corner. This is the physical level expressiveness.

Nowadays, many people always blindly pursue efficiency, so be quick! But Lao Xie tells you that learning programming is the same as learning any technology, the best shortcut is not to take shortcuts. You have to make it clear that your goal is to learn and learn solidly, not to learn quickly and forget quickly. Therefore, in the process of early learning, prepare a pen and a notebook. Using such a long space to explain this "one" is enough to prove its importance.

The so-called "three" refers to using a computer to input three times in practice. "Three times" is not an accurate number, but a basic number. But these three times are also particular, let's explain it in detail.

The first time you enter on the computer, you can complete it with the memory of your previous handwriting, and finally achieve the effect that you can successfully compile and run, so that you can deepen your memory again.

Don't rush to delete the code at this time, because you still have a task, which is to add comments to each line of code (comment is the text used to explain the code in the code, it does not participate in the compilation of the source code, it is only used to explain to the developer The meaning of the program, single-line comments in Java use the form of "//comment content", and multi-line comments use the form of "/ comment content /", which will be mentioned later), which is equivalent to another understanding of the program. All code can be deleted at this point.

Note that the content of the comments just added is kept, and there will be many Chinese comments on the screen during the second input. At this point, your task is to translate all Chinese comments into code, which is much easier, and the purpose is to let you familiarize yourself with the program again. After writing this time, compile and run normally and get the running results. At this time, you can delete all the content. Write it again in a blank source code file. If you can write it out this time, it means that you have understood and remembered this program case. Of course, if you find that it still doesn't work, then use the handwritten code to fill in the incomplete position in the code.

When you can complete the current case independently, it means that this part can be skipped and you can continue to study.

So three times is just a basic number. If it doesn’t work, then the fourth or fifth time may be needed... In short, remember and understand, and then continue to study to avoid more and more doubts in the study.

book structure

Chapter 1: Setting up the Java development environment and completing your first Java program.

Chapter 2 and Chapter 3: Introduce the use of the most basic operating units in the program code - constants, variables and operators. Program = data structure + algorithm. Both data structures and algorithms are inseparable from the most basic constants, variables and operators. So, here we have to lay the groundwork first.

Chapter 4 to Chapter 6: Introduce flow control in Java, including if, switch, while, do while, for and other syntax. Flow control is also a part covered in all programming languages. This part is included in both process-oriented and object-oriented programming languages. This is also the key content in the basic part, which must be mastered well.

Chapter 7: Introduces the use of arrays, which is a more complex data type in Java than the basic data types. Arrays are not used a lot in Java development, but that doesn't mean it's unimportant. In the future, we may use collections more to replace arrays. But we need to know that the underlying implementation of collections also uses the knowledge of arrays, so it is necessary for us to have a good grasp of arrays. And in other process-oriented programming languages, arrays are used very frequently, such as the C language we are familiar with. In the process of realizing various complex data structures and algorithms, arrays are involved.

Chapter 8: Introduce the methods (also called "functions") in Java. Through the study of this part, we can modularize the code and achieve better code reuse.

Chapter 9 to Chapter 13: Introduce the object-oriented of Java, including encapsulation, inheritance, polymorphism, interface, internal class and other related knowledge points, which is also the essence of Java language.

Chapter 14 to Chapter 24: Introduce Lambda, Stream in Java, and the use of common APIs, including strings, date operations, files, collections, multithreading, I/O streams, exceptions, reflections, etc., this part Readers are advised to study the chapters sequentially.

insert image description here
insert image description here
insert image description here

50% discount for a limited time, hurry up and scan the QR code to grab it!

Guess you like

Origin blog.csdn.net/broadview2006/article/details/130928940