1. How to learn programming?
JAVA is a platform and a programming language. How to learn programming well is not only applicable to JAVA, but also to other programming languages ??such as C++. Some programming experts believe that there is no difference between JAVA and C, just use them. Why can they reach such a state? I think it’s because programming languages ??have a lot of commonalities. Once you understand the essence of programming, you will naturally be able to understand everything. Of course, there are many simple things to learn about programming. 1 Cultivate interest 2 Choose programming language carefully 3 Be down-to-earth, fast-food learning is not advisable 4 Practice more, practice quickly 5 Refer to program code more
6 Strengthen English reading ability 7 Ask others only as a last resort 8 Read more Good book
9 Use appropriate tools to learn JAVAJAVA learning route
1 Basic grammar and JAVA principles
Basic grammar and JAVA principles are the foundation, and the foundation is not solid. It's like building a skyscraper on sand, it's very dangerous. The same is true for learning JAVA. You must have a solid foundation so that you can operate with ease in the J2EE and J2ME fields. Taking the SCJP (SUN Certified JAVA Programmer) exam is a good way. One of the reasons is that in order to be worthy of the 1,200 ocean exam fee you pay, you will study harder. The second reason is that the SCJP exam allows you to master the basics. It is very reliable, and it requires you to be as familiar with the basic knowledge of JAVA as JDK; but you must not think that just because you have passed SCJP, you will be great, you will be favored by software companies, and you will be able to get high salaries. This idea is also very dangerous. Obtaining a "real" SCJP can only prove that your foundation is passable, but it is still a long way from actual development.
2 Comprehension of OO ideas
After mastering the basic syntax and JAVA program operating principles, we can use JAVA language to implement object-oriented ideas. Object-oriented is a methodology; it is a programming idea that is independent of language; it is the basis of component-based development of CBD; it is one of the strong technologies. When you need to switch to another object-oriented language for work in the future, you will feel particularly familiar and friendly, and learning it is as easy as drinking cold water.
The basic process of development using object-oriented thinking is:
● Investigate and collect requirements.
●Establish a use case model.
●Identify analysis classes and static and dynamic relationships between classes from the use case model to establish an analysis model.
●Refine the analysis model to the design model.
●Use specific technologies to achieve it.
●Testing, deployment, and summary.
3 Learning basic APIs
When developing software, not all functions need to be implemented, which is what the classic saying goes, "There is no need to reinvent the wheel." We can use ready-made classes, components, and frameworks to build our applications. For example, SUN has written many classes to implement some underlying functions, and the classes contained in the JAR files we downloaded, we can call methods in the classes to complete Some functionality or inherit it. So what methods are provided in these classes for us to use? What are the number and types of parameters of the method? Does the class constructor require parameters? It is impossible for an engineer from SUN to make an international long distance call or even cross the ocean to tell you how to use the class he wrote. They can only provide documents for us to view. The JAVADOC document (Reference 4.4) is such a document. It can be said to be a document for programmers to communicate with programmers.
Basic API refers to classes that implement some low-level functions and highly versatile APIs, such as string processing/input and output, etc. We call it a class library again.
The first way to become familiar with the API is to check more JAVADOC documents (Reference 4.4), and the second is to use the code prompt function of IDEs such as JBuilder/Eclipse 4. Learning of specific APIs
JAVA is involved in a wide range of fields and different fields There are different APIs, and no one is familiar with all APIs. Most people are only familiar with the APIs they use in their work. If you do interface development, then you need to learn APIs such as Swing/AWT/SWT; if you develop online games, you need to have an in-depth understanding of network APIs/multimedia APIs/2D3D, etc.; if you do WEB development, you need to be familiar with APIs such as Servlet La. In short, you need to choose to learn a specific API based on your work needs or the direction of your interest.
5 Usage of development tools
When learning basic grammar and basic object-oriented concepts, from the perspective of training language proficiency, the tool we recommend is Editplus/JCreator+ JDK, don’t rush to get started with integrated development environments such as JBuilder/Eclipse at this time, so as not to focus too much on the powerful functions of the IDE and distract from the JAVA technology itself. After this stage you can start to become familiar with the IDE.
A programmer’s daily work includes many activities, including editing, compiling and building, debugging, unit testing, version control, maintaining model and code synchronization, document updates, etc. Almost every activity has a dedicated Tools, if you use these tools independently, you will be very painful. You need to constantly switch on the taskbar full of tools, which is very inefficient and error-prone. IDEs such as JBuilder and Eclipse have automatically integrated editors, compilers, debuggers, unit testing tools JUnit, automatic build tools ANT, version control tools CVS, DOC document generation and updates, etc., and even UML modeling tools can be integrated Integrated, it provides a wealth of wizards to help generate framework code, making our development easier. It should be said that the development trend of IDE is to integrate almost all tools used in software development.
From the perspective of development efficiency, using IDE is the only way to go, and it is also a milestone in the transition from a student to a professional programmer.
The IDEs used in JAVA development mainly include Eclipse, JBuilder, JDeveloper, NetBeans, etc.; Eclipse and JBuilder have the largest market shares. JBuilder has been the dominant player in the JAVA integrated development environment in recent years. It was developed by Borland, a company highly respected by programmers. In the smoke-filled JAVAIDE war, it defeated IBM's Visual Age for JAVA and so on with its rapid version updates and achieved great success. A great achievement. Since IBM was no longer profitable with Visual Age for JAVA, it simply contributed it to the open source community and became the predecessor of Eclipse. The reborn Eclipse has won the favor of the majority of programmers (including almost all hardcore programmers) with its open plug-in extension mechanism and free open source, and has great development potential.
6 Learn Software Engineering
For small projects, you may think that software engineering is not necessary. As projects become more complex, the need for software engineering becomes apparent. See the "Software Development Learning Route" section.
7 Learning Points
After establishing the learning route, we also need to summarize the learning points of JAVA. These points have been mentioned more or less in the previous article, but the author feels that these places are special. You have to pay attention before summarizing them, don't blame my mother-in-law.
8 Check the API documentation diligently
When programmers write certain classes, they feel a sense of accomplishment and want to contribute it to their colleagues who are suffering. At this time, you need to use the "javadoc" tool (included in the JDK) to generate standard JAVADOC documents for use by peers. The DOC document of J2SE/J2EE/J2ME is a tool for programmers to communicate with each other. Almost everyone has a copy, except for novices.
The official download address of the J2SEDOC document: /j2se/1.5.0/download.jsp. You can search for the CHM version on Google to download. It can also be viewed online: /j2se/1.5.0/docs/api/index.html.
Treat DOC documents like Chairman Mao’s quotations, read them once when you get up in the morning, and read them again before eating and going to bed.
When you need a certain function, you should first check the corresponding DOC document to see if there is a ready-made implementation. If there is, you don’t have to worry about it and just use it. If you can’t find it, you can just use it. Only then did I consider implementing it myself. The usage steps are generally as follows:
●Find a specific package. Packages are generally organized according to functions.
●If you need to use a class, if the class naming is standardized, we can guess a thing or two from the name of the class.
●Choose the constructor. Most of the ways to use classes are to create objects.
●Choose the method you need.
9 Check books/google->Write code test->View source code->Ask others
How should we solve problems when we encounter them?
Don’t rush to ask others at this time. If you ask too simple questions or ask them without thinking, others will look down on you. You can first look for books or search on Google, and most of the problems will be basically solved. For questions like "how to use certain classes/methods", DOC documents are the answer. If you have doubts about certain knowledge points, write code and test it, it will leave a deep impression on you. For some problems, you may need to directly look at the source code of the API to verify your ideas. Only ask others for advice as a last resort.
10 Learn the design ideas of open source software
There are many open source tools, components, and frameworks in the JAVA field, such as JUnit, ANT, Tomcat, Struts, Spring, Jive Forum, PetStore pets There are so many shops and so on. These are the treasures left by our predecessors. Are you willing to enter the Treasure Mountain and return empty-handed? Analyze these tools and frameworks and understand the design ideas. Maybe one day you can write an XXX framework or something, which will be a great success. Analyzing open source software is actually a convenient way for you to improve your technology and improve your practical capabilities.
11 The Importance of Norms
Without rules, there is no rule. The specification here has two meanings. The first level of meaning is technical specifications, which are as many as /docs/codeconv/, and there are also Chinese ones. Ah, if you want to ask me where I am, please refer to Section 3.2.2.
12 Not limited to JAVA
Unfortunately, fortunately, there are still many things to learn. Unfortunately, because there are too many and varied things to learn, there is no time to spend with my wife, family or girlfriend, which leads to physical and mental exhaustion, and in severe cases, even depression. Fortunately, it is not easy for others to take your job. They or they need to pay a lot to achieve their wishes.
Don’t learn JAVA in isolation. You need to comprehensively learn data structure, OOP, software engineering, UML, network programming, database technology and other knowledge. It will be more effective to learn in a horizontal and vertical comparative associative way. For example, when learning JAVA collections, look for books on data structures; when learning JDBC, review database technology; the principle of "learn when needed" is still adopted.