<>java Xiaobai should pay attention to his work

<> Problem solving ability

Problem solving ability is often the most important , Whether you can solve problems often determines whether you can stay in the company , Here's how to solve the problem

<> Pay attention to details

* Don't panic when you make mistakes , have no idea what to do with one 's hands and feet , I don't know where to start to solve the problem , Looking at the red face, I was stunned , First, we should try to narrow the error range as much as possible , Only the smaller the scope, the easier it is to locate our problem
* Interface error , We push information from the interface to our code , Estimate our wrong location
* But the steps to solve the problem are the opposite , We need to debug from the database , Then look at the code logic and whether there is a problem in writing , Be sure to pay great attention to details , Mistakes are often made in detail
* For example, the database information is wrong ,sit library , Result link dev library , This is that the data will not be correct in any case
* Field mapping error , It does not correspond to the field in the database
* Entity correspondence error , The returned is not the same entity , But their two names are very similar , Cause error
* Get data from the front end , If required, non empty judgment shall also be conducted under certain conditions , Null pointer exceptions may occur
* The conversion between data should also be determined , Otherwise, type conversion exceptions will occur
<> Print log

* Be sure to print the log in the appropriate place
* The log will help us determine the location information , And check for errors
* When printing the log, you should also search the full text , Look at what others write , Don't take it for granted , It's easy to make mistakes , And it's hard to find out
<> Self test

This is not about self-test after writing an interface , But after writing a small function, conduct self-test , Because your level is not very high , Can't do many things without mistakes , If you can do it , Then you're not a novice
* such as , We wrote a function to get the first or last day of the month , How do we know we're not writing correctly , The most direct thing is to try whether we can correctly get the first or last day of any month
* adopt public static void main(String[] args){} Test , Then delete it
* There will be no problem with small functions , Problems with large functions , You can also know which code will not cause problems , So as to eliminate errors quickly
<> Code style

* Code style must be paid attention to , Each project has its own style , Don't write what you want , You don't know style , But the code is in your own hands , have a look , Just copy and paste it
* QC Code time , Write according to your own ideas , It's easy for others to know you're a rookie
<> Learn to copy

* We are code movers , Not the creator of the code , Yard farmer decides whether you can work or not , It's not your creativity , It's how fast you move the code
* But be sure to copy , What's the use of copying a bunch of mistakes
* All first look at other people's code , Code see ten thousand lines , Copy like a God , You can't be wrong