Java is what

New programmers often fall into the trap of thinking that learning a language makes you a language engineer. But is this really the case? Not really.

Today we are going to talk about what Java developers actually build. What exactly is the Java back end doing?

basis

We all know that Java is a back-end language, and the back-end refers to the server side. The server side code usually runs on the server, and usually the server where we run Java programs is the Linux server.

In Internet companies, these servers are housed in what’s called a computer room, so Java programmers like us run our code on these servers.

There’s a concept in Java called a virtual machine, and you can think of it as an Android emulator, so if you have an Android emulator on your computer, you can use it to run android applications, like an APP, or a mobile game.

So when you install something called the JDK on your computer, you have the JRE, or Java runtime environment, and with that runtime, you can run Java applications.

Now that we know how Java programs run on computers, let’s talk about some basic Knowledge of Java that we usually learn. What are they really useful for?

In fact, usually this some Basic Java syntax is just some basic knowledge of your code, equivalent to 26 letters in English, common basic type variables, for loop, if else and so on basic syntax, after mastering these basic knowledge, you can write some very simple code.

In addition, Java also has some special concepts, such as object-oriented features, including the concepts of classes, interfaces, and so on. The reason why Java introduced all this stuff was to make it easier for users to design, abstract, and program.

For starters, you don’t need to be particularly deep, because these are things you can only understand gradually after you actually write code.

Java Core Technology

After finishing the basic knowledge, I think you will also be curious, Java often mentioned some collection classes are what, because in real life there are many scenarios, need to use the collection class, such as a list of user names, how do you save?

You’re going to use a List to get it right, so the collection class is going to let you store data better in your programming.

In fact, the concept of set class was first derived from data structure, because there are many special data storage structures in the computer, such as file tree, linked list and array structure, so the computer theory abstracts these data storage models into some common structures, collectively known as data structure.

So, what is concurrent programming in Java? Multithreading in Java is to make better use of the CPU core in the computer. Through concurrent programming, you can improve the efficiency of concurrent programming.

However, concurrent programming requires the support of the operating system, as well as the support of the computer hardware. Therefore, if you want to fully understand multithreading, it is not only enough to understand threads or Thread pools in Java, you also need to understand the operating system, and how the computer is composed.

Just like concurrent programming, there is network programming in Java. Network programming in Java is very similar to other languages, but it is actually a set of APIS based on TCP/IP. With network programming, you can send the data that you want to send to the other side of the network. Java programmers already have a lot of power

After talking about these points, we will talk about what is the Java back-end technology we usually say in the end. Take Alipay for example. There were not many users of Alipay, and a server and a database can support all businesses.

The back-end technology

When more and more users pay treasure, a server is unable to meet the needs of vast users at the same time, then begin to emerge multiple servers, multiple servers form a cluster, the user can access the server by means of load balancing, each user may access to different machines, this way to reach the effect of the shunt, The pressure on the server will be reduced.

Because the database needs to ensure the reliability of data, if a certain database is down, and there is no backup, then the data can not be accessed, which is not allowed in a large system, so there is a database master-slave deployment.

But, in fact, with the business development, the pressure of the database is becoming more and more big, the main equipment deployment does not solve the problem of the performance of the database access, so we need to conduct depots table, on the basis of the database main case, we will place a big amount of data table into multiple tables, and database requests to different data, such as 100 depots, 100 sub-tables is equivalent to dividing a data table into 10000 data tables.

At this time, there is another problem, if a database has multiple standby databases, and when the primary database fails, the primary and secondary switchover is needed, the data between the primary and secondary databases may be inconsistent, and this is also one of the problems of distributed theory research, because it is complicated, we will skip it here.

distributed

Just said distributed technology, in fact, load balancing, sub-database sub-table is a kind of implementation of distributed technology, if you do not want to do sub-database sub-table, then what can reduce the pressure of database access? This is where caching comes in. Caching allows the server to send requests to the cache first. Since cached data is usually in memory, access is very fast, and these requests don’t have to go through the database.

With the development of services, the single point of pressure on the cache will be larger, so the distributed cache will appear. Generally speaking, the cache cannot guarantee the reliability of data, because their data may be lost, and the cache can only store part of the data, not solve all problems.

Therefore, when the number of requests of some businesses is very large, the cache alone cannot solve the problem. At this time, we can also use message queue to help us solve the problem of large traffic and concurrent requests.

We can use message queue to store part of the request message, and then according to the ability of our server to process the request, the message gradually out, and then to process these messages gradually, so that we can solve the problem of high concurrency. Of course, this is provided that the message queue guarantees the reliability of message storage, which is what most message queues guarantee.

This is a pretty good overview of what the Java back end looks like, but there’s a lot more to cover than one night.

Overall, Java back-end technology, difficult to say simple is not simple, I try to tell all the content is easy to understand, in fact every technology, there are much more special complex principle, of course, in you to understand the whole concept of Java back-end technology, believe that after learning more help for you.

Why did I choose Java

