The first chapter of the greatest truths to the simplified, and the first chapter of the greatest truths to the simplified
This book is simple and easy to understand. IT is a very good IT book with the most core, classic, and meaningful content, but it is completely expressed in a seemingly simple figure. The pictures and texts in the book are illustrated with vivid language images, the simple Ancient Chinese fable "yugong Yishan" perfectly describes the boring process of programming. The greatest truths to simplicity tells us more about how to do things. For example, a complicated programming may require a long amount of code, we may wish to turn big problems into small ones and separate them into simple ones. This is perhaps the inspiration from "the greatest truths to simplicity.
Chapter 1: The essence of programming: sequence, branches, and loops. No matter what kind of project, even a huge project like "yugong Yishan", when there is a project demand, determine the workflow of the entire project, it contains the necessary sequence, branch, and loop structure, which can be achieved through simple programming. The Order, branch, and loop structure are the essence of programming. In the story of yugong's migration to the mountains, his goal is "Bi Liping insurance, pointing to the southern Henan to reach hanyin ". The method is to "buckle the rocks and soil, and migrate them to the end of the Bohai Sea ". Conditional judgment: if (I die) My son completed for me. The circular structure is "Son, son, son, and son ". "Mountain does not add" describes the project's feasibility. It is not an endless loop, so it can be implemented by programming.
The pseudocode of the Java statement is as follows:
Import. java. avenue to simplicity .*;
Import. java. yugong migration .*;
Public class Yugongyishan {
Public static void main (String [] args []) throws IOException {
Int yugong, son of the three sons;
While (people ){
Record the rocks and soil to the end of the Bohai Sea;
If (yugong's death)
The descendants of yugong have taken the rocks to the back of the Bohai Sea;
If (mountain = 0)
Break;
End
End
}
}