I graduated in July last year and worked in my current company , It's been about eight months now ; As a little white who has almost no internship experience before, he came to work after graduation , I have experienced a lot during this period , Here is a summary , Not only encourage myself, but also give some help to many students who have just come out to work with the same confusion .

        I still remember that I was hardly assigned any project tasks in the first month before I came to work in the company , Let me see relevant documents every day , During this period, I was arranged to write requirements documents twice , I can't say I wrote it myself , Yes, a template was given , Just change it according to that template . Not bad at first , Read some documents every day , Then come by yourself csdn Read the blog about what you want to know , But as time goes on , I don't know why I am more and more anxious , I'm worried about why the company hasn't arranged some simple projects for me to practice for nearly a month , In case you wait until later to go directly to the project , It may not work well or something ; At that time, I was covered by such a similar negative emotion , So I can't read the articles , Getting scared every day ; The most important thing is that each member of each group in our department needs to report on their work in the form of Tencent meetings , I talked about reading learning documents every day the previous month , But I can't see it myself , I don't know what I'm doing , So the daily work report in the morning is also a cause of anxiety .

        Finally, I was assigned a small independent project , The general content is to query and summarize some accounting data, do some detailed calculation, import and export, etc ; Now it's easy to think about it , But it was still difficult for me without internship experience , This may also be because at that time, I was so overwhelmed by the inexplicable anxiety that I was unable to think about myself ; So I didn't read the requirements documents carefully when I started the project , Just start writing code , It is conceivable that the code is well written ’ rotten ’, Later, I was criticized by the demand experience , Said I didn't even read her requirements document , All the functions that need to be implemented are missing ; During this period, I often asked my tutor some questions that I didn't understand , Whether technical or business requirements ; In retrospect, I'm really sweating for myself , I really ask my tutor every question , There are some very simple needs to ask the tutor , But I can only say that I was lucky to meet a great mentor , Even if I even ask such a simple and explosive question , He didn't show impatience , Also answer for me one by one , My tutor is really good .

        This is my first project , I have also done several other projects in succession , They are all done by the division of labor with some of the company's predecessors , Mainly because they took me , If you don't understand the problem, you can ask them in time . The status of projects during this period is not very good , As long as there are projects to do , I was scared , I'm afraid I can't do it well , The whole person is also in a very chaotic state . After about four months , I found myself feeling different ’ silly ‘ Yes , Not only do people become timid, but they also don't like thinking , In short, I feel that I have become a lot more dull . At this time, I found it impossible to go on like this , So from then on, I picked up the textbooks I learned in college every night and read them for about two hours , Do the exercises at the end of each chapter again , Because I think I have to force myself to think if I want to change my current state , We should not only settle down to read, but also think more , It turned out to be useful , I also began to get rid of the state of being extremely anxious all the time .

        There was another turning point for me , Of course, it's just one time I think it's very helpful for me ; This happened when I kept reading for almost a month ; Lying in bed that night, I suddenly thought that the code I wrote seemed to be written in dao layer , But it is obvious that our current projects are based on a three-tier architecture , This is the time to realize the seriousness of the problem , So every time I have time, I open the code of the project I wrote before , Start refactoring the code , Step by step, the code of business logic is extracted and put into role layer ( The business logic layer of our company is called role layer , That's what we often say service layer ), then dao Layer only sql Statement and execution of dealing with database sql Some methods of statement . During refactoring, I also started to read some code written by the company's predecessors , Learn some code specifications and formats . It took about a month to refactor all the code of the previously written project , Pay attention to the code format and specifications . Then when I look at these codes, I feel a pleasant feeling , Finding the code format and specification and paying attention to the code written later can bring me a happy mood , Instead of the fear and anxiety about the project as before , I hope there are items to write , Want to constantly experience the pleasure of writing good code .

        That is, start with the code of the project you wrote before you started refactoring , I found my whole life better , That kind of fear and anxiety every day is gone , People have become thinking ; Then I felt that I had done a good job in the following projects

        Then some of the good code habits and specifications I realized during refactoring the code I wrote before are :1, Write code in layers , The code of the control layer is written in the control layer , The code of business logic is written in the business logic layer , The code to access the database is written in dao layer , This will make your code organized and structured ;
2, Don't write too long for each line of code , Wrap appropriately , The number of lines of code in a method cannot be too long , If it is too long, you can extract some of the processing methods and put some small methods into the main method call , This makes the code look neat and comfortable ;3, Code must write more comments , This must be noted , Because we do a lot of things every day , Write a lot of code , Without notes , After a period of time, I will find that I can't understand it , If you have notes, you will follow the notes you wrote for the second time , It will come to mind soon ; This is not only convenient for self maintenance, but also convenient for others to maintain their own code ;4, Another point is to remember to log in the appropriate location of the code , In this way, you can find the problem through the log file when there is a problem in the test environment project , Easy troubleshooting ; In fact, there's one more thing that needs to be interrupted ( Both front-end and back-end ), But everyone should know that ( Except for me debug My tutor taught me patiently when I first came to the company , Not before , Dog head protects life );5, Another point is that you must read more requirements documents before you start writing code , Only after we understand the requirements document , We will have a general understanding of the overall development idea of this project , To write the correct code , Otherwise, the code may need to be modified later ;6, Last but not least , We should form the habit of reading more books , What I said about reading more is to read carefully when reading , Think more about what you don't understand , And every day , This enables us to constantly strengthen our ability to think and solve problems while accepting new knowledge every day .

        This is my experience of working for more than half a year after graduation from University , In fact, during the period, I was forced by the anxiety at that time to escape from reality by resigning to take the postgraduate entrance examination , But I was enlightened by my roommate ( He came a year before me ), Pointed out my problems and the reasons for my feelings , I really appreciate my roommate now ; But now in this sober state , In fact, postgraduate entrance examination is also a good choice .

©2019-2020 Toolsou All rights reserved,
【C++ Must see for entry 】C++ from 0 reach 1 Introductory programming axios Interceptor packaging and use Spring Boot Interview must ask : Automatic configuration principle VMware 16 install centos 7 Detailed tutorial C Language data structure - Sequence table delete duplicates V2.0.0 The 12th Blue Bridge Cup c++b Group personal problem solving On sending data from serial port single chip microcomputer to upper computer centos7 install RabbitMqjava Polymorphic array of opencv-python Fourier transform and inverse transform