Programmer: Driving a car, do I need to know the principle of a car to drive a car well?

Confusion of a netizen:

    I have been working for 5 years and have been working on J2EE projects. I went for an interview a few days ago. One person asked me how many JDBC connection methods are available. I have never encountered this problem for so many years. I don't know what you think.

    There is another problem, which is the time complexity of the halving search. This problem was definitely true when I just graduated from university, but after so many years, I have never considered such a problem. I don't know if anyone has encountered such a thing in the J2ee project.

    In addition, during the interview, the company will give some principles about how the transactions in SPring are implemented, how AOP is implemented, not how it is used, but how it is implemented in the spring code.

  To be honest, this question is very deep and very good, but I have worked for so many years and used Spring and Hibernate for so long, and I have never cared about how it is implemented internally. I have a question. I want to use a tool, for example, driving a car. Do I need to know how many strokes the engine is, who designed it, what is the principle of the design, why it is designed this way, what material is designed, and know these Can i drive the car

 

My reply:

    I am a longer rookie, I will apply for a look:

    A person asked me how many ways to connect to JDBC

    Answer: I think he asked about several modes of JDBC, such as Type 1 to Type 4. I really can't tell the specifics. What is certain is that Type 4 is developed in pure Java, one of which is jdbc -odbc bridge, the other is for remote connection of web page links (applet), and the last is for local component cli. We generally choose Type4 drivers because there is no need to install a dedicated client for the database.

 

    Time complexity of binary search

    Answer: I am a field army, I don't understand what is called half search, and I don't know what is called complexity. So it is 0 points. Because I don't need to know this, as the host said, I have never used these things in the project. If I have encountered them, I just need to look up the book and check the information.

 

   How is the transaction in SPring realized, and how is AOP realized

    Answer: I haven't read the source code carefully, but for transactions, it must be to maintain a database connection related to the current thread or session. When the transaction starts, start the connection and set setAutoCommit(false). At the end of the transaction, commit Or roll back the transaction. As for AOP, I understand that through code refactoring and repackaging, some code runs first, then the original code, and finally some code. So all the AOPs I saw cut in before and after the method, I really haven't seen cut in the middle. Ha ha!

 

   To drive a car, do I need to know how many strokes the engine is, who designed it, what is the principle of the design, why it is designed this way, and what material it is designed for, and knowing these can I drive the car well?

 

  Answer: If what we are doing is designing a car, then we must be familiar with it. If what we are doing is repairing a car, then we also need it. However, we are not driving. Those end customers who use our software drive the car, and we programmers are the vehicle assembly engineers. Our task is to select the appropriate vehicle components, then perform the correct assembly, and deliver it to the end user on time.

Guess you like

Origin blog.csdn.net/java2000_net/article/details/5427883