|
|
|
|
|
by riveralabs
4401 days ago
|
|
Copy/Paste is OK as long as you understand the code. If the code is elegant and you know what's happening there's no need to change it. I would argue that the problem is not the copy/pasting but where to paste the code. As an iOS developer I download a lot of code samples from the Apple Development Website. In many cases on these samples the developers put a lot of code in Controllers to show how things are done. Beginner developers will usually copy/paste the code as is in the controller and believe what it does by faith. An experience developer should understand that the code was put in the controller for educational purposes and place the code where it belongs. A Model, Singleton, or leave it in the controller if it makes sense. |
|