Have you mastered the basic knowledge of java, don't slap your face during the interview

Some newcomers who have just learned have no pragmatic spirit. They are self-righteous. They feel that they have learned the basics well, and they are very ambitious. They always want to learn advanced knowledge as soon as possible. I am not here to belittle beginners. Once your foundation is solid, let's talk about it. Let's take a look at the embarrassment of the rookie below.

This involves the basic knowledge of exception stack, compilation time, main function , etc. There are so many unceremonious newcomers who said it, why don't you make it easier to understand?

It's easy to understand, but it comes at a cost.

An exception is an abnormal situation that the program does not expect, and it cannot be handled by the programmer himself. The stack is a very basic data structure. When it appears, it means that the element at the top of the stack is the last to be pushed into the stack. So, see that pile of text thrown by the console after your error? Posted, the closest to XXXException is usually the most critical information.

You see, even if it is reduced to "the pile of text thrown by the console", in comparison, is the "exception stack" more time-saving for both parties? After all, at the current salary level in the IT industry, the old bird may have wasted several ten bucks.

What's more, some people may not even understand the "console", which involves role 2.

There are even more unrealistic and pompous newbies.

I've seen a resume, quartz, POI, easyUI, jquery, etc., and wrote a bunch. This person may feel that these terms are high-end and powerful, but, look at this skill table:

It exposed his problem, this person did not understand what these terms he was talking about.

At least, a basic programmer will not write familiar with xml, json, dom4j technology, and will not put "online payment" and servletjsp in the same column. He doesn't need to dwell on how full his skill tree is, the right content and reasonable layout represent his level.

It doesn’t matter if the newcomer has a solid foundation. You can learn slowly, but you must have a learning attitude and method in learning, you must have the ability to solve problems, and you must give full play to your own initiative. Broken to feed you. In this way, it is very difficult to grow up.

for example:

Generally speaking, the old birds who have suffered these three consecutive scoldings all start from their hearts, but if there are exceptions, either the temper is too good or the girl is too good-looking.

Appropriate solution: search for keywords -> view documentation -> read source code -> ask old bird keywords -> *.

How to solve problems that have never come before? Or to expand, how do the functions I wrote adapt to the strange needs of the future? Of course, this is actually a matter of the amount of code and the amount of reading.

Come down and give newcomers some learning methods and ideas.

I divide learning into several stages:

(1) In the basic understanding stage , you see a basic knowledge point, begin to understand its meaning, and see specific examples that reflect its corresponding basic knowledge. For example, seeing Animal cat=new Cat() can reflect the following knowledge points: declaration, instantiation, reference, polymorphism.

(2) In the concatenation stage , the knowledge points are connected in series to construct the original appearance. For example, in the above example, combined with JVM-related knowledge, a rough stack diagram appears in my mind, just like this picture:

Such capabilities can not only be used to speculate from the source, but also can actively combine knowledge points to come up with new structures. For example, the new requirement is to "generate animals according to configuration".

Then, we analyze that there will be a construction tool that generates animal instances according to configuration items. The code might look like this:

Animal animal=AnimalFactory.createAnimal(“猫”);

In createAnimal, we perform an if judgment on the string to decide whether it is a new Cat or a new Dog

In fact, such a structure has been summarized in the GoF. Eh, what is a GoF? Forgot what this paragraph said?

(3) In the advanced stage , after you have the ability to connect knowledge points, you should have the ability to see the specific implementation of unknown technologies. Such as hibernate, what is its function? The core lies in "synchronizing the persistence layer and the data layer", that is, the mapping between the data table and the JavaBeanPOJO. So, let's think about how to implement this function if there is never an ORM framework similar to hibernate?

First of all, we must have tools and configurations to communicate with the database. Java can use jdbc, and database-related configuration can use any method of xml, json, or bean. We can also see that the bottom layer of hibernate is jdbc, and there is also a configuration entry called Configuration.

Then there must be a configuration way to unify the data table and the bean. Why? Because their amounts of information are inconsistent and the information they contain is an intersecting relationship, for example, they all have similar data types (varchar->String) and incompatible contents (indexes and constraints), we conclude that we A mapping tool is needed to match the intersecting parts and fill in the missing content. Therefore, we can infer that hibernate must have a mapping tool (xml and annotation).

Then, in order to adapt to a variety of different databases, each statement may have different expressions. For example, Oracle has the type of Number(*,*), which is not applicable to mysql. We need to design an adapter for the database. In hibernate, this part is called dialect, Dialect.

After such an analysis process, whether it is to realize new requirements or analyze unknown frameworks, all have a theoretical basis.

In my personal opinion, only programmers who have reached this stage can be called qualified. Having said so much, you need to introspect yourself to know where your problem lies, and then find the problem and solve it. I recommend a learning skirt for learning Java [678, 241, 563], whether you are a big cow or a novice, whether you want to change careers or want to enter the industry, you can come to understand and progress together and learn together! There are development tools in the skirt, a lot of dry goods and technical information to share

Related Posts