Recently, some friends asked me why I chose Java as my career path, and why I didn’t do C++, front-end and other fields. Some others said that I should do algorithms as a graduate student, while I could do development as an undergraduate student, and why I still want to pursue graduate study. In fact, this question is put on different people, the answer may be completely different. I’ll try to explain why I chose Java, mainly from my perspective, in conjunction with some readers’ questions.

Talk about my choice of technical direction

I first contact with the language should be c, then contact with the front end, PHP, c # language, knowledge of the language is limited to know the basic grammar, wrote a small demo, at that time felt that to master a language is to master its syntax to go, so be on your resume writing, understand all kinds of language, now think about is so ridiculous.

But really a lot of beginners think that they can go in either direction because they don’t know what their technical direction is because they’re not good in either direction.

Later, I gradually got into touch with Android development and was able to write some apps by myself. I thought this direction was quite interesting, so I decided to do it in the future. However, I also knew at that time that THERE was still a long way to go, so I planned to take the postgraduate entrance examination. Coincidentally, during the vacation before I went to graduate school, I worked as an intern in a company doing Java Web. At that time, I felt that Android was much simpler than Java Web, and there was no need to learn so many frameworks and technologies, so I became more determined to do Android. However, I also found that at that time, The Java Web is the hotter direction, and jobs are more in demand.

When I went to graduate school, I also planned to study Android at the beginning, so I bought all kinds of books on Android and started reading them. At that time, I happened to encounter a practical course, which asked us to choose a direction, including Java, Android, C++ and so on. At that time, the girl was doing the front end. In order to bring the girl with me to do the project, I simply chose Java Web as the direction, thinking that it would not affect my Android, so I began to learn Java Web in the following time.

Over time, found the direction also have no imagination of so difficult, on the contrary it is quite interesting, after all, can be used to all kinds of framework, the content of the technology stack is very rich also, it looks like a lot of high technical content than Android, coupled with their learned Java, before also have Java Web learning experience, resume can write look better, So in a hurry, began to do the Java direction. In this way, I found my first Java internship, read the Java backend book list, and gradually went further and further on this road. Later, I found that Java Web is far from simple as I imagined, and the Java backend technology stack is far more than Java Web, especially for big factories, there are too many things to master. Such as distributed, network programming, middleware, and so on.

So, to choose direction in this matter, sometimes is the interest, the opportunity and see how long you can keep it up, if you are interested in a sense of direction, and willing to continuous learning, constantly digging, this direction may be suitable for you, when you put in the direction of time, with a certain accumulation and experience, it is not easy to change direction again.

Talk about the prospects for each technology direction

Many readers have asked this question before, which direction is more promising, more money scene. Although I have only worked in one direction, I have some understanding and dabbling in other directions. I can’t say I know much, but I can give some pertinent suggestions based on the situation of my classmates and friends.

In fact, my original intention was to do game development, so let’s talk about that first.

Netease game in a few years ago to develop the job requirement is 985 master’s degree or above, at that time I was at the request had an inquiry, later not to do the game development, is the main reason is that the game development mainly use c + +, and the main direction of the post request is the client technologies, such as graphics, engine technology, as well as the grasp of the c + +.

At that time, I thought that I had some Java foundation and was unwilling to transfer to C++. At the same time, I also felt that there were few big companies in the game industry, except Tencent NetEase, and there was not much room for career development. I love playing games, but developing and playing games are two different things. Of course, the post demand of game development in the past two years is actually very large, because there are too few people doing game development now, resulting in NetEase games

Play relaxed the standard of r & D engineers, only require 211 or above, so, want to be engaged in game development friends, in fact, now into the big factory may be more than before.

After finishing game development, let’s talk about C++. C++ mainly focuses on the back end like Java. Although C++ is also used for most game development, the demand for C++ server side is really not as big as Java, and C++ is a little difficult to learn, so I don’t choose this direction.

Of course, students who do CV and other algorithms will use C++ now, so compared with Java, the range of positions in C++ direction may be more. However, just as Java can also do big data development, the choice of direction is not to choose the language, such as game development or algorithm direction, you need to learn far more than C++, do big data, Java is only a small part of the direction.

In addition, there are also many opportunities for the front end, testing, mobile terminal and other directions. The learning difficulty of these directions may be a little bit easier, so many girls will choose these directions. If you want to enter a big factory but are not very confident about yourself, then these directions are also very good choices.

Should graduate students do algorithms?

Now let’s talk about the hot direction of artificial intelligence and machine learning. To be honest, the most difficult part of this direction lies in theoretical knowledge, that is, machine learning theory, algorithm model, statistical knowledge and so on. The reason why so many people flock to this direction is largely because the salary is high and the work intensity is lower than engineering direction.

However, such a popular direction, how competitive is needless to say, the algorithm of giant post resume to countless more, you don’t have paper for your endorsement, internship, or game, basically even can not resume screening, even if your resume is very beautiful, but most of the time due to the demand for jobs is not much, as long as you are not particularly good, can be arranged to the research and development, This is also the experience of many of my classmates. Another point is that PhD graduates with a lot of algorithms will also compete with you, which is a bit scary. In short, algorithms are still more difficult than R&D, whether it is the difficulty of learning, the difficulty of interviewing, but also the degree of competition, are more obvious.

