July 2018, when junior summer vacation was underway, time flew by and it's been a month since I arrived over here for my internship.
Before I had a job, I used to think thatThe code for a production project will be very different from what I usually practice on my own.。
Thought the production project code what will be standardized a lot, such as in the interface will do a lot of security work (self-study practice when you do learn a similar case), code design will have a lot of design patterns application.
But in reality, it's not as imagined. There is not much difference with the previous usual practice, and the code of the production project can not write the flower, the parameters of the interface is not much checksum, and even found that a lot of places arebad smell。
The biggest difference isIt's a lot of code., with a hundred or so densely packed tables lying in the database, the code on theController
/Service
/Dao
There are enough of them to fill the entire screen.
There will be some previously unlearned tech stacks that come up in the process, such aslombok
/svn
/swagger
etc., but these are well learned and not a big deal.
It's SQL that's been giving me a headache lately.SQL is really hard to write. I thought I was writing Java, but most of the time I go for SQL.
I was trying very hard to understand how the underlying database tables corresponding to the interfaces I was responsible for were designed, but never quite grasped it.
All I know is that I can look up this field in this table and that field in that table, and whatever data the front end wants, I'll just correlate the two tables and look it up together.
It's not unusual for an interface to go out with data that has 5 or 6 tables associated with it at the bottom.
I don't know why some of them are related, anyway, when I see the history code is written like this, I just copy it and it's done.。
As usual.Don't mess with the historical code, just add to it, unless it was actually reported as buggy by the test girl.
The performance of the interface does not have any requirements, write out the SQL index does not index anything, do not need to worry about me, the interface can be out of the data, I am successful.
There was a need that made me tingle, too.Both to get the aggregated value of the detail and to display the corresponding detail dataI'm not sure I'm going to be able to do that.
I mulled over the SQL for two days and couldn't get it to work, then I went straight to the leader and said this is what I'm stuck on and asked him to help me.
"Didn't we have a requirement a couple days ago? We need to count the number of goods replenished in each vending machine aisle, and we need to query the specific goods in each aisle, and then we need to display the goods in pages, but I haven't written the SQL for it."
He mulled it over, said he'd look at it for me, and then told me to train more SQL-related questions.
I went back to my workstation to continue figuring things out.The only thing that comes to mind for training SQL-related skills is LeetCode. Didn't realize I had to brush up on SQL at LeetCode.
After a couple of hours, he called me to his workstation and sent me a SQL to see if it would work and fit the needs.
I don't even have to run sql, which obviously doesn't work. (Turns out he couldn't write it either)
I said to the boss, "No, this is only statistical information, but also to show the details of the sku.I'm going to go with your SQL, and on top of that I'll think about it“
In the end, INesting multiple subqueries, combiningconcat
cap (a poem)group_concat
fulfillmentThe information is queried and then the assembly of the data is done by parsing the string in the program.
It's not easy to write this, I don't feel like I've made much progress in my Java skills, but my SQL skills have improved a lot.
The system seems to use SpringCloud, but I don't see any place for remote calls, and SpringCloud is only visible to him in the configuration file, but I'm learning it in my spare time. I'm finally getting my foot in the door of the distributed/microservices world.
The rest is nothing special, come and go are for the backend to do some additions, deletions and changes, there is not much opportunity to get in touch with the advanced technology stack.
Been on the job for a month.It feels really good to get a paycheck., the administration is a paypal transfer, a solid 3500 transfer on paypal.
《bottom layer programmer"My story continues to be serialized...