How do programmers practice code reuse

前端 未结 14 1281
天涯浪人
天涯浪人 2021-02-13 14:14

I\'ve been a bad programmer because I am doing a copy and paste. An example is that everytime i connect to a database and retrieve a recordset, I will copy the previous code and

14条回答
  •  广开言路
    2021-02-13 14:25

    Try and get into the habit of using other people's functions and libraries.

    You'll usually find that your particular problem has a well-tested, elegant solution.

    Even if the solutions you find aren't a perfect fit, you'll probably gain a lot of insight into the problem by seeing how other people have tackled it.

提交回复
热议问题