Every programmer or every worker should have his or her own career plan. If you are not a rich second generation, or an official second generation, and have no career plan, I hope you can think about your future. Today xiaofian to share with you is a Java engineer from Ali for the epidemic in the current 3 years of work experience programmer career advice, I hope to inspire you.

The three stages of a programmer

 

Phase I – Three years

I think three years is the first threshold for programmers, and that phase will weed out a bunch of people who are not good enough to write code. At this stage, we go out of the campus, into the society, become a programmer, formally from the book content to the real enterprise development. We know how to work together as a team, how to use project management tools, how to control project version, how to test and run the code online and so on. We have accumulated certain development experience and gained a certain in-depth understanding of the code, which is a relatively pure Coder stage.

 

Stage two – five years

Five years is the second threshold to distinguish programmers. Some people in three years, in addition to finish the work, the basic will not deal with other things, in their spare time to study technical implementation details, see N many good books, write some blogs, share technology in the making, these people in five years must have the ability to acquire the technically and clear the development direction of the future, From a Coder to a system analyst or architect, become an indispensable person in the project team.

 

Stage three – ten years

Ten years is another threshold, and that’s when you switch careers or continue to be a programmer. If you had stuck to the idea and worked hard in the first few years, at this point in the decade, someone would have grown up to be a programmer with deep knowledge of the industry, deep knowledge of the technology, and the ability to analyze a product from scratch. It’s an honor to be a CTO, a technical specialist, a chief architect, and other key positions in the company, and your boss will not take advantage of you financially

 

To sum up, I think there are three things you should keep thinking about as you get older and learn more about life:

1; Am I cut out to be a programmer?

2: Should I be a programmer all my life?

3: What kind of attitude do I have towards programming? Is it enough or research?

Finally, define your own career plan, take responsibility for your own plan and work towards it.

 


 

Skills a Java programmer with 3 years of working experience should have

This is probably what Java programmers are concerned about. I want to make it clear that not all of the following is necessary —- but the more you know, the higher your ratings and salary will be.

 

.0. Basic Syntax

This includes the use of static, final, transient, foreach loops, and so on. If you answer static modifiers, modifiers, I will think you qualified, if you answer static blocks, I will think you are good, if you answer static inner classes, I will think you are good, I will be very satisfied with you, because I can see that you are very keen on research technology.

Impressed me experience of an interview, the interviewer asked the volatile keyword directly the underlying implementation of the principle (by the interrupt, interview and interview itself is relative, the interview faculties to ask this question at the same time also make the interviewer feel the interviewer is also a favorite research technology, increased the candidates for the company’s goodwill, My final choice is to ask the question of the company), don’t think this is too critical —- the more simple questions can see a person’s level, others of your technical consideration is the vast majority of depth first, breadth second as the standard, remember.

 


Set 1.

It’s very important and it’s a must-ask. List, Map, Set, etc.

ArrayList, LinkedList, Hashtable, HashMap, ConcurrentHashMap, HashSet, etc. In addition, ConcurrentHashMap is asked a lot in interviews, probably because this class can generate a lot of questions. About ConcurrentHashMap, I offer three answers or research directions:

0. Lock segmentation technique of ConcurrentHashMap

1. Check whether the read of ConcurrentHashMap should be locked

2. Whether the iterator of ConcurrentHashMap is a strong or weak consistent iterator

 


2. Design patterns

I thought it was an important part of the content, but I was only asked once in the interview of Alibaba B2B Business Division, when I asked about the decorator mode.

Of course, we can not be so utilitarian, in order to learn the interview, design mode is still very important in the work, very useful, 23 kinds of design mode focus on the study of more than ten kinds of common can be, the interview about the design mode of the question and answer are mainly three directions:

What design patterns did you use in your projects and how did you use them

1. Know the strengths and weaknesses of common design patterns

2. Able to draw UML diagrams of common design patterns

 


3. Multithreading

This is also a must ask a piece. Because of three years of working experience, I will basically not ask you how to achieve multi-threading, I will ask some in-depth questions, such as the difference and connection between Thread and Runnable, how to start a Thread many times, what state the Thread has. Of course, this is just the most basic. Unexpectedly, several interviews were almost simultaneously asked the same question in different ways, which summed up the following meaning:

If Thread1, Thread2, Thread3, and Thread4 count the size of C, D, E, and F respectively, and all the threads are handed over to Thread5 for summary, how should this be implemented?

Do you have an answer to this question? Not hard, there are already classes available under java.util.Concurrent.

In addition, thread pool is also a relatively common question, how many common thread pool? What are the differences and connections between these thread pools? How does thread pooling work? To be realistic, you will be given some scenarios to answer which thread pools are appropriate for this scenario.

Finally, although this interview does not ask many questions, but multi-threaded synchronization, locking is also important. The difference between synchronized and ReentrantLock, the common method and static method of synchronized lock, deadlock principle and troubleshooting methods, etc.

 


4. IO

I/O is divided into File I/O and Socket I/O. File I/O is basically not asked. It is good to use File I/O, and remember that File I/O is blocking IO.

Socket IO is an important part, to understand the difference between blocking/non-blocking, synchronous/asynchronous, to understand the blocking IO, non-blocking IO, multiplexing IO, asynchronous IO these four IO models, how Socket IO and these four models associated. It was a little bit basic, but if I went deeper, I would ask about the principle of NIO, which IO model NIO belongs to, and the three components of NIO, etc. It was a bit difficult, and I also studied for a long time before I could understand NIO.

