So I have been doing ipad swift playgrounds for about a week now. Ive been doing c# with unity for about a year and I have been taking the approach of just making it work.
However the playground kept saying in the exercises to create the most efficient code I can think of to solve the solution. And while it did take more brain work I was able to find ways to do the tasks with much less code.
Now, prior to playgrounds it never occurred to me to do this since I am self taught and no one ever told me. So it got me thinking about the concept of making it work and being fast, or making the code more efficient at the cost of speed.
Should I always go with the cleanest and most efficient code I produce or are there situations where just getting it working is preferred?
However the playground kept saying in the exercises to create the most efficient code I can think of to solve the solution. And while it did take more brain work I was able to find ways to do the tasks with much less code.
Now, prior to playgrounds it never occurred to me to do this since I am self taught and no one ever told me. So it got me thinking about the concept of making it work and being fast, or making the code more efficient at the cost of speed.
Should I always go with the cleanest and most efficient code I produce or are there situations where just getting it working is preferred?