preface

I’ve lost count of how many readers have asked:

Blogger, how do you learn? Do you have any suggestions for a situation like mine?

I don’t know when I became a life coach. Of course, I don’t reject these questions, and communicating with everyone is a learning process.

Therefore, I also promised to prepare an article on learning. Therefore, this article has been prepared for a long time and is long in length. Please read it patiently and hope it can be fruitful.

The following is just a summary of my experience as a “not so bad programmer” in terms of hard and soft skills. Welcome to join the architecture huashan Sword: 836442475 this group provides free learning guidance architecture information and free answers to questions you do not know can be put forward in this group, there will be career planning and interview guidance into the group to modify the group remarks: years of development – region – experience to facilitate the architect to answer questions

The skill tree

As a code code of technical workers, how to say dry or technical work.

Since it is technical that professional strength must be excellent, I will talk about what we should master in accordance with the relevant categories below.

Computer Fundamentals

A job that involves working with computers. Computers are what we live on. So there are some basic skills that we should and must master.

For example, Internet related knowledge.

This includes the TCP protocol, which is different from UDP. You need to understand the TCP three-way handshake, such as unpacking and sticking packets.

Of course, the most common HTTP at the top also needs to be known, even familiar with.

Since most of the code you write will be running on Linux servers, you’ll need to be familiar with this as well.

Concepts such as processes, threads, memory, etc. Server common command use, this is no trick is usually knock knock summary.

I also worked part-time for half a year in operation and maintenance before I was familiar with this area.

It can be tedious to learn these things as a beginner, and universities usually have these basic subjects before their major courses. I’m sure most of you didn’t listen very carefully, because it’s true that even if you learned these things and memorized them, there wasn’t much direct motivation.

But after a few years of work, you’ll realize that as long as you’re still doing computer work, you’ll be glad you made the right choice one day.

Data structures and algorithms

Next comes another boring subject: data structures.

It was also the least popular course in college and the only one IN which I failed.

I remember that every time the teacher let us use C language to practice the exercises on the book, looking at a combination of letters that are open to recognize together I resolutely chose to give up.

As a result, NOW I have to read binary trees, red-black trees, stacks, queues and other knowledge every once in a while to deepen my impression.

I really have no say in the algorithm, and MOST of the topics of LeetCode THAT I insisted on brushing were in the elementary level.

But like basic search, sort algorithm I think still have to know, not necessarily handwritten but to understand the idea.

Therefore, I strongly suggest students to actively participate in some ACM competitions, which will definitely be a sharp tool to add points in the future.

This area of content may play a big role in college recruitment, if your job is Java Web development, this area is relatively less likely.

But once you get into model design, middleware, efficient storage, queries and so on, there’s no getting around that.

This content is about the same as the computer foundation above. For Our Java development, I think that in addition to deepening the impression by brushing LeetCode many times, when we choose a container to store data in daily development, we should think why we choose it? Is there a better way to store it? How efficient is the write and query?

The same stick to it, the future certainly receive goods quite abundant.

Java based

Most of the readers here are Java related, so this highly relevant skill is very important.

The Java foundation is the only way to advanced Java.

Leaving aside basic grammar, we’ll focus on the high-frequency stuff in the real world.

Basic containers, such as HashMap, ArrayList, HashSet, LinkedList, etc., need to be able to use and understand how they work. In this way, the optimal design can be selected in different scenarios.

IO and NIO also need to be mastered. Most of the daily development is dealing with disk, network (logging, database, Redis), these are the IO process.

Common design patterns such as agent, factory, callback, and Builder patterns are helpful in developing flexible and scalable applications.

Java multithreading is a very important feature, many daily development. Understands the threading model, the pros and cons of multithreading, and how to avoid it.

Good single test habits. Many people find writing single tests a waste of time and pointless. But with single tests, many problems can be exposed in advance, reducing the chance of rework and improving the quality of the code.

Multithreaded application

With a solid foundation, let’s talk about multithreading and concurrency.

If you want to add the word “advanced” to your title, you must go through the baptism of concurrency.

Concurrency here refers mainly to scenarios in a single application, but distributed content in multiple applications can be seen later.

The emergence of multithreading is mainly to improve CPU utilization rate and task execution efficiency. However, it is not always possible to achieve this effect with multi-threading, because it also brings some problems:

Context switch

Shared resources

Visibility, atomicity, orderliness, etc.