NIO, by the way, is not strictly a non-blocking IO but rather a multiplexing IO, and that’s a detail to keep in mind when you’re answering an interview, saying that NIO blocks in the Selector select method will make the interviewer think better of you.

If you’ve ever used Netty, you might want to ask about Netty. After all, it’s one of the best NIO frameworks out there (Mina is actually good, but not as good as Netty in general), and most Internet companies use Netty.

 


5. The JDK source code

To get a high salary, JDK source must be read. The above content may also be linked to specific scenarios, JDK source code is to see you usually love to study. During the interview, I was asked many questions about the JDK source code. One of the most difficult questions was how to implement the String hashCode() method. Fortunately, I usually read the String source code, so I gave a general answer. JDK source code in fact, there is no good summary, purely personal, summary of the more important source code:

List, Map, Set implementation class source code

ReentrantLock, AQS source code

AtomicInteger implementation principle, can mainly explain the CAS mechanism and AtomicInteger is how to use CAS mechanism to achieve

Implementation principle of thread pool

Methods in the Object class and what each method does

These are actually quite high requirements, I last year a whole year basic JDK important class source code research all over, really spend time, spend energy, of course, looking back, is worth —- not only for the interview.

 


Framework of 6.

It’s a cliche. It’s an interview question. In general, I will ask you about the framework you are using in your project, and then I will give you some scenarios to ask you how to use the framework, such as how I want to do something when Spring initializes the bean, how I want to do something when the bean is destroyed, the difference between $and # in MyBatis, etc. All these are practical. Usually accumulated well, how much learning framework use details naturally are not a problem.

If you answered the above questions well, the interviewer will often ask in depth how the framework works. One of the most frequently asked questions is the implementation principle of Spring AOP. Of course, this is very easy to do in two sentences, even if you don’t have to prepare for it. The most abnormal thing I encountered was asking me to draw a UML diagram of Spring’s Bean factory implementation. Of course, FACED with such a profound question, I could never answer……

 


7. The database

Every database will ask you. Some basic differences such as union and Union all, left join, several indexes and their differences are not discussed, more important is the database performance optimization, if you know nothing about database performance optimization, then have time, It is also recommended that you spend a day or two prior to the interview preparing specifically for SQL basics and SQL optimization.

However, the database is not to worry about, a company often has many departments, if you are not familiar with the database and the basic technology is very good, nine chengdu will ask you, it is estimated that you will be put into the database use is not very high requirements of the department exercise.


8. Data structure and algorithm analysis

Data structure and algorithm analysis, for a programmer, is better than never and definitely comes in handy in the workplace. Array, linked list is the basis, stack and queue in-depth but also not difficult, tree is very important, more important tree AVL tree, red black tree, can not understand their specific implementation, but to know what is a binary search tree, what is a balanced tree, AVL tree and red black tree difference. I remember an interview, and an interviewer and I were talking about the index of the database, and he asked me,

Do you know which data structure is used for the index implementation?

I think I got the Hash table. Wrong. Do you know why trees are used? I replied that because Hash tables are likely to have a lot of conflicts, with tens or even hundreds of millions of data levels, it can greatly increase the complexity of lookup time. But the tree is relatively stable, basically guarantee can find the data you want at most 20 or 30 times, the other party said not completely correct, finally we still exchange this problem, I also understand why to use a tree, not here, why do you think the index should use a tree to achieve?

As for algorithmic analysis, forget it. I was asked in an interview what sort method collections.sort used. Of course, in order to show my erudite, algorithm analysis also have a certain amount of research, I still boldly said a sentence may be bubbling sort bar. The answer, of course, is no. For those interested, take a look at the source code for the collections.sort method, which uses a sort called TimSort, which is an enhanced merge sort.

 


9. Java VM

To my surprise, the Java virtual machine was supposed to be a big part of the story, and the chances of being asked about it in any of these companies were almost zero. After all, I spent a lot of time researching Java virtual machine last year. I read Zhou Zhiming’s “In-depth Understanding of Java Virtual Machine: Advanced JVM Features and Best Practices” more than five times.

Without further ado, the Java Virtual Machine has not been covered, but I feel it is worth investigating, so I will briefly outline some of the most important aspects of the Java Virtual machine:

0. Memory layout of the Java VM

1.GC algorithm and several garbage collectors

2. Class loading mechanism, also known as parent delegation model

3.Java memory model

4. Happens-before rules

5. Rules for using the volatile keyword

6. Maybe the interview is useless, but on the way to the bull, you can’t fail.

 

10. Web issues

Java is primarily web-oriented, so some questions about the Web are also mandatory. The two most common questions I get are:

1. Talk about several implementations of distributed Session

There are four common answers that are naturally very satisfying to the interviewer. Another common question is:

2. Talk about the difference and connection between Session and Cookie and the realization principle of Session

In addition to these two questions, the content of web.xml is the key. Filters, servlets, and listeners are not only clear about how they are implemented, but at least how they are used. In addition, some details such as get/ POST differences, forward/ redirect differences, and HTTPS implementation principles may also be examined.

 


Finally, if you are interested and have time, I suggest you learn and study SOA and RPC, service-oriented system, large distributed architecture is necessary, life-saving solution, cure-all, always successful — welcome to leave a message

Special statement: this article material from the network, only as a share of learning, such as infringement, please contact delete!

 

  • give a like
  • collection
  • share
    • The article reported


Frank little yard farmer
Direct messages
Focus on