Algorithm, many people feel that the graduate school should do undergraduate students to do research and development, I can’t agree with, because the main or also the individual actual situation, if you want to go to, then at least bachelor degree will have a very solid foundation strength, it is difficult for most of the students, if you are not famous, I think in the difficulty of large or larger.

Many universities undergraduate background can get big development offer, then they will feel that it is not necessary to attend graduate school, but for me this cross major, graduate student is I start the first step, there is no comparable with them, so for me to start from scratch, do research and development more than algorithm depends on spectrum, for many people who turned to the programmer, For the same reason, we should choose a position that is more in line with our own strength and not aiming too high.

The above content is purely personal opinion!

How did I learn Java?

Coach, I want to learn Java!

How to learn Java, a simple proposition, I myself also toss about for several years, although I can not say that Java master, but also a little success, at least not understand some basic concepts and technical principles.

It has been almost 4 years since I first listened to the teacher’s JAVA course in class in my junior year. Looking back, I can say that my learning process is full of hardships, but I am making continuous progress. The so-called road is tortuous and the future is bright, which is basically what I mean.

The first method: take classes

Have a class here, still refer to the course in the school commonly, do not include training class. The Java curriculum in the school is generally relatively simple, the curriculum content is not too much, but for us at the beginning of these white, or very difficult.

When it comes to basic data types, ints, doubles, and floats take up a few bytes each, we don’t know why. When it comes to object orientation, classes, and interfaces, we don’t know why. To the end of the term, we brush questions, back the answer, so too, who did not put these knowledge too heart.

Probably the vast majority of people’s university Java courses are so learned, can only be regarded as a beginner, is to open the door to the new world for xiaobai.

Second: watch videos

The difference between attending class and watching videos is that watching videos is a self-taught process, so you can follow the course by yourself and complete the exercises together.

When I was just learning Java, I liked watching videos very much. It was very easy and I could watch the parts I didn’t understand over and over again. Although the efficiency was not high and the video quality was uneven, it was very friendly to beginners.

Over time, you’ll get used to learning by watching videos, and find your favorite course videos, try to speed them up, complete some exercises with them, and constantly improve yourself.

The third way: training

Training classes and university classes are different, the overall teaching speed is very fast, and pay more attention to practice, after all, they claim to be “crash course”, “including employment”, must ensure the speed of teaching, at the same time as soon as possible to cultivate students’ practical ability.

I haven’t really attended a training class, but the school asked us to participate in a one-week short-term training on Android. Actually, the teaching method is similar to that of the training class. The teacher will make PPT and take it with us to study, and explain it while typing code, which is quite interesting. In just one week, we’ve had an overview of Android’s basic controls and programming methods.

The fourth method: read

All say outstanding programmer is always want to read a book, there is Yan Ruyu also have gold room in the book, more programmers need to learn some basic knowledge and technical principle most. As a Java engineer, for example, you have to read Understanding the JVM or you’ll never get to the next level. You don’t know how it works, but you like to jump right into projects, which are like castles in the air.

Reading a book, need to consume time, energy, need you very carefully interpret the meaning of those professional nouns, so reading difficulty is often a very high threshold. But, as anyone who has read it knows, you have to stick it out to get the real knowledge you want.

Number five: read blogs

Blog, I do not know when, has become the most active territory of technical people, in blog park, CSDN, or nuggets, segmentfault and other technical communities, you can see some good technical articles, which are often the predecessors through reading, actual combat after refining things.

The quality of blogs varies, but if you can find good ones, it’s much easier than trying to summarize them yourself.

Sometimes you can’t read a book, so read a blog instead.

Number six: Blog

I admire from the bottom of my heart those who can write excellent technical articles. They always extract concepts very accurately and summarize them. Some can even turn these boring knowledge points into vivid stories or cartoons.

There are a lot of such big cattle, such as Liu Xin teacher, programmer small grey.

One of the biggest benefits of blogging is that it helps you learn more about what you’re writing about. Scientific research shows that teaching your knowledge to others is the most effective way to master it yourself.

In this respect, I am inferior to them. I have only written some superficial Java articles, but in addition, I cannot write any in-depth technical articles. I hope that after several years of technical accumulation, I can also write high-quality articles like them.

Conclusion:

What they all have in common is that you need practice, whether it’s in books, on blogs, on your own, by referring to others, and ultimately by reinforcing it with practice.

Choose your own method, do not follow the trend, do not insist, but please insist.

For more content, please pay attention to wechat public number [Java Technology Lake]

Technical station of an Ali Java engineer. Author Huang Xiaoxi, focus on Java related technology: SSM, SpringBoot, MySQL, distributed, middleware, cluster, Linux, network, multithreading, occasionally talk about Docker, ELK, but also share technical dry goods and learning experience, committed to Java full stack development! (pay attention to the public after the reply “Java” can get the Java base, advanced, free learning materials, and so on the project and the architect is more popular technology such as database, distributed, micro service learning video, rich in content, both theory and practice, and also will give the author original Java study guide, dry goods, such as a Java programmer interview guide resources)