Using multiple threads can be more complex and uncontrollable than single-threaded programs, and even slower than single-threaded programs when used incorrectly. So consider whether you really need multithreading.

Once you know how to use it, you need to think about why multithreading has that problem, and you need to understand things like memory models and visibility.

What are the same solutions? Their strengths and weaknesses also need to be understood.

Speaking of multithreading, we have to mention and issue the following package java.util.concurrent.

The most commonly used and needed to master are:

Atomic class: Atomic operations for concurrent scenarios.

The queue. Often used for decoupling, you need to understand how it works.

Concurrency tools, such as ConcurrentHashMap, CountDownLatch, etc.

Thread pool usage, and related principles.

Lock related content: the use and principle of synchronized and ReentrantLock.

This piece of content can be we know that writing the JDK to handle concurrency ideas, we write our own high-quality multithreaded programs also have a lot of help.

The Art of Concurrent Programming in Java is recommended as a good introduction to concurrency.

The JVM virtual machine

The JVM is essential to getting deep into Java. For most developers who have been working for one to three years, there is little direct exposure to these things.

To 3~5 years this stage must understand, the following content I think is must master:

JVM memory partition, know which memory holds what content; Thread safety; Memory is not enough how to deal with.

Different cases of memory overflow, stack overflow, and location solutions.

Generational garbage collection strategies.

Online problem location and related solutions.

The entire process of loading a class, creating objects, garbage collection, and class unloading.

Knowing these things really helps a lot in actually analyzing problems.

The database

Do WEB application development students must have a lot of dealings with the database, and usually a system is the first bottleneck is often the database, said that the database is the last straw to the system is not too much.

So it is very necessary to master the database. Take the MySQL database used by the Internet as an example, some knowledge points must be mastered:

Index data structure and principles, which fields should be created index.

For a slow SQL optimization idea.

For the solution of database horizontal and vertical splitting, it is necessary to understand the middleware such as MyCAT and Sharding-Sphere commonly used in the industry.

Distributed technology

With the development of the Internet, traditional single application is less and less suitable for existing scenarios.

So distributed technology comes along, and this is too much to cover, but I can only list some of the things I use on a daily basis:

First of all, some basic theories such as CAP theorem, some problems that distributed system will bring, and the way each application trade-offs.

To learn about the definitions, sources and comparisons of Microservices that have become hot in recent years, you can read Martin Fowler’s original Microservices, or search for relevant domestic translations.

When working with distributed frameworks such as Dubbo and SpringCloud, it is best to understand the principles.

The next step is to come up with solutions to the problems posed by distribution. Such as distributed lock, distributed traffic limiting, distributed transaction, distributed cache, distributed ID, message middleware and so on.

Also understand some of the load algorithms in distribution: weights, Hash, consistent Hash, failover, LRU, and so on.


Understand the point of architecture

I believe everyone has a dream of being an architect.

There is a sense that the architect is drawing the paper, setting up the shelf, and the people below are doing the work.

But in fact, the internal work needs to be very deep, on the above list all need to master, the bottom to the operating system, algorithm; From the top down to applications and frameworks, you need to be very proficient. (except PPT architect)

I don’t have much experience with architecture myself, so I can only offer limited advice.

First of all, you have to master distribution, because most of today’s architectures are based on distribution.

In this process, it is necessary to choose consistency or availability according to CAP theory and the project situation, and how to select the technology suitable for the existing team.


How to learn

With skill trees out of the way, let’s talk about learning, which is one of the most frequently asked questions.

And the most talked about study is watching videos or reading books?

video

We have to admit that video is the most convenient source of knowledge, after all, it contains pictures, text and sound.

In fact, I did not take professional courses in the university for several years. I remember that I spent two months watching the video tutorials of “Ma Soldier” at home every day in one summer vacation. At that time, the resources were very old, and I remember the videos were released in 2007 (using Google).

During that period, I got up early and went to bed late. I practiced what I learned every day and felt a sense of accomplishment. Later, he became a “student with outstanding results” in the eyes of his classmates.

Now open my 12-year-old computer, there are still dozens of gigabytes of teaching videos lying in the hard drive.

Reading a book

After work, time is really precious, and there is no freedom for students to study. So now my main source of knowledge is books.

These are the books I read recently:

Reading books will involve the difference between e-books and paper books, I personally prefer paper books. After all, I can easily take notes and switch chapters at any time. The most important or from childhood to develop the habit of smelling books.